Skip to content

Commit aac19e6

Browse files
committed
Added a README to describe the steps involved in migration.
- Removed references to `terracli`. - Updated the Oracle Feeder version. - Added execution permissions to the bash scripts.
1 parent 21d4d62 commit aac19e6

File tree

5 files changed

+104
-3
lines changed

5 files changed

+104
-3
lines changed

terra/sample/README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# System services & migration
2+
3+
## Services
4+
5+
### terrad
6+
7+
```bash
8+
sudo cp -i terrad.service /etc/systemd/system/
9+
```
10+
11+
Modify the service file by replacing `$USER` with the correct user.
12+
13+
```bash
14+
sudo vi /etc/systemd/system/terrad.service
15+
sudo systemctl daemon-reload
16+
sudo systemctl start terrad.service
17+
```
18+
19+
### Price Server
20+
21+
```bash
22+
cp -i price-server-start.sh ~/oracle-feeder/price-server/
23+
sudo cp -i price-server.service /etc/systemd/system/
24+
```
25+
26+
Modify the service file by replacing `$USER` with the correct user.
27+
28+
```bash
29+
sudo vi /etc/systemd/system/price-server.service
30+
sudo systemctl daemon-reload
31+
sudo systemctl start price-server.service
32+
```
33+
34+
### Oracle Feeder
35+
36+
```bash
37+
cp -i feeder-start.sh ~/oracle-feeder/feeder/
38+
sudo cp -i feeder.service /etc/system/system/
39+
```
40+
41+
Modify the service file by replacing `$USER` with the correct user.
42+
43+
IMPORTANT: Adjust the environment variables.
44+
45+
```bash
46+
sudo vi /etc/systemd/system/feeder.service
47+
sudo systemctl daemon-reload
48+
sudo systemctl start feeder.service
49+
```
50+
51+
## Migration
52+
53+
### Preparation at the new server
54+
55+
> This section describes the scenario where the data directory resides on an externally mounted volume.
56+
57+
Copy the configuration files over:
58+
59+
```bash
60+
scp ~/.terra/config/priv_validator_key.json terra2.aurastake.com:.terra/config/
61+
scp ~/.terra/config/config.toml terra2.aurastake.com:.terra/config/
62+
scp ~/.terra/config/app.toml terra2.aurastake.com:.terra/config/
63+
scp ~/.terra/config/addrbook.json terra2.aurastake.com:.terra/config/
64+
scp ~/oracle-feeder/price-server/config/default.js terra2.aurastake.com:oracle-feeder/price-server/config/
65+
scp ~/oracle-feeder/feeder/voter.json terra2.aurastake.com:oracle-feeder/feeder/
66+
```
67+
68+
Make the mount directory.
69+
70+
```bash
71+
sudo mkdir /mnt/bombay10a
72+
```
73+
74+
### Deprovisioning at the old server
75+
76+
Check that no other services are accessing the mounted folder.
77+
78+
```bash
79+
lsof | grep /mnt/columbusa
80+
```
81+
82+
```bash
83+
sudo systemctl stop terrad.service
84+
sudo umount /mnt/columbusa
85+
```
86+
87+
### Dashboard
88+
89+
Then unmount the volume from the old server, and mount the volume onto the new server.
90+
91+
### Activation at the new server
92+
93+
```bash
94+
sudo mount -o discard,defaults,noatime /dev/disk/by-id/scsi-columbusa /mnt/columbusa
95+
sudo chown -R ${TERRA_USER}:${TERRA_USER} /mnt/columbusa
96+
sudo systemctl start terrad.service
97+
```
98+
99+
After confirming that the service is running, update the _fstab_ file at **both** servers.
100+
101+
```bash
102+
echo '/dev/disk/by-id/scsi-columbusa /mnt/columbusa ext4 defaults,noatime,nofail,discard 0 0' | sudo tee -a /etc/fstab
103+
```

terra/sample/feeder-start.sh

100644100755
File mode changed.

terra/sample/oracle-monitor.sh

100644100755
File mode changed.

terra/sample/price-server-start.sh

100644100755
File mode changed.

terra/user1.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ cd $HOME/Downloads
5454
echo -n "Adding autocompletion for terrad & terracli commands..."
5555
# Add autocompletion.
5656
terrad completion > terrad_completion
57-
terracli completion > terracli_completion
5857
cat terrad_completion >> ~/.bash_aliases
59-
cat terracli_completion >> ~/.bash_aliases
6058
source ~/.profile
6159
echo " done."
6260

@@ -91,7 +89,7 @@ echo "-------------------------"
9189
cd $HOME
9290
git clone https://github.com/terra-project/oracle-feeder.git
9391

94-
VERSION_FEEDER=v1.4.5
92+
VERSION_FEEDER=v2.0.0
9593
echo "Switching to version $VERSION_FEEDER"
9694
cd $HOME/oracle-feeder
9795
git checkout $VERSION_FEEDER

0 commit comments

Comments
 (0)