Updated as of 3/25/21
This closely follows the Original Setup Guide but contains some divergences that were required for the unique Amazon Linux distro.
This guide assumes the following prereqs:
- Create an AWS EC2 t3.medium in a subnet that contains an internet gateway so that it has public internet access. More detailed instructions here.
- Assign a security group to the instance that exposes port 22 for adminstrative ssh access and port 26656 to run the agoric node.
- SSH into your new machine to get started
Update generic packages and add jq
which you'll need later:
sudo yum update
sudo yum install jq
Install node:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 15.11.0
node -e "console.log('Running Node.js ' + process.version)"
Install Yarn:
curl -o- -L https://yarnpkg.com/install.sh | bash
Install Go:
sudo yum install golang -y
go version
Add GOROOT, GOPATH, etc... to your ~/.bash_profile
so your go path is on your $PATH
:
cat <<'EOF' >>$HOME/.bash_profile
export GOROOT=$(which go)
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:$HOME/go/bin
EOF
source $HOME/.bash_profile
Install 'Development Tools' which contains various system dependencies like make
which you'll need later:
sudo yum groupinstall 'Development Tools'
You can pick up the original guide at Install Agoric SDK and carry on with the steps there. But there's a caveat when you get to the Syncing Your Node section.
In the Syncing Your Node section, the AWS Linux systemd
did not like the resulting file.
To get this working, I had to an Environment
line to set the $PATH
. So run the following instead:
sudo tee <<EOF >/dev/null /etc/systemd/system/ag-chain-cosmos.service
[Unit]
Description=Agoric Cosmos daemon
After=network-online.target
[Service]
User=$USER
Environment=PATH=$PATH
ExecStart=$HOME/go/bin/ag-chain-cosmos start --log_level=warn
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
# Check the contents of the file, especially User, Environment and ExecStart lines
cat /etc/systemd/system/ag-chain-cosmos.service
After you get past this step, the original Validator Guide works like a charm the rest of the way.
Happy validating!