From 8036d3f107fbb7d83f48d1cbe5f9f44095d2355c Mon Sep 17 00:00:00 2001 From: Tschakki Date: Wed, 26 Jul 2023 16:02:20 +0200 Subject: [PATCH 1/8] Align snippets in source setup --- .../modules/ROOT/pages/setup/source.adoc | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/antora/modules/ROOT/pages/setup/source.adoc b/docs/antora/modules/ROOT/pages/setup/source.adoc index ba5d29937c..0b1b3d7c4d 100644 --- a/docs/antora/modules/ROOT/pages/setup/source.adoc +++ b/docs/antora/modules/ROOT/pages/setup/source.adoc @@ -65,6 +65,10 @@ Next, ensure your package sources are up to date: [source,bash] ---- brew update +---- + +[source,bash] +---- brew doctor ---- -- @@ -133,6 +137,10 @@ If NVM or other package managers are not required, it is possible to install the [source,bash] ---- curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - +---- + +[source,bash] +---- sudo apt-get install -y nodejs ---- @@ -167,7 +175,15 @@ Ubuntu:: [source,bash] ---- sudo apt update +---- + +[source,bash] +---- sudo apt install mysql-server=8.0* +---- + +[source,bash] +---- sudo mysql_secure_installation ---- @@ -178,7 +194,15 @@ macOS:: [source,bash] ---- brew tap homebrew/services +---- + +[source,bash] +---- brew install mysql@8.0 +---- + +[source,bash] +---- brew services start mysql@8.0 ---- @@ -236,11 +260,13 @@ Follow the steps described in the xref:{url_setup_docker_docker}[Prerequisites > ---- docker run --name redis_service --port 6379:6379 -d redis:5-alpine ---- + .How to use the custom redis.conf file [source,bash] ---- docker run --name redis_service -v /path/to/custom_redis.conf:/usr/local/etc/redis/redis.conf --port 6379:6379 -d redis:5-alpine ---- + The above commands should be enough to start Redis which is ready to use with Lisk Service. To stop the Docker container again, execute the following commands below: From af803723bd2e9b78b0a97489ad46ebc02af188b5 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Wed, 26 Jul 2023 16:04:50 +0200 Subject: [PATCH 2/8] Align snippets in docker setup --- .../modules/ROOT/pages/setup/docker.adoc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/setup/docker.adoc b/docs/antora/modules/ROOT/pages/setup/docker.adoc index 7abb41fa06..b8efcdb988 100644 --- a/docs/antora/modules/ROOT/pages/setup/docker.adoc +++ b/docs/antora/modules/ROOT/pages/setup/docker.adoc @@ -7,6 +7,7 @@ Mona Bärenfänger Muhammad Talha Muhammad Talha Date: Wed, 26 Jul 2023 16:26:04 +0200 Subject: [PATCH 3/8] Align snippets in source mgmnt --- .../modules/ROOT/pages/management/docker.adoc | 50 +++++++++---------- .../modules/ROOT/pages/setup/docker.adoc | 21 +++----- .../modules/ROOT/pages/setup/source.adoc | 32 ++---------- 3 files changed, 33 insertions(+), 70 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index 86e0697056..f6dfd939de 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -6,15 +6,13 @@ Mona Bärenfänger :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 -[source,bash] ---- make up ---- @@ -26,7 +24,6 @@ In case a different node or network shall be used, xref:{url_config}[configure] == Stop .Inside the lisk-service root folder -[source,bash] ---- make down ---- @@ -35,7 +32,6 @@ This will stop Lisk Service. == Show the status of Docker containers -[source,bash] ---- docker ps ---- @@ -46,7 +42,6 @@ To reset the database of Lisk Service, drop the respective MySQL and Redis datab Before resetting the database, stop Lisk Service: -[source,bash] ---- make stop ---- @@ -55,11 +50,10 @@ Now connect to the Docker container in which you wish to reset the database. If To connect to the interactive shell of the MySQL Docker container in which you wish to reset the MySQL database, execute the following command: -[source,bash] ---- docker exec -it lisk-service-mysql-primary-1 bash ---- - + === Drop Database [tabs] @@ -69,10 +63,13 @@ MySQL DB:: -- . Login to MySQL with the `lisk` user. + -[source,bash] ---- -root@f1413b535254:/# mysql -ulisk -ppassword -mysql: [Warning] Using a password on the command line interface can be insecure. +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 @@ -88,19 +85,16 @@ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. ---- . Drop the `lisk` database. + -[source,bash] ---- mysql> drop database lisk; ---- . Create a fresh database `lisk`. + -[source,bash] ---- mysql> create database lisk; ---- . Log out from MySQL by typing `quit;` + -[source,bash] ---- mysql> quit; ---- @@ -115,10 +109,13 @@ MariaDB also uses the same SQL commands for querying and manipulating the releva . Login to MariaDB with the `lisk` user. + -[source,bash] ---- -root@f1413b535254:~# docker exec -it lisk_mariadb mysql -uroot -p -Enter password: +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 @@ -129,24 +126,26 @@ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. ---- . Drop the `lisk` database. + -[source,bash] ---- MariaDB [(none)]> drop database lisk; +---- ++ +---- Query OK, 0 rows affected (0.009 sec) ---- . Create a fresh database `lisk` + -[source,bash] ---- MariaDB [(none)]> create database lisk; +---- ++ +---- Query OK, 1 row affected (0.001 sec) ---- . Log out by typing `quit;`. + -[source,bash] ---- MariaDB [(none)]> exit; -Bye ---- Log out of the docker container by pressing kbd:[CRTL] + kbd:[D]. @@ -157,9 +156,11 @@ Log out of the docker container by pressing kbd:[CRTL] + kbd:[D]. Reset the databases for Redis after dropping the MySQL database: -[source,bash] ---- sudo docker exec -it lisk-service_redis_core_persistent_1 /bin/sh +---- + +---- redis-cli flushall ---- @@ -175,9 +176,8 @@ For more information, check the Redis documentation: {url_FLUSHALL}[FLUSHALL]. To flush only a particular DB in Redis, execute the following command instead: -[source,bash] ---- - redis-cli -n flushdb +redis-cli -n flushdb ---- ==== @@ -185,7 +185,6 @@ To flush only a particular DB in Redis, execute the following command instead: After the databases are reset, start Lisk Service again as usual: -[source,bash] ---- make up ---- @@ -199,7 +198,6 @@ To check the logs for the different microservices of Lisk Service, use the comma For example, to see the logs for the Gateway microservice, execute the following command: -[source,bash] ---- docker container logs lisk-service_gateway_1 ---- diff --git a/docs/antora/modules/ROOT/pages/setup/docker.adoc b/docs/antora/modules/ROOT/pages/setup/docker.adoc index b8efcdb988..577d7dd306 100644 --- a/docs/antora/modules/ROOT/pages/setup/docker.adoc +++ b/docs/antora/modules/ROOT/pages/setup/docker.adoc @@ -8,6 +8,7 @@ Mona Bärenfänger Muhammad Talha :page-previous-title: Setup :page-next: /lisk-service/configuration/source.html :page-next-title: Configuration with PM2 +:source-language: bash // URLs :url_docker_install_linux: https://docs.docker.com/engine/install :url_docker_install_linux_compose: https://docs.docker.com/compose/install/ @@ -50,7 +51,6 @@ Ubuntu:: -- In Ubuntu and its derivatives APT is the base package management application. Ensure your local APT registry is up-to-date. -[source,bash] ---- apt update ---- @@ -62,12 +62,10 @@ Install https://brew.sh/[Brew] by following the https://brew.sh/[latest instruct Next, ensure your package sources are up to date: -[source,bash] ---- brew update ---- -[source,bash] ---- brew doctor ---- @@ -82,8 +80,6 @@ Ubuntu:: + -- Install the `build-essential` package alongside with several development tools. - -[source,bash] ---- sudo apt-get install -y build-essential git make ---- @@ -91,7 +87,6 @@ sudo apt-get install -y build-essential git make macOS:: + -- -[source,bash] ---- xcode-select --install ---- @@ -116,13 +111,11 @@ NVM is a bash script that enables the management of multiple active Node.js vers . Install v16 of Node.js using NVM. .Check for the latest LTS version -[source,bash] ---- nvm ls-remote ---- .Install the latest LTS version -[source,bash] ---- nvm install 16 ---- @@ -134,12 +127,10 @@ If NVM or other package managers are not required, it is possible to install the *Ubuntu* -[source,bash] ---- curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - ---- -[source,bash] ---- sudo apt-get install -y nodejs ---- @@ -148,7 +139,6 @@ sudo apt-get install -y nodejs For macOS, please execute the following command below: -[source,bash] ---- brew install node@16 ---- @@ -172,17 +162,14 @@ You can choose to create a custom database with a different user and password. T Ubuntu:: + -- -[source,bash] ---- sudo apt update ---- -[source,bash] ---- sudo apt install mysql-server=8.0* ---- -[source,bash] ---- sudo mysql_secure_installation ---- @@ -191,17 +178,14 @@ sudo mysql_secure_installation macOS:: + -- -[source,bash] ---- brew tap homebrew/services ---- -[source,bash] ---- brew install mysql@8.0 ---- -[source,bash] ---- brew services start mysql@8.0 ---- @@ -256,13 +240,11 @@ Follow the steps described in the xref:{url_setup_docker_docker}[Prerequisites > **Installation** .How to install and start Redis with Docker -[source,bash] ---- docker run --name redis_service --port 6379:6379 -d redis:5-alpine ---- .How to use the custom redis.conf file -[source,bash] ---- docker run --name redis_service -v /path/to/custom_redis.conf:/usr/local/etc/redis/redis.conf --port 6379:6379 -d redis:5-alpine ---- @@ -272,7 +254,6 @@ The above commands should be enough to start Redis which is ready to use with Li To stop the Docker container again, execute the following commands below: .How to stop Redis with Docker -[source,bash] ---- docker stop redis_service ---- @@ -281,15 +262,11 @@ Redis system-wide:: + -- *Ubuntu* - -[source, bash] ---- sudo apt-get install redis-server ---- *macOS* - -[source, bash] ---- brew install redis ---- @@ -304,7 +281,7 @@ we should encourage community to make Lisk Service compatible with this service, {url_geojs}[GeoJS] is used by the Network Monitor for IP address geo-location. -[source,bash] + ---- #todo ---- @@ -315,7 +292,6 @@ we should encourage community to make Lisk Service compatible with this service, {url_pm2}[PM2] helps manage the node processes for Lisk Service and also offers easy log rotation (Highly Recommended). -[source,bash] ---- npm install -g pm2 ---- @@ -329,7 +305,7 @@ It is strongly recommended that you synchronize your Lisk Core node with the net If you have not already done so, clone the {url_github_service}[lisk-service^] GitHub repository and then navigate into the project folder and check out the latest release. -[source,bash] + ---- # Clone Lisk Service repository git clone https://github.com/LiskHQ/lisk-service.git @@ -346,7 +322,6 @@ git checkout development Install all npm dependencies from the root directory. -[source,bash] ---- make build-local ---- @@ -354,7 +329,6 @@ make build-local Now it is possible to start Lisk Service. .Start Lisk Service from Source code -[source,bash] ---- npm run start ---- From 124f8e9d2b43f6eadd18a13d891f4d3f156d7345 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Thu, 27 Jul 2023 12:01:25 +0200 Subject: [PATCH 4/8] Align snippets in mgmnt and config --- .../ROOT/pages/configuration/index.adoc | 56 +++++++++---------- .../modules/ROOT/pages/management/source.adoc | 30 +--------- 2 files changed, 31 insertions(+), 55 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/configuration/index.adoc b/docs/antora/modules/ROOT/pages/configuration/index.adoc index db7b4a9f75..12601a3f59 100644 --- a/docs/antora/modules/ROOT/pages/configuration/index.adoc +++ b/docs/antora/modules/ROOT/pages/configuration/index.adoc @@ -6,7 +6,7 @@ Muhammad Talha :url_pm2: https://pm2.keymetrics.io/ :url_config_file: https://github.com/LiskHQ/lisk-service/blob/development/ecosystem.config.js :url_lisk_service_repo: https://github.com/LiskHQ/lisk-service - +:source-language: js On the xref:{url_intro_services}[Introduction to Lisk Service] page, we have discussed the various xref:{url_microservices}[microservices] that combine to form Lisk Service. On this page, we will thoroughly discuss the configuration options available for each service. @@ -49,12 +49,12 @@ This could be a NATS or a Redis instance. | number | Inter-microservice request timeout in seconds. | 10 - + | `SERVICE_LOG_LEVEL` | string | Set the application logging level; Available options are `trace`, `debug`, `info`, `warn`, `error`, and `fatal`. | info - + | `SERVICE_LOG_STDOUT` | string | Enable posting logs to the standard output stream. @@ -83,7 +83,7 @@ For example, Graylog 'localhost:12201/udp'. Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -138,7 +138,7 @@ Properties:: | string | URL of the host. | 127.0.0.1 - + | `SERVICE_BROKER` | string | URL of the microservice message broker (NATS or Redis). @@ -148,7 +148,7 @@ Properties:: | string | Ensures that JSON-RPC accepts a valid JSON-RPC 2.0 envelope. | false - + | `ENABLE_HTTP_API` | string | Enables particular HTTP API endpoints. @@ -229,7 +229,7 @@ This would include the Cache-Control header within the responses. Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -284,7 +284,7 @@ Properties:: | string | URL of the microservice message broker (NATS or Redis). | redis://localhost:6379/0 - + | `LISK_APP_WS` | string | URL to connect with the Lisk application node over WebSocket. @@ -294,7 +294,7 @@ Properties:: | string | Boolean flag to enable IPC-based connection to the Lisk application node. Requires `LISK_APP_DATA_PATH` to be set. -| true +| true | `LISK_APP_DATA_PATH` | string @@ -318,7 +318,7 @@ Only to be used when the genesis block is large enough to be transmitted over AP Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -363,7 +363,7 @@ Properties:: | string | URL of the microservice message broker (NATS or Redis). | redis://localhost:6379/0 - + | `SERVICE_MESSAGE_QUEUE_REDIS` | string | URL of the Redis instance hosting the job queue to schedule the block indexing jobs. @@ -376,7 +376,7 @@ Must match the value supplied for the `indexer` microservice. Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -416,7 +416,7 @@ Properties:: | string | URL of the microservice message broker (NATS or Redis). | redis://localhost:6379/0 - + | `SERVICE_INDEXER_MYSQL` | string | Connection string of the MySQL instance that the microservice connects to. @@ -458,7 +458,7 @@ Must match the value supplied for the `coordinator` microservice. Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -504,7 +504,7 @@ Properties:: | string | URL of the microservice message broker (NATS or Redis). | redis://localhost:6379/0 - + | `SERVICE_APP_REGISTRY_MYSQL` | string | Connection string of the MySQL instance that the microservice connects to. @@ -521,7 +521,7 @@ Properties:: Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -562,7 +562,7 @@ Properties:: | string | URL of the microservice message broker (NATS or Redis). | redis://localhost:6379/0 - + | `SERVICE_FEE_ESTIMATOR_CACHE` | string | URL of the cache storage (Redis). @@ -594,7 +594,7 @@ Properties:: Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -639,7 +639,7 @@ Properties:: | string | URL of the microservice message broker (NATS or Redis). | redis://localhost:6379/0 - + | `SERVICE_STATISTICS_MYSQL` | string | Connection string of the MySQL instance that the microservice connects to. @@ -661,7 +661,7 @@ Properties:: Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -702,7 +702,7 @@ Properties:: | string | URL of the microservice message broker (NATS or Redis). | redis://localhost:6379/0 - + | `SERVICE_MARKET_REDIS` | string | URL of the cache storage (Redis). @@ -710,9 +710,9 @@ Properties:: | `SERVICE_MARKET_FIAT_CURRENCIES` | string -| Fiat currencies are used for price calculation. +| Fiat currencies are used for price calculation. All Fiat currencies used here need to be comma separated. -| EUR,USD,CHF,GBP,RUB +| EUR,USD,CHF,GBP,RUB | `SERVICE_MARKET_TARGET_PAIRS` | string @@ -725,14 +725,14 @@ The values listed here must be comma separated. | Optional API key for https://exchangeratesapi.io/. The `/market/prices` endpoint will respond with additional data, specifically the exchange rates for various cryptocurrencies in other fiat currencies. The free plan would suffice for Lisk Service. -| +| |=== -- Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -774,7 +774,7 @@ Properties:: | string | URL of the microservice message broker (NATS or Redis). | redis://localhost:6379/0 - + | `SERVICE_EXPORT_REDIS` | string | URL of the permanent cache storage (Redis). @@ -791,7 +791,7 @@ Properties:: Sample:: + -- -[source,js] + ---- module.exports = { apps: [ @@ -832,7 +832,7 @@ module.exports = { // | string // | Enable or disable apply snapshot feature. // | true - + // | `INDEX_SNAPSHOT_URL` // | string // | Custom snapshot URL: expected to end with "sql.gz". diff --git a/docs/antora/modules/ROOT/pages/management/source.adoc b/docs/antora/modules/ROOT/pages/management/source.adoc index b371f8ea4e..6501795456 100644 --- a/docs/antora/modules/ROOT/pages/management/source.adoc +++ b/docs/antora/modules/ROOT/pages/management/source.adoc @@ -5,7 +5,7 @@ Mona Bärenfänger Muhammad Talha > command. For example, to see the logs for the Gateway microservice, execute the following command: -[source,bash] ---- pm2 logs lisk-service-gateway ---- @@ -115,7 +110,6 @@ pm2 logs lisk-service-gateway [%collapsible] ==== .Example output -[source,bash] ---- 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 @@ -138,7 +132,6 @@ pm2 logs lisk-service-gateway === Flush Remove all the logs of the PM2-managed processes defined in the specified config file. -[source,bash] ---- pm2 flush ecosystem.config.js ---- @@ -147,7 +140,6 @@ pm2 flush ecosystem.config.js [%collapsible] ==== .Example output -[source,bash] ---- [PM2] Logs flushed ---- @@ -157,7 +149,6 @@ pm2 flush ecosystem.config.js === Stop Stop PM2 managed Lisk Service instance. -[source,bash] ---- pm2 stop ecosystem.config.js ---- @@ -198,7 +189,6 @@ pm2 stop ecosystem.config.js Restart Lisk Service via PM2. -[source,bash] ---- pm2 restart ecosystem.config.js ---- @@ -243,12 +233,9 @@ pm2 restart ecosystem.config.js ---- ==== - - === Delete Remove all processes from the PM2 list. -[source,bash] ---- pm2 delete ecosystem.config.js ---- @@ -258,7 +245,6 @@ pm2 delete ecosystem.config.js [%collapsible] ==== .Example output -[source,bash] ---- [PM2] [lisk-service-gateway](0) ✓ [PM2] [lisk-service-blockchain-app-registry](1) ✓ @@ -280,7 +266,6 @@ pm2 delete ecosystem.config.js === Clean all run-time files with dependencies -[source,bash] ---- make clean-local ---- @@ -289,7 +274,6 @@ make clean-local [%collapsible] ==== .Example output -[source,bash] ---- rm -rf node_modules cd ./framework && rm -rf node_modules @@ -309,7 +293,6 @@ cd ./tests && rm -rf node_modules === Install npm dependencies -[source,bash] ---- make build-local ---- @@ -322,35 +305,30 @@ To reset the database of Lisk Service, drop the respective MySQL and Redis datab . Stop Lisk Service + -[source,bash] ---- npm stop ---- . Login to MySQL with the `lisk` user. + -[source,bash] ---- mysql -u lisk -ppassword ---- . Drop the database. + -[source,bash] ---- mysql> drop database lisk; ---- . Create a fresh database. + -[source,bash] ---- mysql> create database lisk; ---- . Quit MySQL. + -[source,bash] ---- mysql> quit; ---- @@ -361,7 +339,6 @@ NOTE: The process to re-index all the data commences after Lisk Service starts a Reset the databases for Redis after dropping the MySQL database: -[source,bash] ---- redis-cli flushall ---- @@ -376,10 +353,9 @@ For more information, check the Redis documentation: {url_FLUSHALL}[FLUSHALL]. To flush only a particular database in Redis, execute the following command instead: -[source,bash] ---- redis-cli -n flushdb ---- ==== -You can start Lisk Service again with the <> command. \ No newline at end of file +You can start Lisk Service again with the <> command. From cee9194ad94bfd358a8f99c64f7d2cf0a3d9253a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mona=20B=C3=A4renf=C3=A4nger?= Date: Fri, 28 Jul 2023 12:27:02 +0200 Subject: [PATCH 5/8] Apply suggestions from code review Co-authored-by: Muhammad Talha <13951043+TalhaMaliktz@users.noreply.github.com> --- docs/antora/modules/ROOT/pages/management/docker.adoc | 4 ++++ docs/antora/modules/ROOT/pages/setup/docker.adoc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/management/docker.adoc b/docs/antora/modules/ROOT/pages/management/docker.adoc index f6dfd939de..ee454feeb7 100644 --- a/docs/antora/modules/ROOT/pages/management/docker.adoc +++ b/docs/antora/modules/ROOT/pages/management/docker.adoc @@ -130,6 +130,7 @@ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> drop database lisk; ---- + +.Result ---- Query OK, 0 rows affected (0.009 sec) ---- @@ -139,6 +140,7 @@ Query OK, 0 rows affected (0.009 sec) MariaDB [(none)]> create database lisk; ---- + +.Result ---- Query OK, 1 row affected (0.001 sec) ---- @@ -156,10 +158,12 @@ Log out of the docker container by pressing kbd:[CRTL] + kbd:[D]. 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 ---- diff --git a/docs/antora/modules/ROOT/pages/setup/docker.adoc b/docs/antora/modules/ROOT/pages/setup/docker.adoc index 577d7dd306..58a2789557 100644 --- a/docs/antora/modules/ROOT/pages/setup/docker.adoc +++ b/docs/antora/modules/ROOT/pages/setup/docker.adoc @@ -136,11 +136,11 @@ Clone the {url_github_service}[lisk-service^] GitHub repository and then navigat git clone https://github.com/LiskHQ/lisk-service.git ---- - ---- cd lisk-service ---- +Switch to the latest release branch. ---- git checkout v0.7.0 From 1231ce7232d11f4ac5112c9324b45185c57dda37 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Fri, 28 Jul 2023 12:37:47 +0200 Subject: [PATCH 6/8] Apply feedback from review --- .../modules/ROOT/pages/setup/source.adoc | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/setup/source.adoc b/docs/antora/modules/ROOT/pages/setup/source.adoc index 4f589c2755..6575c738cf 100644 --- a/docs/antora/modules/ROOT/pages/setup/source.adoc +++ b/docs/antora/modules/ROOT/pages/setup/source.adoc @@ -2,10 +2,6 @@ Mona Bärenfänger :description: Describes all necessary steps and requirements to install Lisk Service from source. :toc: -:page-previous: /lisk-service/index.html -:page-previous-title: Setup -:page-next: /lisk-service/configuration/source.html -:page-next-title: Configuration with PM2 :source-language: bash // URLs :url_docker_install_linux: https://docs.docker.com/engine/install @@ -205,7 +201,9 @@ Open up `my.cnf` . If you are unsure where to find your `my.cnf`, run the following command: - $ mysql --verbose --help | grep my.cnf +---- +mysql --verbose --help | grep my.cnf +---- Add the following at the end of the file: @@ -215,11 +213,15 @@ Save and exit. Next, login via the terminal: - $ mysql -uroot +---- +mysql -uroot +---- Then run the following command to update the root password: - ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; +---- +ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; +---- Now you should be able to login to your MySQL 8 via your MySQL Client. @@ -305,18 +307,23 @@ It is strongly recommended that you synchronize your Lisk Core node with the net If you have not already done so, clone the {url_github_service}[lisk-service^] GitHub repository and then navigate into the project folder and check out the latest release. - +.Clone Lisk Service repository ---- -# Clone Lisk Service repository git clone https://github.com/LiskHQ/lisk-service.git +---- -# Change directory to the new repository +.Change directory to the new repository +---- cd lisk-service +---- -# Switch to the recent stable as a base +.Switch to the recent stable as a base +---- git checkout v0.7.0 +---- -# ...or use the development branch +.\...or use the development branch +---- git checkout development ---- @@ -335,8 +342,8 @@ npm run start The default configuration in `ecosystem.config.js` should suffice in most of the cases. If necessary, please modify the file to configure the necessary environment variables for each microservice as per your requirements. -To change the default configuration, check out the page xref:{url_config}[Configuration with PM2]. +To change the default configuration, check out the page xref:{url_config}[]. -// TODO: More commands about how to manage Lisk Service are described on the xref:{url_management_pm2}[PM2 commands] page. +More commands about how to manage Lisk Service are described on the xref:{url_management_pm2}[] page. // TODO: TIP: Check the xref:{url_index_usage}[Usage] section for examples of how to use and interact with Lisk Service. From 3ecbd582eb6a7b021f746c3cebd68bb4ce0e5969 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Fri, 28 Jul 2023 12:49:00 +0200 Subject: [PATCH 7/8] Apply feedback from review --- docs/antora/modules/ROOT/pages/setup/docker.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/setup/docker.adoc b/docs/antora/modules/ROOT/pages/setup/docker.adoc index 58a2789557..f505767af8 100644 --- a/docs/antora/modules/ROOT/pages/setup/docker.adoc +++ b/docs/antora/modules/ROOT/pages/setup/docker.adoc @@ -170,7 +170,7 @@ cp docker/example.env .env In the next step, open `.env` to set the required environment variables. -.Working directory: ./lisk-service/ +.Working directory: lisk-service/ ---- vim .env ---- @@ -198,7 +198,7 @@ TIP: For a complete list of supported environment variables check the xref:{url_ Run the following command to start Lisk Service: -.Working directory: ./lisk-service/ +.Working directory: lisk-service/ ---- make up ---- @@ -206,7 +206,7 @@ make up == Stopping Lisk Service You can stop Lisk Service again with the following command: -.Working directory: ./lisk-service/ +.Working directory: lisk-service/ ---- make down ---- From 31d7ab03bf7979e0b66515feddd935ac3dbdb572 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Fri, 28 Jul 2023 13:50:43 +0200 Subject: [PATCH 8/8] Uncomment line --- docs/antora/modules/ROOT/pages/setup/docker.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora/modules/ROOT/pages/setup/docker.adoc b/docs/antora/modules/ROOT/pages/setup/docker.adoc index f505767af8..260ece0fc5 100644 --- a/docs/antora/modules/ROOT/pages/setup/docker.adoc +++ b/docs/antora/modules/ROOT/pages/setup/docker.adoc @@ -211,6 +211,6 @@ You can stop Lisk Service again with the following command: make down ---- -// More commands about how to manage Lisk Service are described on the xref:{url_management}[Docker commands] page. +More commands about how to manage Lisk Service are described on the xref:{url_management}[] page. // TIP: Check the xref:{url_index_usage}[Usage] section for examples of how to use and interact with Lisk Service.