Openshift and DevOps
Our app will be hosted on the BCGov Private Cloud space, on the Kamloops Gold Cluster.
Team:
DevOps Lead: Noel Feliciano
nofelici
Development (including Workflow changes): Chelsea Brown
cbrown
Product Manager/Owner (Openshift): Dea De Jarisco
Here, there are 4 projects, including three environments (dev
, test
, prod
) and tools. Tools will be responsible for handling the build config and building the application out, while each build will be promoted to each environment through a deployment config.
GitHub Workflows
Our workflows on GitHub include the following:
On PR, build the application and handle some minimal automated testing, including code quality analysis
On merge, automatically deploy the main branch to
dev
We can then deploy to test by using
make tag-test
on a specific commitAfter QA finishes testing on
test
, we can deploy and tag forprod
at any point. This requires approvals before it finishes deployment
Building and Deployment
What happens behind the scenes:
tools
Project on Openshift contains a build configuration each for server and client that watches the repository and watches for a push to themain
branch. When a commit is pushed to main, it kicks off a buildAfter the build is concluded, it pushes an Image into the ImageStream in tools with the tag based on the commit SHA
dev
Project on Openshift contains a deployment configuration each for server and client that watches for the tagdev
in the image stream. When the tag is pushed, the deployment config is kicked off and promotes the published image into thedev
environmenttest
Project on Openshift contains a similar DC for the tagtest
prod
Project on Openshift contains a similar DC for the tagprod
As such, in order to deploy, we have
make
commands that pushes a git tag and an openshift (oc
) tag for the three environments. Running theoc tag
will tag the image tagged with the commit we are tagging from to the environment we are tagging to and kick off the right DC
Other Openshift Pods
We also have a number of pods for patroni
, which manages our postgres database. There are notes on how this works in the application readme
, and notes on how it works in general on the BCGov GitHub
Another pod exists for backups for patroni, notes can be found on GitHub
Further documentation pieces:
Routes
Secrets
Logging