-
Notifications
You must be signed in to change notification settings - Fork 15
Add update service node page for docker in Lisk Service v0.7.0 #1850
Changes from 21 commits
7307f65
37152f6
2c459e5
3259fc0
cedcda9
5f339fa
1923681
cc32413
7cdac5a
82333dd
e81abd0
25a3308
13739cc
8c5cc8c
e82704a
1f136ae
e782520
3d612a1
eece577
c03b016
da0f0bd
4903212
7d897f6
aeeb162
2dd0e21
516c763
3ce876a
5f2ae7c
e2d4dd8
e0b7368
88ecfb2
2126e73
773b3ab
51222c9
aaefb4d
1cbda96
469bc53
68fea38
730a367
b596062
7cf1835
b1bb6be
ee83af0
f981e0a
acc325e
c61d27d
68b7ab3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,24 @@ Mona Bärenfänger <[email protected]> | |
:url_FLUSHALL: https://redis.io/commands/FLUSHALL | ||
:url_snapshot_config: configuration/index.adoc | ||
:url_backups: management/snapshots.adoc | ||
:url_rel_notes: https://github.com/LiskHQ/lisk-service/releases/ | ||
|
||
|
||
== Build Docker image | ||
|
||
.Inside the lisk-service root folder | ||
---- | ||
make build | ||
---- | ||
This creates the necessary Docker images to start Lisk Service in the containers. | ||
|
||
== Start | ||
|
||
.Inside the lisk-service root folder | ||
---- | ||
cp ./docker/example.env .env | ||
---- | ||
---- | ||
make up | ||
---- | ||
|
||
|
@@ -204,10 +217,126 @@ If you wish to take a snapshot of your Docker installation, the details can be f | |
|
||
== Logging | ||
|
||
To check the logs for the different microservices of Lisk Service, use the command `docker container logs CONTAINER`, where `CONTAINER` is the respective Docker container that holds the logs you wish to view. | ||
The possibility exists here to either use the `docker` commands or the `make` commands to check the logs, and both options are listed here below. | ||
|
||
For `docker`, to check the logs for the different microservices of Lisk Service, use the command `docker container logs CONTAINER`, where `CONTAINER` is the respective Docker container that holds the logs you wish to view. | ||
|
||
For example, to see the logs for the Gateway microservice, execute the following command: | ||
|
||
---- | ||
docker container logs lisk-service_gateway_1 | ||
---- | ||
|
||
To check the logs for different microservices using the `make` commands, the following commands listed below can be used: | ||
|
||
.Displays the logs for all the microservices that have been logged so far, and that are currently existing | ||
---- | ||
make logs | ||
---- | ||
|
||
.Displays the latest logs for all the microservices | ||
---- | ||
make logs-live | ||
---- | ||
|
||
.Displays the logs for the specified microservice. | ||
---- | ||
make logs-blockchain-connector | ||
---- | ||
In the above example, it will display logs only for the `blockchain-connector` microservice. | ||
|
||
.Displays the latest logs for the specified microservice. | ||
---- | ||
make logs-live-blockchain-connector | ||
---- | ||
In the above example, it will display latest logs only for the `blockchain-connector` microservice. | ||
|
||
|
||
Replace the `blockchain-connector` with the specific service name required. | ||
|
||
|
||
== Upgrade Lisk Service | ||
|
||
To upgrade the Docker container to a desired version, please follow one of the two options below. | ||
chris529 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
==== Option A - Download pre-built images from DockerHub | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Option A should be the recommended way to upgrade Lisk Service, imho Option A and B should be switched, because B looks easier There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, imho it would be nice to use tabs to switch between Option A & B There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I have now added tabs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'd prefer that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK |
||
|
||
. Update `docker-compose.yml` to download the specific image versions from the DockerHub as shown below. Update the `0.7.0` tag against the specified images with the desired version. | ||
chris529 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
---- | ||
chris529 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
blockchain-app-registry: | ||
image: lisk/service_blockchain_app_registry:0.7.0 | ||
... | ||
|
||
blockchain-connector: | ||
image: lisk/service_blockchain_connector:0.7.0 | ||
... | ||
|
||
blockchain-indexer: | ||
image: lisk/service_blockchain_indexer:0.7.0 | ||
... | ||
|
||
blockchain-coordinator: | ||
image: lisk/service_blockchain_coordinator:0.7.0 | ||
... | ||
|
||
transaction-statistics: | ||
image: lisk/service_transaction_statistics:0.7.0 | ||
... | ||
|
||
fee-estimator: | ||
image: lisk/service_fee_estimator:0.7.0 | ||
... | ||
|
||
gateway: | ||
image: lisk/service_gateway:0.7.0 | ||
... | ||
|
||
market: | ||
image: lisk/service_market:0.7.0 | ||
... | ||
|
||
export: | ||
image: lisk/service_export:0.7.0 | ||
|
||
---- | ||
|
||
. Stop Lisk Service | ||
+ | ||
---- | ||
make stop | ||
---- | ||
NOTE: In case the database needs to be flushed please execute the `make down` command instead. Please check the {url_rel_notes}[release notes] for the relevant version to see if the existing databases need to be flushed. | ||
chris529 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
. Start Lisk Service in the containers. | ||
+ | ||
---- | ||
make up | ||
---- | ||
|
||
|
||
==== Option B - Build images locally | ||
|
||
Build the images locally using the following steps. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At what point does it describe how to download and install the new version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like the step to run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done as suggested 👍 |
||
Navigate inside the lisk-service root folder, and execute the following commands. | ||
|
||
. Stop Lisk Service | ||
+ | ||
---- | ||
make stop | ||
---- | ||
NOTE: In case the database needs to be flushed please execute the `make down` command instead. Please check the {url_rel_notes}[release notes] for the relevant version to see if the existing databases need to be flushed. | ||
|
||
. Build the required updated Docker images. | ||
+ | ||
---- | ||
make build | ||
---- | ||
|
||
. Start Lisk Service in the containers. | ||
chris529 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
---- | ||
make up | ||
---- | ||
|
||
To verify the microservice logs, please refer to the <<Logging>> section. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ Mona Bärenfänger <[email protected]> Muhammad Talha <muhammad.talha@lightcurv | |
// External URLs | ||
:url_pm2_docs: https://pm2.keymetrics.io/docs/usage/quick-start/ | ||
:url_FLUSHALL: https://redis.io/commands/FLUSHALL | ||
:url_pm2_management: https://pm2.keymetrics.io/docs/usage/log-management/ | ||
:url_backups: management/snapshots.adoc | ||
|
||
//TODO: add in link to new Backups page for importing the DB snapshot manually | ||
|
@@ -103,6 +104,7 @@ Alternatively, it is also possible to check the logs for a specific PM2 process | |
For example, `pm2 logs 0` can be used to check the Lisk Service Gateway logs. | ||
|
||
TIP: The process ID of each PM2-managed process can be seen by executing the <<list>> command. | ||
To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation]. | ||
|
||
For example, to see the logs for the Gateway microservice, execute the following command: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this needs t be done every time Lisk Service is started, so it doesn't really fit here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point Mona...I checked with @nagdahimanshu earlier, and he recommends that we should leave it here as it can be beneficial when Lisk Service is started for the first time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this is not about starting it for the first time, it is about how to start it in general. I don't think you need to do it every time you start Lisk Service. So it shouldn't be mentioned here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We advice that the user performs this step (sets the
.env
file for all the necessary environment variable configuration) when starting the Lisk Service on with Docker Compose for the first time. Alternatively, they canexport
the necessary environment variables on the terminal before starting the containers which can be quite cumbersome.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, this is not about starting for the first time. This step is already included at the right location, which is the setup guides: https://liskhq.github.io/lisk-docs/lisk-service/0.7/setup/docker.html#connecting-lisk-service-to-a-blockchain-node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is about managing the Lisk Service docker setup. So, I think, it is relevant to maintain the necessary environment variables with the
.env
file. Alternatively, users canexport
the native environment variables which could be quite messy and inconvenient. If you prefer not having it here, you can remove the section but share a link on how to maintain the necessary environment variable information.