Skip to content

MESH-Research/digital-ocean-infrastructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knowledge Commons Digital Ocean Infrastructure Scripts

Scripts to spin up infrastructure for running Knowledge Commons on Digital Ocean.

Setup

Install Ansible Galaxy Collections for Digital Ocean

ansible-galaxy collection install community.digitalocean
ansible-galaxy collection install ansible.posix

Configuration

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)

Usage

Deploy

ansible-playbook -i inventory.ini bluegreen-deploy.yml

Revert a deployment

ansible-playbook revert.yml -e revert_to=blue

About

Infrastructure-as-code for Digital Ocean deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published