Add README.md #127

Merged
benjaoming merged 13 commits from readme into main 2022-11-29 13:58:39 +00:00
Showing only changes of commit 62d5a3ccca - Show all commits

51
README.md Normal file
View file

@ -0,0 +1,51 @@
# 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
samsapti marked this conversation as resolved Outdated

This is really good! Suggesting this:

Ansible playbook uses two custom-made roles (in the roles/ directory):

  • ubuntu_base: ...
  • docker: deploying the services themselves using Docker containers

Select services only can also be specified. By default, the script deploys everything.

This is really good! Suggesting this: > Ansible playbook uses two custom-made roles (in the `roles/` directory): > > * `ubuntu_base`: ... > * `docker`: deploying the services themselves using Docker containers > > Select services only can also be specified. By default, the script deploys everything.

I agree, your suggestion looks a bit cleaner 👍

I agree, your suggestion looks a bit cleaner 👍
also be specified. By default, the script deploys everything.
Here is a summary of the options that can be used:
```console
$ ./deploy.sh # deploy everything
$ ./deploy.sh base # deploy the ubuntu_base role only
$ ./deploy.sh services # deploy the docker role only
$ ./deploy.sh services SERVICE # deploy SERVICE only
```
samsapti marked this conversation as resolved Outdated

Just for better rendering: can we put comments on the preceding line and have a newline between each comman e?

Just for better rendering: can we put comments on the preceding line and have a newline between each comman e?

Done 👍

Done 👍
`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:
```console
$ vagrant up # Create and provision the VM
$ vagrant provision # Re-provision the VM
$ vagrant ssh # SSH into the VM
$ vagrant halt # Power down the VM
$ vagrant destroy # Power down and delete the VM
```