This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
resize_rootfs: false | |
disk_setup: | |
/dev/sda: | |
table_type: 'mbr' | |
layout: | |
- 25 | |
- 75 | |
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##########GRAPH-NODE######## | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -; \ | |
sudo bash -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'; \ | |
sudo apt-get update && sudo apt-get upgrade -y; \ | |
sudo apt-get install -y clang libpq-dev libssl-dev pkg-config; \ | |
sudo apt-get install -y gnupg gnupg2 snapd git postgresql-12 postgresql-client-12 nodejs screen httpie ufw; \ | |
curl https://sh.rustup.rs -sSf | sh | |
source $HOME/.cargo/env | |
sudo snap install ipfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#####GRAPH-NODE###### | |
#####NPM INSTALL##### | |
sudo apt update && \ | |
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - && \ | |
sudo apt -y install nodejs && \ | |
sudo apt install -y libsecret-1-dev && \ | |
nodejs -v && \ | |
npm version | |
####DATABASE-SERVER################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
# пути к ключам будут вида /solana/validator-keypair.json | |
# а на хосте они будут лежать в папке /root/solana_blabla. например /root/solana_agx10k | |
#### | |
#######################################dockerfile#### | |
echo "export SOLANA_NAME=<имя>" | tee -a ~/.bashrc ### например AG | |
source ~/.bashrc | |
echo "export SOLANA_DIR=/root/solana_${SOLANA_NAME}" | tee -a ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
vote_account="/root/solana/vote-account-keypair.json" | |
identity_account="/root/solana/validator-keypair.json" | |
new_stake="/root/solana/validator-stake-keypair-$(printf '%(%Y-%m-%d)T').json" | |
min_vote_balance=100 | |
available_for_withdraw=$(solana balance $vote_account | awk -F\. '{print $1}') | |
re='^[0-9]+$' | |
if ! [[ $available_for_withdraw =~ $re ]] ; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
stegosout=$(echo "show balance" | /data/stegos/stegos --data-dir /data/stegos/db) | |
stegosexit=$? | |
if [ $stegosexit -gt 0 ]; then | |
echo stegosout: "$stegosout" | |
exit $stegosexit | |
fi | |
if grep -q -i error <<< "$stegosout"; then | |
echo stegos returned error: |