Go to file
2022-11-25 23:31:30 +01:00
group_vars/all Add Redis memcache to Nextcloud 2022-11-22 17:15:59 +01:00
roles Upgrade HedgeDoc to 1.9.6 2022-11-25 22:04:38 +01:00
.gitignore Update .gitignore to ignore vagrant stuff 2018-06-24 15:16:29 +02:00
ansible.cfg Use inventory in ansible.cfg 2021-03-04 13:52:25 +01:00
datacoop_hosts Update host ip 2022-03-02 15:44:40 +00:00
deploy.sh Add installation of community modules to deploy.sh 2022-11-12 19:41:57 +01:00
playbook.yml Add missing services to playbook.yml 2022-11-25 22:04:14 +01:00
README.md Add README.md 2022-11-25 23:31:30 +01:00
Vagrantfile Vagrant-based testing environment (#111) 2022-11-25 13:07:09 +00:00

data.coop infrastructure

This repository contains the code used to deploy data.coop's services and websites. We use Ansible to encode our infrastructure setup. Only the association's administrators have access to deploy the services.

Deploying

To deploy the services, the included deploy.sh script can be used. The Ansible playbook uses two custom-made roles (in the roles/ directory). The script has options to deploy only one of the roles, which are namely ubuntu_base and docker, the latter of which is for deploying the services themselves using Docker containers. Select services only can also be specified. By default, the script deploys everything.

Here is a summary of the options that can be used:

$ ./deploy.sh                   # deploy everything
$ ./deploy.sh base              # deploy only ubuntu_base
$ ./deploy.sh services          # deploy all services
$ ./deploy.sh services SERVICE  # deploy SERVICE only

SERVICE should match one of the filenames in roles/docker/tasks/services/, but without the .yml extension

Testing

In order for us to be able to test our setup locally, we use Vagrant to deploy the services in a virtual machine. To do this, Vagrant and VirtualBox must both be installed on the development machine. Then, the services can be deployed locally by using the vagrant command-line tool. The working directory needs to be the root of the repository for this to work properly.

Note: As our secrets are contained in an Ansible Vault file, only the administrators have the ability to run the deployment in Vagrant. However, one could replace the vault file for testing purposes.

Here is a summary of the commands that are available with the vagrant command-line tool:

$ vagrant up         # Create and provision the VM
$ vagrant provision  # Re-provision the VM
$ vagrant halt       # Power down the VM
$ vagrant destroy    # Power down and delete the VM