Created
September 10, 2018 00:07
-
-
Save Quantisan/66e44333338982732bfb03b9bd80374c to your computer and use it in GitHub Desktop.
AlgoVPN Docker: Deploying with scripted Ansible in a Docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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