Skip to content

Instantly share code, notes, and snippets.

@ardeshir
Forked from initcron/docker_final_projects.md
Created September 25, 2017 18:53
Show Gist options
  • Save ardeshir/8b5b3473be3303d46d5cff46ce299f57 to your computer and use it in GitHub Desktop.
Save ardeshir/8b5b3473be3303d46d5cff46ce299f57 to your computer and use it in GitHub Desktop.
Docker Project

Project 1 : Build a Docker Image for Sysfoo

Link to Application Source: https://github.com/schoolofdevops/sysfoo

Description:

Sysfoo is a java based web application, which uses maven as a build tool. The build specifications are provided with pom.xml in the root directory of the project. Your job is to write a dockerfile to build and package the sysfoo application.

The instructions to build this project is as follows:

  • maven and jdk should be installed as part of build tool/ container
  • the source files should be copied to the workdir
  • project can be compiled and packaged with mvn package command
  • the above command creates a .war file which needs to be part of the final image
  • this warfile can be deployed with tomcat. Specifically, it should be copied to the webapps directory of tomcat
  • image should contain all relevant metadata e.g. port to expose, command to launch etc.

Instructions:

  • Image should have a automated build on DockerHub. E.g. whenever the code is updated in the repo, it should build a new version of the image automatically.
  • Final deliverable image should contain only tomcat along with .war file. It should not contain the build tools e.g. maven

Deliverables:

  • Link to github repo with application code, Dockerfile etc.
  • Link to the page where image is published e.g. DockerHub

======================================================================================

Project 2 : Deploy a Microservices Stack with Docker SWARM

Link to Application Source: https://github.com/microservices-demo/microservices-demo

Description:

As a Devops Ninja, you have been tasked with deploying microservices based Sock Shop application in production. You are to also setup monitoring services once the application is deployed.

Instructions:

  • Setup a SWARM cluster. Should have minimum of 3nodes. Ideally 5 nodes with 3 masters. You could also use http://play-with-docker.com to do so.
  • Examine the Microservices Demo app, its deployment scripts. Learn how its been designed, what are the components, how they are connected with each other etc.
  • Examine the swarm deployment scripts, convert it into version 3. Add deploy configurations etc.
  • Deploy the application on the cluster built above.
  • Scale the application components, do rolling updates etc.

** Deliverables**:

  • Link to git repo which contains your own fork of the Microservices App. It should also contain deploy stack definition for swarm with version 3, overlay network etc.
  • Screenshot of the visualizer for docker swarm after building cluster and deploying the application.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment