This repository contains Ansible playbooks/roles to deploy our services/bots to Openshift cluster. This file documents basic usage, for more info see docs (below).
- containers/ - files used to build container images
- cron-jobs/ - OpenShift cron jobs
- docs/ - more documentation
- Images - what images we have and how we build them
- Continuous deployment - how are the deployed services/bots updated
- Testing changes - how to test our services/bots locally
- Let's encrypt TLS certs - generating & renewing with
certbot
- Monitoring
- PostgreSQL data migration
- Packit service deployment specifics
- Fedora source-git bot deployment specifics
- CentOS Stream source-git bot deployment specifics
- playbooks/ - Ansible playbooks
- roles/ - Ansible roles
- vars/ - Variable file(s). See vars/README.md.
- openshift/ - Openshift resource configuration files (templates).
- secrets/ - secret stuff to be used from
openshift/secret-*.yml.j2
- scripts/ - devops scripts used in multiple repositories
- Configure the deployment by creating a variable file in 'vars/' from a template as described in vars/README.
- Install some dependencies:
dnf install ansible python3-openshift jq make
dnf install origin-clients
or (for a more recent version) downloadopenshift-client-linux
from the OKD releases page, unpack it, and placeoc
in your$PATH
(ex:~/.local/bin
).- Download the Bitwarden
CLI,
unpack and place it in your
$PATH
(ex:~/.local/bin
).
[SERVICE={service}] DEPLOYMENT={deployment} make deploy
(see vars/README).
By default, the playbook checks that the local copy of the deployment is up-to-date, and the variable file used is up-to-date with the corresponding template.
To disable these checks, set check_up_to_date
to false
in the
variable file.
To only disable comparing the variable file to the template, set
check_vars_template_diff
to false
.
To run only the tasks related to some of the services, this way doing a
partial deployment, you can set the TAGS
environment variable before calling
make
. For example, to run only the tasks to deploy Redis and Redis
Commander, run:
$ DEPLOYMENT=dev TAGS="redis,redis-commander" make deploy
Use make tags
to list the currently available tags.