Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1853 from LiskHQ/1571-add-update-service-node-pag…
Browse files Browse the repository at this point in the history
…e-for-source

Add update service node page for source in Lisk Service v0.7.0
  • Loading branch information
sameersubudhi authored Oct 20, 2023
2 parents f981e0a + c61d27d commit 68b7ab3
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions docs/antora/modules/ROOT/pages/management/source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Mona Bärenfänger <[email protected]> Muhammad Talha <muhammad.talha@lightcurv
:url_FLUSHALL: https://redis.io/commands/FLUSHALL
:url_pm2_management: https://pm2.keymetrics.io/docs/usage/log-management/
:url_backups: management/snapshots.adoc
:url_rel_notes: https://github.com/LiskHQ/lisk-service/releases
:url_tags: https://github.com/LiskHQ/lisk-service/tags


//TODO: add in link to new Backups page for importing the DB snapshot manually

Expand All @@ -20,6 +23,9 @@ For more details about PM2, see {url_pm2_docs}[PM2 docs].

Moreover, we'll also talk about the steps to reset a Lisk Service node.

TIP: The process ID of each PM2-managed process can be seen by executing the <<list>> command. To learn more about PM2 log management please refer the {url_pm2_management}[PM2 logs documentation].


== Various PM2 commands

=== Start
Expand Down Expand Up @@ -369,3 +375,104 @@ redis-cli -n <db_number> flushdb
====

You can start Lisk Service again with the <<start>> command.


== Upgrade Lisk Service

To upgrade Lisk Service to a desired version, please follow the steps listed below. To find all the tagged versions for Lisk Service, please check the {url_tags}[available tags] on GitHub.

. Stop the existing running version of Lisk Service.
+
----
pm2 stop ecosystem.config.js
----
+
.Response
[%collapsible]
====
.Example output
[source,bash]
----
[PM2] [lisk-service-blockchain-app-registry](1) ✓
[PM2] [lisk-service-gateway](0) ✓
[PM2] [lisk-service-blockchain-indexer](3) ✓
[PM2] [lisk-service-blockchain-connector](2) ✓
[PM2] [lisk-service-blockchain-coordinator](4) ✓
[PM2] [lisk-service-fee-estimator](5) ✓
[PM2] [lisk-service-transaction-statistics](6) ✓
[PM2] [lisk-service-market](7) ✓
[PM2] [lisk-service-export](8) ✓
┌------------------------------------------------------------------------------------------------------------------------------------------------------------------------┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├------------------------------------------------------------------------------------------------------------------------------------------------------------------------┤
│ 1 │ lisk-service-blockchain-app-registry │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 32 │ stopped │ 0% │ 0b │ XYZ │ disabled │
│ 2 │ lisk-service-blockchain-connector │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ XYZ │ disabled │
│ 4 │ lisk-service-blockchain-coordinator │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ XYZ │ disabled │
│ 3 │ lisk-service-blockchain-indexer │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 32 │ stopped │ 0% │ 0b │ XYZ │ disabled │
│ 8 │ lisk-service-export │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │
│ 5 │ lisk-service-fee-estimator │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │
│ 0 │ lisk-service-gateway │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │
│ 7 │ lisk-service-market │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │
│ 6 │ lisk-service-transaction-statistics │ default │ 0.7.0-… │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ XYZ │ disabled │
└------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘
----
====

. Checkout the version with *`git checkout <tag>`*.
+
----
git checkout v0.7.0
----

. Update the npm dependencies by executing the following command.
+
----
make build-local
----

. Restart Lisk Service with the following command.
+
----
pm2 start ecosystem.config.js
----
+
.Response
[%collapsible]
====
.Example output
----
[PM2] Applying action restartProcessId on app [lisk-service-gateway](ids: [ 0 ])
[PM2] Applying action restartProcessId on app [lisk-service-blockchain-app-registry](ids: [ 1 ])
[PM2] [lisk-service-gateway](0) ✓
[PM2] [lisk-service-blockchain-app-registry](1) ✓
[PM2] Applying action restartProcessId on app [lisk-service-blockchain-connector](ids: [ 2 ])
[PM2] [lisk-service-blockchain-connector](2) ✓
[PM2] Applying action restartProcessId on app [lisk-service-blockchain-indexer](ids: [ 3 ])
[PM2] [lisk-service-blockchain-indexer](3) ✓
[PM2] Applying action restartProcessId on app [lisk-service-blockchain-coordinator](ids: [ 4 ])
[PM2] [lisk-service-blockchain-coordinator](4) ✓
[PM2] Applying action restartProcessId on app [lisk-service-fee-estimator](ids: [ 5 ])
[PM2] [lisk-service-fee-estimator](5) ✓
[PM2] Applying action restartProcessId on app [lisk-service-transaction-statistics](ids: [ 6 ])
[PM2] [lisk-service-transaction-statistics](6) ✓
[PM2] Applying action restartProcessId on app [lisk-service-market](ids: [ 7 ])
[PM2] [lisk-service-market](7) ✓
[PM2] Applying action restartProcessId on app [lisk-service-export](ids: [ 8 ])
[PM2] [lisk-service-export](8) ✓
┌----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┤
│ 1 │ lisk-service-blockchain-app-registry │ default │ 0.7.0-… │ fork │ 33328 │ 0s │ 16 │ online │ 0% │ 65.5mb │ XYZ │ disabled │
│ 2 │ lisk-service-blockchain-connector │ default │ 0.7.0-… │ fork │ 33331 │ 0s │ 0 │ online │ 0% │ 63.8mb │ XYZ │ disabled │
│ 4 │ lisk-service-blockchain-coordinator │ default │ 0.7.0-… │ fork │ 33341 │ 0s │ 0 │ online │ 0% │ 54.1mb │ XYZ │ disabled │
│ 3 │ lisk-service-blockchain-indexer │ default │ 0.7.0-… │ fork │ 33338 │ 0s │ 16 │ online │ 0% │ 54.3mb │ XYZ │ disabled │
│ 8 │ lisk-service-export │ default │ 0.7.0-… │ fork │ 33355 │ 0s │ 15 │ online │ 0% │ 14.1mb │ XYZ │ disabled │
│ 5 │ lisk-service-fee-estimator │ default │ 0.7.0-… │ fork │ 33346 │ 0s │ 15 │ online │ 0% │ 46.9mb │ XYZ │ disabled │
│ 0 │ lisk-service-gateway │ default │ 0.7.0-… │ fork │ 33326 │ 0s │ 15 │ online │ 0% │ 65.6mb │ XYZ │ disabled │
│ 7 │ lisk-service-market │ default │ 0.7.0-… │ fork │ 33351 │ 0s │ 15 │ online │ 0% │ 36.9mb │ XYZ │ disabled │
│ 6 │ lisk-service-transaction-statistics │ default │ 0.7.0-… │ fork │ 33348 │ 0s │ 15 │ online │ 0% │ 43.5mb │ XYZ │ disabled │
└----------------------------------------------------------------------------------------------------------------------------------------------------------------------------┘
----
====

NOTE: Please check the {url_rel_notes}[GitHub release notes] for the relevant version to verify if the existing databases need to be flushed.

0 comments on commit 68b7ab3

Please sign in to comment.