Skip to content

Commit d050b7c

Browse files
committed
Remove algorand package in host-based setups
1 parent e2088f2 commit d050b7c

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

bin/migrate-from-d13-setup renamed to bin/migrate-from-host-setup

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ if [[ $(id -u) -eq 0 ]]; then
1919
is_root=1
2020
fi
2121

22-
echo "This script will assist migrating your node from D13 based setups to Voi Swarm, if your node is already running D13 based setup."
23-
echo "If you are running a D13 based setup on another service follow guidance in the documentation to migrate to Voi Swarm: https://voinetwork.github.io/voi-swarm/"
22+
echo "This script will assist migrating your node from a host-based setups to Voi Swarm, if your node is already running a Voi or Algorand based setup."
2423
echo ""
2524
if [[ -f /var/lib/algorand/logging.config ]]; then
2625
echo "Migrating telemetry configuration"
@@ -30,10 +29,12 @@ if [[ -f /var/lib/algorand/logging.config ]]; then
3029
fi
3130
fi
3231

33-
echo "Stopping Voi.service if available"
32+
echo "Stopping services and uninstalling previous installation"
3433
execute_sudo "systemctl stop voi"
3534
execute_sudo "systemctl disable voi"
36-
echo "If you want to revert to D13 based setup on this host, you can start the service again by running 'systemctl start voi && systemctl enable voi'"
35+
execute_sudo "systemctl disable algorand"
36+
execute_sudo "systemctl disable algorand"
37+
execute_sudo "apt-get remove -y algorand"
3738

3839
echo "Start Voi Swarm"
3940
bash -c "env VOINETWORK_TELEMETRY_NAME=$VOINETWORK_TELEMETRY_NAME docker stack deploy -c ${HOME}/voi/docker/compose.yml voinetwork"

docs/installation/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export VOINETWORK_IMPORT_ACCOUNT=1
2626
```
2727

2828
???+ info
29-
While the installation detects existing D13 based setups on the same host
29+
While the installation detects existing host-based setups (such as D13) on the same host
3030
and offers migration automatically,
3131
it is important to familiarize yourself with the [migration steps](../../migrating/) in particular
3232
if you are [migrating from a different host](../../migrating/#installing-on-a-new-server).

docs/migrating.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Migrating to Voi Swarm
22

3-
## From D13 based setups
3+
## From host-based based setups (including D13)
44

55
Install Voi Swarm on your server by importing your existing wallet using your mnemonic:
66

@@ -11,18 +11,20 @@ export VOINETWORK_IMPORT_ACCOUNT=1
1111

1212
=== "Installing on same server"
1313

14-
During the installation, the setup will detect existing D13 based setups on the same host and offer migration automatically.
14+
During the installation, the setup will detect existing Voi and Algorand based setups on the same host and offer
15+
migration automatically.
1516

1617
If you want to migrate manually after installation run this command:
1718

1819
```bash
19-
~/voi/bin/migrate-from-d13-setup
20+
~/voi/bin/migrate-from-host-setup
2021
```
2122

2223
This command will do the following steps for you:
2324

2425
1. Duplicate telemetry settings, including existing telemetry name and GUID, without affecting rewards.
25-
2. Stop the host-based Voi service
26+
2. Stop the host-based Voi and Algorand services
27+
3. Remove the Algorand debian package, to avoid conficts with the Voi Swarm setup
2628
3. Restart Voi Swarm
2729

2830
=== "Installing on a new server"

install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ set_telemetry_name() {
492492
return
493493
fi
494494

495-
detect_existing_host_based_voi_setup
495+
detect_existing_host_based_setup
496496

497497
if [[ ${migrate_host_based_setup} -eq 1 ]]; then
498498
return
@@ -524,11 +524,11 @@ set_telemetry_name() {
524524
fi
525525
}
526526

527-
detect_existing_host_based_voi_setup() {
527+
detect_existing_host_based_setup() {
528528
if [[ -f /var/lib/algorand/logging.config && ! -f /var/lib/voi/algod/data/logging.config ]]; then
529-
echo "An existing Voi installation has been detected on your system."
529+
echo "An existing Voi or Algorand installation has been detected on your system."
530530
echo "We can migrate your existing telemetry configuration to Voi Swarm."
531-
echo "As part of this process, we will also stop the existing service."
531+
echo "As part of this process, we will also stop and uninstall the existing service."
532532
echo "This is necessary to prevent conflicts and ensure that your node can join Voi Swarm as a healthy node."
533533
echo ""
534534
echo "Do you want to migrate your existing setup to Voi Swarm? (yes/no)"
@@ -549,7 +549,7 @@ migrate_host_based_voi_setup() {
549549
if [[ ${migrate_host_based_setup} -eq 1 ]]; then
550550
display_banner "Migrating from host based setup"
551551
VOINETWORK_TELEMETRY_NAME=$(execute_sudo "cat /var/lib/algorand/logging.config" | jq -r '.Name')
552-
bash -c "env VOINETWORK_TELEMETRY_NAME=\"${VOINETWORK_TELEMETRY_NAME}\" ${voi_home}/bin/migrate-from-d13-setup"
552+
bash -c "env VOINETWORK_TELEMETRY_NAME=\"${VOINETWORK_TELEMETRY_NAME}\" ${voi_home}/bin/migrate-from-host-setup"
553553
fi
554554
}
555555

0 commit comments

Comments
 (0)