This repo contains infrastructure as code for cow network.
- Have Terraform (>= 0.14.8) installed
- Have Python3 installed
- Have Pipenv installed
- Run
./setup.sh
to set up your local repo. - Set
$COW_NET_SSH_KEY
to your personal SSH key (Recommendation: Install direnv and load it automatically) - Create
tf/token.auto.tfvars
file and put in your hcloud API token like thishcloud_token = "<mytoken>"
Note: Always make sure you are in your virtual environment, if not execute pipenv shell
otherwise all python modules will be missing.
When deploying the infrastructure from scratch, you have to use a SSH key we call management-key
which functions basically as a bootstrap key. Add other SSH keys using this command:
$ ansible-playbook --private-key <management-key> add_ssh_keys_playbook.yaml -e servers=<groups>
The management key has to be set on all hcloud servers.
- support subgroups in
inventory.py