Example 10.12. A bundle for a containerized web server
<bundle id="httpd-bundle"> <podman 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,Z"/> <storage-mapping id="httpd-logs" source-dir-root="/var/log/pacemaker/bundles" target-dir="/etc/httpd/logs" options="rw,Z"/> </storage> <primitive class="ocf" id="httpd" provider="heartbeat" type="apache"/> </bundle>
ocf:heartbeat:docker
, ocf:heartbeat:podman
, or ocf:heartbeat:rkt
to manage a bundle’s container. The user must ensure that the appropriate resource agent is installed on every node allowed to run the bundle.