Plug-in Documentation

Docker Compose

Overview

This plug-in provides steps for running Docker Compose.

To add the Docker Compose plug-in steps to processes, click Cloud > Docker in the step palette of the process editor.

Compatibility

The IBM UrbanCode Deploy automation plug-in for Docker Compose works with Docker Compose Version 4.0 and later.

This plug-in requires version 6.2 or later of IBM UrbanCode Deploy.

Installation

No special steps are required for installation. See Installing plug-ins in UrbanCode Deploy.

History

Version 23

  • Add dependency on version 30 of the UrbanCode Versioned File Storage plug-in.

Version 22

  • Add support for Compose v3 files.
  • Removed references to unset component property named docker-compose from component template processes.
  • Fixed problem where overrides file was not being generated correctly by plugin step Create Child Resources.

Version 20

Create a compose.service.scale component environment property on the Docker Compose component and update with new service names.

Version 19

Error discovered when trying to update a deployed version in the Create Child Resources step.
Added catch in Create Child Resources step for unsupported IBM UrbanCode Deploy versions.

Version 18

Support property file encryption.

Version 17

Implemented new Run Docker Compose step.
Renamed Compose Up step to Launch Docker Compose Application
Renamed Compose Scale step to Scale Docker Compose Application

  • Added Timeout property.

Version 16

Implemented new Compose Scale step.

Version 15

New docker-compose Command Path property to specify the location of the docker-compose executable for the Compose Up step.
New Do Not Delete Script property to save the plugins generated script following execution of the Compose Up step.
Default interpreter now used for *nix operating system.

Version 14

Updated bug when sourcing Environment Script file. Functionality only for *nix machines.
Added Text Area Box for specifying indiviual environment value pairs for both Windows and *nix.

Version 13

Update to Create Resource Tree step to match updates made to a dependency.

Version 12

This version of the plug-in includes changes related to internal refactoring.

Version 9

The following features are included in the initial release of the plug-in:

  • Create an environment based on a Compose file.
  • Run the Docker Compose up command.

Steps

Process steps in the Docker Compose plug-in

Create Child Resources

Create child resources of the component from Compose application resources. Dynamically
generate an overrides file for docker-compose.yml based on the selected component
versions at deployment.

Input properties for the Create Child Resources step
Name Type Description Required
Component Template String The template to use when creating components from Compose application resources. You
can use component templates to store different sets
of registry credentials.
No
Compose Files String A list of paths to Compose YAML files, separated by newline characters. The default
Compose file is docker-compose.yml.
No

Launch Docker Compose Application

Start all of the application services that are defined in a Compose file. Invoke docker-compose
up for compose file version less than or equal 2, and docker stack deploy when
version is 3+. This specialized step is expected to be follow the Create Resource
Tree step.

Input properties for the Launch Docker Compose Application step
Name Type Description Required
Additional Options String Specify additional command-line options for the docker-compose up command. No
Compose Files String A list of paths to Compose YAML files, separated by newline characters. The default
Compose file is docker-compose.yml.
No
Do Not Delete Script Boolean Select to save the plugins generated executable script to analyze and run manually
later.
No
Environment Script Paths String Specify the paths to shell scripts to run before the Docker Compose command runs.
Typically, this property is used to run a Docker environment script. This property
is utilized only on *nix machines.
No
Project Name String Specify an alternate project name. By default, the project name is the directory name. No
Stack Name String Name to give to the stack when compose file version is 3+. No
docker-compose Command Path String Full path to the docker-compose executable, or command name (docker-compose) if it
is on the $PATH environment variable. Default value is docker-compose.
No

Run Docker Compose

Run any docker-compose command through this generalized step. It is highly suggested
to use a commands specific step if available.

Input properties for the Run Docker Compose step
Name Type Description Required
Command Options and Services String List of command specific options and services. Input will be placed directly onto
the command line.
No
Compose Command Enumeration:

  • build
  • bundle
  • config
  • create
  • down
  • events
  • exec
  • help
  • kill
  • logs
  • pause
  • port
  • ps
  • pull
  • push
  • restart
  • rm
  • run
  • scale
  • start
  • stop
  • unpause
  • up
Select the docker-compose command to run. Yes
Compose Files String A list of paths to Compose YAML files, separated by newline characters. The default
Compose file is docker-compose.yml.
No
Compose Options String Specify additional command-line options for the general docker-compose command. No
Do Not Delete Script Boolean Select to save the plugins generated executable script to analyze and run manually
later.
No
Environment Script Paths String Specify the paths to shell scripts to run before the Docker Compose command runs.
Typically, this property is used to run a Docker environment script. This property
is utilized only on *nix machines.
No
Project Name String Specify an alternate project name. By default, the project name is the directory name. No
docker-compose Command Path String Full path to the docker-compose executable, or command name (docker-compose) if it
is on the $PATH environment variable. Default value is docker-compose.
No

Scale Docker Compose Application

Scale a service by assigning a number of available containers. (docker-compose scale)

Input properties for the Scale Docker Compose Application step
Name Type Description Required
Additional Options String Specify additional command-line options for the docker-compose Scale command. No
Compose Files String A list of paths to Compose YAML files, separated by newline characters. The default
Compose file is docker-compose.yml.
No
Do Not Delete Script Boolean Select to save the plugins generated executable script to analyze and run manually
later.
No
Environment Script Paths String Specify the paths to shell scripts to run before the Docker Compose command runs.
Typically, this property is used to run a Docker environment script. This property
is utilized only on *nix machines.
No
Project Name String Specify an alternate project name. By default, the project name is the directory name. No
Service and Container Pairs String List of services and number of container pairs delimited by newlines or commas. Each
pair is separated by an equals (=) sign. For example: service=num
Yes
Timeout String Specify in seconds a shutdown timeout. Default is 10 seconds. No
docker-compose Command Path String Full path to the docker-compose executable, or command name (docker-compose) if it
is on the $PATH environment variable. Default value is docker-compose.
No