diff --git a/nodes/bootnode/install.sh b/nodes/bootnode/install.sh index e534acb..85b07cf 100644 --- a/nodes/bootnode/install.sh +++ b/nodes/bootnode/install.sh @@ -5,6 +5,7 @@ set -x # this should be provided through env by azure template TEMPLATES_BRANCH="${TEMPLATES_BRANCH}" +MAIN_REPO_FETCH="${MAIN_REPO_FETCH}" echo "========== ${TEMPLATES_BRANCH}/bootnode/install.sh starting ==========" echo "===== current time: $(date)" @@ -19,7 +20,7 @@ EXT_IP="$(curl ifconfig.co)" echo "===== external ip: ${EXT_IP}" echo "===== downloading common.vars" -curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars" +curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars" source common.vars INSTALL_CONFIG_REPO="${REPO_BASE_PATH}/bootnode" @@ -38,7 +39,7 @@ echo "===== environmental variables:" printenv echo "===== downloading common.funcs" -curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs" +curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs" source common.funcs setup_ufw() { @@ -74,9 +75,9 @@ EOF clone_dapps() { echo "=====> clone_dapps" mkdir -p parity_data/dapps - git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-dapps-keys-generation.git parity_data/dapps/KeysGenerator - git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-dapps-voting.git parity_data/dapps/Voting - git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-dapps-validators.git parity_data/dapps/ValidatorsList + git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-dapps-keys-generation.git parity_data/dapps/KeysGenerator + git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-dapps-voting.git parity_data/dapps/Voting + git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-dapps-validators.git parity_data/dapps/ValidatorsList echo "<===== clone_dapps" } diff --git a/nodes/bootnode/template.json b/nodes/bootnode/template.json index 12d51a2..57256f0 100644 --- a/nodes/bootnode/template.json +++ b/nodes/bootnode/template.json @@ -57,6 +57,7 @@ }, "variables": { "TEMPLATES_BRANCH": "dev-mainnet", + "MAIN_REPO_FETCH": "oraclesorg", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'salinuxvm')]", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", @@ -237,11 +238,11 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ - "[concat('https://raw.githubusercontent.com/oraclesorg/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/bootnode/install.sh')]" + "[concat('https://raw.githubusercontent.com/', variables('MAIN_REPO_FETCH'), '/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/bootnode/install.sh')]" ] }, "protectedSettings": { - "commandToExecute": "[concat('cp install.sh /home/', variables('adminUsername'), '/; cd /home/', variables('adminUsername'), '; chown ', variables('adminUsername'), ':', variables('adminUsername'), ' install.sh; chmod +x install.sh; TEMPLATES_BRANCH=\"', variables('TEMPLATES_BRANCH'), '\" ADMIN_USERNAME=\"', variables('adminUsername'), '\" NETSTATS_SERVER=\"', variables('netstatsServer'), '\" NETSTATS_SECRET=\"', variables('netstatsSecret'), '\" NODE_FULLNAME=\"', variables('nodeFullName'), '\" NODE_ADMIN_EMAIL=\"', variables('nodeAdminEmail'), '\" sudo -u ', variables('adminUsername'), ' -E -H ./install.sh')]" + "commandToExecute": "[concat('cp install.sh /home/', variables('adminUsername'), '/; cd /home/', variables('adminUsername'), '; chown ', variables('adminUsername'), ':', variables('adminUsername'), ' install.sh; chmod +x install.sh; TEMPLATES_BRANCH=\"', variables('TEMPLATES_BRANCH'), '\" ADMIN_USERNAME=\"', variables('adminUsername'), '\" NETSTATS_SERVER=\"', variables('netstatsServer'), '\" NETSTATS_SECRET=\"', variables('netstatsSecret'), '\" NODE_FULLNAME=\"', variables('nodeFullName'), '\" NODE_ADMIN_EMAIL=\"', variables('nodeAdminEmail'), '\" MAIN_REPO_FETCH=\"', variables('MAIN_REPO_FETCH'), '\" sudo -u ', variables('adminUsername'), ' -E -H ./install.sh')]" } } } diff --git a/nodes/common.vars b/nodes/common.vars index 6ba7327..1e2c4a9 100644 --- a/nodes/common.vars +++ b/nodes/common.vars @@ -3,6 +3,7 @@ echo "=====> sourcing common.vars" ##### These variables may need to be changed when creating new network OWNER_ADDRESS="0xdd0bb0e2a1594240fed0c2f2c17c1e9ab4f87126" +MAIN_REPO_FETCH="oraclesorg" SCRIPTS_BRANCH="sokol" DAPPS_BRANCH="master" diff --git a/nodes/mining-node/install.sh b/nodes/mining-node/install.sh index 23ecd16..b28cfbf 100644 --- a/nodes/mining-node/install.sh +++ b/nodes/mining-node/install.sh @@ -5,6 +5,7 @@ set -x # this should be provided through env by azure template TEMPLATES_BRANCH="${TEMPLATES_BRANCH}" +MAIN_REPO_FETCH="${MAIN_REPO_FETCH}" echo "========== ${TEMPLATES_BRANCH}/mining-node/install.sh starting ==========" echo "===== current time: $(date)" @@ -19,7 +20,7 @@ EXT_IP="$(curl ifconfig.co)" echo "===== external ip: ${EXT_IP}" echo "===== downloading common.vars" -curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars" +curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars" source common.vars INSTALL_CONFIG_REPO="${REPO_BASE_PATH}/mining-node" @@ -42,7 +43,7 @@ echo "===== environmental variables:" printenv echo "===== downloading common.funcs" -curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs" +curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs" source common.funcs set_ssh_keys() { @@ -100,7 +101,7 @@ EOF install_scripts() { echo "=====> install_scripts" - git clone -b ${SCRIPTS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-scripts + git clone -b ${SCRIPTS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-scripts ln -s ../${NODE_TOML} oracles-scripts/node.toml cd oracles-scripts/scripts npm install diff --git a/nodes/mining-node/template.json b/nodes/mining-node/template.json index 019dca8..23a58d0 100644 --- a/nodes/mining-node/template.json +++ b/nodes/mining-node/template.json @@ -60,6 +60,7 @@ }, "variables": { "TEMPLATES_BRANCH": "dev-mainnet", + "MAIN_REPO_FETCH": "oraclesorg", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'salinuxvm')]", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", @@ -243,11 +244,11 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ - "[concat('https://raw.githubusercontent.com/oraclesorg/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/mining-node/install.sh')]" + "[concat('https://raw.githubusercontent.com/', variables('MAIN_REPO_FETCH'), '/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/mining-node/install.sh')]" ] }, "protectedSettings": { - "commandToExecute": "[concat('cp install.sh /home/', variables('adminUsername'), '/; cd /home/', variables('adminUsername'), '; chown ', variables('adminUsername'), ':', variables('adminUsername'), ' install.sh; chmod +x install.sh; TEMPLATES_BRANCH=\"', variables('TEMPLATES_BRANCH'), '\" ADMIN_USERNAME=\"', variables('adminUsername'), '\" NETSTATS_SERVER=\"', variables('netstatsServer'), '\" NETSTATS_SECRET=\"', variables('netstatsSecret'), '\" MINING_KEYFILE=\"', variables('miningKeyfile'), '\" MINING_ADDRESS=\"', variables('miningAddress'), '\" MINING_KEYPASS=\"', variables('miningKeypass'), '\" NODE_FULLNAME=\"', variables('nodeFullName'), '\" NODE_ADMIN_EMAIL=\"', variables('nodeAdminEmail'), '\" sudo -u ', variables('adminUsername'), ' -E -H ./install.sh')]" + "commandToExecute": "[concat('cp install.sh /home/', variables('adminUsername'), '/; cd /home/', variables('adminUsername'), '; chown ', variables('adminUsername'), ':', variables('adminUsername'), ' install.sh; chmod +x install.sh; TEMPLATES_BRANCH=\"', variables('TEMPLATES_BRANCH'), '\" ADMIN_USERNAME=\"', variables('adminUsername'), '\" NETSTATS_SERVER=\"', variables('netstatsServer'), '\" NETSTATS_SECRET=\"', variables('netstatsSecret'), '\" MINING_KEYFILE=\"', variables('miningKeyfile'), '\" MINING_ADDRESS=\"', variables('miningAddress'), '\" MINING_KEYPASS=\"', variables('miningKeypass'), '\" NODE_FULLNAME=\"', variables('nodeFullName'), '\" NODE_ADMIN_EMAIL=\"', variables('nodeAdminEmail'), '\" MAIN_REPO_FETCH=\"', variables('MAIN_REPO_FETCH'), '\" sudo -u ', variables('adminUsername'), ' -E -H ./install.sh')]" } } } diff --git a/nodes/netstats-server/install.sh b/nodes/netstats-server/install.sh index b624b4d..06b71b8 100644 --- a/nodes/netstats-server/install.sh +++ b/nodes/netstats-server/install.sh @@ -5,6 +5,7 @@ set -x # this should be provided through env by azure template TEMPLATES_BRANCH="${TEMPLATES_BRANCH}" +MAIN_REPO_FETCH="${MAIN_REPO_FETCH}" echo "========== ${TEMPLATES_BRANCH}/netstats-server/install.sh starting ==========" echo "===== current time: $(date)" @@ -19,7 +20,7 @@ EXT_IP="$(curl ifconfig.co)" echo "===== external ip: ${EXT_IP}" echo "===== downloading common.vars" -curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars" +curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars" source common.vars INSTALL_CONFIG_REPO="${REPO_BASE_PATH}/netstats-server" @@ -38,7 +39,7 @@ echo "===== environmental variables:" printenv echo "===== downloading common.funcs" -curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs" +curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs" source common.funcs setup_ufw() { diff --git a/nodes/netstats-server/template.json b/nodes/netstats-server/template.json index 688dae1..84b86da 100644 --- a/nodes/netstats-server/template.json +++ b/nodes/netstats-server/template.json @@ -51,6 +51,7 @@ }, "variables": { "TEMPLATES_BRANCH": "dev-mainnet", + "MAIN_REPO_FETCH": "oraclesorg", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'salinuxvm')]", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", @@ -230,11 +231,11 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ - "[concat('https://raw.githubusercontent.com/oraclesorg/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/netstats-server/install.sh')]" + "[concat('https://raw.githubusercontent.com/',variables('MAIN_REPO_FETCH'),'/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/netstats-server/install.sh')]" ] }, "protectedSettings": { - "commandToExecute": "[concat('cp install.sh /home/', variables('adminUsername'), '/; cd /home/', variables('adminUsername'), '; chown ', variables('adminUsername'), ':', variables('adminUsername'), ' install.sh; chmod +x install.sh; TEMPLATES_BRANCH=\"', variables('TEMPLATES_BRANCH'), '\" ADMIN_USERNAME=\"', variables('adminUsername'), '\" NETSTATS_SECRET=\"', variables('netstatsSecret'), '\" NODE_FULLNAME=\"', variables('nodeFullName'), '\" NODE_ADMIN_EMAIL=\"', variables('nodeAdminEmail'), '\" sudo -u ', variables('adminUsername'), ' -E -H ./install.sh')]" + "commandToExecute": "[concat('cp install.sh /home/', variables('adminUsername'), '/; cd /home/', variables('adminUsername'), '; chown ', variables('adminUsername'), ':', variables('adminUsername'), ' install.sh; chmod +x install.sh; TEMPLATES_BRANCH=\"', variables('TEMPLATES_BRANCH'), '\" ADMIN_USERNAME=\"', variables('adminUsername'), '\" NETSTATS_SECRET=\"', variables('netstatsSecret'), '\" NODE_FULLNAME=\"', variables('nodeFullName'), '\" NODE_ADMIN_EMAIL=\"', variables('nodeAdminEmail'),'\" MAIN_REPO_FETCH=\"', variables('MAIN_REPO_FETCH'), '\" sudo -u ', variables('adminUsername'), ' -E -H ./install.sh')]" } } } diff --git a/nodes/owner/install.sh b/nodes/owner/install.sh index ea9ac12..ab6e233 100644 --- a/nodes/owner/install.sh +++ b/nodes/owner/install.sh @@ -5,6 +5,7 @@ set -x # this should be provided through env by azure template TEMPLATES_BRANCH="${TEMPLATES_BRANCH}" +MAIN_REPO_FETCH="${MAIN_REPO_FETCH}" echo "========== ${TEMPLATES_BRANCH}/owner/install.sh starting ==========" echo "===== current time: $(date)" @@ -19,7 +20,7 @@ EXT_IP="$(curl ifconfig.co)" echo "===== external ip: ${EXT_IP}" echo "===== downloading common.vars" -curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars" +curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars" source common.vars INSTALL_CONFIG_REPO="${REPO_BASE_PATH}/owner" @@ -40,7 +41,7 @@ echo "===== environmental variables:" printenv echo "===== downloading common.funcs" -curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs" +curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs" source common.funcs setup_ufw() { @@ -84,7 +85,7 @@ EOF download_initial_keys_script() { echo "=====> download_initial_keys_script" - git clone -b ${IKEYS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-initial-keys + git clone -b ${IKEYS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-initial-keys cd oracles-initial-keys npm install cd .. diff --git a/nodes/owner/template.json b/nodes/owner/template.json index 668c2da..5550edf 100644 --- a/nodes/owner/template.json +++ b/nodes/owner/template.json @@ -53,6 +53,7 @@ }, "variables": { "TEMPLATES_BRANCH": "dev-mainnet", + "MAIN_REPO_FETCH": "oraclesorg", "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'salinuxvm')]", "imagePublisher": "Canonical", "imageOffer": "UbuntuServer", @@ -235,11 +236,11 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ - "[concat('https://raw.githubusercontent.com/oraclesorg/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/owner/install.sh')]" + "[concat('https://raw.githubusercontent.com/', variables('MAIN_REPO_FETCH'), '/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/owner/install.sh')]" ] }, "protectedSettings": { - "commandToExecute": "[concat('cp install.sh /home/', variables('adminUsername'), '/; cd /home/', variables('adminUsername'), '; chown ', variables('adminUsername'), ':', variables('adminUsername'), ' install.sh; chmod +x install.sh; TEMPLATES_BRANCH=\"', variables('TEMPLATES_BRANCH'), '\" ADMIN_USERNAME=\"', variables('adminUsername'), '\" NETSTATS_SERVER=\"', variables('netstatsServer'), '\" NETSTATS_SECRET=\"', variables('netstatsSecret'), '\" OWNER_KEYFILE=\"', variables('ownerKeyFile'), '\" OWNER_KEYPASS=\"', variables('ownerKeypass'), '\" NODE_FULLNAME=\"', variables('nodeFullName'), '\" NODE_ADMIN_EMAIL=\"', variables('nodeAdminEmail'), '\" sudo -u ', variables('adminUsername'), ' -E -H ./install.sh')]" + "commandToExecute": "[concat('cp install.sh /home/', variables('adminUsername'), '/; cd /home/', variables('adminUsername'), '; chown ', variables('adminUsername'), ':', variables('adminUsername'), ' install.sh; chmod +x install.sh; TEMPLATES_BRANCH=\"', variables('TEMPLATES_BRANCH'), '\" ADMIN_USERNAME=\"', variables('adminUsername'), '\" NETSTATS_SERVER=\"', variables('netstatsServer'), '\" NETSTATS_SECRET=\"', variables('netstatsSecret'), '\" OWNER_KEYFILE=\"', variables('ownerKeyFile'), '\" OWNER_KEYPASS=\"', variables('ownerKeypass'), '\" NODE_FULLNAME=\"', variables('nodeFullName'), '\" NODE_ADMIN_EMAIL=\"', variables('nodeAdminEmail'), '\" MAIN_REPO_FETCH=\"', variables('MAIN_REPO_FETCH'), '\" sudo -u ', variables('adminUsername'), ' -E -H ./install.sh')]" } } }