The flocker-dataset-agent
is the workhorse of Flocker; you should enable and run it on each node in your cluster.
The Flocker Plugin for Docker (flocker-docker-plugin
) is also installed on each node in the cluster.
The instructions below include enabling and testing the plugin, which allows Flocker to manage your data volumes while using other tools such as Docker, Docker Swarm, or Mesos to manage your containers.
Run the following commands to enable the agent service:
systemctl enable flocker-dataset-agent systemctl start flocker-dataset-agent
Run the following commands to enable the Flocker plugin for Docker:
systemctl enable flocker-docker-plugin systemctl restart flocker-docker-plugin
Run the following commands to enable the agent service:
systemctl enable flocker-dataset-agent systemctl start flocker-dataset-agent
Run the following command to enable the Flocker plugin for Docker:
systemctl enable flocker-docker-plugin systemctl restart flocker-docker-plugin
Run the following commands to enable the agent service:
service flocker-dataset-agent start
Run the following command to enable the Flocker plugin for Docker:
service flocker-docker-plugin restart
Once installed, the example provided below runs two simple Docker tests to verify that the plugin is working correctly with the Flocker agents.
Run the following command, which uses the Flocker plugin for Docker as the volume driver to create a named volume called apples
:
docker run -v apples:/data --volume-driver flocker busybox sh -c "echo hello > /data/file.txt"
Run the following command to reattach the same volume from the first container, and verify that the data (hello
) has been preserved.
docker run -v apples:/data --volume-driver flocker busybox sh -c "cat /data/file.txt"
This completes the manual installation of Flocker for an integration with Docker Swarm.
The next step is to install Docker Swarm. Click the button below to open the Swarm installation instructions provided by Docker - this will open in a new window: