Configuration/Setup
Introduction
This section of the documentation outlines the directory structure of the cicd resources and explains which values need to be configured for a deployment. Afterwards, we outline step by step on how to deploy the cicd system and describe which/what resources are deployed on which clusters.
CI/CD Directory Structure
Configuration:
- update the ingress.host.name and ingress.host.path values for each values.yaml file except for the helm-api.
- specify the cluster.context value in helm-api values.yaml file
- list the application pipelines and helm pipelines in the polling-server values.yaml file
- specify the cluster context for the cicd dss files
- include any new value files into the application sections of the helmsman dss files
Example Application Directory Structure
Notes:
- Example Test Service
- in an effort to give ownership of the application helm charts back to the developers, as opposed to being managed by a SRE/DevOps team, we’re storing each applications helm charts and value files within their respective github repositories. These helm charts will be uploaded to the chartmuseum repository (via helm-push) and be accessed from there by the helmsman dss files. The value files for the helm chart will be referenced by helmsman using their raw github url link.
- the Dockerfile must be in the top level directory of the repo, since the polling-server calls
docker build
using the github repo URL.
Setup
Setting up CICD Cluster
git clone https://github.com/nnt1054/mmorpg_cicd.git && cd mmorpg_cicd
minikube start --profile cicd && minikube profile cicd
- create helmsman service account
kubectl create sa helmsman
kubectl create clusterrolebinding helmsman-cluster-admin --clusterrole=cluster-admin --serviceaccount=default:helmsman
helmsman --apply -f cicd_storage_dss.yaml
Setting up the Application Cluster
minikube --profile app && minikube profile app
- create helmsman service account
kubectl create sa helmsman
kubectl create clusterrolebinding helmsman-cluster-admin --clusterrole=cluster-admin --serviceaccount=default:helmsman
helmsman --apply -f cicd_tools_dss.yaml
helmsman --apply -f application/application-prod.yaml
DSS File Descriptions
This sections describes what applications are deployed by each helmsman dss file.
cicd_storage_dss.yaml
This basically deploys the same services we would need from JFrog Artifactory
- stable/minio
- stable/docker-registry
- stable/chartmuseum
cicd_tools_dss.yaml
- polling-server
- helm-api
- keel-hq/keel
application-[env].yaml
- (the actual application)