This repository has been archived on 2023-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/app
Quentin ed82071223
Upgrade Stolon doc
2022-08-24 17:09:40 +02:00
..
backup replace os.system with subprocess.run 2022-04-15 14:57:54 +02:00
bagage Update bagage 2021-12-12 12:49:48 +01:00
core/deploy Some fixes 2022-01-27 09:57:49 +01:00
cryptpad Simplify the build 2022-05-06 10:49:28 +02:00
directory Disable guichet on old cluster 2022-08-24 15:51:29 +02:00
drone-ci Update doc 2022-07-28 17:34:49 +02:00
dummy/secrets/dummy Move out .hcl files specific to Neptune cluster 2021-12-25 19:40:30 +01:00
email Use Tricot certificates instead of self-signed ones 2022-07-06 13:16:50 +02:00
frontend/deploy remove obsolete admin_port 2022-05-04 17:33:43 +02:00
garage Garage v0.7.1 2022-05-09 16:25:15 +02:00
im Matrix is so weird... 2022-08-19 18:27:43 +02:00
jitsi Some fixes 2022-01-27 09:57:49 +01:00
matterbridge Add missing options for discord bridge 2021-11-16 12:57:15 +01:00
metrics/deploy Set prometheus node_exporter version to v1.1.2 2021-03-09 00:15:55 +01:00
platoo Add tricot tags to everything 2021-12-08 12:42:48 +01:00
plume Set plume log verbosity to info 2022-04-24 13:45:32 +02:00
postgres Upgrade Stolon to Posgtgres 14 2022-08-24 15:58:21 +02:00
.gitignore updated READMEs 2021-01-19 15:21:23 +01:00
README.md updated READMEs 2021-01-19 15:21:23 +01:00
docker-compose.yml Upgrade Stolon doc 2022-08-24 17:09:40 +02:00
requirements.txt Redeploy plume 2022-01-27 13:31:25 +01:00
secretmgr.py Add Drone CI 2021-02-08 14:52:13 +01:00
shell.nix Redeploy plume 2022-01-27 13:31:25 +01:00

README.md

Folder hierarchy

  • <module>/build/<image_name>/: folders with dockerfiles and other necessary resources for building container images
  • <module>/config/: folder containing configuration files, referenced by deployment file
  • <module>/secrets/: folder containing secrets, which can be synchronized with Consul using secretmgr.py
  • <module>/deploy/: folder containing the HCL file(s) necessary for deploying the module
  • <module>/integration/: folder containing files for integration testing using docker-compose

Secret Manager secretmgr.py

The Secret Manager ensures that all secrets are present where they should in the cluster.

You need access to the cluster (SSH port forwarding) for it to find any secret on the cluster. Refer to the previous directory's README, at the bottom of the file.

How to install secretmgr.py dependencies

### Install system dependencies first:
## On fedora

dnf install -y openldap-devel cyrus-sasl-devel
## On ubuntu
apt-get install -y libldap2-dev libsasl2-dev

### Now install the Python dependencies from requirements.txt:

## Either using a virtual environment
# (requires virtualenv python module)
python3 -m virtualenv env 
# Must be done everytime you create a new terminal window in this folder:
. env/bin/activate 
# Install the deps
pip install -r requirements.txt

## Either by installing the dependencies for your system user:
pip3 install --user -r requirements.txt

How to use secretmgr.py

Check that all secrets are correctly deployed for app dummy:

./secretmgr.py check dummy

Generate secrets for app dummy if they don't already exist:

./secretmgr.py gen dummy

Rotate secrets for app dummy, overwriting existing ones (be careful, this is dangerous!):

./secretmgr.py regen dummy

Upgrading one of our packaged apps to a new version

  1. Edit docker-compose.yml
  2. Change the VERSION variable to the desired version
  3. Increment the docker image tag by 1 (eg: superboum/riot:v13 -> superboum/riot:v14)
  4. Run docker-compose build
  5. Run docker-compose push
  6. Done