Pre-requisites: To create AWS Infra instance (handles required vpc creation for the cluster)
- Execute terraform script following infrastructure/terraform/README.md
Steps to create the Kubernetes cluster:
- Create kubernetes cluster
- Kube cluster creation is handled by
eksctl
tool. For more info, check README.md in eks folder.
- Kube cluster creation is handled by
- Create Jenkins
- We’re using server-less Jenkins architecture, means whenever there is a need for a worker, we’ll create one in AWS Fargate.
- Prior creating the Jenkins, you’ll have to create the dependencies like docker registry secret, private GH repo secret etc. All these files are stored in private repo
hcx/kubernetes/manifests/cicd/jenkins
folder. Edit the files with updated secrets, andkubectl apply -f hcx/kubernetes/manifests/cicd/jenkins
- You’ve to use variable override file from private repo
application/helm/cicd/jenkins/values.yaml
- To install jenkins
helm upgrade --install jenkins --namespace cicd ./jenkins -f ./jenkins/values-custom.yaml --create-namespace
For more information, please refer toapplication/helm/cicd/README.md
- Create monitoring stack
- Since monitoring stack use CRDs and our Jenkins doesn’t have a Cluster Admin role, we’ve to initialize the Jenkins while installing the cluster
- We’ve to update the passwords and storage configs in monitoring private repo.
hcx/kubernetes/helm/monitoring/monitoring/values.yaml
- Installing monitoring stack is simple
helm upgrade --install monitoring -n monitoring --create-namespace application/helm/monitoring/moniotring -f private-repo/hcx/kubernetes/helm/monitoring/monitoring/values.yaml
- Build/Depoy apps
- All jobs are configured as Jenkins pipeline files
- Every job configuration is centralized JCasC code.
- Means to recreate all jobs,
- You simply have to create a pipeline job
- and run the job, which will inturn create all other jobs.
- Means to recreate all jobs,