Skip to content

Commit

Permalink
update: release v2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Oct 21, 2023
1 parent 2475461 commit cbca764
Show file tree
Hide file tree
Showing 10 changed files with 269 additions and 67 deletions.
1 change: 1 addition & 0 deletions authority-keypair.json.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[253,64,18,233,202,203,137,47,10,225,113,89,197,3,242,145,235,186,222,88,141,76,167,99,189,103,41,148,96,125,139,124,163,184,45,241,159,122,5,251,196,100,69,213,136,29,133,116,110,104,232,206,24,229,219,157,213,9,199,163,13,202,115,87]
128 changes: 64 additions & 64 deletions dist/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions mainnet-validator-keypair.json.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[255,43,192,255,59,243,131,148,72,166,140,173,210,111,115,50,164,196,96,181,166,145,192,160,148,97,179,101,79,176,31,116,218,236,246,255,199,155,123,220,25,238,179,224,224,190,59,90,96,191,140,120,81,24,116,203,32,205,65,170,133,35,23,188]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epics-dao/solv2",
"version": "2.1.1",
"version": "2.1.2",
"description": "Solana Validator CLI SOLV2",
"main": "dist/index.js",
"repository": "https://github.com/EpicsDAO/solv2",
Expand Down
98 changes: 98 additions & 0 deletions resource/solv2/v2.1.1/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/bin/sh

# Constants and configurable variables
SOLANA_VERSION=1.17.2
NODE_VERSION=18.18.1

# This ensures the entire script is downloaded
{
set -e # exit immediately if a command exits with a non-zero status

usage() {
cat 1>&2 <<EOF
Custom Install Script
Creates a new user 'solv', adds the user to the sudo group, logs in as 'solv',
installs nodenv, node $NODE_VERSION, and sets it as the global version.
Additionally, installs the @epics-dao/solv2 package globally.
USAGE:
custom-install-script.sh [FLAGS]
FLAGS:
-h, --help Prints help information
EOF
}

create_user() {
echo "Creating user 'solv'..."
sudo adduser solv
sudo usermod -aG sudo solv
}

setup_firewall() {
echo "Configuring firewall"
echo "yes" | sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 53
sudo ufw allow 8000:10000/udp
sudo ufw allow 8000:10000/tcp
sudo ufw reload
}


install_nodenv_and_node() {
sudo su - solv <<EOF_SOLV
echo "Installing nodenv..."
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
echo 'export PATH="\$HOME/.nodenv/bin:\$PATH"' >> ~/.profile
echo 'eval "\$(nodenv init -)"' >> ~/.profile
source ~/.profile
echo "Installing node-build..."
git clone https://github.com/nodenv/node-build.git "\$(nodenv root)"/plugins/node-build
echo "Installing node $NODE_VERSION..."
nodenv install $NODE_VERSION
nodenv global $NODE_VERSION
echo "Node installation completed!"
echo "Installing @epics-dao/solv2..."
npm i -g @epics-dao/solv2
echo "Sourcing ~/.profile..."
source ~/.profile
solv solv
EOF_SOLV
}

install_solana() {
echo "Installing solana..."
SOLV_HOME=$(eval echo ~solv)
export SOLANA_INSTALL_DIR="$SOLV_HOME/.local/share/solana/install"
sudo -u solv sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_VERSION}/install)"
echo "Solana installation completed!"
}

main() {
for arg in "$@"; do
case "$arg" in
-h|--help)
usage
exit 0
;;
*)
;;
esac
done

create_user
setup_firewall
install_solana
install_nodenv_and_node
echo "Enter solv user password 👇"
su solv
}

main "$@"

} # this ensures the entire script is downloaded
98 changes: 98 additions & 0 deletions resource/solv2/v2.1.2/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/bin/sh

# Constants and configurable variables
SOLANA_VERSION=1.17.2
NODE_VERSION=18.18.1

