Welcome to the assignment section for DevOps. We understand that time and resources are limited. Hence the assignments are broken into few levels.
The sample application is a simple Spring Boot application that helps in storing the detail of the employees. It exposes REST API to CRUD on employee entity. The data is stored in an in memory database (which means that data stored in the database will not survive a server/app restart).
- Java 8
- Maven 3
- Git Client (to check out code)
- Postman (to invoke the API of the application)
Once checked out, use following commands to build and run the application on local machine.
cd my-app
mvn clean install
cd target
java -jar my-app-0.0.1-SNAPSHOT.jar
There is a postman collection. Feel free to use and extend the same to test the API behaviour.
- Create a Dockerfile for the application
- Build the image
- Run the image
- Create a CD pipeline in Jenkins CI server (or any other CI server of your choice)
- As part of the pipeline,
- Check out the code
- Build it
- Check using SonarQube
- Test the API by running Postman in a headless manner
- Create Docker image for the app
- Push to Docker Hub
- Notify once the build is completed
- Provision the environment using code
- As part of the environment,
- Create a VPC
- Ensure that the VPC spans at least 2 availability zones
- Create a public subnet
- Create a private subnet
- Provision EC2 instances; refer to app-install.sh; use it as user data to initialize an app on VM startup
- Configure classic Elastic Load Balancer to route traffic to the EC2 instances
- Complete Level - 3
- Update the VMs to have Docker runtime
- Deploy the image on the VM by downloading it from Docker Hub