This is an assignment for devop position.
Creating a CI pipeline for a Python product.
Development language: Python.
3RD parties: git, Github, Jenkins, Docker, Minikube, Helm
Distribution type: Public.
- Jenkins will be used as a CI engine and will run and schedule the pipeline.
- Git will be used as source control management tool.
- The Jenkins pipeline must be written inside a Jenkinsfile and committed into a remote any git repository.
- Computer.
- Github account.
- DockerHub account.
- Install docker on the computer.
- Install minikube.
- Install helm.
- Install jenkins with helm chart on local minikube.
- Install docker plugin in configure jenkins to connect to your dockerhub account.
- Configure jenkins to connect github account.
- Create a job to execute the Jenkinsfile.
- Create dockerfile with all dependencies for the microservice.
- Install python virtualenv.
- Install requirements.txt.
- Add microservice directory.
- Execute microservice/main.py.
- Build the image and test if the microservice is running.
- Create new deployment on minikube and run microservice.
- Execute microservice/main.py.
- Make sure the deployment is running.
- Pull SCM.
- Run python unittests in the microservice folder using py.test.
- Build image docker image using Dockerfile.
- Push docker image to dockerhub.
- Deploy image using deployment.yaml.