From d6fd82792efefeea7ff6b4971f0002ac73b2af14 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Thu, 7 Mar 2024 19:12:44 -0500 Subject: [PATCH 01/19] Addition of Archway with script to deploy the Archway multisig on the Constantine testnet and launch the multisig frontend --- archway/start2.sh | 73 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 archway/start2.sh diff --git a/archway/start2.sh b/archway/start2.sh new file mode 100644 index 0000000..c008f43 --- /dev/null +++ b/archway/start2.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# Function to create a new Archway account and capture the address +create_archway_account() { + echo "Creating new Archway account..." + output=$(archway accounts new) + address=$(echo "$output" | grep 'Address:' | awk '{print $2}') + echo "$output" + echo $address > account_address.txt +} + +# Function to configure the multisig_params.json file +configure_multisig_script() { + echo "Configuring MultiSig script..." + account_address=$( tmp.$$.json && mv tmp.$$.json scripts/instantiate/multisig_params.json +} + +# Function to update the .env file +setup_env_file() { + echo "Setting up .env file..." + cp .env.example .env + sed -i 's/RUNTIME_ENVIRONMENT=mainnet|testnet|titus/RUNTIME_ENVIRONMENT=testnet/' .env + contracts=$(cat scripts/instantiate/multisig_contracts_result.json) + echo "DAODAO_CONTRACTS=$contracts" >> .env +} + +echo "Installing jq, nodejs and npm..." +sudo apt install jq +sudo apt-get install -y nodejs + +echo "Installing Archway Developer CLI..." +npm install -g @archwayhq/cli + +# Configure Archway CLI +echo "Configuring Archway Developer CLI to use the Constantine network..." +archway config chain-id constantine-3 --global +# archway config chain-id archway-1 --global # For Mainnet + +echo "Current Archway CLI configuration:" +archway config show + +# Preparing accounts +#echo "Creating a new Archway account..." +#archway accounts new mywallet +create_archway_account + +echo "Listing all accounts..." +archway accounts list + +# Clone MultiSig repository +echo "Change to user's home directory..." +cd ~ +echo "Cloning MultiSig repository..." +git clone git@github.com:archway-network/archway-msig.git +cd archway-msig +npm install + +# Configuring MultiSig script +configure_multisig_script + +# Deploy the MultiSig contracts +echo "Deploying MultiSig contracts..." +bash scripts/instantiate/instantiate_contracts.sh + +# Set up MultiSig environment +#echo "Setting up MultiSig environment..." +#cp .env.example .env +setup_env_file + +# Step 8: Launching the development server +echo "Launching the development server..." +npm run dev From 455e6e9460bebf01aef36c6c8994c0bc9ed178e9 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Thu, 7 Mar 2024 19:17:33 -0500 Subject: [PATCH 02/19] Rename startup script filename --- archway/{start2.sh => start.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename archway/{start2.sh => start.sh} (100%) diff --git a/archway/start2.sh b/archway/start.sh similarity index 100% rename from archway/start2.sh rename to archway/start.sh From e16d1a559078811ffbe9aedef6ff33e31a46401c Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Thu, 7 Mar 2024 19:48:18 -0500 Subject: [PATCH 03/19] Add a comment outlining what the script does --- archway/start.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/archway/start.sh b/archway/start.sh index c008f43..93eea4d 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -1,5 +1,13 @@ #!/bin/bash +# ****************************************************************************** +# This script deploys the Archway MultiSig to the Constantine testnet and +# starts a local frontend to interact with the MultiSig. It automates the +# process of setting up the environment, creating an Archway account, +# configuring the MultiSig parameters, deploying the contracts, and setting up +# the local development server. +# ****************************************************************************** + # Function to create a new Archway account and capture the address create_archway_account() { echo "Creating new Archway account..." From 1073607d5f19d62876ac0fb0444f5d8cfd909080 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 08:55:04 -0500 Subject: [PATCH 04/19] Update comments --- archway/start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index 93eea4d..e89a3a6 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -8,7 +8,7 @@ # the local development server. # ****************************************************************************** -# Function to create a new Archway account and capture the address +# Create a new Archway account and capture the address create_archway_account() { echo "Creating new Archway account..." output=$(archway accounts new) @@ -17,14 +17,14 @@ create_archway_account() { echo $address > account_address.txt } -# Function to configure the multisig_params.json file +# Configure the multisig_params.json file configure_multisig_script() { echo "Configuring MultiSig script..." account_address=$( tmp.$$.json && mv tmp.$$.json scripts/instantiate/multisig_params.json } -# Function to update the .env file +# Update the .env file setup_env_file() { echo "Setting up .env file..." cp .env.example .env From 042e0d3bb8bf49149af9f2d09870d6c4909f531a Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 16:25:27 -0500 Subject: [PATCH 05/19] Update the OS and also install npm --- archway/start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archway/start.sh b/archway/start.sh index e89a3a6..68c8359 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -33,9 +33,13 @@ setup_env_file() { echo "DAODAO_CONTRACTS=$contracts" >> .env } +# Update os +sudo apt update + echo "Installing jq, nodejs and npm..." sudo apt install jq sudo apt-get install -y nodejs +sudo apt install npm echo "Installing Archway Developer CLI..." npm install -g @archwayhq/cli From d758d950b3fb2682c0c806f1d5b415e67509d7fa Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 16:31:39 -0500 Subject: [PATCH 06/19] Automatically continue with each installation --- archway/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index 68c8359..19d72c1 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -37,9 +37,9 @@ setup_env_file() { sudo apt update echo "Installing jq, nodejs and npm..." -sudo apt install jq +sudo apt install -y jq sudo apt-get install -y nodejs -sudo apt install npm +sudo apt install -y npm echo "Installing Archway Developer CLI..." npm install -g @archwayhq/cli From 29dd43c773584eed4793f385c5552737dc9b7b8f Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 17:55:18 -0500 Subject: [PATCH 07/19] Install go dependency --- archway/start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archway/start.sh b/archway/start.sh index 19d72c1..a5523b0 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -36,6 +36,10 @@ setup_env_file() { # Update os sudo apt update +# Install go +echo "Installing go..." +sudo apt install golang-go + echo "Installing jq, nodejs and npm..." sudo apt install -y jq sudo apt-get install -y nodejs From da830e9535f804781b3b76d060238530ae84c11d Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 18:16:38 -0500 Subject: [PATCH 08/19] Modifiy script to install NodeJs 18 which is the latest version required by other packages --- archway/start.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index a5523b0..182e434 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -38,11 +38,22 @@ sudo apt update # Install go echo "Installing go..." -sudo apt install golang-go +sudo apt install -y golang-go -echo "Installing jq, nodejs and npm..." +# Install curl to install node v18 +sudo apt install -y curl + +# Install jq +echo "Installing jq..." sudo apt install -y jq -sudo apt-get install -y nodejs + +# Install nodejs 18 +echo "Installing nodejs..." +curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - +sudo apt install -y nodejs + +# Install npm +echo "Installing npm..." sudo apt install -y npm echo "Installing Archway Developer CLI..." From d7e2ee0b396db2c2b7f46489098b972dbd01e3dd Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 18:34:48 -0500 Subject: [PATCH 09/19] Use nvm to install node version 18 --- archway/start.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index 182e434..1b231de 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -49,8 +49,11 @@ sudo apt install -y jq # Install nodejs 18 echo "Installing nodejs..." -curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - -sudo apt install -y nodejs +#curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash +#sudo apt install -y nodejs +nvm install 18 +nvm use 18 # Install npm echo "Installing npm..." From 00c7d7c4865c4fb7db94c3302b4a668a39bcb627 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 18:46:45 -0500 Subject: [PATCH 10/19] Fixed archway config command and added an acount name to archway accounts new command --- archway/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index 1b231de..0bc0d4f 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -11,7 +11,7 @@ # Create a new Archway account and capture the address create_archway_account() { echo "Creating new Archway account..." - output=$(archway accounts new) + output=$(archway accounts new mywallet) address=$(echo "$output" | grep 'Address:' | awk '{print $2}') echo "$output" echo $address > account_address.txt @@ -64,7 +64,8 @@ npm install -g @archwayhq/cli # Configure Archway CLI echo "Configuring Archway Developer CLI to use the Constantine network..." -archway config chain-id constantine-3 --global +#archway config chain-id constantine-3 --global +archway config set -g chain-id constantine-3 # archway config chain-id archway-1 --global # For Mainnet echo "Current Archway CLI configuration:" From b854d0d6bf6b2d12ddeb6fed68e3ffcbc38e5e5b Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 19:10:06 -0500 Subject: [PATCH 11/19] Allow for installing cargo, cargo-generate, gnome keyring and docker --- archway/start.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/archway/start.sh b/archway/start.sh index 0bc0d4f..d106f53 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -47,6 +47,32 @@ sudo apt install -y curl echo "Installing jq..." sudo apt install -y jq +# Install cargo +curl https://sh.rustup.rs -sSf | sh + +# Install cargo generate +cargo add cargo-generate + +# Install docker +# Add Docker's official GPG key: +sudo apt-get update +sudo apt-get install ca-certificates curl +sudo install -m 0755 -d /etc/apt/keyrings +sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc +sudo chmod a+r /etc/apt/keyrings/docker.asc + +# Add the repository to Apt sources: +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +sudo apt-get update + +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + +# Install gnome keyring +sudo apt-get install -y gnome-keyring + # Install nodejs 18 echo "Installing nodejs..." #curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - From a370acb6564e7b61522f1870b4b2b8040272aa49 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 19:18:02 -0500 Subject: [PATCH 12/19] Unlock the os keyring --- archway/start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/archway/start.sh b/archway/start.sh index d106f53..9365f33 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -72,6 +72,7 @@ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin # Install gnome keyring sudo apt-get install -y gnome-keyring +echo 'somecredstorepass' | gnome-keyring-daemon --unlock # unlock the system's keyring # Install nodejs 18 echo "Installing nodejs..." From 39fec34fef913f16f39683f37ecab922b6aff37e Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Fri, 8 Mar 2024 19:23:48 -0500 Subject: [PATCH 13/19] Set keyring backend to test as the backend on headless ubuntu is not working --- archway/start.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/archway/start.sh b/archway/start.sh index 9365f33..71f3cf3 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -95,6 +95,9 @@ echo "Configuring Archway Developer CLI to use the Constantine network..." archway config set -g chain-id constantine-3 # archway config chain-id archway-1 --global # For Mainnet +# Set keyring backend to test +archway config set -g keyring-backend test + echo "Current Archway CLI configuration:" archway config show From 190fe526fde0ce8fc27479a2a674417be9081072 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Mon, 11 Mar 2024 13:30:42 -0500 Subject: [PATCH 14/19] Use of the test keyring backend and clone github repo via https instead of ssh --- archway/start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index 71f3cf3..da4b51b 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -11,7 +11,7 @@ # Create a new Archway account and capture the address create_archway_account() { echo "Creating new Archway account..." - output=$(archway accounts new mywallet) + output=$(archway accounts new mywallet --keyring-backend test) address=$(echo "$output" | grep 'Address:' | awk '{print $2}') echo "$output" echo $address > account_address.txt @@ -107,13 +107,13 @@ archway config show create_archway_account echo "Listing all accounts..." -archway accounts list +archway accounts list --keyring-backend test # Clone MultiSig repository echo "Change to user's home directory..." cd ~ echo "Cloning MultiSig repository..." -git clone git@github.com:archway-network/archway-msig.git +git clone https://github.com/archway-network/archway-msig.git cd archway-msig npm install From 382c4476a89c0fc981950ef9aa07e82dd1f1c678 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Mon, 11 Mar 2024 16:33:04 -0500 Subject: [PATCH 15/19] Utilizing the test keyring and correctly editing the .env file --- archway/start.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index da4b51b..5b9e831 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -11,7 +11,7 @@ # Create a new Archway account and capture the address create_archway_account() { echo "Creating new Archway account..." - output=$(archway accounts new mywallet --keyring-backend test) + output=$(archway accounts new mywallet4 --keyring-backend test) address=$(echo "$output" | grep 'Address:' | awk '{print $2}') echo "$output" echo $address > account_address.txt @@ -20,15 +20,13 @@ create_archway_account() { # Configure the multisig_params.json file configure_multisig_script() { echo "Configuring MultiSig script..." - account_address=$( tmp.$$.json && mv tmp.$$.json scripts/instantiate/multisig_params.json } # Update the .env file setup_env_file() { - echo "Setting up .env file..." - cp .env.example .env - sed -i 's/RUNTIME_ENVIRONMENT=mainnet|testnet|titus/RUNTIME_ENVIRONMENT=testnet/' .env contracts=$(cat scripts/instantiate/multisig_contracts_result.json) echo "DAODAO_CONTRACTS=$contracts" >> .env } @@ -110,16 +108,26 @@ echo "Listing all accounts..." archway accounts list --keyring-backend test # Clone MultiSig repository -echo "Change to user's home directory..." -cd ~ +#echo "Change to user's home directory..." +#cd ~ echo "Cloning MultiSig repository..." git clone https://github.com/archway-network/archway-msig.git +echo "Change into the archway-msig directory..." cd archway-msig +echo "Install packages with npm..." npm install # Configuring MultiSig script configure_multisig_script +# Set up .env file +echo "Setting up .env file..." +cp .env.example .env +#sed -i 's/RUNTIME_ENVIRONMENT=\(mainnet\|testnet\|titus\)/RUNTIME_ENVIRONMENT=testnet/' .env +sed -i 's/RUNTIME_ENVIRONMENT=mainnet|testnet|devnet/RUNTIME_ENVIRONMENT=testnet/' .env + +sed -i 's/DEFAULT_TRANSPORT=rpc|rest/DEFAULT_TRANSPORT=rpc/' .env + # Deploy the MultiSig contracts echo "Deploying MultiSig contracts..." bash scripts/instantiate/instantiate_contracts.sh From 1992afc0ff05b1183e3609e13cb4ebf6cfa88bbb Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Tue, 12 Mar 2024 11:36:38 -0500 Subject: [PATCH 16/19] Reconfigured the script to simply set up an Archway environment and create an account --- archway/start.sh | 57 +++++++++--------------------------------------- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index 5b9e831..3331398 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -1,36 +1,19 @@ #!/bin/bash # ****************************************************************************** -# This script deploys the Archway MultiSig to the Constantine testnet and -# starts a local frontend to interact with the MultiSig. It automates the -# process of setting up the environment, creating an Archway account, -# configuring the MultiSig parameters, deploying the contracts, and setting up -# the local development server. +# This script automates the process of setting up and environment for Archway +# and creating an Archway account. # ****************************************************************************** # Create a new Archway account and capture the address create_archway_account() { echo "Creating new Archway account..." - output=$(archway accounts new mywallet4 --keyring-backend test) + output=$(archway accounts new mywallet --keyring-backend test) address=$(echo "$output" | grep 'Address:' | awk '{print $2}') echo "$output" echo $address > account_address.txt } -# Configure the multisig_params.json file -configure_multisig_script() { - echo "Configuring MultiSig script..." - account_address=$(<../account_address.txt) - echo "Account address: $account_address" - jq --arg address "$account_address" '.sender_account = $address | .members = [{addr: $address, weight: 1}]' scripts/instantiate/multisig_params.json > tmp.$$.json && mv tmp.$$.json scripts/instantiate/multisig_params.json -} - -# Update the .env file -setup_env_file() { - contracts=$(cat scripts/instantiate/multisig_contracts_result.json) - echo "DAODAO_CONTRACTS=$contracts" >> .env -} - # Update os sudo apt update @@ -46,10 +29,14 @@ echo "Installing jq..." sudo apt install -y jq # Install cargo -curl https://sh.rustup.rs -sSf | sh +echo "Installing cargo..." +#curl https://sh.rustup.rs -sSf | sh +curl https://sh.rustup.rs -sSf | sh -s -- -y # Install cargo generate -cargo add cargo-generate +#cargo add cargo-generate +echo "Installing cargo-generate..." +yes | cargo install cargo-generate # Install docker # Add Docker's official GPG key: @@ -115,28 +102,4 @@ git clone https://github.com/archway-network/archway-msig.git echo "Change into the archway-msig directory..." cd archway-msig echo "Install packages with npm..." -npm install - -# Configuring MultiSig script -configure_multisig_script - -# Set up .env file -echo "Setting up .env file..." -cp .env.example .env -#sed -i 's/RUNTIME_ENVIRONMENT=\(mainnet\|testnet\|titus\)/RUNTIME_ENVIRONMENT=testnet/' .env -sed -i 's/RUNTIME_ENVIRONMENT=mainnet|testnet|devnet/RUNTIME_ENVIRONMENT=testnet/' .env - -sed -i 's/DEFAULT_TRANSPORT=rpc|rest/DEFAULT_TRANSPORT=rpc/' .env - -# Deploy the MultiSig contracts -echo "Deploying MultiSig contracts..." -bash scripts/instantiate/instantiate_contracts.sh - -# Set up MultiSig environment -#echo "Setting up MultiSig environment..." -#cp .env.example .env -setup_env_file - -# Step 8: Launching the development server -echo "Launching the development server..." -npm run dev +npm install \ No newline at end of file From f41386888e16ff146a050d41dae827e57f883e2f Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Tue, 12 Mar 2024 13:06:09 -0500 Subject: [PATCH 17/19] Use the latest LTS node version --- archway/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index 3331398..e0cb44a 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -64,8 +64,8 @@ echo "Installing nodejs..." #curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash #sudo apt install -y nodejs -nvm install 18 -nvm use 18 +nvm install --lts +nvm use --lts # Install npm echo "Installing npm..." From 849957b19e260d952a5ca0ac85a0db4ebd9cb358 Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Tue, 12 Mar 2024 13:06:38 -0500 Subject: [PATCH 18/19] Remove the gnome keyring installation --- archway/start.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index e0cb44a..cc08090 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -55,10 +55,6 @@ sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -# Install gnome keyring -sudo apt-get install -y gnome-keyring -echo 'somecredstorepass' | gnome-keyring-daemon --unlock # unlock the system's keyring - # Install nodejs 18 echo "Installing nodejs..." #curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - From 4b3378f1739c3dcc99a345e7c054d67726b8f05b Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Tue, 12 Mar 2024 13:50:00 -0500 Subject: [PATCH 19/19] Use default responses for docker install and fix npm installation issues --- archway/start.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/archway/start.sh b/archway/start.sh index cc08090..81dc4d8 100644 --- a/archway/start.sh +++ b/archway/start.sh @@ -40,8 +40,8 @@ yes | cargo install cargo-generate # Install docker # Add Docker's official GPG key: -sudo apt-get update -sudo apt-get install ca-certificates curl +sudo apt-get -y update +sudo apt-get -y install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc @@ -53,15 +53,23 @@ echo \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update -sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin +sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Install nodejs 18 echo "Installing nodejs..." #curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" #sudo apt install -y nodejs -nvm install --lts -nvm use --lts +nvm install 20 +nvm use 20 + +echo "Node.js version:" +node -v +echo "NPM version:" +npm -v # Install npm echo "Installing npm..." @@ -98,4 +106,4 @@ git clone https://github.com/archway-network/archway-msig.git echo "Change into the archway-msig directory..." cd archway-msig echo "Install packages with npm..." -npm install \ No newline at end of file +npm install -y \ No newline at end of file