{"action":"created","comment":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/39983049","id":39983049,"diff_hunk":"@@ -0,0 +1,97 @@\n+\n+========================================\n+Installing the Flocker Plugin for Docker\n+========================================\n+\n+Before installing the Flocker plugin for Docker, you will need to have installed Flocker on some nodes, using the :ref:`node installation instructions <installing-flocker-node>`.\n+\n+The Flocker plugin for Docker requires access to the Flocker REST API, and therefore you will need to create an API user certificate and key for a user named ``plugin`` on each node, as described in the :ref:`generate-api` instructions.\n+For example, you can use the ``flocker-ca`` command as below:\n+\n+.. prompt:: bash $\n+\n+   flocker-ca create-api-certificate plugin\n+   scp ./plugin.crt root@172.16.255.251:/etc/flocker/plugin.crt\n+   scp ./plugin.key root@172.16.255.251:/etc/flocker/plugin.key\n+\n+Upload these files to :file:`/etc/flocker/plugin.key` and :file:`/etc/flocker/plugin.crt` on the nodes where you want to run the Flocker plugin for Docker.\n+\n+You will also need to have Docker (at least version 1.8 or later) installed. For more information, see `the Docker installation instructions <https://docs.docker.com/>`_.\n+\n+Now you can use the following instructions to install the Flocker plugin for Docker on each of the nodes in your cluster.\n+\n+On CentOS 7\n+===========\n+\n+On each of your Flocker nodes, install the Flocker plugin:\n+\n+.. prompt:: bash $\n+\n+   yum install -y clusterhq-flocker-docker-plugin\n+   systemctl enable flocker-docker-plugin\n+   systemctl start flocker-docker-plugin\n+\n+The service can then be started, stopped, or restarted using ``systemctl``.\n+For example:\n+\n+.. prompt:: bash $\n+\n+   systemctl restart flocker-docker-plugin\n+\n+\n+On Ubuntu 14.04\n+===============\n+\n+On Ubuntu, it's best to ensure that Docker is using the ``AUFS`` storage driver.\n+\n+The easiest way to do this is to add a ``-s aufs`` option to the :file:`/etc/default/docker` file.\n+For example::\n+\n+   DOCKER_OPTS=\"-s aufs\"\n+\n+On each of your Flocker nodes, install the Flocker plugin:\n+\n+.. prompt:: bash $\n+\n+   apt-get install clusterhq-flocker-docker-plugin\n+\n+The service can be started, stopped, or restarted using ``service``.\n+For example:\n+\n+.. prompt:: bash $\n+\n+   service flocker-docker-plugin restart\n+\n+Testing your installation\n+=========================\n+\n+Once installed, two simple Docker tests can be run to verify that the plugin is working correctly with the Flocker agents:\n+\n+.. prompt:: bash $\n+\n+   docker run -v apples:/data --volume-driver flocker busybox sh -c \"echo hello > /data/file.txt\"\n+   docker run -v apples:/data --volume-driver flocker busybox sh -c \"cat /data/file.txt\"\n+\n+In this example, the first command uses the Flocker plugin for Docker as the volume driver to create a named volume called ``apples``.\n+\n+In the second command we are reattaching the same volume from the first container, and verifying that the data (``hello``) has been preserved.\n+\n+Upgrading the plugin\n+====================\n+\n+If you are upgrading from an earlier version of the plugin, make sure to stop the Docker daemon before doing so and then start it back up once the plugin has been upgraded.\n+\n+Known limitations\n+=================\n+\n+* You should not move a volume from one node to another unless you are sure no containers are using the volume.\n+\n+  The Flocker plugin will not stop volumes from being migrated out from underneath a running container.\n+  It is possible that Docker or your orchestration tool will prevent this from happening, but Flocker itself does not.\n+* ``--volumes-from`` and equivalent Docker API calls will only work if both containers are on the same machine.\n+\n+  Some orchestration frameworks may not schedule containers in a way that respects this restriction, so check before using ``--volumes-from``.\n+* We recommend only using named volumes when using the Flocker plugin.\n+\n+  If you use volumes in your Docker run commands without specified names, anonymous volumes can be created.\n+  This occurs as Docker defines volume drivers for the entire run command, not per-volume.","path":"docs/install/docker-plugin.rst","position":97,"original_position":97,"commit_id":"26e847a30c0d4440e8f8db63cb1a81584fc7c920","original_commit_id":"26e847a30c0d4440e8f8db63cb1a81584fc7c920","user":{"login":"lukemarsden","id":264658,"avatar_url":"https://avatars.githubusercontent.com/u/264658?v=3","gravatar_id":"","url":"https://api.github.com/users/lukemarsden","html_url":"https://github.com/lukemarsden","followers_url":"https://api.github.com/users/lukemarsden/followers","following_url":"https://api.github.com/users/lukemarsden/following{/other_user}","gists_url":"https://api.github.com/users/lukemarsden/gists{/gist_id}","starred_url":"https://api.github.com/users/lukemarsden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukemarsden/subscriptions","organizations_url":"https://api.github.com/users/lukemarsden/orgs","repos_url":"https://api.github.com/users/lukemarsden/repos","events_url":"https://api.github.com/users/lukemarsden/events{/privacy}","received_events_url":"https://api.github.com/users/lukemarsden/received_events","type":"User","site_admin":false},"body":"\"The result of this is that each time such a container is started on a different host, a new random name for the anonymous volumes is created. This can waste resources when the underlying volumes are provisioned from, for example, EBS. Therefore, we recommend not using Docker images that specify VOLUMEs, or anonymous (`-v /path`) style volumes when running Docker containers with the Flocker Docker plugin.\"","created_at":"2015-09-21T15:17:55Z","updated_at":"2015-09-21T15:17:55Z","html_url":"https://github.com/ClusterHQ/flocker/pull/1943#discussion_r39983049","pull_request_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1943","_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/39983049"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/1943#discussion_r39983049"},"pull_request":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1943"}}},"pull_request":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1943","id":45175833,"html_url":"https://github.com/ClusterHQ/flocker/pull/1943","diff_url":"https://github.com/ClusterHQ/flocker/pull/1943.diff","patch_url":"https://github.com/ClusterHQ/flocker/pull/1943.patch","issue_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1943","number":1943,"state":"open","locked":false,"title":"[FLOC 2760] Documentation for the Flocker plugin for Docker ","user":{"login":"davidoliverSP2","id":12032446,"avatar_url":"https://avatars.githubusercontent.com/u/12032446?v=3","gravatar_id":"","url":"https://api.github.com/users/davidoliverSP2","html_url":"https://github.com/davidoliverSP2","followers_url":"https://api.github.com/users/davidoliverSP2/followers","following_url":"https://api.github.com/users/davidoliverSP2/following{/other_user}","gists_url":"https://api.github.com/users/davidoliverSP2/gists{/gist_id}","starred_url":"https://api.github.com/users/davidoliverSP2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidoliverSP2/subscriptions","organizations_url":"https://api.github.com/users/davidoliverSP2/orgs","repos_url":"https://api.github.com/users/davidoliverSP2/repos","events_url":"https://api.github.com/users/davidoliverSP2/events{/privacy}","received_events_url":"https://api.github.com/users/davidoliverSP2/received_events","type":"User","site_admin":false},"body":"Fixes 2760\r\n\r\n@ferrantim and I are already aware that we require a new diagram for the content in the Introduction, and we already have a rough draft that will be sent to fffunction.\r\n\r\nDo not merge this branch until the updated image is added (or the current one is removed)","created_at":"2015-09-16T14:08:58Z","updated_at":"2015-09-21T15:17:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54d05e7bd7d876826cb60a8dee45ec3046a9fa2a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1943/commits","review_comments_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1943/comments","review_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1943/comments","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/26e847a30c0d4440e8f8db63cb1a81584fc7c920","head":{"label":"ClusterHQ:install-dockerplugin-FLOC-2760","ref":"install-dockerplugin-FLOC-2760","sha":"26e847a30c0d4440e8f8db63cb1a81584fc7c920","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":19248542,"name":"flocker","full_name":"ClusterHQ/flocker","owner":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterHQ/flocker","description":"Easily manage Docker containers & their data","fork":false,"url":"https://api.github.com/repos/ClusterHQ/flocker","forks_url":"https://api.github.com/repos/ClusterHQ/flocker/forks","keys_url":"https://api.github.com/repos/ClusterHQ/flocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterHQ/flocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterHQ/flocker/teams","hooks_url":"https://api.github.com/repos/ClusterHQ/flocker/hooks","issue_events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterHQ/flocker/events","assignees_url":"https://api.github.com/repos/ClusterHQ/flocker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterHQ/flocker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterHQ/flocker/tags","blobs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterHQ/flocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterHQ/flocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterHQ/flocker/languages","stargazers_url":"https://api.github.com/repos/ClusterHQ/flocker/stargazers","contributors_url":"https://api.github.com/repos/ClusterHQ/flocker/contributors","subscribers_url":"https://api.github.com/repos/ClusterHQ/flocker/subscribers","subscription_url":"https://api.github.com/repos/ClusterHQ/flocker/subscription","commits_url":"https://api.github.com/repos/ClusterHQ/flocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterHQ/flocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClusterHQ/flocker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterHQ/flocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterHQ/flocker/merges","archive_url":"https://api.github.com/repos/ClusterHQ/flocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterHQ/flocker/downloads","issues_url":"https://api.github.com/repos/ClusterHQ/flocker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterHQ/flocker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterHQ/flocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterHQ/flocker/releases{/id}","created_at":"2014-04-28T18:02:14Z","updated_at":"2015-09-21T03:07:29Z","pushed_at":"2015-09-21T14:49:21Z","git_url":"git://github.com/ClusterHQ/flocker.git","ssh_url":"git@github.com:ClusterHQ/flocker.git","clone_url":"https://github.com/ClusterHQ/flocker.git","svn_url":"https://github.com/ClusterHQ/flocker","homepage":"https://clusterhq.com","size":65783,"stargazers_count":1865,"watchers_count":1865,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":131,"mirror_url":null,"open_issues_count":30,"forks":131,"open_issues":30,"watchers":1865,"default_branch":"master"}},"base":{"label":"ClusterHQ:master","ref":"master","sha":"c83cfb85ba926509a3c476888f484f4068fc463d","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":19248542,"name":"flocker","full_name":"ClusterHQ/flocker","owner":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterHQ/flocker","description":"Easily manage Docker containers & their data","fork":false,"url":"https://api.github.com/repos/ClusterHQ/flocker","forks_url":"https://api.github.com/repos/ClusterHQ/flocker/forks","keys_url":"https://api.github.com/repos/ClusterHQ/flocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterHQ/flocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterHQ/flocker/teams","hooks_url":"https://api.github.com/repos/ClusterHQ/flocker/hooks","issue_events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterHQ/flocker/events","assignees_url":"https://api.github.com/repos/ClusterHQ/flocker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterHQ/flocker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterHQ/flocker/tags","blobs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterHQ/flocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterHQ/flocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterHQ/flocker/languages","stargazers_url":"https://api.github.com/repos/ClusterHQ/flocker/stargazers","contributors_url":"https://api.github.com/repos/ClusterHQ/flocker/contributors","subscribers_url":"https://api.github.com/repos/ClusterHQ/flocker/subscribers","subscription_url":"https://api.github.com/repos/ClusterHQ/flocker/subscription","commits_url":"https://api.github.com/repos/ClusterHQ/flocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterHQ/flocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClusterHQ/flocker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterHQ/flocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterHQ/flocker/merges","archive_url":"https://api.github.com/repos/ClusterHQ/flocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterHQ/flocker/downloads","issues_url":"https://api.github.com/repos/ClusterHQ/flocker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterHQ/flocker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterHQ/flocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterHQ/flocker/releases{/id}","created_at":"2014-04-28T18:02:14Z","updated_at":"2015-09-21T03:07:29Z","pushed_at":"2015-09-21T14:49:21Z","git_url":"git://github.com/ClusterHQ/flocker.git","ssh_url":"git@github.com:ClusterHQ/flocker.git","clone_url":"https://github.com/ClusterHQ/flocker.git","svn_url":"https://github.com/ClusterHQ/flocker","homepage":"https://clusterhq.com","size":65783,"stargazers_count":1865,"watchers_count":1865,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":131,"mirror_url":null,"open_issues_count":30,"forks":131,"open_issues":30,"watchers":1865,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1943"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/1943"},"issue":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/1943"},"comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/1943/comments"},"review_comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1943/comments"},"review_comment":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1943/commits"},"statuses":{"href":"https://api.github.com/repos/ClusterHQ/flocker/statuses/26e847a30c0d4440e8f8db63cb1a81584fc7c920"}}}}