Courtesy of the Forestry Suite of Applications Program from the Ministry of Land, Water and Resource Stewardship.
UPDATE: We are of splitting this offering into a quickstart template and helper functions. Please be on the lookup for progress, releases and new features!
Initial configuration is expected to take under three hours. Please read our setup guide to get started.
The DevOps Quickstart is a fully functional set of pipeline workflows and a starter application stack intended to help Agile DevOps teams hit the ground running. Currently OpenShift is supported with plans for AWS (Amazon Web Services). Pipelines are run using GitHub Actions.
Features:
This project is in active development. Please visit our issues page to view or request features.
Out-of-the-box, sandboxed, pull request-based development deployments allowing for multiple developers to work on and see their features at once.
Deployment to production is gatekept using GitHub environments, requiring sign off from code maintainers.
Deployment to test, staging or pre-prod (pick a name!) is currently planned to be transitory, allowing access to gatekept data, but only stopping before production deployment if a failure occurs. (work in progress)
Successful deployments are linked in Pull Request comments.
Builds are handled by Docker Actions and published to the GitHub Container Registry (ghcr.io). This allows for publicly accessible builds that can be consumed by OpenShift, Amazon Web Services or any other container service.
Unit tests are run in jest, but other test frameworks can always be installed. SonarCube should be configured to pick up sarif files and provide coverage reports.
Code quality is reporting are performed by:
Sonar reports are provided as Pull Request comments.
Code coverage is generated by any included tests. Results are provided as Pull Request comments.
Dependency, container and vulnerability scanning is performed by:
Penetration testing and reporting is performed by:
Dependency scanning, patching and updating by PR is performed by:
Higher-level environments come after DEV deployments and are usually called any of TEST, STAGING, PRE-PROD or PROD. Since data and token access is more frequently sensitive access must be controlled by only allowing access from a merge to the main branch.
Optionally, higher-level deployments can be prevented until manually approved.
This workflow is triggered when a Pull Request to the main branch is created or modified. Each development deployment is separate, using its own stack. This avoids collisions between development environments and provides isolation for testing and experimentation. Pipeline steps are enforced, preventing merge of failing code.
The workflow, located here, includes:
Triggers are used to determine whether images need to be built or previous ones consumed. Partial or full skips, like when limited to documentation, are shown below.
When a PR is merged, the message comment below is added. Despite showing on this pull request it is actually handled by the next pipeline.
The workflow, located here, fires when a pull request is closed.
When a pull request is merged to main, one additional job is run. This promotes the new images to the TEST environment.
If this closure was triggered by a merge to the main branch it will trigger the following workflow.
The workflow, located here, includes:
The starter stack includes a frontend, backend and postgres database. The frontend and backend are buld with NestJS. They currently do very little, but provide placeholders for more functional products. See the backend and frontend folders for source, including Dockerfiles.
Features:
Local development can be supported using Docker Compose. Please be aware that Podman and Podman Compose work as drop-in replacements for the Docker counterparts.
docker-compose up -d
Templates for APIs, UIs and Metabase/Oracle can be used to kickstart or extend projects. Please visit our collaborators' NR Architecture Templates repository for more information.