Build a VPN topology spanning multiple cloud providers using Docker, Terraform, Ansible, and Wireguard.
Create your .env file for your provider credentials. This will be mounted in to the skyhook container from the same directory as this README. You may use "placeholder" as a value for any providers you may not have accounts for. AWS is the only required provider due to SQS and DynamoDB being used.
DESTROY_URL=
BUILD_URL=
DYNAMODB_TABLE_NAME=
AWS_ACCOUNT_ID=
AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
TF_VAR_LINODE_TOKEN=
TF_VAR_AZ_APP_ID=
TF_VAR_AZ_TENANT=
TF_VAR_AZ_SECRET=
TF_VAR_AZ_SUB_ID=
GOOGLE_APPLICATION_CREDENTIALS=
TF_VAR_GOOGLE_PROJECT=cd docker/builder/
docker build -t skyhook-builder .
cd docker/destroyer/
docker build -t skyhook-destroyer .
cd docker/plugins/
docker build -t skyhook-plugins .docker-compose up -ddocker-compose logs -f- Use your AWS_ACCESS_KEY for AWS_ACCESS_KEY
- Use your AWS_SECRET_ACCESS_KEY for AWS_SECRET_ACCESS_KEY
- az login
- use tenantId for TF_VAR_AZ_TENANT and id for TF_VAR_AZ_SUB_ID
- az account set --subscription="PUT-YOUR-SUB-ID-HERE"
- az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/PUT-YOUR-SUB-ID-HERE"
- use password for TF_VAR_AZ_SECRET and appId for TF_VAR_AZ_APP_ID
- Use your service account key for GOOGLE_SERVICE_ACCOUNT_KEY
- Use your Linode API key for TF_VAR_LINODE_TOKEN
Enter the providers you wish to use. An SQS message will be sent which will be picked up by the builder container. Ansible-playbook logs can be seen by tailing docker-compose logs or container logs.
castironclay@mbp skyhook % python3 build.py
Provider 1: aws
Provider 2: linode
Provider 3: awsAfter the mesh is deployed you can move to your project's folder and run connect.sh.
cd projects/(your project)
chmod +x connect.sh
./connect.shA list of existing stacks will be presented. Enter the stack you wish to destroy. An SQS message will be sent which will be picked up by the destroyer container.
castironclay@mbp skyhook % python3 decom.py
['1h7sbh']
Project name: 1h7sbh