Skip to content

Instantly share code, notes, and snippets.

@avoidik
Created January 13, 2020 07:37
Show Gist options
  • Save avoidik/2e7348bdf6467fd2ad2286a08d58867d to your computer and use it in GitHub Desktop.
Save avoidik/2e7348bdf6467fd2ad2286a08d58867d to your computer and use it in GitHub Desktop.
How to deploy Streisand on AWS

Generate ssh-key

ssh-keygen -t rsa -b 2048 -C "streisand@stack" -f id_rsa_streisand -q -N ""
aws ec2 import-key-pair --key-name 'streisand' --public-key-material file://./id_rsa_streisand.pub

Prepare prerequisites

sudo apt-get install git python-pip python-cffi libffi-dev libssl-dev libcurl4-openssl-dev
git clone https://github.com/StreisandEffect/streisand.git && cd streisand
./util/venv-dependencies.sh ./venv

Create new

source ./venv/bin/activate

deploy/streisand-new-cloud-server.sh \
  --provider amazon \
  --site-config global_vars/noninteractive/amazon-site.yml

Reconfigure existing

StreisandEffect/streisand#1697

source ./venv/bin/activate

deploy/streisand-existing-cloud-server.sh \
  --ip-address x.x.x.x \
  --ssh-user ubuntu \
  --site-config global_vars/noninteractive/amazon-site.yml

SSH into it

ssh -i id_rsa_streisand -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -l ubuntu x.x.x.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment