Skip to content

Instantly share code, notes, and snippets.

@tpmccallum
Created March 23, 2021 01:38
Show Gist options
  • Save tpmccallum/732155fcf16ea89d506ab353e1d9e73c to your computer and use it in GitHub Desktop.
Save tpmccallum/732155fcf16ea89d506ab353e1d9e73c to your computer and use it in GitHub Desktop.
A list of instructions to install Compound Gateway

Install Terraform

cd ~
sudo apt update
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt install terraform

Install Ansible

sudo apt install ansible

Fetch the Compound gateway code

git clone https://github.com/compound-finance/gateway.git
cd gateway/ops

Create AWS infrastructure

Create an AWS account and also create an S3 bucket i.e. a new bucket called compound-gateway.

Configure AWS authentication

Install the necessary AWS CLI software for your Ubuntu machine, so that you can authorize AWS when executing terraform commands.

sudo apt install python3-pip
pip3 install awscli
aws configure

The last command shown above will require that you input your AWS Access Key ID, AWS Secret Access Key, as well as Default region name and Default output format. These can all be obtained from security credentials section of your AWS account.

Configure S3

Please see this Terraform S3 backend config site for more information about configuration required.

Run terraform command

terraform init -upgrade \
  -backend-config="bucket=compound-gateway" \
  -backend-config="key=tfstate" \
  -backend-config="region=ap-southeast-2"

The output will be similar to the following

terraform_success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment