Skip to content

Ansible playbooks and scripts for deploying packit-service to OpenShift

License

Notifications You must be signed in to change notification settings

packit/deployment

Repository files navigation

Deploying Packit service or Stream service to Openshift

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).

What's in here

tl;dr How to deploy

  1. Configure the deployment by creating a variable file in 'vars/' from a template as described in vars/README.
  2. Install some dependencies:
    • dnf install ansible python3-openshift python3-passlib jq make
    • dnf install origin-clients or (for a more recent version) download openshift-client-linux from the OKD releases page, unpack it, and place oc in your $PATH (ex: ~/.local/bin).
    • Download the Bitwarden CLI, unpack and place it in your $PATH (ex: ~/.local/bin).
  3. [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.

Partial deployments

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 Redict and Redis Commander, run:

$ DEPLOYMENT=dev TAGS="redict,redis-commander" make deploy

Use make tags to list the currently available tags.

See docs/ for more documentation.