diff --git a/bin/migrate-from-d13-setup b/bin/migrate-from-host-setup similarity index 66% rename from bin/migrate-from-d13-setup rename to bin/migrate-from-host-setup index 7b846f5..19fc724 100755 --- a/bin/migrate-from-d13-setup +++ b/bin/migrate-from-host-setup @@ -19,8 +19,7 @@ if [[ $(id -u) -eq 0 ]]; then is_root=1 fi -echo "This script will assist migrating your node from D13 based setups to Voi Swarm, if your node is already running D13 based setup." -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/" +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." echo "" if [[ -f /var/lib/algorand/logging.config ]]; then echo "Migrating telemetry configuration" @@ -30,10 +29,12 @@ if [[ -f /var/lib/algorand/logging.config ]]; then fi fi -echo "Stopping Voi.service if available" +echo "Stopping services and uninstalling previous installation" execute_sudo "systemctl stop voi" execute_sudo "systemctl disable voi" -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'" +execute_sudo "systemctl disable algorand" +execute_sudo "systemctl disable algorand" +execute_sudo "apt-get remove -y algorand" echo "Start Voi Swarm" bash -c "env VOINETWORK_TELEMETRY_NAME=$VOINETWORK_TELEMETRY_NAME docker stack deploy -c ${HOME}/voi/docker/compose.yml voinetwork" diff --git a/docs/installation/installation.md b/docs/installation/installation.md index 554c688..e686e6c 100644 --- a/docs/installation/installation.md +++ b/docs/installation/installation.md @@ -26,7 +26,7 @@ export VOINETWORK_IMPORT_ACCOUNT=1 ``` ???+ info - While the installation detects existing D13 based setups on the same host + While the installation detects existing host-based setups (such as D13) on the same host and offers migration automatically, it is important to familiarize yourself with the [migration steps](../../migrating/) in particular if you are [migrating from a different host](../../migrating/#installing-on-a-new-server). diff --git a/docs/migrating.md b/docs/migrating.md index 1f6914e..d2f1f84 100644 --- a/docs/migrating.md +++ b/docs/migrating.md @@ -1,6 +1,6 @@ # Migrating to Voi Swarm -## From D13 based setups +## From host-based based setups (including D13) Install Voi Swarm on your server by importing your existing wallet using your mnemonic: @@ -11,18 +11,20 @@ export VOINETWORK_IMPORT_ACCOUNT=1 === "Installing on same server" - During the installation, the setup will detect existing D13 based setups on the same host and offer migration automatically. + During the installation, the setup will detect existing Voi and Algorand based setups on the same host and offer + migration automatically. If you want to migrate manually after installation run this command: ```bash - ~/voi/bin/migrate-from-d13-setup + ~/voi/bin/migrate-from-host-setup ``` This command will do the following steps for you: 1. Duplicate telemetry settings, including existing telemetry name and GUID, without affecting rewards. - 2. Stop the host-based Voi service + 2. Stop the host-based Voi and Algorand services + 3. Remove the Algorand debian package, to avoid conficts with the Voi Swarm setup 3. Restart Voi Swarm === "Installing on a new server" diff --git a/install.sh b/install.sh index 2f32ec6..f5063ae 100755 --- a/install.sh +++ b/install.sh @@ -492,7 +492,7 @@ set_telemetry_name() { return fi - detect_existing_host_based_voi_setup + detect_existing_host_based_setup if [[ ${migrate_host_based_setup} -eq 1 ]]; then return @@ -524,11 +524,11 @@ set_telemetry_name() { fi } -detect_existing_host_based_voi_setup() { +detect_existing_host_based_setup() { if [[ -f /var/lib/algorand/logging.config && ! -f /var/lib/voi/algod/data/logging.config ]]; then - echo "An existing Voi installation has been detected on your system." + echo "An existing Voi or Algorand installation has been detected on your system." echo "We can migrate your existing telemetry configuration to Voi Swarm." - echo "As part of this process, we will also stop the existing service." + echo "As part of this process, we will also stop and uninstall the existing service." echo "This is necessary to prevent conflicts and ensure that your node can join Voi Swarm as a healthy node." echo "" echo "Do you want to migrate your existing setup to Voi Swarm? (yes/no)" @@ -549,7 +549,7 @@ migrate_host_based_voi_setup() { if [[ ${migrate_host_based_setup} -eq 1 ]]; then display_banner "Migrating from host based setup" VOINETWORK_TELEMETRY_NAME=$(execute_sudo "cat /var/lib/algorand/logging.config" | jq -r '.Name') - bash -c "env VOINETWORK_TELEMETRY_NAME=\"${VOINETWORK_TELEMETRY_NAME}\" ${voi_home}/bin/migrate-from-d13-setup" + bash -c "env VOINETWORK_TELEMETRY_NAME=\"${VOINETWORK_TELEMETRY_NAME}\" ${voi_home}/bin/migrate-from-host-setup" fi }