Open Innovation Labs CI/CD Bootstrapping
A collection of Red Hat Open Innovation Labs CI/CD components
Overview
This is an inventory, some templates, some build projects, and associated configuration which can be used to bootstrap a CI/CD environment in OpenShift Container Platform. Currently, this will deploy:
- CI/CD Project
- Dev/Test/UAT Environments
- Jenkins (With extra plugins and Docker build slaves)
- SonarQube (And associated PostgreSQL database)
- SonaType Nexus
- Maven Build Pod
- NPM Build Pod
- Example Java application and pipeline
Prerequisites
- Ansible
- Ansible Galaxy
- OpenShift CLI Tools
- Access to an OpenShift cluster or minishift/cdk environment
Usage
- Log on to an OpenShift server
oc login -u <user> https://<server>:<port>/
- User needs permissions to deploy ProjectRequest objects
oc adm policy add-cluster-role-to-user cluster-reader developer
- User needs permissions to deploy ProjectRequest objects
- Clone this repository to
<workdir>/labs-ci-cd
- Modify the inventory under
<workdir>/labs-ci-cd/ci-cd-bootstrap/inventory/group_vars/all.yml
as required for site/customer specific needs- Additional customization can be done in
<workdir>/labs-ci-cd/ci-cd-bootstrap/namespaces
- Additional customization can be done in
<workdir>/labs-ci-cd/ci-cd-bootstrap/params
- Additional customization can be done in
- Execute
./run.sh
in the<workdir>/labs-ci-cd
directory. This will:- Install the casl-ansible dependency in the current directory
- Execute the playbook
labs-ci-cd.yml
using the inventory contained in the current directory