From 7307f65d0cf82df3fd9b083cfdb248e28f15e770 Mon Sep 17 00:00:00 2001 From: chris529 Date: Wed, 13 Sep 2023 17:09:09 +0200 Subject: [PATCH 01/43] Update index.adoc --- .../ROOT/pages/configuration/index.adoc | 74 +++++++++++++------ 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/configuration/index.adoc b/docs/antora/modules/ROOT/pages/configuration/index.adoc index f27c5df8a2..38fbfaddd9 100644 --- a/docs/antora/modules/ROOT/pages/configuration/index.adoc +++ b/docs/antora/modules/ROOT/pages/configuration/index.adoc @@ -296,7 +296,7 @@ By default, it is set to run every minute. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Gateway microservice +.Example environment variables for the Gateway microservice ---- module.exports = { apps: [ @@ -391,19 +391,19 @@ Only to be used when the genesis block is large enough to be transmitted over AP | `ENABLE_BLOCK_CACHING` | boolean | Boolean flag to enable block caching. -Enabled by default. +Enabled by default. To disable it, set it to `false`. | true | `EXPIRY_IN_HOURS` | number -| Expiry time in hours for block cache. +| Expiry time in hours for block cache. By default, it is set to `12` hours. | 12 | `JOB_INTERVAL_CACHE_CLEANUP` | number -| Job run interval to clean up block cache. +| Job run interval to clean up block cache. By default, it is set to 0. | 0 @@ -430,7 +430,7 @@ By default, it is set to an empty string `''`. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Blockchain Connector microservice +.Example environment variables for the Blockchain Connector microservice ---- module.exports = { apps: [ @@ -506,7 +506,7 @@ By default, it is set to run every 15 minutes. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Coordinator microservice +.Example environment variables for the Coordinator microservice ---- module.exports = { apps: [ @@ -599,7 +599,7 @@ Must match the value supplied for the `coordinator` microservice. | `INDEX_SNAPSHOT_URL` | string | URL from where the Lisk Service database snapshot will be downloaded. -| +| | `ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP` | boolean @@ -655,9 +655,9 @@ By default, it is set to run every `10` seconds. | `JOB_SCHEDULE_REFRESH_INDEX_STATUS` | string -| Job run cron schedule to refresh indexing status. +| Job run cron schedule to refresh indexing status. By default, it is set to an empty string `''`. -| +| | `JOB_INTERVAL_REFRESH_BLOCKCHAIN_APPS_STATS` | number @@ -703,7 +703,7 @@ By default, it is set to `0`. | `JOB_SCHEDULE_TRIGGER_ACCOUNT_UPDATES` | string -| Job run cron schedule to trigger account updates. +| Job run cron schedule to trigger account updates. By default, it is set to run every 15 minutes. | */15 * * * * @@ -723,7 +723,7 @@ By default, it is set to `0`. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Blockchain Indexer microservice +.Example environment variables for the Blockchain Indexer microservice ---- module.exports = { apps: [ @@ -808,7 +808,7 @@ module.exports = { | `DEFAULT_APPS` | string -| Default blockchain applications. +| Default blockchain applications. By default, it is set to `lisk_mainchain`. | lisk_mainchain @@ -850,7 +850,7 @@ By default, it is set to run every `10` minutes. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Blockchain App Registry microservice +.Example environment variables for the Blockchain App Registry microservice ---- module.exports = { apps: [ @@ -945,7 +945,7 @@ By default, it starts at the genesis height in full mode and the current block h .Sample Configurations [%collapsible] ==== -.Example environment variables for the Fee Estimator microservice +.Example environment variables for the Fee Estimator microservice ---- module.exports = { apps: [ @@ -1035,7 +1035,7 @@ By default, it is set to `0`. | `JOB_SCHEDULE_VERIFY_TRANSACTION_STATS` | string -|Job run cron schedule to verify if the transaction statistics have been built correctly. +|Job run cron schedule to verify if the transaction statistics have been built correctly. By default, it is set to run every 3rd hour after the first `15` minutes. | 15 */3 * * * @@ -1044,7 +1044,7 @@ By default, it is set to run every 3rd hour after the first `15` minutes. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Transaction Statistics microservice +.Example environment variables for the Transaction Statistics microservice ---- module.exports = { apps: [ @@ -1181,7 +1181,7 @@ By default, it is set to an empty string `''`. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Market microservice +.Example environment variables for the Market microservice ---- module.exports = { apps: [ @@ -1236,7 +1236,7 @@ For the local file system, use `*SERVICE_EXPORT_PARTIALS*` and `*SERVICE_EXPORT_ | `SERVICE_BROKER` | string | URL of the microservice message broker (NATS or Redis). -| redis://127.0.0.1:6379/0 +| redis://127.0.0.1:6379/0 | `SERVICE_EXPORT_REDIS` | string @@ -1266,17 +1266,17 @@ For the local file system, use `*SERVICE_EXPORT_PARTIALS*` and `*SERVICE_EXPORT_ | `EXPORT_S3_ACCESS_KEY` | string | Amazon S3 bucket access key for the specified endpoint. -| +| | `EXPORT_S3_SECRET_KEY` | string | Amazon S3 bucket secret key. -| +| | `EXPORT_S3_SESSION_TOKEN` | string | Amazon S3 bucket session token. -| +| | `EXPORT_S3_REGION` | string @@ -1320,7 +1320,7 @@ By default, it is set to run daily at 04:45 am. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Export microservice +.Example environment variables for the Export microservice ---- module.exports = { apps: [ @@ -1356,4 +1356,32 @@ module.exports = { ], }; ---- -==== \ No newline at end of file +==== + +=== MySQL snapshot configuration + +The MySQL snapshot relevant properties can be seen in the table below: + +[cols="2,1,~,~m",options="header",stripes="hover"] + +|=== +|Environment variable +|Datatype +|Description +|Sample + +|`ENABLE_APPLY_SNAPSHOT` +|boolean +|Enable or display apply snapshot feature. By default, the value is ... +|true + +|`INDEX_SNAPSHOT_URL` +|string +|Custom snapshot url (Expected to end with sql.gz) +|https://snapshots.lisk.io/mainnet/service.sql.gz + +|`ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP` +|boolean +|Allow insecure HTTP connections. By default, this is disabled. +|false +|=== From 37152f620ba2f70e94ac8790e3b8dbbc878c6f45 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 14 Sep 2023 10:44:38 +0200 Subject: [PATCH 02/43] create-update-docker.adoc --- .../update-existing-node/update-docker.adoc | 207 ++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc new file mode 100644 index 0000000000..ee454feeb7 --- /dev/null +++ b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc @@ -0,0 +1,207 @@ += Docker commands +Mona Bärenfänger +:description: Describes how to manage Lisk Service with Docker. +:toc: +:idseparator: - +:idprefix: +:experimental: +:imagesdir: ../assets/images +:source-language: bash +:url_config: configuration/docker.adoc +:url_FLUSHALL: https://redis.io/commands/FLUSHALL + +== Start + +.Inside the lisk-service root folder +---- +make up +---- + +This will start Lisk Service with the default configuration, which in turn will connect to a Lisk Core Mainnet node. + +In case a different node or network shall be used, xref:{url_config}[configure] Lisk Service accordingly. + +== Stop + +.Inside the lisk-service root folder +---- +make down +---- + +This will stop Lisk Service. + +== Show the status of Docker containers + +---- +docker ps +---- + +== Reset the Lisk Service database + +To reset the database of Lisk Service, drop the respective MySQL and Redis databases. + +Before resetting the database, stop Lisk Service: + +---- +make stop +---- + +Now connect to the Docker container in which you wish to reset the database. If you are not sure what to choose here, check the available containers via <>. + +To connect to the interactive shell of the MySQL Docker container in which you wish to reset the MySQL database, execute the following command: + +---- +docker exec -it lisk-service-mysql-primary-1 bash +---- + +=== Drop Database + +[tabs] +==== +MySQL DB:: ++ +-- +. Login to MySQL with the `lisk` user. ++ +---- +mysql -ulisk -ppassword +---- ++ +On successful login, you enter the MYSQL command-line client: ++ +---- +Welcome to the MySQL monitor. Commands end with ; or \g. +Your MySQL connection id is 2044 +Server version: 8.0.27 MySQL Community Server - GPL + +Copyright (c) 2000, 2021, Oracle and/or its affiliates. + +Oracle is a registered trademark of Oracle Corporation and/or its +affiliates. Other names may be trademarks of their respective +owners. + + +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. +---- +. Drop the `lisk` database. ++ +---- +mysql> drop database lisk; +---- +. Create a fresh database `lisk`. ++ +---- +mysql> create database lisk; +---- +. Log out from MySQL by typing `quit;` ++ +---- +mysql> quit; +---- + +Log out of the docker container by pressing kbd:[CRTL] + kbd:[D]. + +-- +MariaDB:: ++ +-- +MariaDB also uses the same SQL commands for querying and manipulating the relevant data, including data storage, client libraries, and replication. + +. Login to MariaDB with the `lisk` user. ++ +---- +docker exec -it lisk_mariadb mysql -uroot -p +---- ++ +On successful login, you enter the MariaDB command-line client: ++ +---- +Welcome to the MariaDB monitor. Commands end with ; or \g. +Your MariaDB connection id is 9 +Server version: 10.7.8-MariaDB-1:10.7.8+maria~ubu2004 mariadb.org binary distribution + +Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. + +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. +---- +. Drop the `lisk` database. ++ +---- +MariaDB [(none)]> drop database lisk; +---- ++ +.Result +---- +Query OK, 0 rows affected (0.009 sec) +---- +. Create a fresh database `lisk` ++ +---- +MariaDB [(none)]> create database lisk; +---- ++ +.Result +---- +Query OK, 1 row affected (0.001 sec) +---- +. Log out by typing `quit;`. ++ +---- +MariaDB [(none)]> exit; +---- + +Log out of the docker container by pressing kbd:[CRTL] + kbd:[D]. +-- +==== + +=== Flush Redis DB + +Reset the databases for Redis after dropping the MySQL database: + +.Execute command in running docker container. +---- +sudo docker exec -it lisk-service_redis_core_persistent_1 /bin/sh +---- + +.Truncate redis database. +---- +redis-cli flushall +---- + +TIP: Log out of the docker container again by pressing kbd:[CRTL] + kbd:[D]. + +[NOTE] +==== +The `flushall` command truncates all existing Redis databases: + +> Deletes all the keys of all the existing databases, not just the current selected one. This command never fails. + +For more information, check the Redis documentation: {url_FLUSHALL}[FLUSHALL]. + +To flush only a particular DB in Redis, execute the following command instead: + +---- +redis-cli -n flushdb +---- +==== + +=== Start Lisk Service + +After the databases are reset, start Lisk Service again as usual: + +---- +make up +---- + +NOTE: When Lisk Service is started again after a database reset, then the process to reindex all the data is initiated. +This can be quite time-consuming when the chain is long, spanning over hours. + +== 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. + +For example, to see the logs for the Gateway microservice, execute the following command: + +---- +docker container logs lisk-service_gateway_1 +---- From 2c459e59e842525844f5ce559705ff44878489a4 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 14 Sep 2023 11:22:42 +0200 Subject: [PATCH 03/43] update-in-update-docker.adoc --- .../ROOT/pages/update-existing-node/update-docker.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc index ee454feeb7..27d0157165 100644 --- a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc +++ b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc @@ -1,6 +1,6 @@ -= Docker commands -Mona Bärenfänger -:description: Describes how to manage Lisk Service with Docker. += Update Docker commands +Mona Bärenfänger Chris Braithwaite +:description: Describes how to manage Lisk Service v0.7.0 with Docker. :toc: :idseparator: - :idprefix: From 3259fc0bad0c9cc0891f7d58d93a2731d83401d2 Mon Sep 17 00:00:00 2001 From: chris529 Date: Mon, 18 Sep 2023 11:37:52 +0200 Subject: [PATCH 04/43] update-in-update-docker.adoc --- .../update-existing-node/update-docker.adoc | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc index 27d0157165..8c65b08775 100644 --- a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc +++ b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc @@ -21,6 +21,19 @@ This will start Lisk Service with the default configuration, which in turn will In case a different node or network shall be used, xref:{url_config}[configure] Lisk Service accordingly. +[NOTE] +==== +It is recommended to copy the docker/example.env. to `env` before running the `make up` command. + +example.env +---- +Common Docker configuration + +Service broker +SERVICE_BROKER_TIMEOUT=10 +---- +==== + == Stop .Inside the lisk-service root folder @@ -198,6 +211,8 @@ This can be quite time-consuming when the chain is long, spanning over hours. == Logging +// User has the option the use the Docker container otr the make logs.... + 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: @@ -205,3 +220,39 @@ For example, to see the logs for the Gateway microservice, execute the following ---- docker container logs lisk-service_gateway_1 ---- + +We can also use make commands to check logs.. + + + +make logs +Display logs for all the microservices logged so far and exist automatically. +make logs-live +Displays logs for all the microservices logged so far and continues to display the new ones as well. +make logs-blockchain-connector +Similar to make logs but only displays logs for the specified microservice. Eg: only for blockchain-connector in the above example +make logs-live-blockchain-connector +Similar to make logs-live but only displays logs for the specified microservice. Eg: only for blockchain-connector in the above example +Replace blockchain-connector with the relevant service + + + + + + + + + + + +=== make logs +ffff + +=== make logs-live + + +=== make logs-blockchain-connector + +=== make logs-live-blockchain-connector + +Replace blockchain-connector with the relevant service name for which the user needs to check the logs (edited) From cedcda9659fe88d59bb5bac435403cb316eeef2a Mon Sep 17 00:00:00 2001 From: chris529 Date: Mon, 18 Sep 2023 12:18:42 +0200 Subject: [PATCH 05/43] update-in-update-docker.adoc --- .../update-existing-node/update-docker.adoc | 51 ++++++++----------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc index 8c65b08775..8a6d542dff 100644 --- a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc +++ b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc @@ -9,6 +9,7 @@ Mona Bärenfänger Chris Braithwaite Date: Mon, 18 Sep 2023 15:13:23 +0200 Subject: [PATCH 06/43] Revert "Update index.adoc" This reverts commit 7307f65d0cf82df3fd9b083cfdb248e28f15e770. --- .../ROOT/pages/configuration/index.adoc | 74 ++++++------------- 1 file changed, 23 insertions(+), 51 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/configuration/index.adoc b/docs/antora/modules/ROOT/pages/configuration/index.adoc index 38fbfaddd9..f27c5df8a2 100644 --- a/docs/antora/modules/ROOT/pages/configuration/index.adoc +++ b/docs/antora/modules/ROOT/pages/configuration/index.adoc @@ -296,7 +296,7 @@ By default, it is set to run every minute. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Gateway microservice +.Example environment variables for the Gateway microservice ---- module.exports = { apps: [ @@ -391,19 +391,19 @@ Only to be used when the genesis block is large enough to be transmitted over AP | `ENABLE_BLOCK_CACHING` | boolean | Boolean flag to enable block caching. -Enabled by default. +Enabled by default. To disable it, set it to `false`. | true | `EXPIRY_IN_HOURS` | number -| Expiry time in hours for block cache. +| Expiry time in hours for block cache. By default, it is set to `12` hours. | 12 | `JOB_INTERVAL_CACHE_CLEANUP` | number -| Job run interval to clean up block cache. +| Job run interval to clean up block cache. By default, it is set to 0. | 0 @@ -430,7 +430,7 @@ By default, it is set to an empty string `''`. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Blockchain Connector microservice +.Example environment variables for the Blockchain Connector microservice ---- module.exports = { apps: [ @@ -506,7 +506,7 @@ By default, it is set to run every 15 minutes. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Coordinator microservice +.Example environment variables for the Coordinator microservice ---- module.exports = { apps: [ @@ -599,7 +599,7 @@ Must match the value supplied for the `coordinator` microservice. | `INDEX_SNAPSHOT_URL` | string | URL from where the Lisk Service database snapshot will be downloaded. -| +| | `ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP` | boolean @@ -655,9 +655,9 @@ By default, it is set to run every `10` seconds. | `JOB_SCHEDULE_REFRESH_INDEX_STATUS` | string -| Job run cron schedule to refresh indexing status. +| Job run cron schedule to refresh indexing status. By default, it is set to an empty string `''`. -| +| | `JOB_INTERVAL_REFRESH_BLOCKCHAIN_APPS_STATS` | number @@ -703,7 +703,7 @@ By default, it is set to `0`. | `JOB_SCHEDULE_TRIGGER_ACCOUNT_UPDATES` | string -| Job run cron schedule to trigger account updates. +| Job run cron schedule to trigger account updates. By default, it is set to run every 15 minutes. | */15 * * * * @@ -723,7 +723,7 @@ By default, it is set to `0`. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Blockchain Indexer microservice +.Example environment variables for the Blockchain Indexer microservice ---- module.exports = { apps: [ @@ -808,7 +808,7 @@ module.exports = { | `DEFAULT_APPS` | string -| Default blockchain applications. +| Default blockchain applications. By default, it is set to `lisk_mainchain`. | lisk_mainchain @@ -850,7 +850,7 @@ By default, it is set to run every `10` minutes. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Blockchain App Registry microservice +.Example environment variables for the Blockchain App Registry microservice ---- module.exports = { apps: [ @@ -945,7 +945,7 @@ By default, it starts at the genesis height in full mode and the current block h .Sample Configurations [%collapsible] ==== -.Example environment variables for the Fee Estimator microservice +.Example environment variables for the Fee Estimator microservice ---- module.exports = { apps: [ @@ -1035,7 +1035,7 @@ By default, it is set to `0`. | `JOB_SCHEDULE_VERIFY_TRANSACTION_STATS` | string -|Job run cron schedule to verify if the transaction statistics have been built correctly. +|Job run cron schedule to verify if the transaction statistics have been built correctly. By default, it is set to run every 3rd hour after the first `15` minutes. | 15 */3 * * * @@ -1044,7 +1044,7 @@ By default, it is set to run every 3rd hour after the first `15` minutes. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Transaction Statistics microservice +.Example environment variables for the Transaction Statistics microservice ---- module.exports = { apps: [ @@ -1181,7 +1181,7 @@ By default, it is set to an empty string `''`. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Market microservice +.Example environment variables for the Market microservice ---- module.exports = { apps: [ @@ -1236,7 +1236,7 @@ For the local file system, use `*SERVICE_EXPORT_PARTIALS*` and `*SERVICE_EXPORT_ | `SERVICE_BROKER` | string | URL of the microservice message broker (NATS or Redis). -| redis://127.0.0.1:6379/0 +| redis://127.0.0.1:6379/0 | `SERVICE_EXPORT_REDIS` | string @@ -1266,17 +1266,17 @@ For the local file system, use `*SERVICE_EXPORT_PARTIALS*` and `*SERVICE_EXPORT_ | `EXPORT_S3_ACCESS_KEY` | string | Amazon S3 bucket access key for the specified endpoint. -| +| | `EXPORT_S3_SECRET_KEY` | string | Amazon S3 bucket secret key. -| +| | `EXPORT_S3_SESSION_TOKEN` | string | Amazon S3 bucket session token. -| +| | `EXPORT_S3_REGION` | string @@ -1320,7 +1320,7 @@ By default, it is set to run daily at 04:45 am. .Sample Configurations [%collapsible] ==== -.Example environment variables for the Export microservice +.Example environment variables for the Export microservice ---- module.exports = { apps: [ @@ -1356,32 +1356,4 @@ module.exports = { ], }; ---- -==== - -=== MySQL snapshot configuration - -The MySQL snapshot relevant properties can be seen in the table below: - -[cols="2,1,~,~m",options="header",stripes="hover"] - -|=== -|Environment variable -|Datatype -|Description -|Sample - -|`ENABLE_APPLY_SNAPSHOT` -|boolean -|Enable or display apply snapshot feature. By default, the value is ... -|true - -|`INDEX_SNAPSHOT_URL` -|string -|Custom snapshot url (Expected to end with sql.gz) -|https://snapshots.lisk.io/mainnet/service.sql.gz - -|`ENABLE_SNAPSHOT_ALLOW_INSECURE_HTTP` -|boolean -|Allow insecure HTTP connections. By default, this is disabled. -|false -|=== +==== \ No newline at end of file From 19236815d12055ab17f4a1588c43e9c757d41e69 Mon Sep 17 00:00:00 2001 From: chris529 Date: Tue, 19 Sep 2023 18:05:12 +0200 Subject: [PATCH 07/43] update in update-docker.adoc --- .../modules/ROOT/pages/update-existing-node/update-docker.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc index 8a6d542dff..53b893c333 100644 --- a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc +++ b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc @@ -242,6 +242,6 @@ make logs-live-blockchain-connector Finally, the above command is similar to the `make logs-live` command, but only displays the logs for the specified microservice. For example, in this case also only for blockchain-connector here. -Replace the `blockchain-connector` with the specifc service name required. +Replace the `blockchain-connector` with the specific service name required. From cc32413a760d69fe57d23438248c58107c2bc586 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 21 Sep 2023 09:44:31 +0200 Subject: [PATCH 08/43] create-new-page-update-source.adoc --- .../update-existing-node/update-source.adoc | 361 ++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 docs/antora/modules/ROOT/pages/update-existing-node/update-source.adoc diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-source.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-source.adoc new file mode 100644 index 0000000000..34a40a8546 --- /dev/null +++ b/docs/antora/modules/ROOT/pages/update-existing-node/update-source.adoc @@ -0,0 +1,361 @@ += Update PM2 commands +Mona Bärenfänger Muhammad Talha chris braithwaite +:description: Describes how to manage Lisk Service v0.7.0 with PM2. +:toc: +:idseparator: - +:idprefix: +:imagesdir: ../assets/images +:source-language: bash +// External URLs +:url_pm2_docs: https://pm2.keymetrics.io/docs/usage/quick-start/ +:url_FLUSHALL: https://redis.io/commands/FLUSHALL + +On this page, you'll find the most relevant PM2 commands for running a source-based Lisk Service installation. +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. + +== Various PM2 commands + +=== Start +Start Lisk Service. + +---- +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 │ +└----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ +---- +==== + +=== List + +View the status of different microservices of Lisk Service in the list of PM2 processes: + +---- +pm2 list +---- + +.Response +[%collapsible] +==== +.Example output +---- +┌----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┐ +│ 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 │ +└----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ +---- +==== + +=== Logs +To check the logs for the different microservices of Lisk Service, use the command `pm2 logs PROCESS_NAME`, where `PROCESS_NAME` is the respective PM2-managed process that contains the logs you wish to view. + +Alternatively, it is also possible to check the logs for a specific PM2 process based on its process ID. +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 <> command. + +For example, to see the logs for the Gateway microservice, execute the following command: + +---- +pm2 logs lisk-service-gateway +---- + +.Response +[%collapsible] +==== +.Example output +---- +0|lisk-ser | 2023-07-19 17:53:08 503: 2023-07-19T17:53:08.503 INFO [TRANSIT] Connecting to the transporter... +0|lisk-ser | 2023-07-19 17:53:08 504: 2023-07-19T17:53:08.503 INFO [TRANSPORTER] Setting Redis transporter +0|lisk-ser | 2023-07-19 17:53:08 510: 2023-07-19T17:53:08.510 INFO [TRANSPORTER] Redis-sub client is connected. +0|lisk-ser | 2023-07-19 17:53:08 510: 2023-07-19T17:53:08.510 INFO [TRANSPORTER] Setting Redis transporter +0|lisk-ser | 2023-07-19 17:53:08 512: 2023-07-19T17:53:08.512 INFO [TRANSPORTER] Redis-pub client is connected. +0|lisk-ser | 2023-07-19 17:53:09 016: 2023-07-19T17:53:09.016 INFO [TEMP_SERVICE_GATEWAY] Waiting for service(s) 'indexer, connector'... +0|lisk-ser | 2023-07-19 17:53:09 018: 2023-07-19T17:53:09.018 INFO [REGISTRY] '$node' service is registered. +0|lisk-ser | 2023-07-19 17:53:09 018: 2023-07-19T17:53:09.018 INFO [$NODE] Service '$node' started. +0|lisk-ser | 2023-07-19 17:53:10 225: 2023-07-19T17:53:10.223 INFO [REGISTRY] Node 'XYZ.local-74790' connected. +0|lisk-ser | 2023-07-19 17:53:10 274: 2023-07-19T17:53:10.274 INFO [REGISTRY] Node 'XYZ.local-74787' connected. +0|lisk-ser | 2023-07-19 17:53:10 325: 2023-07-19T17:53:10.325 INFO [REGISTRY] Node 'XYZ.local-74798' connected. +0|lisk-ser | 2023-07-19 17:53:10 346: 2023-07-19T17:53:10.345 INFO [REGISTRY] Node 'XYZ.local-74772' connected. +0|lisk-ser | 2023-07-19 17:53:10 415: 2023-07-19T17:53:10.414 INFO [REGISTRY] Node 'XYZ.local-74804' connected. +0|lisk-ser | 2023-07-19 17:53:10 485: 2023-07-19T17:53:10.484 INFO [REGISTRY] Node 'XYZ.local-74795' connected. +0|lisk-ser | 2023-07-19 17:53:10 676: 2023-07-19T17:53:10.675 INFO [REGISTRY] Node 'XYZ.local-74779' connected. +---- +==== + +=== Flush +Remove all the logs of the PM2-managed processes defined in the specified config file. + +---- +pm2 flush ecosystem.config.js +---- + +.Response +[%collapsible] +==== +.Example output +---- +[PM2] Logs flushed +---- +==== + + +=== Stop +Stop PM2 managed Lisk Service instance. + +---- +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 │ +└------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ +---- +==== + + +=== Restart + +Restart Lisk Service via PM2. + +---- +pm2 restart ecosystem.config.js +---- + +.Response +[%collapsible] +==== +.Example output +[source,bash] +---- +[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] 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-connector](2) ✓ +[PM2] Applying action restartProcessId on app [lisk-service-fee-estimator](ids: [ 5 ]) +[PM2] [lisk-service-blockchain-coordinator](4) ✓ +[PM2] [lisk-service-fee-estimator](5) ✓ +[PM2] Applying action restartProcessId on app [lisk-service-transaction-statistics](ids: [ 6 ]) +[PM2] Applying action restartProcessId on app [lisk-service-market](ids: [ 7 ]) +[PM2] [lisk-service-transaction-statistics](6) ✓ +[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 │ +└----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ +---- +==== + +=== Delete +Remove all processes from the PM2 list. + +---- +pm2 delete ecosystem.config.js +---- + + +.Response +[%collapsible] +==== +.Example output +---- +[PM2] [lisk-service-gateway](0) ✓ +[PM2] [lisk-service-blockchain-app-registry](1) ✓ +[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 │ +└----------------------------------------------------------------------------------------------------------------------------------------------┘ +[PM2][WARN] Current process list is not synchronized with saved list. App lisk-service-gateway lisk-service-blockchain-app-registry lisk-service-blockchain-connector lisk-service-blockchain-indexer lisk-service-blockchain-coordinator lisk-service-fee-estimator lisk-service-transaction-statistics lisk-service-market lisk-service-export differs. Type 'pm2 save' to synchronize. +---- +==== + +== Resetting Lisk Service + +=== Clean all run-time files with dependencies + +---- +make clean-local +---- + +.Response +[%collapsible] +==== +.Example output +---- +rm -rf node_modules +cd ./framework && rm -rf node_modules +cd ./services/blockchain-app-registry && rm -rf node_modules +cd ./services/blockchain-connector && rm -rf node_modules +cd ./services/blockchain-coordinator && rm -rf node_modules +cd ./services/blockchain-indexer && rm -rf node_modules +cd ./services/transaction-statistics && rm -rf node_modules +cd ./services/fee-estimator && rm -rf node_modules +cd ./services/market && rm -rf node_modules +cd ./services/gateway && rm -rf node_modules +cd ./services/export && rm -rf node_modules +cd ./services/template && rm -rf node_modules +cd ./tests && rm -rf node_modules +---- +==== + +=== Install npm dependencies + +---- +make build-local +---- + +=== Reset the Lisk Service database + +To reset the database of Lisk Service, drop the respective MySQL and Redis databases. + +==== Drop the MySQL database + +. Stop Lisk Service ++ +---- +yarn stop +---- + +. Login to MySQL with the `lisk` user. ++ +---- +mysql -u lisk -ppassword +---- + +. Drop the database. ++ +---- +mysql> drop database lisk; +---- + +. Create a fresh database. ++ +---- +mysql> create database lisk; +---- + +. Quit MySQL. ++ +---- +mysql> quit; +---- + +NOTE: The process to re-index all the data commences after Lisk Service starts again following a database reset. The process can be rather time-consuming and could take several hours, depending on the length of the chain. + +==== Flush Redis DB + +Reset the databases for Redis after dropping the MySQL database: + +---- +redis-cli flushall +---- + +[NOTE] +==== +The `flushall` command truncates all existing Redis databases: + +> Deletes all the keys of all the existing databases, not just the current selected one. This command never fails. + +For more information, check the Redis documentation: {url_FLUSHALL}[FLUSHALL]. + +To flush only a particular database in Redis, execute the following command instead: + +---- +redis-cli -n flushdb +---- +==== + +You can start Lisk Service again with the <> command. From 7cdac5a84f385042288e767095663f3f23bfbd37 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 28 Sep 2023 09:23:01 +0200 Subject: [PATCH 09/43] update-in-both update-docker.adoc-and-docker.adoc --- .../modules/ROOT/pages/management/docker.adoc | 27 +++++++- .../update-existing-node/update-docker.adoc | 68 +++++++++---------- 2 files changed, 60 insertions(+), 35 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index ee454feeb7..9f58fafbd1 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -198,10 +198,35 @@ This can be quite time-consuming when the chain is long, spanning over hours. == 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: + +---- +make logs +---- +The above command, displays the logs for all the microservices that have been logged so far, and that are currently existing. +---- +make logs-live +---- +The above command displays the logs for all the microservices currently logged so far, and also continues to display the latest logs. +---- +make logs-blockchain-connector +---- +The above command is similar to the `make logs` command, but only displays the appropriate logs for the specified microservice. +For example, in this case only for the `blockchain-connector`. +---- +make logs-live-blockchain-connector +---- +Finally, the above command is similar to the `make logs-live` command, but only displays the logs for the specified microservice. +For example, in this case also only for blockchain-connector here. + +Replace the `blockchain-connector` with the specific service name required. diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc index 53b893c333..cd9dfa2d35 100644 --- a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc +++ b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc @@ -209,39 +209,39 @@ make up NOTE: When Lisk Service is started again after a database reset, then the process to reindex all the data is initiated. This can be quite time-consuming when the chain is long, spanning over hours. -== Logging - -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: - ----- -make logs ----- -The above command, displays the logs for all the microservices that have been logged so far, and that are currently existing. ----- -make logs-live ----- -The above command displays the logs for all the microservices currently logged so far, and also continues to display the latest logs. ----- -make logs-blockchain-connector ----- -The above command is similar to the `make logs` command, but only displays the appropriate logs for the specified microservice. -For example, in this case only for the `blockchain-connector`. ----- -make logs-live-blockchain-connector ----- -Finally, the above command is similar to the `make logs-live` command, but only displays the logs for the specified microservice. -For example, in this case also only for blockchain-connector here. - -Replace the `blockchain-connector` with the specific service name required. +// == Logging + +// 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: + +// ---- +// make logs +// ---- +// The above command, displays the logs for all the microservices that have been logged so far, and that are currently existing. +// ---- +// make logs-live +// ---- +// The above command displays the logs for all the microservices currently logged so far, and also continues to display the latest logs. +// ---- +// make logs-blockchain-connector +// ---- +// The above command is similar to the `make logs` command, but only displays the appropriate logs for the specified microservice. +// For example, in this case only for the `blockchain-connector`. +// ---- +// make logs-live-blockchain-connector +// ---- +// Finally, the above command is similar to the `make logs-live` command, but only displays the logs for the specified microservice. +// For example, in this case also only for blockchain-connector here. + +// Replace the `blockchain-connector` with the specific service name required. From 82333ddc0af33309cb04e945ba124709c172cfa4 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 28 Sep 2023 11:11:03 +0200 Subject: [PATCH 10/43] update-in-source.adoc --- docs/antora/modules/ROOT/pages/management/source.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index f0ef762fa9..653a3d5aac 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -9,6 +9,7 @@ Mona Bärenfänger Muhammad Talha > command. +TIP: The process ID of each PM2-managed process can be seen by executing the <> command. To learn more about PM2 log management please refer the xref:{url_pm2_management}[PM2 logs documentation]. For example, to see the logs for the Gateway microservice, execute the following command: From e81abd08eb5a06f645586618f166b9780ffac95c Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 28 Sep 2023 11:15:29 +0200 Subject: [PATCH 11/43] update-in-source.adoc --- docs/antora/modules/ROOT/pages/management/source.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index 653a3d5aac..aa439705d8 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -99,7 +99,7 @@ To check the logs for the different microservices of Lisk Service, use the comma Alternatively, it is also possible to check the logs for a specific PM2 process based on its process ID. 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 <> command. To learn more about PM2 log management please refer the xref:{url_pm2_management}[PM2 logs documentation]. +TIP: The process ID of each PM2-managed process can be seen by executing the <> 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: From 25a3308f2a9d2b24d3707a6c3c442475a85ceae4 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 28 Sep 2023 11:22:23 +0200 Subject: [PATCH 12/43] removed update-eisting-node --- .../update-existing-node/update-docker.adoc | 247 ------------------ 1 file changed, 247 deletions(-) delete mode 100644 docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc deleted file mode 100644 index cd9dfa2d35..0000000000 --- a/docs/antora/modules/ROOT/pages/update-existing-node/update-docker.adoc +++ /dev/null @@ -1,247 +0,0 @@ -= Update Docker commands -Mona Bärenfänger Chris Braithwaite -:description: Describes how to manage Lisk Service v0.7.0 with Docker. -:toc: -:idseparator: - -:idprefix: -:experimental: -:imagesdir: ../assets/images -:source-language: bash -:url_config: configuration/docker.adoc -:url_FLUSHALL: https://redis.io/commands/FLUSHALL -:url_docker_example: https://github.com/LiskHQ/lisk-service/blob/v0.7.0-rc.0/docker/example.env - -== Start - -.Inside the lisk-service root folder ----- -make up ----- - -This will start Lisk Service with the default configuration, which in turn will connect to a Lisk Core Mainnet node. - -In case a different node or network shall be used, xref:{url_config}[configure] Lisk Service accordingly. - -[NOTE] -==== -It is recommended to copy the xref:{url_docker_example][docker/example.env.] to `env` before running the `make up` command: - ----- -Common Docker configuration - -Service broker -SERVICE_BROKER_TIMEOUT=10 ----- -==== - -== Stop - -.Inside the lisk-service root folder ----- -make down ----- - -This will stop Lisk Service. - -== Show the status of Docker containers - ----- -docker ps ----- - -== Reset the Lisk Service database - -To reset the database of Lisk Service, drop the respective MySQL and Redis databases. - -Before resetting the database, stop Lisk Service: - ----- -make stop ----- - -Now connect to the Docker container in which you wish to reset the database. If you are not sure what to choose here, check the available containers via <>. - -To connect to the interactive shell of the MySQL Docker container in which you wish to reset the MySQL database, execute the following command: - ----- -docker exec -it lisk-service-mysql-primary-1 bash ----- - -=== Drop Database - -[tabs] -==== -MySQL DB:: -+ --- -. Login to MySQL with the `lisk` user. -+ ----- -mysql -ulisk -ppassword ----- -+ -On successful login, you enter the MYSQL command-line client: -+ ----- -Welcome to the MySQL monitor. Commands end with ; or \g. -Your MySQL connection id is 2044 -Server version: 8.0.27 MySQL Community Server - GPL - -Copyright (c) 2000, 2021, Oracle and/or its affiliates. - -Oracle is a registered trademark of Oracle Corporation and/or its -affiliates. Other names may be trademarks of their respective -owners. - - -Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. ----- -. Drop the `lisk` database. -+ ----- -mysql> drop database lisk; ----- -. Create a fresh database `lisk`. -+ ----- -mysql> create database lisk; ----- -. Log out from MySQL by typing `quit;` -+ ----- -mysql> quit; ----- - -Log out of the docker container by pressing kbd:[CRTL] + kbd:[D]. - --- -MariaDB:: -+ --- -MariaDB also uses the same SQL commands for querying and manipulating the relevant data, including data storage, client libraries, and replication. - -. Login to MariaDB with the `lisk` user. -+ ----- -docker exec -it lisk_mariadb mysql -uroot -p ----- -+ -On successful login, you enter the MariaDB command-line client: -+ ----- -Welcome to the MariaDB monitor. Commands end with ; or \g. -Your MariaDB connection id is 9 -Server version: 10.7.8-MariaDB-1:10.7.8+maria~ubu2004 mariadb.org binary distribution - -Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. - -Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. ----- -. Drop the `lisk` database. -+ ----- -MariaDB [(none)]> drop database lisk; ----- -+ -.Result ----- -Query OK, 0 rows affected (0.009 sec) ----- -. Create a fresh database `lisk` -+ ----- -MariaDB [(none)]> create database lisk; ----- -+ -.Result ----- -Query OK, 1 row affected (0.001 sec) ----- -. Log out by typing `quit;`. -+ ----- -MariaDB [(none)]> exit; ----- - -Log out of the docker container by pressing kbd:[CRTL] + kbd:[D]. --- -==== - -=== Flush Redis DB - -Reset the databases for Redis after dropping the MySQL database: - -.Execute command in running docker container. ----- -sudo docker exec -it lisk-service_redis_core_persistent_1 /bin/sh ----- - -.Truncate redis database. ----- -redis-cli flushall ----- - -TIP: Log out of the docker container again by pressing kbd:[CRTL] + kbd:[D]. - -[NOTE] -==== -The `flushall` command truncates all existing Redis databases: - -> Deletes all the keys of all the existing databases, not just the current selected one. This command never fails. - -For more information, check the Redis documentation: {url_FLUSHALL}[FLUSHALL]. - -To flush only a particular DB in Redis, execute the following command instead: - ----- -redis-cli -n flushdb ----- -==== - -=== Start Lisk Service - -After the databases are reset, start Lisk Service again as usual: - ----- -make up ----- - -NOTE: When Lisk Service is started again after a database reset, then the process to reindex all the data is initiated. -This can be quite time-consuming when the chain is long, spanning over hours. - -// == Logging - -// 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: - -// ---- -// make logs -// ---- -// The above command, displays the logs for all the microservices that have been logged so far, and that are currently existing. -// ---- -// make logs-live -// ---- -// The above command displays the logs for all the microservices currently logged so far, and also continues to display the latest logs. -// ---- -// make logs-blockchain-connector -// ---- -// The above command is similar to the `make logs` command, but only displays the appropriate logs for the specified microservice. -// For example, in this case only for the `blockchain-connector`. -// ---- -// make logs-live-blockchain-connector -// ---- -// Finally, the above command is similar to the `make logs-live` command, but only displays the logs for the specified microservice. -// For example, in this case also only for blockchain-connector here. - -// Replace the `blockchain-connector` with the specific service name required. - - From 13739ccb3df0d4efea85bd8cd0c58aebe98b9681 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 5 Oct 2023 14:31:54 +0200 Subject: [PATCH 13/43] update-in-docker.adoc --- docs/antora/modules/ROOT/pages/management/docker.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 9f58fafbd1..ed24e5e63a 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -10,6 +10,8 @@ Mona Bärenfänger :url_config: configuration/docker.adoc :url_FLUSHALL: https://redis.io/commands/FLUSHALL +NOTE: To upgrade Lisk Service to a desired version, please checkout the specific version with *`git checkout `*, run *make build* and then follow the existing process described below. + == Start .Inside the lisk-service root folder From 8c5cc8ccac9b766218c068c079a75afbc2cbdedd Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 5 Oct 2023 14:32:57 +0200 Subject: [PATCH 14/43] update-in-docker.adoc --- docs/antora/modules/ROOT/pages/management/docker.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index ed24e5e63a..7634f7ccc2 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -10,7 +10,7 @@ Mona Bärenfänger :url_config: configuration/docker.adoc :url_FLUSHALL: https://redis.io/commands/FLUSHALL -NOTE: To upgrade Lisk Service to a desired version, please checkout the specific version with *`git checkout `*, run *make build* and then follow the existing process described below. +NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, run *make build* and then follow the existing process described below. == Start From e82704ae3de3a2cadcd77a7b5f3f1c5affe4cb36 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 5 Oct 2023 14:42:04 +0200 Subject: [PATCH 15/43] update-in-source.adoc --- docs/antora/modules/ROOT/pages/management/source.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index f0ef762fa9..cbf28e5edb 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -9,12 +9,16 @@ Mona Bärenfänger Muhammad Talha > command. To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation]. + + == Various PM2 commands === Start From 1f136aed2ee53da81c61f2eb32875b468a82bccd Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 5 Oct 2023 14:47:53 +0200 Subject: [PATCH 16/43] update-in-source.adoc --- docs/antora/modules/ROOT/pages/management/source.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index cbf28e5edb..04b18122bf 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -18,6 +18,7 @@ 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 <> command. To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation]. +NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `* and follow the existing process. == Various PM2 commands From e78252058c426018e64d14f4527456edace3c499 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 5 Oct 2023 16:11:18 +0200 Subject: [PATCH 17/43] update-in-source.adoc --- .../update-existing-node/update-source.adoc | 361 ------------------ 1 file changed, 361 deletions(-) delete mode 100644 docs/antora/modules/ROOT/pages/update-existing-node/update-source.adoc diff --git a/docs/antora/modules/ROOT/pages/update-existing-node/update-source.adoc b/docs/antora/modules/ROOT/pages/update-existing-node/update-source.adoc deleted file mode 100644 index 34a40a8546..0000000000 --- a/docs/antora/modules/ROOT/pages/update-existing-node/update-source.adoc +++ /dev/null @@ -1,361 +0,0 @@ -= Update PM2 commands -Mona Bärenfänger Muhammad Talha chris braithwaite -:description: Describes how to manage Lisk Service v0.7.0 with PM2. -:toc: -:idseparator: - -:idprefix: -:imagesdir: ../assets/images -:source-language: bash -// External URLs -:url_pm2_docs: https://pm2.keymetrics.io/docs/usage/quick-start/ -:url_FLUSHALL: https://redis.io/commands/FLUSHALL - -On this page, you'll find the most relevant PM2 commands for running a source-based Lisk Service installation. -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. - -== Various PM2 commands - -=== Start -Start Lisk Service. - ----- -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 │ -└----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ ----- -==== - -=== List - -View the status of different microservices of Lisk Service in the list of PM2 processes: - ----- -pm2 list ----- - -.Response -[%collapsible] -==== -.Example output ----- -┌----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┐ -│ 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 │ -└----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ ----- -==== - -=== Logs -To check the logs for the different microservices of Lisk Service, use the command `pm2 logs PROCESS_NAME`, where `PROCESS_NAME` is the respective PM2-managed process that contains the logs you wish to view. - -Alternatively, it is also possible to check the logs for a specific PM2 process based on its process ID. -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 <> command. - -For example, to see the logs for the Gateway microservice, execute the following command: - ----- -pm2 logs lisk-service-gateway ----- - -.Response -[%collapsible] -==== -.Example output ----- -0|lisk-ser | 2023-07-19 17:53:08 503: 2023-07-19T17:53:08.503 INFO [TRANSIT] Connecting to the transporter... -0|lisk-ser | 2023-07-19 17:53:08 504: 2023-07-19T17:53:08.503 INFO [TRANSPORTER] Setting Redis transporter -0|lisk-ser | 2023-07-19 17:53:08 510: 2023-07-19T17:53:08.510 INFO [TRANSPORTER] Redis-sub client is connected. -0|lisk-ser | 2023-07-19 17:53:08 510: 2023-07-19T17:53:08.510 INFO [TRANSPORTER] Setting Redis transporter -0|lisk-ser | 2023-07-19 17:53:08 512: 2023-07-19T17:53:08.512 INFO [TRANSPORTER] Redis-pub client is connected. -0|lisk-ser | 2023-07-19 17:53:09 016: 2023-07-19T17:53:09.016 INFO [TEMP_SERVICE_GATEWAY] Waiting for service(s) 'indexer, connector'... -0|lisk-ser | 2023-07-19 17:53:09 018: 2023-07-19T17:53:09.018 INFO [REGISTRY] '$node' service is registered. -0|lisk-ser | 2023-07-19 17:53:09 018: 2023-07-19T17:53:09.018 INFO [$NODE] Service '$node' started. -0|lisk-ser | 2023-07-19 17:53:10 225: 2023-07-19T17:53:10.223 INFO [REGISTRY] Node 'XYZ.local-74790' connected. -0|lisk-ser | 2023-07-19 17:53:10 274: 2023-07-19T17:53:10.274 INFO [REGISTRY] Node 'XYZ.local-74787' connected. -0|lisk-ser | 2023-07-19 17:53:10 325: 2023-07-19T17:53:10.325 INFO [REGISTRY] Node 'XYZ.local-74798' connected. -0|lisk-ser | 2023-07-19 17:53:10 346: 2023-07-19T17:53:10.345 INFO [REGISTRY] Node 'XYZ.local-74772' connected. -0|lisk-ser | 2023-07-19 17:53:10 415: 2023-07-19T17:53:10.414 INFO [REGISTRY] Node 'XYZ.local-74804' connected. -0|lisk-ser | 2023-07-19 17:53:10 485: 2023-07-19T17:53:10.484 INFO [REGISTRY] Node 'XYZ.local-74795' connected. -0|lisk-ser | 2023-07-19 17:53:10 676: 2023-07-19T17:53:10.675 INFO [REGISTRY] Node 'XYZ.local-74779' connected. ----- -==== - -=== Flush -Remove all the logs of the PM2-managed processes defined in the specified config file. - ----- -pm2 flush ecosystem.config.js ----- - -.Response -[%collapsible] -==== -.Example output ----- -[PM2] Logs flushed ----- -==== - - -=== Stop -Stop PM2 managed Lisk Service instance. - ----- -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 │ -└------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ ----- -==== - - -=== Restart - -Restart Lisk Service via PM2. - ----- -pm2 restart ecosystem.config.js ----- - -.Response -[%collapsible] -==== -.Example output -[source,bash] ----- -[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] 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-connector](2) ✓ -[PM2] Applying action restartProcessId on app [lisk-service-fee-estimator](ids: [ 5 ]) -[PM2] [lisk-service-blockchain-coordinator](4) ✓ -[PM2] [lisk-service-fee-estimator](5) ✓ -[PM2] Applying action restartProcessId on app [lisk-service-transaction-statistics](ids: [ 6 ]) -[PM2] Applying action restartProcessId on app [lisk-service-market](ids: [ 7 ]) -[PM2] [lisk-service-transaction-statistics](6) ✓ -[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 │ -└----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ ----- -==== - -=== Delete -Remove all processes from the PM2 list. - ----- -pm2 delete ecosystem.config.js ----- - - -.Response -[%collapsible] -==== -.Example output ----- -[PM2] [lisk-service-gateway](0) ✓ -[PM2] [lisk-service-blockchain-app-registry](1) ✓ -[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 │ -└----------------------------------------------------------------------------------------------------------------------------------------------┘ -[PM2][WARN] Current process list is not synchronized with saved list. App lisk-service-gateway lisk-service-blockchain-app-registry lisk-service-blockchain-connector lisk-service-blockchain-indexer lisk-service-blockchain-coordinator lisk-service-fee-estimator lisk-service-transaction-statistics lisk-service-market lisk-service-export differs. Type 'pm2 save' to synchronize. ----- -==== - -== Resetting Lisk Service - -=== Clean all run-time files with dependencies - ----- -make clean-local ----- - -.Response -[%collapsible] -==== -.Example output ----- -rm -rf node_modules -cd ./framework && rm -rf node_modules -cd ./services/blockchain-app-registry && rm -rf node_modules -cd ./services/blockchain-connector && rm -rf node_modules -cd ./services/blockchain-coordinator && rm -rf node_modules -cd ./services/blockchain-indexer && rm -rf node_modules -cd ./services/transaction-statistics && rm -rf node_modules -cd ./services/fee-estimator && rm -rf node_modules -cd ./services/market && rm -rf node_modules -cd ./services/gateway && rm -rf node_modules -cd ./services/export && rm -rf node_modules -cd ./services/template && rm -rf node_modules -cd ./tests && rm -rf node_modules ----- -==== - -=== Install npm dependencies - ----- -make build-local ----- - -=== Reset the Lisk Service database - -To reset the database of Lisk Service, drop the respective MySQL and Redis databases. - -==== Drop the MySQL database - -. Stop Lisk Service -+ ----- -yarn stop ----- - -. Login to MySQL with the `lisk` user. -+ ----- -mysql -u lisk -ppassword ----- - -. Drop the database. -+ ----- -mysql> drop database lisk; ----- - -. Create a fresh database. -+ ----- -mysql> create database lisk; ----- - -. Quit MySQL. -+ ----- -mysql> quit; ----- - -NOTE: The process to re-index all the data commences after Lisk Service starts again following a database reset. The process can be rather time-consuming and could take several hours, depending on the length of the chain. - -==== Flush Redis DB - -Reset the databases for Redis after dropping the MySQL database: - ----- -redis-cli flushall ----- - -[NOTE] -==== -The `flushall` command truncates all existing Redis databases: - -> Deletes all the keys of all the existing databases, not just the current selected one. This command never fails. - -For more information, check the Redis documentation: {url_FLUSHALL}[FLUSHALL]. - -To flush only a particular database in Redis, execute the following command instead: - ----- -redis-cli -n flushdb ----- -==== - -You can start Lisk Service again with the <> command. From 3d612a116997f17379d58895a707aade9e800ae8 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 5 Oct 2023 16:25:12 +0200 Subject: [PATCH 18/43] update-in-docker.adoc --- .../modules/ROOT/pages/management/docker.adoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 7634f7ccc2..ae5c530dc7 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -10,12 +10,23 @@ Mona Bärenfänger :url_config: configuration/docker.adoc :url_FLUSHALL: https://redis.io/commands/FLUSHALL -NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, run *make build* and then follow the existing process described below. +NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and then follow the existing process described below. + +== 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 ---- From eece577e2963fada683a1a5225fff4b483063366 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 5 Oct 2023 16:28:15 +0200 Subject: [PATCH 19/43] update-in-source.adoc --- docs/antora/modules/ROOT/pages/management/source.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index 04b18122bf..7196680a8a 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -18,7 +18,7 @@ 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 <> command. To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation]. -NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `* and follow the existing process. +NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and follow the existing process. == Various PM2 commands From da0f0bd5765d279da39cdb4b5173ebc1b2509d5e Mon Sep 17 00:00:00 2001 From: chris529 Date: Fri, 13 Oct 2023 11:55:24 +0200 Subject: [PATCH 20/43] update in source.adoc --- docs/antora/modules/ROOT/pages/management/source.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index deca4ee4cc..d051a25204 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -18,7 +18,7 @@ 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 <> command. To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation]. -NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and follow the existing process. +NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and start Lisk Service as shown below: == Various PM2 commands From 4903212699633115fcc3f8b09b48916b3588e30d Mon Sep 17 00:00:00 2001 From: chris529 Date: Fri, 13 Oct 2023 12:00:45 +0200 Subject: [PATCH 21/43] update in source.adoc --- docs/antora/modules/ROOT/pages/management/source.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index d051a25204..d1dc4b9cea 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -18,7 +18,7 @@ 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 <> command. To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation]. -NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and start Lisk Service as shown below: +NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and then start Lisk Service as shown in the list of commands below. == Various PM2 commands From 7d897f62178d6d42352919248b0e07fb867d6deb Mon Sep 17 00:00:00 2001 From: chris529 Date: Fri, 13 Oct 2023 13:06:10 +0200 Subject: [PATCH 22/43] Update docs/antora/modules/ROOT/pages/management/docker.adoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mona Bärenfänger --- .../modules/ROOT/pages/management/docker.adoc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index ae5c530dc7..29cd8775d2 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -223,23 +223,28 @@ 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 ---- -The above command, displays the logs for all the microservices that have been logged so far, and that are currently existing. + +.Displays the latest logs for all the microservices ---- make logs-live ---- -The above command displays the logs for all the microservices currently logged so far, and also continues to display the latest logs. + +.Displays the logs for the specified microservice. ---- make logs-blockchain-connector ---- -The above command is similar to the `make logs` command, but only displays the appropriate logs for the specified microservice. -For example, in this case only for the `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 ---- -Finally, the above command is similar to the `make logs-live` command, but only displays the logs for the specified microservice. +In the above example, it will display latest logs only for the `blockchain-connector` microservice. + For example, in this case also only for blockchain-connector here. Replace the `blockchain-connector` with the specific service name required. From aeeb1620d804df030d1d1b601fea8ef6b4a89910 Mon Sep 17 00:00:00 2001 From: chris529 Date: Fri, 13 Oct 2023 13:34:06 +0200 Subject: [PATCH 23/43] Update docs/antora/modules/ROOT/pages/management/docker.adoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mona Bärenfänger --- docs/antora/modules/ROOT/pages/management/docker.adoc | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 29cd8775d2..3352aaabf4 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -245,6 +245,5 @@ make logs-live-blockchain-connector ---- In the above example, it will display latest logs only for the `blockchain-connector` microservice. -For example, in this case also only for blockchain-connector here. Replace the `blockchain-connector` with the specific service name required. From 2dd0e215032e3b4e61b05f3e20a596e844cac422 Mon Sep 17 00:00:00 2001 From: chris529 Date: Fri, 13 Oct 2023 13:34:46 +0200 Subject: [PATCH 24/43] Update docs/antora/modules/ROOT/pages/management/source.adoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mona Bärenfänger --- docs/antora/modules/ROOT/pages/management/source.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index aa439705d8..ea14b3cf42 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -99,7 +99,8 @@ To check the logs for the different microservices of Lisk Service, use the comma Alternatively, it is also possible to check the logs for a specific PM2 process based on its process ID. 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 <> command. To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation]. +TIP: The process ID of each PM2-managed process can be seen by executing the <> 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: From 3ce876abd9e6cb31abc99dd93cd9acd9d3c67dfc Mon Sep 17 00:00:00 2001 From: chris529 Date: Fri, 13 Oct 2023 17:19:53 +0200 Subject: [PATCH 25/43] update in docker.adoc --- docs/antora/modules/ROOT/pages/management/docker.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index b7440c88c3..cb3dca6686 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -12,7 +12,7 @@ Mona Bärenfänger :url_snapshot_config: configuration/index.adoc :url_backups: management/snapshots.adoc -NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and then follow the existing process described below. +NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and then create the Docker image, followed by starting Lisk Service as shown in the commands below. == Build Docker image From 5f2ae7cd999c7a3771dba9201d5ecde861c87b5d Mon Sep 17 00:00:00 2001 From: chris529 Date: Tue, 17 Oct 2023 10:25:15 +0200 Subject: [PATCH 26/43] update in source.adoc --- .../modules/ROOT/pages/management/source.adoc | 103 +++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index d1dc4b9cea..c5db33a7bc 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -10,6 +10,7 @@ Mona Bärenfänger Muhammad Talha > command. To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation]. -NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and then start Lisk Service as shown in the list of commands below. == Various PM2 commands @@ -364,3 +364,104 @@ redis-cli -n flushdb ==== You can start Lisk Service again with the <> command. + + +== Upgrade Lisk Service + +To upgrade Lisk Service to a desired version, please follow the steps listed below. + +1. Stop the existing running version of Lisk Service with the command listed below. + +---- +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 │ +└------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ +---- +==== + + +2. Checkout the specific version with *`git checkout `*. +---- +git checkout v0.7.0 +---- + +3. Update the npm dependencies by executing the following command. +---- +make build-local +---- + +3. 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...release notes for the relevant version to see if the existing databases need to be flushed. From e2d4dd8d1350ba882565a2d54e4e3cbd7d2d58eb Mon Sep 17 00:00:00 2001 From: chris529 Date: Tue, 17 Oct 2023 11:27:38 +0200 Subject: [PATCH 27/43] update in source.adoc --- .../modules/ROOT/pages/management/source.adoc | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index c5db33a7bc..0f14ed45f7 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -370,7 +370,7 @@ You can start Lisk Service again with the <> command. To upgrade Lisk Service to a desired version, please follow the steps listed below. -1. Stop the existing running version of Lisk Service with the command listed below. +1.Stop the existing running version of Lisk Service. ---- pm2 stop ecosystem.config.js @@ -406,21 +406,15 @@ pm2 stop ecosystem.config.js └------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ ---- ==== - - -2. Checkout the specific version with *`git checkout `*. +2.Checkout the version with *`git checkout `*. ---- git checkout v0.7.0 ---- - -3. Update the npm dependencies by executing the following command. +3.Update the npm dependencies by executing the following command. ---- make build-local ---- - -3. Restart Lisk Service with the following command. - - +4.Restart Lisk Service with the following command. ---- pm2 start ecosystem.config.js ---- @@ -464,4 +458,4 @@ pm2 start ecosystem.config.js ---- ==== -NOTE: Please check the :url_rel...release notes for the relevant version to see if the existing databases need to be flushed. +NOTE: Please check the {url_rel_notes}[release notes] for the relevant version to see if the existing databases need to be flushed. From 88ecfb2b6d9e79df2a24f53941880d05c493a5db Mon Sep 17 00:00:00 2001 From: chris529 Date: Tue, 17 Oct 2023 16:38:01 +0200 Subject: [PATCH 28/43] update in docker.adoc --- .../modules/ROOT/pages/management/docker.adoc | 87 ++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index cb3dca6686..5c9e0cf9d7 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -11,8 +11,8 @@ Mona Bärenfänger :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/ -NOTE: To upgrade Lisk Service to a desired version, please check out the specific version with *`git checkout `*, and then create the Docker image, followed by starting Lisk Service as shown in the commands below. == Build Docker image @@ -253,3 +253,88 @@ In the above example, it will display latest logs only for the `blockchain-conne 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. + +==== Option A - Download pre-built images from DockerHub + +1.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. + +---- +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 + +---- + +2.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. + + +3.Start Lisk Service in the containers. + +---- +make up +---- + + +==== Option B - Build images locally + +Build the images locally using the following steps. +Navigate inside the lisk-service root folder, and execute the following commands. + +1.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. + +2.Build the required updated Docker images. +---- +make build +---- + +3.Start Lisk Service in the containers. + +---- +make up +---- + +To verify the microservice logs, please refer to the <> section. From 2126e73857ec4c4861864bdbbde5bcfcec2da830 Mon Sep 17 00:00:00 2001 From: chris529 Date: Tue, 17 Oct 2023 17:04:56 +0200 Subject: [PATCH 29/43] update in source.adoc --- .../modules/ROOT/pages/management/source.adoc | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index 5f74a843cf..e5405c61c0 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -379,12 +379,12 @@ You can start Lisk Service again with the <> command. To upgrade Lisk Service to a desired version, please follow the steps listed below. -1.Stop the existing running version of Lisk Service. - +. Stop the existing running version of Lisk Service. ++ ---- pm2 stop ecosystem.config.js ---- - ++ .Response [%collapsible] ==== @@ -415,19 +415,25 @@ pm2 stop ecosystem.config.js └------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘ ---- ==== -2.Checkout the version with *`git checkout `*. + +. Checkout the version with *`git checkout `*. ++ ---- git checkout v0.7.0 ---- -3.Update the npm dependencies by executing the following command. + +. Update the npm dependencies by executing the following command. ++ ---- make build-local ---- -4.Restart Lisk Service with the following command. + +. Restart Lisk Service with the following command. ++ ---- pm2 start ecosystem.config.js ---- - ++ .Response [%collapsible] ==== From 773b3ab77a20d9d23b2c5169d60b04dfef86c51c Mon Sep 17 00:00:00 2001 From: chris529 Date: Tue, 17 Oct 2023 17:08:58 +0200 Subject: [PATCH 30/43] update in docker.adoc --- .../modules/ROOT/pages/management/docker.adoc | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 5c9e0cf9d7..bf00d93d6c 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -261,8 +261,8 @@ To upgrade the Docker container to a desired version, please follow one of the t ==== Option A - Download pre-built images from DockerHub -1.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. - +. 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. ++ ---- blockchain-app-registry: image: lisk/service_blockchain_app_registry:0.7.0 @@ -301,15 +301,15 @@ blockchain-app-registry: ---- -2.Stop Lisk Service +. 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. - -3.Start Lisk Service in the containers. - +. Start Lisk Service in the containers. ++ ---- make up ---- @@ -320,19 +320,21 @@ make up Build the images locally using the following steps. Navigate inside the lisk-service root folder, and execute the following commands. -1.Stop Lisk Service +. 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. -2.Build the required updated Docker images. +. Build the required updated Docker images. ++ ---- make build ---- -3.Start Lisk Service in the containers. - +. Start Lisk Service in the containers. ++ ---- make up ---- From 51222c90ffe1348d025c5df8cc5f372c2c202bf6 Mon Sep 17 00:00:00 2001 From: chris529 Date: Wed, 18 Oct 2023 11:33:23 +0200 Subject: [PATCH 31/43] Update docs/antora/modules/ROOT/pages/management/docker.adoc Co-authored-by: Sameer --- docs/antora/modules/ROOT/pages/management/docker.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index bf00d93d6c..8b0d68b430 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -257,7 +257,7 @@ 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 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 available tags (https://github.com/LiskHQ/lisk-service/tags) on GitHub. ==== Option A - Download pre-built images from DockerHub From aaefb4d472bc08cf48522faacc342a5c5983f62e Mon Sep 17 00:00:00 2001 From: chris529 Date: Wed, 18 Oct 2023 11:33:53 +0200 Subject: [PATCH 32/43] Update docs/antora/modules/ROOT/pages/management/docker.adoc Co-authored-by: Sameer --- docs/antora/modules/ROOT/pages/management/docker.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 8b0d68b430..1bc3df00d3 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -306,7 +306,7 @@ blockchain-app-registry: ---- 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. +NOTE: In case the database needs to be flushed please execute the `make down` command instead. Please check the {url_rel_notes}[GitHub release notes] for the relevant version to verify if the existing databases need to be flushed. . Start Lisk Service in the containers. + From 1cbda96ae26621c843c718712efbb864935998f5 Mon Sep 17 00:00:00 2001 From: chris529 Date: Wed, 18 Oct 2023 11:39:07 +0200 Subject: [PATCH 33/43] Update docs/antora/modules/ROOT/pages/management/source.adoc Co-authored-by: Sameer --- docs/antora/modules/ROOT/pages/management/source.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index e5405c61c0..19948bec11 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -377,7 +377,7 @@ You can start Lisk Service again with the <> command. == Upgrade Lisk Service -To upgrade Lisk Service to a desired version, please follow the steps listed below. +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 available tags (https://github.com/LiskHQ/lisk-service/tags) on GitHub. . Stop the existing running version of Lisk Service. + From 469bc53b03f2db679c633a785cb08d351ce7affc Mon Sep 17 00:00:00 2001 From: chris529 Date: Wed, 18 Oct 2023 11:39:23 +0200 Subject: [PATCH 34/43] Update docs/antora/modules/ROOT/pages/management/source.adoc Co-authored-by: Sameer --- docs/antora/modules/ROOT/pages/management/source.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index 19948bec11..61cdc6d86f 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -473,4 +473,4 @@ pm2 start ecosystem.config.js ---- ==== -NOTE: Please check the {url_rel_notes}[release notes] for the relevant version to see if the existing databases need to be flushed. +NOTE: Please check the {url_rel_notes}[GitHub release notes] for the relevant version to verify if the existing databases need to be flushed. From 68fea3860d8cd7b6d977785d8b4dfcadf8dc17cd Mon Sep 17 00:00:00 2001 From: chris529 Date: Wed, 18 Oct 2023 11:50:48 +0200 Subject: [PATCH 35/43] update in source.adoc --- docs/antora/modules/ROOT/pages/management/source.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index 61cdc6d86f..9d8eda0026 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -13,6 +13,8 @@ Mona Bärenfänger Muhammad Talha Date: Thu, 19 Oct 2023 11:31:12 +0200 Subject: [PATCH 36/43] Update docs/antora/modules/ROOT/pages/management/docker.adoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mona Bärenfänger --- docs/antora/modules/ROOT/pages/management/docker.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 1bc3df00d3..779ffae69d 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -263,6 +263,8 @@ To upgrade the Docker container to a desired version, please follow one of the t . 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. + +.docker-compose.yml +[source,yaml] ---- blockchain-app-registry: image: lisk/service_blockchain_app_registry:0.7.0 From b596062c67ab49e0bb5f069bd6e8dd092f276fac Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 19 Oct 2023 11:34:51 +0200 Subject: [PATCH 37/43] Update docs/antora/modules/ROOT/pages/management/docker.adoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mona Bärenfänger --- docs/antora/modules/ROOT/pages/management/docker.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 779ffae69d..cbcd66a808 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -261,7 +261,8 @@ To upgrade the Docker container to a desired version, please follow one of the t ==== Option A - Download pre-built images from DockerHub -. 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. +. 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] From 7cf1835311d4f13a6a9223fb85ea07ac163f9979 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 19 Oct 2023 11:56:53 +0200 Subject: [PATCH 38/43] Update docs/antora/modules/ROOT/pages/management/docker.adoc Co-authored-by: Sameer --- docs/antora/modules/ROOT/pages/management/docker.adoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index cbcd66a808..aee42e22f6 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -330,13 +330,19 @@ 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. +. Checkout the version with *`git checkout `* ++ +---- +git checkout v0.7.0 +---- + +. Build the required updated Docker images + ---- make build ---- -. Start Lisk Service in the containers. +. Start Lisk Service in the containers + ---- make up From b1bb6beebf73558a388592796e0cd12cf3daf558 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 19 Oct 2023 12:34:22 +0200 Subject: [PATCH 39/43] update in doker.adoc --- .../modules/ROOT/pages/management/docker.adoc | 68 +++++++++++-------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index aee42e22f6..534208bbf0 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -259,9 +259,44 @@ Replace the `blockchain-connector` with the specific service name required. 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 available tags (https://github.com/LiskHQ/lisk-service/tags) on GitHub. -==== Option A - Download pre-built images from DockerHub +[tabs] +==== +Option A - Build images locally :: ++ +-- + +Build the images locally using the following steps. +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. -. Update `docker-compose.yml` to download the specific image versions from the DockerHub as shown below. +. Checkout the version with *`git checkout `* ++ +---- +git checkout v0.7.0 +---- + +. Build the required updated Docker images ++ +---- +make build +---- + +. Start Lisk Service in the containers ++ +---- +make up +---- +-- +Option B - Download pre-built images from DockerHub:: ++ +-- +. 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 @@ -316,36 +351,9 @@ NOTE: In case the database needs to be flushed please execute the `make down` co ---- make up ---- +==== -==== Option B - Build images locally - -Build the images locally using the following steps. -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 `* -+ ----- -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 <> section. From ee83af09ab753db18bad6ff6e041000b864f4cf9 Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 19 Oct 2023 12:34:53 +0200 Subject: [PATCH 40/43] update in docker.adoc --- docs/antora/modules/ROOT/pages/management/docker.adoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 534208bbf0..2033e04899 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -353,7 +353,4 @@ make up ---- ==== - - - To verify the microservice logs, please refer to the <> section. From f981e0aacd486bb6900d5262d0afa4b89478b1cb Mon Sep 17 00:00:00 2001 From: chris529 Date: Thu, 19 Oct 2023 13:45:41 +0200 Subject: [PATCH 41/43] update in docker.adoc --- .../modules/ROOT/pages/management/docker.adoc | 59 +++++++++++-------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 2033e04899..6f2b9aefff 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -11,8 +11,8 @@ Mona Bärenfänger :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_rel_notes: https://github.com/LiskHQ/lisk-service/releases +:url_tags: https://github.com/LiskHQ/lisk-service/tags == Build Docker image @@ -249,7 +249,7 @@ In the above example, it will display logs only for the `blockchain-connector` m ---- make logs-live-blockchain-connector ---- -In the above example, it will display latest logs only for the `blockchain-connector` microservice. +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. @@ -257,17 +257,13 @@ 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 available tags (https://github.com/LiskHQ/lisk-service/tags) on GitHub. +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 - Build images locally :: +Option A - Download pre-built images from DockerHub:: + -- - -Build the images locally using the following steps. -Navigate inside the lisk-service root folder, and execute the following commands. - . Stop Lisk Service + ---- @@ -281,21 +277,6 @@ NOTE: In case the database needs to be flushed please execute the `make down` co git checkout v0.7.0 ---- -. Build the required updated Docker images -+ ----- -make build ----- - -. Start Lisk Service in the containers -+ ----- -make up ----- --- -Option B - Download pre-built images from DockerHub:: -+ --- . 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`. + @@ -339,18 +320,44 @@ blockchain-app-registry: ---- +. Start Lisk Service in the containers. ++ +---- +make up +---- +-- +Option B - Build images locally :: ++ +-- +Build the images locally using the following steps. +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}[GitHub release notes] for the relevant version to verify if the existing databases need to be flushed. +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. -. Start Lisk Service in the containers. +. Checkout the version with *`git checkout `* ++ +---- +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 <> section. From acc325e2cb96235ec2aa62def9fa68bb84f803e2 Mon Sep 17 00:00:00 2001 From: chris529 Date: Fri, 20 Oct 2023 11:57:04 +0200 Subject: [PATCH 42/43] Update docs/antora/modules/ROOT/pages/management/source.adoc Co-authored-by: Sameer --- docs/antora/modules/ROOT/pages/management/source.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index 9d8eda0026..265f5bc6ba 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -11,9 +11,9 @@ Mona Bärenfänger Muhammad Talha Date: Fri, 20 Oct 2023 12:00:37 +0200 Subject: [PATCH 43/43] Update docs/antora/modules/ROOT/pages/management/source.adoc Co-authored-by: Sameer --- docs/antora/modules/ROOT/pages/management/source.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index 265f5bc6ba..7d858d9cd7 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -379,7 +379,7 @@ You can start Lisk Service again with the <> 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 available tags (https://github.com/LiskHQ/lisk-service/tags) on GitHub. +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. +