Skip to content

Commit

Permalink
fix: old binary setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
deepan95dev committed Feb 22, 2024
1 parent c222f7c commit 7602a1d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/upgrade/integration/scripts/old_binary_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

set -euox pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

pushd "$DIR/../../../docker/localnet"

# Generate configs (make sure old binary is installed locally)
bash gen-network-config-old-binary.sh
sudo chown -R 1000:1000 network-config

# Start network
docker compose --env-file mainnet-latest.env up --detach --no-build

# Import keys
bash import-keys.sh

# TODO: Get rid of this sleep.
sleep 5

# Copy keys
sudo docker compose --env-file mainnet-latest.env cp network-config/validator-0/keyring-test validator-0:/home/cheqd/.cheqdnode
sudo docker compose --env-file mainnet-latest.env cp network-config/validator-1/keyring-test validator-1:/home/cheqd/.cheqdnode
sudo docker compose --env-file mainnet-latest.env cp network-config/validator-2/keyring-test validator-2:/home/cheqd/.cheqdnode
sudo docker compose --env-file mainnet-latest.env cp network-config/validator-3/keyring-test validator-3:/home/cheqd/.cheqdnode

# Restore permissions
sudo docker compose --env-file mainnet-latest.env exec --user root validator-0 chown -R cheqd:cheqd /home/cheqd
sudo docker compose --env-file mainnet-latest.env exec --user root validator-1 chown -R cheqd:cheqd /home/cheqd
sudo docker compose --env-file mainnet-latest.env exec --user root validator-2 chown -R cheqd:cheqd /home/cheqd
sudo docker compose --env-file mainnet-latest.env exec --user root validator-3 chown -R cheqd:cheqd /home/cheqd

popd

0 comments on commit 7602a1d

Please sign in to comment.