- Objective - Create a CI/CD Pipeline that builds an image from github and deploys it to a kubernetes cluster
- Purpose - To demonstrate container orchestration skillset
- Git CLI
- Docker
- minikube
- kubectl
- Python
- Flask
- Jenkins
- Fork and clone this project locally.
- Create a respective
requirements.txtto download anypipdependencies for this python project.- Ensure you
pushthe newly created file:requirements.txt
- Ensure you
- Create a
Dockerfileto build the image. Push it to github - Build the image
- Push image to one of your repos on Dockerhub.
- Create a
kubernetes.ymlwhich will pull the aforementioned Dockerhub image and create 3 running copies of it. - Use the
kubernetes.ymlto launch your application. Push this file to your github repo as well. If possible have jenkins start the app by this method. - Write and run a script to determine the state of your kubernetes cluster including the information about the services, pods, nodes, ip addresses, etc.
- upload script to github
kubernetes-cluster-information.sh - run script and redirect the output of the
kuberenetes-cluster-information.shtokuberenetes-cluster-information-output - push the script output to your github repo
- upload script to github
- To fork the project, click the
Forkbutton located at the top right of the project.
- Navigate to your github profile to find the newly forked repository.
- Copy the URL of the project to the clipboard.
- Clone the repository from your account into the directory where you keep projects e.g. ~/projects
- clone the project by executing the following command:
git clone https://github.com/MYUSERNAME/NAMEOFPROJECT
- clone the project by executing the following command:
- Upon executing
python web.py, navigate tolocalhost:8080to view the webpage.
Points Breakdown
* 150 pushed a requirements.txt file to their repo
* 150 built the new image w/jenkins
* 150 pushed Dockerfile to repo
* 150 Pushed built image to dockerhub
* 150 deployed image to k8s cluster
* 150 screenshot showing their browser with the spinning flasks
* 150 script+output to show k8s cluster status, 150 points if output shows correct functioning(e.g. pods, nodes, deployments, etc... of app) output+script pushed to github
* 50 submitted pull request with all their changes
- from the browser, navigate to the forked project from your github account.
- click the
Pull Requeststab. - select
New Pull Request
