Project Overview | Installation | Documentation
Develop a CI/CD pipeline for micro services applications with blue/green deployment. We will also develop Continuous Integration steps as you see fit, but must at least include typographical checking (aka “linting”).
[
project goal is to operationalize machine learning microservice using kubernetes, which is an open-source system for automating the management of containerized applications. In this project we will:
- Pushing the built Docker container(s) to the Docker repository (use AWS ECR/ Dockerhub);
- Deploying these Docker container(s) to a small Kubernetes cluster.
- Use Ansible or CloudFormation to build your “infrastructure”; i.e., the Kubernetes Cluster
- Or we can also use AWS Kubernetes as a Service for Kubernetes cluste.
- Construct your pipeline in your GitHub repository, GitOps
The final implementation of the project will showcase your abilities to implement blue/green deployment using docker, kubernete, AWS EKS.
- Dockerfile
- file that contains all commands, in order, needed to build a image.
- run_docker.sh
- Shell Script to run docker container and exposed container port to host.
- upload_docker.sh
- Shell Script to push image to docker registery with tag
- run_kubernetes.sh
- Shell Script to run kubernetes Pod with docker container and forward port from container to host
- Jenkinsfile
- Descriptive Jenkinsfile for automating the blue/green deployment pipeline
- Install java
- Install Jenkins
- Configure Jenkins with AWS Credential and docker Credential
- Install BlueOcean Plugin
- Install Docker
- Install AWS CLI (1.16 or higher)
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py
Pip install awscli –upgrade
- Install EKSCTL
curl --silent –location "https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
eksctl version
[ℹ] version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.13.0"}
- Install KUBECTL
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --short --client
Client Version: v1.17.3
- Install Hadolint for Linting test
sudo wget -O /bin/hadolint https://github.com/hadolint/hadolint/releases/download/v1.16.3/hadolint-Linux-x86_64
sudo chmod +x /bin/hadolint
- eksctl is a simple CLI tool for creating clusters on EKS - Amazon’s new managed Kubernetes service.It is written in Go, uses CloudFormation. customize cluster by using a config file
eksctl create cluster -f cluster.yaml
Important: In us-east-1 you are likely to get UnsupportedAvailabilityZoneException. If you do, copy the suggested zones and pass --zones flag, e.g. eksctl create cluster --region=us-east-1 --zones=us-east-1a,us-east-1b,us-east-1d.
- Microservices deployed using pipeline in AWS EKS
- Label instances with blue and green application accordingly
- Redirect live Traffic to green environment by updating the updating LB service with selector
- Kubernetes command
kubectl get nodes
kubectl get pods
kubectl get svc
kubectl describe svc lbsvc_name
kubectl logs podname