Grounded in the Cloud
cancel
Showing results for 
Search instead for 
Did you mean: 

Uncover the secrets to interactively control Docker Compose services with Operations Orchestration

collinchau

Written by Andrei Truta, HP Software CAT team

 

You might be already familiar with Docker—the new and emerging tool that is getting a lot of attention in the DevOps space. There are new tools released by the Docker team that support the tool: Docker Compose, Docker Machine, Docker Swarm.

 

The demo below shows how to control Docker Compose services interactively through HP Operations Orchestration.

 

G8658097032008_JPGHighres_96dpi_800x600.pngWhat is Docker Compose?

Compose is a tool for defining and running complex applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.

 

Let’s see how does the interactive control in the HP Operations Orchestration IT process automation tool, against the Docker services work.

 

Note: you can follow the steps here in order to easily have your first Docker compose based app running.

 

 

What does the OO flow allow you to do?

  1. Target a Docker compose project and retrieve its Docker compose services
  2. Interactively control one or multiple Docker compose services
  3. Interactively target one of the following commands: Stop, Start, Restart
  4. Get display notification of the targeted services, triggered command and affected containers and their current status.

Note: The flow is triggering Docker compose related commands like start, stop, restart and ps in order to interact with your Docker compose project.

 

 

Why the need for such flow?

Well, while working around my Docker compose project I realized that whenever I wanted to control a specific service I had to remember/know the service’s name. As a result I often ended up doing adjacent work to find out exactly what I had to control. Also through the help of this flow, you get the immediate result of the status of your action—thus the actual status of the Docker compose containers is retrieved too.

The flow graph can be seen below.

 

aT_1.png 

 

At runtime the flow allows you to target your environment as below:

 

aT_2.png 

 

The startDir input should be the location of your Docker compose project where any Docker compose yml file(s) should reside. The composeFile input is not mandatory, it can be left empty. In this case, the flow will look for a docker-compose.yml file at the startDir location.

 

If your Docker compose project is fine and the targeted compose file exists, the services are retrieved and actions can be taken as desired:

 

aT_3.png

 

With the ability to select:

  1. None of the available services - in which case all services will be affected
  2. One service
  3. Multiple services at once

aT_4.png 

 

Once the selected Docker compose command is triggered the notification will come as a display.

 

aT_5.png

 


G6889336082007_JPGHighres_96dpi_800x600.pngAs you can see it is simple and easy to control the services.

 

The flow can be easily adjusted to address other needs like:

  1. Other notification mechanisms e.g. writing to files or sending emails
  2. Other commands to trigger e.g. the scaling capabilities that the Docker compose offers
  3. Be part of an automatic remediation flow triggered by your monitoring system as part of your Day 2 Operations

 

Learn More:

Latest Docker and Docker Compose related content pack is available here

Additional info about HP Operations Orchestration CE is available here

Get a trial of Operations Orchestration Community Edition here

Docker Image of HP Operations Orchestration CE is available here

Docker announcement of Docker Compose, Docker Swarm, and Docker Machine here

Instructions around Docker Compose installation are available here

Making Cloud Simple
0 Kudos
About the Author

collinchau

Lending 20 years of IT market expertise across 5 continents, for defining moments as an innovation adoption change agent.

Events
28-30 November
Madrid, Spain
Discover 2017 Madrid
Join us for Hewlett Packard Enterprise Discover 2017 Madrid, taking place 28-30 November at the Feria de Madrid Convention Center
Read more
See posts for dates
Online
HPE Webinars - 2017
Find out about this year's live broadcasts and on-demand webinars.
Read more
View all