This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
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
Merged
sameersubudhi
merged 47 commits into
release/0.7.0
from
1570-add-update-service-node-page-for-docker
Oct 20, 2023
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
7307f65
Update index.adoc
chris529 37152f6
create-update-docker.adoc
chris529 2c459e5
update-in-update-docker.adoc
chris529 3259fc0
update-in-update-docker.adoc
chris529 cedcda9
update-in-update-docker.adoc
chris529 5f339fa
Revert "Update index.adoc"
chris529 1923681
update in update-docker.adoc
chris529 cc32413
create-new-page-update-source.adoc
chris529 7cdac5a
update-in-both update-docker.adoc-and-docker.adoc
chris529 82333dd
update-in-source.adoc
chris529 e81abd0
update-in-source.adoc
chris529 25a3308
removed update-eisting-node
chris529 13739cc
update-in-docker.adoc
chris529 8c5cc8c
update-in-docker.adoc
chris529 e82704a
update-in-source.adoc
chris529 1f136ae
update-in-source.adoc
chris529 e782520
update-in-source.adoc
chris529 3d612a1
update-in-docker.adoc
chris529 eece577
update-in-source.adoc
chris529 c03b016
Merge branch '1570-add-update-service-node-page-for-docker' into 1571…
chris529 da0f0bd
update in source.adoc
chris529 4903212
update in source.adoc
chris529 7d897f6
Update docs/antora/modules/ROOT/pages/management/docker.adoc
chris529 aeeb162
Update docs/antora/modules/ROOT/pages/management/docker.adoc
chris529 2dd0e21
Update docs/antora/modules/ROOT/pages/management/source.adoc
chris529 516c763
Merge branch 'release/0.7.0' into 1570-add-update-service-node-page-f…
chris529 3ce876a
update in docker.adoc
chris529 5f2ae7c
update in source.adoc
chris529 e2d4dd8
update in source.adoc
chris529 e0b7368
Merge branch '1570-add-update-service-node-page-for-docker' into 1571…
sameersubudhi 88ecfb2
update in docker.adoc
chris529 2126e73
update in source.adoc
chris529 773b3ab
update in docker.adoc
chris529 51222c9
Update docs/antora/modules/ROOT/pages/management/docker.adoc
chris529 aaefb4d
Update docs/antora/modules/ROOT/pages/management/docker.adoc
chris529 1cbda96
Update docs/antora/modules/ROOT/pages/management/source.adoc
chris529 469bc53
Update docs/antora/modules/ROOT/pages/management/source.adoc
chris529 68fea38
update in source.adoc
chris529 730a367
Update docs/antora/modules/ROOT/pages/management/docker.adoc
chris529 b596062
Update docs/antora/modules/ROOT/pages/management/docker.adoc
chris529 7cf1835
Update docs/antora/modules/ROOT/pages/management/docker.adoc
chris529 b1bb6be
update in doker.adoc
chris529 ee83af0
update in docker.adoc
chris529 f981e0a
update in docker.adoc
chris529 acc325e
Update docs/antora/modules/ROOT/pages/management/source.adoc
chris529 c61d27d
Update docs/antora/modules/ROOT/pages/management/source.adoc
chris529 68b7ab3
Merge pull request #1853 from LiskHQ/1571-add-update-service-node-pag…
sameersubudhi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
:url_tags: https://github.com/LiskHQ/lisk-service/tags | ||
|
||
== 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,147 @@ 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 the 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. To find all the tagged versions for Lisk Service, please check the {url_tags}[available tags] on GitHub. | ||
|
||
[tabs] | ||
==== | ||
Option A - Download pre-built images from DockerHub:: | ||
+ | ||
-- | ||
. 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. | ||
|
||
. Checkout the version with *`git checkout <tag>`* | ||
+ | ||
---- | ||
git checkout v0.7.0 | ||
---- | ||
|
||
. Update `docker-compose.yml` to download the specific image versions from the DockerHub as shown below. | ||
Update specified images with the desired version, for example `0.7.0`. | ||
+ | ||
.docker-compose.yml | ||
[source,yaml] | ||
---- | ||
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 | ||
|
||
---- | ||
|
||
. 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. | ||
|
||
. Checkout the version with *`git checkout <tag>`* | ||
+ | ||
---- | ||
git checkout v0.7.0 | ||
---- | ||
|
||
. Build the required updated Docker images | ||
+ | ||
---- | ||
make build | ||
---- | ||
|
||
. Start Lisk Service in the containers | ||
+ | ||
---- | ||
make up | ||
---- | ||
-- | ||
|
||
==== | ||
|
||
To verify the microservice logs, please refer to the <<Logging>> section. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,11 @@ 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 | ||
:url_rel_notes: https://github.com/LiskHQ/lisk-service/releases | ||
:url_tags: https://github.com/LiskHQ/lisk-service/tags | ||
|
||
|
||
//TODO: add in link to new Backups page for importing the DB snapshot manually | ||
|
||
|
@@ -19,6 +23,9 @@ For more details about PM2, see {url_pm2_docs}[PM2 docs]. | |
|
||
Moreover, we'll also talk about the steps to reset a Lisk Service node. | ||
|
||
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]. | ||
|
||
|
||
== Various PM2 commands | ||
|
||
=== Start | ||
|
@@ -103,6 +110,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: | ||
|
||
|
@@ -367,3 +375,104 @@ redis-cli -n <db_number> flushdb | |
==== | ||
|
||
You can start Lisk Service again with the <<start>> command. | ||
|
||
|
||
== Upgrade Lisk Service | ||
|
||
To upgrade Lisk Service to a desired version, please follow the steps listed below. To find all the tagged versions for Lisk Service, please check the {url_tags}[available tags] on GitHub. | ||
|
||
. Stop the existing running version of Lisk Service. | ||
+ | ||
---- | ||
pm2 stop ecosystem.config.js | ||
---- | ||
+ | ||
.Response | ||
[%collapsible] | ||
==== | ||
.Example output | ||
[source,bash] | ||
---- | ||
[PM2] [lisk-service-blockchain-app-registry](1) ✓ | ||
[PM2] [lisk-service-gateway](0) ✓ | ||
[PM2] [lisk-service-blockchain-indexer](3) ✓ | ||
[PM2] [lisk-service-blockchain-connector](2) ✓ | ||
[PM2] [lisk-service-blockchain-coordinator](4) ✓ | ||
[PM2] [lisk-service-fee-estimator](5) ✓ | ||
[PM2] [lisk-service-transaction-statistics](6) ✓ | ||
[PM2] [lisk-service-market](7) ✓ | ||
[PM2] [lisk-service-export](8) ✓ | ||
┌------------------------------------------------------------------------------------------------------------------------------------------------------------------------┐ | ||
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ | ||
├------------------------------------------------------------------------------------------------------------------------------------------------------------------------┤ | ||
│ 1 │ lisk-service-blockchain-app-registry │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 32 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
│ 2 │ lisk-service-blockchain-connector │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
│ 4 │ lisk-service-blockchain-coordinator │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
│ 3 │ lisk-service-blockchain-indexer │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 32 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
│ 8 │ lisk-service-export │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
│ 5 │ lisk-service-fee-estimator │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
│ 0 │ lisk-service-gateway │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
│ 7 │ lisk-service-market │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
│ 6 │ lisk-service-transaction-statistics │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │ | ||
└------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ | ||
---- | ||
==== | ||
|
||
. Checkout the version with *`git checkout <tag>`*. | ||
+ | ||
---- | ||
git checkout v0.7.0 | ||
---- | ||
|
||
. Update the npm dependencies by executing the following command. | ||
+ | ||
---- | ||
make build-local | ||
---- | ||
|
||
. Restart Lisk Service with the following command. | ||
+ | ||
---- | ||
pm2 start ecosystem.config.js | ||
---- | ||
+ | ||
.Response | ||
[%collapsible] | ||
==== | ||
.Example output | ||
---- | ||
[PM2] Applying action restartProcessId on app [lisk-service-gateway](ids: [ 0 ]) | ||
[PM2] Applying action restartProcessId on app [lisk-service-blockchain-app-registry](ids: [ 1 ]) | ||
[PM2] [lisk-service-gateway](0) ✓ | ||
[PM2] [lisk-service-blockchain-app-registry](1) ✓ | ||
[PM2] Applying action restartProcessId on app [lisk-service-blockchain-connector](ids: [ 2 ]) | ||
[PM2] [lisk-service-blockchain-connector](2) ✓ | ||
[PM2] Applying action restartProcessId on app [lisk-service-blockchain-indexer](ids: [ 3 ]) | ||
[PM2] [lisk-service-blockchain-indexer](3) ✓ | ||
[PM2] Applying action restartProcessId on app [lisk-service-blockchain-coordinator](ids: [ 4 ]) | ||
[PM2] [lisk-service-blockchain-coordinator](4) ✓ | ||
[PM2] Applying action restartProcessId on app [lisk-service-fee-estimator](ids: [ 5 ]) | ||
[PM2] [lisk-service-fee-estimator](5) ✓ | ||
[PM2] Applying action restartProcessId on app [lisk-service-transaction-statistics](ids: [ 6 ]) | ||
[PM2] [lisk-service-transaction-statistics](6) ✓ | ||
[PM2] Applying action restartProcessId on app [lisk-service-market](ids: [ 7 ]) | ||
[PM2] [lisk-service-market](7) ✓ | ||
[PM2] Applying action restartProcessId on app [lisk-service-export](ids: [ 8 ]) | ||
[PM2] [lisk-service-export](8) ✓ | ||
┌----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┐ | ||
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ | ||
├----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┤ | ||
│ 1 │ lisk-service-blockchain-app-registry │ default │ 0.7.0-… │ fork │ 33328 │ 0s │ 16 │ online │ 0% │ 65.5mb │ XYZ │ disabled │ | ||
│ 2 │ lisk-service-blockchain-connector │ default │ 0.7.0-… │ fork │ 33331 │ 0s │ 0 │ online │ 0% │ 63.8mb │ XYZ │ disabled │ | ||
│ 4 │ lisk-service-blockchain-coordinator │ default │ 0.7.0-… │ fork │ 33341 │ 0s │ 0 │ online │ 0% │ 54.1mb │ XYZ │ disabled │ | ||
│ 3 │ lisk-service-blockchain-indexer │ default │ 0.7.0-… │ fork │ 33338 │ 0s │ 16 │ online │ 0% │ 54.3mb │ XYZ │ disabled │ | ||
│ 8 │ lisk-service-export │ default │ 0.7.0-… │ fork │ 33355 │ 0s │ 15 │ online │ 0% │ 14.1mb │ XYZ │ disabled │ | ||
│ 5 │ lisk-service-fee-estimator │ default │ 0.7.0-… │ fork │ 33346 │ 0s │ 15 │ online │ 0% │ 46.9mb │ XYZ │ disabled │ | ||
│ 0 │ lisk-service-gateway │ default │ 0.7.0-… │ fork │ 33326 │ 0s │ 15 │ online │ 0% │ 65.6mb │ XYZ │ disabled │ | ||
│ 7 │ lisk-service-market │ default │ 0.7.0-… │ fork │ 33351 │ 0s │ 15 │ online │ 0% │ 36.9mb │ XYZ │ disabled │ | ||
│ 6 │ lisk-service-transaction-statistics │ default │ 0.7.0-… │ fork │ 33348 │ 0s │ 15 │ online │ 0% │ 43.5mb │ XYZ │ disabled │ | ||
└----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ | ||
---- | ||
==== | ||
|
||
NOTE: Please check the {url_rel_notes}[GitHub release notes] for the relevant version to verify if the existing databases need to be flushed. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.