In this repository you'll find Light-weight continuous deployment exercise.
- Your work and configuration should be visible and you will be instructed to present them.
- We expect a running "Dummy" service, and a working automated deployment work-flow.
- Use this repository as the workspace for everything you build and configure
- You will do the exercise on EC2 machine , please download devops-candidate.pem and login to EC2 by:
ssh -i <devops-candidate.pem full path> [email protected]
-
Clone this repository https://github.com/adiCohenIL/devops-chk on EC2
Make sure you create your own branch to work on !
-
This repostitory contains dummy nodeJS app in CICD-exercise directory (See
package.json
andapp.js
)
- cd CICD-exercise
- Install Node dependencies with:
npm install
- Run service:
npm run start
GET
http://localhost:3000/health -⚠️ Randomly reports unhealthy!
- Create a Dockerfile for the Dummy service for being able to run the service as a Docker container.
- Docker registry is available on EC2 , called qwilt-registry
curl -X GET http://qwilt-registry:5000/v2/_catalog
curl -X GET http://qwilt-registry:5000/v2/<image-name>/tags/list
-
Jenkins is available on http://54.75.84.188:8080 Edit "Ci Cycle" job, job should create and upload Dummy service docker image to registry
Note: versioning of image is expected
build groovy file should be saved in /home/ubuntu/repos/devops-chk/CICD-exercise/ci_jenkinsfile
-
Add Jenkins task to deploy dummy service container to EC2 machine ( get image from registry and run it)
-
Bonus: Add health check to your service (in the dockerfile)
Copyright © 2021 Qwilt