# This ensures the entire script is downloaded
{
set -e # exit immediately if a command exits with a non-zero status

usage() {
cat 1>&2 <<EOF
Custom Install Script
Creates a new user 'solv', adds the user to the sudo group, logs in as 'solv',
installs nodenv, node $NODE_VERSION, and sets it as the global version.
Additionally, installs the @epics-dao/solv2 package globally.
USAGE:
custom-install-script.sh [FLAGS]
FLAGS:
-h, --help Prints help information
EOF
}

create_user() {
echo "Creating user 'solv'..."
sudo adduser solv
sudo usermod -aG sudo solv
}

setup_firewall() {
echo "Configuring firewall"
echo "yes" | sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 53
sudo ufw allow 8000:10000/udp
sudo ufw allow 8000:10000/tcp
sudo ufw reload
}


install_nodenv_and_node() {
sudo su - solv <<EOF_SOLV
echo "Installing nodenv..."
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
echo 'export PATH="\$HOME/.nodenv/bin:\$PATH"' >> ~/.profile
echo 'eval "\$(nodenv init -)"' >> ~/.profile
source ~/.profile
echo "Installing node-build..."
git clone https://github.com/nodenv/node-build.git "\$(nodenv root)"/plugins/node-build
echo "Installing node $NODE_VERSION..."
nodenv install $NODE_VERSION
nodenv global $NODE_VERSION
echo "Node installation completed!"
echo "Installing @epics-dao/solv2..."
npm i -g @epics-dao/solv2
echo "Sourcing ~/.profile..."
source ~/.profile
solv solv
EOF_SOLV
}

install_solana() {
echo "Installing solana..."
SOLV_HOME=$(eval echo ~solv)
export SOLANA_INSTALL_DIR="$SOLV_HOME/.local/share/solana/install"
sudo -u solv sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_VERSION}/install)"
echo "Solana installation completed!"
}

main() {
for arg in "$@"; do
case "$arg" in
-h|--help)
usage
exit 0
;;
*)
;;
esac
done

create_user
setup_firewall
install_solana
install_nodenv_and_node
echo "Enter solv user password 👇"
su solv
}

main "$@"

} # this ensures the entire script is downloaded
4 changes: 3 additions & 1 deletion src/cli/setup/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import chalk from 'chalk'
import { makeServices } from './makeServices'
import { getLargestUnmountedDisks } from '../mt/getLargestUnmountedDisks'
import { setupPermissions } from './userPermissions'
import { startSolana } from '../start/startSolana'

export const setup = () => {
try {
Expand All @@ -24,7 +25,7 @@ export const setup = () => {
setupDirs()
setupPermissions()
makeServices()
startValidator()
startValidator(true)
setupKeys()
const cmds = [
'sudo systemctl daemon-reload',
Expand All @@ -34,6 +35,7 @@ export const setup = () => {
for (const line of cmds) {
spawnSync(line, { shell: true, stdio: 'inherit' })
}
startSolana()
return true
} catch (error) {
throw new Error(`setup Error: ${error}`)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '2.1.1'
export const VERSION = '2.1.2'
1 change: 1 addition & 0 deletions testnet-validator-keypair.json.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[174,19,190,15,167,106,244,29,210,226,244,134,238,119,216,2,52,30,1,42,236,44,161,94,191,240,80,21,215,36,49,79,247,98,233,149,52,166,157,162,79,164,98,180,159,32,168,81,130,223,34,190,103,184,106,168,7,10,245,129,142,114,250,28]
1 change: 1 addition & 0 deletions vote-account-keypair.json.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[196,8,248,148,79,147,43,146,188,199,73,57,245,179,12,246,109,251,13,154,106,3,163,82,134,222,163,30,74,13,229,177,57,249,99,16,202,84,54,222,183,88,85,177,110,217,198,89,196,30,51,15,11,218,62,12,213,107,115,51,30,156,207,52]

0 comments on commit cbca764

Please sign in to comment.