[ClusterLabs] Manage Docker service and containers with pacemaker
kgaillot at redhat.com
Fri Feb 3 10:32:38 EST 2017
On 02/03/2017 08:15 AM, Stephane Gaucher wrote:
> Hello I am completing a proof of concept.
> Here are the facts:
> An active / passive cluster.....Done
> A drbd partition for exchanging files for different services....Done
> A shared VIP between the two nodes....Done
> The docker/containers are functional. I do not want to use docker swarm.
> This is not the purpose of this message.
> The services I develop are in the form of containers. I would like to be
> able to control the docker service with pacemaker. The docker system
> folders are on a drbd partition so available on the second node when it
> is active.
> For the moment it works well, but I have to manually start the docker
> service as well as the containers on the active node for the switch to
> be effective. The server is in high availability in the hardly way.
> So is it possible to create a directive that starts the docker service
> and even the container by using pacemaker.
Is it documented? No. :-(
There are three types of support for containers in Pacemaker: the
ocf:heartbeat:docker resource agent, running Pacemaker Remote inside a
container, and Pacemaker's "resource isolation" capability.
The resource agent is pretty easy to figure out from its meta-data and
The Pacemaker Remote documentation gives a few pointers on that approach
under "Containers as Guest Nodes":
The resource isolation capability is probably the most interesting. The
best documentation currently is the "Resource Isolation" section of this
document (the "blackbox" use case it mentions is just the
ocf:heartbeat:docker agent mentioned above):
Testing and feedback on any of these methods are welcome.
More information about the Users