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/README.md

1.5 KiB

Understand this folder hierarchy

This folder contains the following 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

How to install secretmgr.py dependencies

How to install its dependencies:

# on fedora:
dnf install -y openldap-devel
# on ubuntu:
apt-get install -y libldap2-dev

# for eveyrone:
pip3 install --user --requirement 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

How to upgrade 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