September 26, 2021

Part 1. Akash: full guide

Let's Node!

⠀Text


Table of contents

Part 1. Akash: full guide

Part 2. Akash: Avalanche node


Installation

To table of contents

Automatically

⠀Execute the script

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Akash/main/multi_tool.sh)

Manual

⠀Update packages

sudo apt update && sudo apt upgrade -y 

⠀Install required packages

sudo apt install zip jq pkg-config build-essential libssl-dev -y

⠀Download the node binary

cd; \
akash_version=`wget -qO- https://api.github.com/repos/ovrclk/akash/releases/latest | jq -r ".tag_name" | sed "s%v%%g"`; \
wget -qO akash.zip "https://github.com/ovrclk/akash/releases/download/v${akash_version}/akash_${akash_version}_linux_amd64.zip"

⠀Unzip the archive

unzip akash.zip

⠀Move the node binary to /usr/bin/

cd akash_*
mv akash /usr/bin/akash

⠀Delete the archive and the empty node directory

cd; rm -rf akash*

Wallet

⠀Think of a wallet name, run the command and enter the name, thereby adding it to the system as a variable

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n akash_wallet_name

Recovering

⠀If you already have a wallet you have to recover the wallet

akash keys add "$akash_wallet_name" --recover --keyring-backend file

⠀You must to enter a mnemonic phrase and wallet password twice

СКРИН

Creating

⠀In other cases, you need to create a wallet

akash keys add "$akash_wallet_name" --keyring-backend file

⠀You must to enter a password twice, remember it and

Save the command output to a text file in a safe place.

СКРИН

Variables inserting

⠀Think of a wallet name, run the command and enter the name, thereby adding it to the system as a variable

⠀You must enter the wallet password

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh)-n akash_wallet_address -v `akash keys show "$akash_wallet_name" -a --keyring-backend file`

⠀Add variables and commands to the system as a variable

  • Akash chain ID variable;
  • TCP of project node variable for interaction with blockchain;
  • Command to view a wallet balance.
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n akash_chain_id -v "\`wget -qO- https://raw.githubusercontent.com/ovrclk/net/master/mainnet/chain-id.txt\`"
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n akash_project_node -v "\`wget -qO- https://raw.githubusercontent.com/ovrclk/net/master/mainnet/rpc-nodes.txt | head -1\`"
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n akash_wallet_balance -v "akash query bank balances \\\$akash_wallet_address --node \\\$akash_project_node" -a

Account replenishment

⠀To use the service and create deployments you must to have a minimum balance of 5 AKT (it is also worth not forgetting about the cost of commissions). So you need to replenish the wallet.

⠀If you haven't AKT you could buy it on an exchange. There is a list of exchanges on Coingecko.

⠀Replenish, for example, 6 AKT to previously created wallet

echo "$akash_wallet_address"

⠀You can view the wallet balance via command

akash_wallet_balance

Certificate creation

⠀You have to create a certificate to create deployment. Your certificate needs to be created only once per wallet and can be used across all deployments

⠀Create your certificate via command

akash tx cert create client \
	--chain-id "$akash_chain_id" \
	--fees 5000uakt \
	--from "$akash_wallet_name" \
	--node "$akash_project_node" \
	--keyring-backend file

Deployment

General logic

⠀Create your config using official documentation or using builder

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Akash/main/config_builder.sh) -h

⠀Example of the filled command and result

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Akash/main/config_builder.sh) \
-sn avalanche \
-in secord/avalanche:latest \
-c 1 \
-m 1Gi \
-s 5Gi \
-pn us

СКРИН

⠀There are some examples of deployment

Avalanche node

⠀Create your deployment

akash tx deployment create $HOME/.akash/deploy.yaml \
	--chain-id "$akash_chain_id" \
	--fees 5000uakt \
	--from "$akash_wallet_name" \
	--node "$akash_project_node" \
	--keyring-backend file -y

Management

⠀Hi


Useful commands

To table of contents

⠀To view the last 100 node log entries

avalanch_log
sudo journalctl -f -n 100 -u avalanchd

⠀To restart the node

sudo systemctl restart avalanchd

Useful URLs

To table of contents

Official project site | Official Telegram group | Discord | Twitter


Thanks

To table of contents

Let’s Node Team — writing an article and creating an auto installation script

To express your gratitude