Product SiteDocumentation Site

10.4. Bundles - Isolated Environments

Pacemaker supports a special syntax for launching a container with any infrastructure it requires: the bundle.
Pacemaker bundles support Docker (since version 1.1.17) and rkt (since version 1.1.18) container technologies. [18]

Example 10.12. A bundle for a containerized web server

<bundle id="httpd-bundle">
   <docker image="pcmk:http" replicas="3"/>
   <network ip-range-start="192.168.122.131"
            host-netmask="24"
            host-interface="eth0">
      <port-mapping id="httpd-port" port="80"/>
   </network>
   <storage>
      <storage-mapping id="httpd-syslog"
                       source-dir="/dev/log"
                       target-dir="/dev/log"
                       options="rw"/>
      <storage-mapping id="httpd-root"
                       source-dir="/srv/html"
                       target-dir="/var/www/html"
                       options="rw"/>
      <storage-mapping id="httpd-logs"
                       source-dir-root="/var/log/pacemaker/bundles"
                       target-dir="/etc/httpd/logs"
                       options="rw"/>
   </storage>
   <primitive class="ocf" id="httpd" provider="heartbeat" type="apache"/>
</bundle>

10.4.1. Bundle Properties

Table 10.12. Properties of a Bundle

Field Description
id
A unique name for the bundle (required)
description
Arbitrary text (not used by Pacemaker)

A bundle must contain exactly one <docker> or <rkt> element.


[18] Docker is a trademark of Docker, Inc. No endorsement by or association with Docker, Inc. is implied.