ocf_heartbeat_docker-compose - Man Page

This script manages docker services using docker-compose.

Synopsis

docker-compose [start | stop | monitor | meta-data | validate-all]

Description

Manages docker services using docker-compose as an OCF resource in an High Availability setup. It relies on a well-tested docker compose YAML file which distributed on an identical location on all cluster nodes.

Caveat: 1. A YAML file (docker-compose.yml) and an optional Dockerfile must be provided in a working directory. 2. It is suggested to test run the docker-compose and verify on all cluster nodes before enabling this agent.

Supported Parameters

binpath

The docker-composer binary path. For example, "/usr/bin/docker-compose"

(optional, string, default "/usr/bin/docker-compose")

dirpath

The directory contains docker compose yaml file. For example, "/data/docker"

(required, string, no default)

ymlfile

The docker-compose yaml file. For example, "docker-compose.yml"

(optional, string, default "docker-compose.yml")

Supported Actions

This resource agent supports the following actions (operations):

start

Starts the resource. Suggested minimum timeout: 240s.

stop

Stops the resource. Suggested minimum timeout: 20s.

monitor

Performs a detailed status check. Suggested minimum timeout: 10s. Suggested interval: 60s.

validate-all

Performs a validation of the resource configuration. Suggested minimum timeout: 5s.

meta-data

Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.

Example CRM Shell

The following is an example configuration for a docker-compose resource using the crm(8) shell:

primitive p_docker-compose ocf:heartbeat:docker-compose \
  params \
    dirpath=string \
  op monitor depth="0" timeout="10s" interval="60s"

Example PCS

The following is an example configuration for a docker-compose resource using pcs(8)

pcs resource create p_docker-compose ocf:heartbeat:docker-compose \
  dirpath=string \
  op monitor OCF_CHECK_LEVEL="0" timeout="10s" interval="60s"

See Also

http://clusterlabs.org/

Author

ClusterLabs contributors (see the resource agent source for information about individual authors)

Info

11/06/2024 resource-agents UNKNOWN OCF resource agents