As per capstone project requirement the directions are rather more open-ended than they were in the previous projects in the program. In this project, need to make some of our own choices in this capstone, as deployment implement, services, and the nature of the application development.
So that, develop a CI/CD pipeline for micro services applications with either blue/green deployment or rolling deployment. And, also develop our Continuous Integration steps as our project, but must at least include typographical checking (aka “linting”).
- AWS Account
- GitHub Account
- Docker ID
- AWS EC2 instance
- Git
- Python (Flask)
- Jenkins
- Docker
- AWS CLI
- AWS CloudFormation
- AWS Elastic Kubernetes Service
$ sudo apt-get install default-jdk -y
sudo apt-get update
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo echo "deb https://pkg.jenkins.io/debian-stable binary/" >> /etc/apt/sources.list
sudo apt-get install jenkins -y
sudo systemctl status jenkins
- Blue Ocean
- CloudBees Docker Build and Publish
- pipeline-aws
sudo apt-get install python3-pip -y
sudo apt-get install docker.io -y
sudo chmod 666 /var/run/docker.sock
sudo wget -O /bin/hadolint https://github.com/hadolint/hadolint/releases/download/v1.16.3/hadolint-Linux-x86_64
sudo chmod +x /bin/hadolint
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo apt-get install unzip
unzip awscliv2.zip
sudo ./aws/install
aws --version
aws configure
rm awscliv2.zip
curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv kubectl /bin/
kubectl version --short --client
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
eksctl version
eksctl create cluster -f cluster.yaml
kubectl get svc
aws eks --region us-west-2 update-kubeconfig --name clustercapstone
kubectl get services
kubectl describe services bluegreenlb
eksctl delete cluster -f cluster.yaml
- /Application_deployment_output_images - image of the project output pipeline
- /bgdeployment - Blue-Green deployment configuration file
- Dockerfile - Docker file of the application
- Jenkinsfile - Jenkins pipeline file
- Makefile - Makefile for install and lint check
- app.py - Flask application file
- cluster.yaml - CloudFormation stack file for cluster
- requirements.txt - Python requirements library packages
- Step-1: Create an EC2 instance (t2.micro) and allow port: 22, 80, 8000, 8080 in the security groups
- Step-2: Install jenkins in the EC2 instance and check the jenkins system status
- Step-3: Install jenkins requirements plugin
- Step-4: Install Python Package Management System
- Step-5: Install Docker and Hadolint in the instance
- Step-6: Install AWS CLI, kubectl, eksctl
- Step-7: Run the
cluster.yaml
in the EC2 instance - Step-8: Check the cluster services
- Step-9: Set docker and aws credentials in the jenkins credentials
- Step-10: Add this GitHub repo to the Blue Ocean pipeline and create pipeline
- Step-11: After complete the project remove the cluster