Skip to content

Instantly share code, notes, and snippets.

@Quantisan
Created September 10, 2018 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Quantisan/66e44333338982732bfb03b9bd80374c to your computer and use it in GitHub Desktop.
Save Quantisan/66e44333338982732bfb03b9bd80374c to your computer and use it in GitHub Desktop.
AlgoVPN Docker: Deploying with scripted Ansible in a Docker container
# I had trouble provisioning AlgoVPN to EC2 with the included Docker image. The stdin
# isn't reading my AWS credentials correctly. So I'm running the ansible
# playbook directly to bypass entering the secrets. This is a record of my
# shell commands to get it provisioning an AlgoVPN server.
# First follow the instruction at https://github.com/trailofbits/algo/blob/master/docs/Docker.md
# to setup your config.cfg
# On the host machine, inside the algo repository folder, build the Docker image from source.
$ docker build -t trailofbits/algo .
$ docker run --cap-drop ALL -it -v <your local vpn config folder>:/data trailofbits/algo:latest
# Once you're inside the container shell,
$ source ./env/bin/activate
$ cp /data/config.cfg .
$ ansible-playbook main.yml -e "provider=ec2
server_name=algo.jp
ondemand_cellular=true
ondemand_wifi=true
local_dns=false
ssh_tunneling=true
windows=false
store_cakey=false
region=ap-northeast-1
aws_access_key=<ACCESS_KEY>
aws_secret_key=<SECRET_KEY>"
# While keeping this container running, copy the files from container to your host machine
# in another terminal.
$ docker cp <containerID>:/algo/configs .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment