Skip to content

Commit fef75d9

Browse files
committed
Add doc about Upgrading OS(Ubuntu) on running nodes
Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
1 parent 6410d7f commit fef75d9

2 files changed

Lines changed: 107 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,5 @@ the following instructions from [how-to.md](docs/how-to.md) can be used for ever
232232
- [CometBFT](https://cometbft.com/)
233233
- [Cosmos SDK](https://cosmos.network/sdk)
234234
- [Ledger Nano Support](docs/ledger-nano.md)
235-
- [Mapping DCL Entities to Matter Specification](docs/mapping_against_matter_spec.md)
235+
- [Mapping DCL Entities to Matter Specification](docs/mapping_against_matter_spec.md)
236+
- [Upgrading OS(Ubuntu) on running nodes](docs/upgrading-ubuntu-on-running-nodes.md)
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Node OS Upgrade: Upgrading DCL cloud instance from Ubuntu 20.04 to Ubuntu 24.04
2+
3+
This document outlines the procedure for upgrading active Distributed Compliance Ledger (DCL) node to Ubuntu 24.04.
4+
5+
1. **Take a snapshot**: Take a snapshot from running instance. Follow-up guidelines of your cloud provider to take a snapshot.
6+
7+
Bellow are the steps for AWS Lightsail.
8+
9+
1.1 Open `AWS Lightsail` console and select running instance.
10+
11+
1.2 From bottom navigation bar, select `Snapshots` tab.
12+
13+
1.3 Click `Create snapshot` and give a name then click to `Create`.
14+
15+
1.4 Wait until Snapshotting finishes.
16+
17+
2. **Connect to running cloud instance**. Connect using SSH. Below are the steps for AWS Lightsail.
18+
19+
2.1 Open `AWS Lightsail` console and select running instance.
20+
21+
2.2 From bottom navigation bar, select `Connect` tab.
22+
23+
2.3 Click on `Connect using SSH`.
24+
25+
3. **OS Preparation**: Update existing packages.
26+
27+
3.1 Switch to root user
28+
```bash
29+
sudo su
30+
```
31+
3.2 Update existing packages.
32+
```bash
33+
sudo apt update
34+
sudo apt upgrade -y
35+
sudo apt autoremove -y
36+
```
37+
*Note: During the upgrade, this terminal may fail. In that case, you have to use an SSH client like Terminal on Linux or PuTTY on Windows to connect to the server.*
38+
39+
3.3 After package upgrade, reboot the instance
40+
```bash
41+
reboot
42+
```
43+
44+
4. **Release Upgrade**: Initiate the Ubuntu release upgrade.
45+
46+
4.1 Connect to the instance using SSH.
47+
```bash
48+
ssh -i "private-key.pem" root@{{ip or hostname}}
49+
```
50+
4.2 In terminal window, you should see something like this:
51+
52+
```bash
53+
...
54+
New release '22.04.5 LTS' available.
55+
Run 'do-rlease-upgrade' to upgrade to it.
56+
...
57+
```
58+
59+
4.3 Execute release upgrade command
60+
```bash
61+
do-release-upgrade
62+
```
63+
4.4 During the upgrade, it will ask to open an additional ssh daemon at `1022` port. Enter `y` to continue.
64+
65+
4.5 It will also ask to open the port in the firewall. This is a firewall inside the instance. Press `Enter` button to continue
66+
Let's open the port in the Lightsail firewall.
67+
68+
* From bottom navigation bar of selected instance, select `Networking` tab.
69+
* Click `Add rule`
70+
* Default rule is `Custom` and protocol is `TCP` and enter `1022` port
71+
* Click on `Create`
72+
73+
*Note: It is a reserved port to connect to the instance if the default `22` port will fail during the upgrade. Don't forget to remove this open port after upgrade.
74+
75+
4.6 For `Installing the upgrade can take several hours` prompt, press `y` button to continue.
76+
77+
4.7 While the upgrade is downloading these packages, connect to `1022` SSH port as a second safe connection.
78+
```bash
79+
ssh -p 1022 -i "private-key.pem" root@{ip or hostname}
80+
```
81+
82+
4.6 For `There are services installed on your system which need to be restarted when certain libraries such as libpam, libc,.. Restart services during package upgrade without asking` prompt, select `yes` and press Enter.
83+
84+
4.7 For `Postix Configuration` prompt, select default `No configuration` and press Enter.
85+
86+
4.8 For `Configuration file 'etc/monit/monitrc` prompt, press `Y`.
87+
88+
4.9 For `Remove obsolete packages` prompt, enter `y`.
89+
90+
4.10 For `System upgrade complete. Restart required` prompt, enter `y` to reboot the instance.
91+
92+
5. **Verification**: After reboot, ensure the instance upgraded to Ubuntu `22.04` and the `dcld` is running.
93+
94+
5.1 After connecting using ssh, execute below command to verify current version of Ubuntu:
95+
```bash
96+
sudo lsb_release -a
97+
```
98+
99+
5.2 Verify that the node is running.
100+
```bash
101+
dcld status
102+
```
103+
104+
6. **Upgrade to 24.04**. To upgrade to next `24.04` release, please repeat above steps, you can skip `4.5` step.
105+
7. **Post upgrade**. Remove opened port in step 4.5 from your Network settings of your instance.

0 commit comments

Comments
 (0)