Scripts to spin up infrastructure for running Knowledge Commons on Digital Ocean.
ansible-galaxy collection install community.digitalocean
ansible-galaxy collection install ansible.posix
In group_vars/all.yml:
do_api_token: "DO_API"
do_database_id: "DATABASE_ID"
do_valkey_id: "VALKEY_ID"
ssh_key_path: ~/.ssh/id_ed25519.pub
droplet_name: wordpressprod
region: ams3
droplet_size: g-8vcpu-32gb # changeable: https://slugs.do-api.dev/
image: docker-20-04
volume_name: volume-ams3-01 # name for volume for /media
volume_for_themes_and_plugins: wordpress-themes-and-plugins # name for volume for /content
https_certificate_name: hcommons-dev
droplet_secrets_file: /home/martin/secrets.env
Local secrets.env file currently contains the environment setup. (TODO: move to vault)
ansible-playbook -i inventory.ini bluegreen-deploy.yml
ansible-playbook revert.yml -e revert_to=blue