{"action":"created","comment":{"url":"https://api.github.com/repos/docker/swarm/pulls/comments/51717690","id":51717690,"diff_hunk":"@@ -0,0 +1,174 @@\n+<!--[metadata]>\n++++\n+title = \"Provision with Machine\"\n+description = \"Provision with Machine\"\n+keywords = [\"docker, Swarm, clustering, provision, Machine\"]\n+[menu.main]\n+parent=\"workw_swarm\"\n+weight=5\n++++\n+<![end-metadata]-->\n+\n+\n+# Provision a Swarm cluster with Docker Machine\n+\n+You can use Docker Machine to provision a Docker Swarm cluster. Machine is the\n+Docker provisioning tool. Machine provisions the hosts, installs Docker Engine\n+on them, and then configures the Docker CLI client. With Machine's Swarm options, you can also quickly configure a Swarm cluster as part of this provisioning.\n+\n+This page explains the commands you need to provision a basic Swarm cluster on a\n+local Mac or Windows computer using Machine. Once you understand the process,\n+you can use it to setup a Swarm cluster on a cloud provider, or inside your\n+company's data center.\n+\n+If this is the first time you are creating a Swarm cluster, you should first learn about Swarm and its requirements by [installing a Swarm for evaluation](install-w-machine.md) or [installing a Swarm for production](install-on-aws.md). If this is the first time you have used Machine,\n+you should take some time to [understand Machine before continuing](https://docs.docker.com/machine).\n+\n+\n+## What you need\n+\n+If you are using Mac OS X or Windows and have installed with Docker Toolbox, you\n+should already have Machine installed. If you need to install, see the\n+instructions for [Mac OS X](https://docs.docker.com/engine/installation/mac/) or\n+[Windows](https://docs.docker.com/engine/installation/mac/).\n+\n+Machine supports installing on AWS, Digital Ocean, Google Cloud Platform, IBM\n+Softlayer, Microsoft Azure and Hyper-V, OpenStack, Rackspace, VirtualBox, VMware\n+Fusion&reg;, vCloud&reg; Air<sup>TM</sup> and vSphere&reg;.  In this example,\n+you'll use VirtualBox to run several VMs based on the `boot2docker.iso` image.\n+This image is a small-footprint Linux distribution for running Engine.\n+\n+The Toolbox installation gives you VirtualBox and the `boot2docker.iso` image\n+you need. It also gives you the ability provision on all the systems Machine\n+supports.\n+\n+**Note**:These examples assume you are using Mac OS X or Windows, if you like you can also [install Docker Machine directly on a Linux system](http://docs.docker.com/machine/install-machine).\n+\n+\n+## Provision a host to generate a Swarm token\n+\n+Before you can configure a Swarm, start by provisioning a host with Engine. Open a terminal on the host where you installed Machine and do the following:\n+\n+```\n+docker-machine create -d virtualbox local\n+```\n+\n+This examples uses VirtualBox but it could easily be DigitalOcean or a host on\n+your data center. The `local` value is the host name. Once you create it,\n+configure your terminal's shell environment to interact with the `local` host.\n+\n+```\n+eval \"$(docker-machine env local)\"\n+```\n+\n+Each Swarm host has a token installed into its Engine configuration. The token\n+allows the Swarm discovery backend to recognize a node as belonging to a\n+particular Swarm cluster. Create the token for your cluster by running the\n+`swarm` image:\n+\n+```\n+docker run swarm create\n+Unable to find image 'swarm' locally\n+1.1.0-rc2: Pulling from library/swarm\n+892cb307750a: Pull complete\n+fe3c9860e6d5: Pull complete\n+cc01ef3f1fbc: Pull complete\n+b7e14a9c9c72: Pull complete\n+3ec746117013: Pull complete\n+703cb7acfce6: Pull complete\n+d4f6bb678158: Pull complete\n+2ad500e1bf96: Pull complete\n+Digest: sha256:f02993cd1afd86b399f35dc7ca0240969e971c92b0232a8839cf17a37d6e7009\n+Status: Downloaded newer image for swarm\n+0de84fa62a1d9e9cc2156111f63ac31f\n+```\n+\n+The output of the `swarm create` command is a cluster token. Copy the token to a\n+safe place you will remember. Once you have the token, you can provision the\n+Swarm nodes and join them to the cluster_id.  The rest of this documentation,\n+refers to this token as the `SWARM_CLUSTER_TOKEN`.\n+\n+## Provision Swarm nodes\n+\n+All Swarm nodes in a cluster must have Engine installed. With Machine and the `SWARM_CLUSTER_TOKEN` you can provision a host with Engine and configure it as a Swarm node with one Machine command. To create a Swarm master node on a new VM called `swarm-master`, you do the following:\n+\n+```\n+docker-machine create \\\n+    -d virtualbox \\\n+    --swarm \\\n+    --swarm-master \\\n+    --swarm-discovery token://SWARM_CLUSTER_TOKEN \\\n+    swarm-master\n+```\n+\n+Then, provision additional an additional node. You must supply the `SWARM_CLUSTER_TOKEN` and a unique name for each host node, `HOST_NODE_NAME`.\n+\n+```\n+docker-machine create \\\n+    -d virtualbox \\\n+    --swarm \\\n+    --swarm-discovery token://SWARM_CLUSTER_TOKEN \\\n+    HOST_NODE_NAME\n+```\n+\n+For example, you might use `node-01` as the `HOST_NODE_NAME` in the previous example.\n+\n+>**Note**: These command rely on Docker Swarm's hosted discovery service, Docker\n+Hub. If Docker Hub is having issues, these commands may fail. You can wait for\n+the Docker Hub to recover or configure other types of discovery backends. Check\n+the [Docker Hub status page](http://status.docker.com/) for service\n+availability.\n+\n+## Connect node environments with Machine\n+\n+If you are connecting to typical host environment with Machine, you use the `env` subcommand, like this:\n+\n+```\n+eval \"$(docker-machine env local)\"\n+```\n+\n+Docker Machine provides a special `--swarm` flag with its `env` command to connect to Swarm nodes.\n+\n+```\n+docker-machine env --swarm HOST_NODE_NAME","path":"docs/provision-with-machine.md","position":133,"original_position":133,"commit_id":"7657e399165ab05d9d7532f258dcc39465a0f817","original_commit_id":"7657e399165ab05d9d7532f258dcc39465a0f817","user":{"login":"moxiegirl","id":1347209,"avatar_url":"https://avatars.githubusercontent.com/u/1347209?v=3","gravatar_id":"","url":"https://api.github.com/users/moxiegirl","html_url":"https://github.com/moxiegirl","followers_url":"https://api.github.com/users/moxiegirl/followers","following_url":"https://api.github.com/users/moxiegirl/following{/other_user}","gists_url":"https://api.github.com/users/moxiegirl/gists{/gist_id}","starred_url":"https://api.github.com/users/moxiegirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moxiegirl/subscriptions","organizations_url":"https://api.github.com/users/moxiegirl/orgs","repos_url":"https://api.github.com/users/moxiegirl/repos","events_url":"https://api.github.com/users/moxiegirl/events{/privacy}","received_events_url":"https://api.github.com/users/moxiegirl/received_events","type":"User","site_admin":false},"body":"I'm not sure what you mean, the output is shown --- that's what lines 134-139 are.","created_at":"2016-02-03T13:07:05Z","updated_at":"2016-02-03T13:07:05Z","html_url":"https://github.com/docker/swarm/pull/1718#discussion_r51717690","pull_request_url":"https://api.github.com/repos/docker/swarm/pulls/1718","_links":{"self":{"href":"https://api.github.com/repos/docker/swarm/pulls/comments/51717690"},"html":{"href":"https://github.com/docker/swarm/pull/1718#discussion_r51717690"},"pull_request":{"href":"https://api.github.com/repos/docker/swarm/pulls/1718"}}},"pull_request":{"url":"https://api.github.com/repos/docker/swarm/pulls/1718","id":57757470,"html_url":"https://github.com/docker/swarm/pull/1718","diff_url":"https://github.com/docker/swarm/pull/1718.diff","patch_url":"https://github.com/docker/swarm/pull/1718.patch","issue_url":"https://api.github.com/repos/docker/swarm/issues/1718","number":1718,"state":"open","locked":false,"title":"How to get Swarm and Machine provisioning","user":{"login":"moxiegirl","id":1347209,"avatar_url":"https://avatars.githubusercontent.com/u/1347209?v=3","gravatar_id":"","url":"https://api.github.com/users/moxiegirl","html_url":"https://github.com/moxiegirl","followers_url":"https://api.github.com/users/moxiegirl/followers","following_url":"https://api.github.com/users/moxiegirl/following{/other_user}","gists_url":"https://api.github.com/users/moxiegirl/gists{/gist_id}","starred_url":"https://api.github.com/users/moxiegirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moxiegirl/subscriptions","organizations_url":"https://api.github.com/users/moxiegirl/orgs","repos_url":"https://api.github.com/users/moxiegirl/repos","events_url":"https://api.github.com/users/moxiegirl/events{/privacy}","received_events_url":"https://api.github.com/users/moxiegirl/received_events","type":"User","site_admin":false},"body":"Adding a how to get Swarm\r\nFix and close #1580 \r\nSupplements https://github.com/docker/machine/pull/2957\r\n\r\n\r\nSigned-off-by: Mary Anthony <mary@docker.com>","created_at":"2016-01-31T02:25:26Z","updated_at":"2016-02-03T13:07:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc5aa3e47bfb7b1b02a33582aef296a9eb1ec9fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/swarm/pulls/1718/commits","review_comments_url":"https://api.github.com/repos/docker/swarm/pulls/1718/comments","review_comment_url":"https://api.github.com/repos/docker/swarm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarm/issues/1718/comments","statuses_url":"https://api.github.com/repos/docker/swarm/statuses/7657e399165ab05d9d7532f258dcc39465a0f817","head":{"label":"moxiegirl:swarm-1.10-docs","ref":"swarm-1.10-docs","sha":"7657e399165ab05d9d7532f258dcc39465a0f817","user":{"login":"moxiegirl","id":1347209,"avatar_url":"https://avatars.githubusercontent.com/u/1347209?v=3","gravatar_id":"","url":"https://api.github.com/users/moxiegirl","html_url":"https://github.com/moxiegirl","followers_url":"https://api.github.com/users/moxiegirl/followers","following_url":"https://api.github.com/users/moxiegirl/following{/other_user}","gists_url":"https://api.github.com/users/moxiegirl/gists{/gist_id}","starred_url":"https://api.github.com/users/moxiegirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moxiegirl/subscriptions","organizations_url":"https://api.github.com/users/moxiegirl/orgs","repos_url":"https://api.github.com/users/moxiegirl/repos","events_url":"https://api.github.com/users/moxiegirl/events{/privacy}","received_events_url":"https://api.github.com/users/moxiegirl/received_events","type":"User","site_admin":false},"repo":{"id":34550284,"name":"swarm","full_name":"moxiegirl/swarm","owner":{"login":"moxiegirl","id":1347209,"avatar_url":"https://avatars.githubusercontent.com/u/1347209?v=3","gravatar_id":"","url":"https://api.github.com/users/moxiegirl","html_url":"https://github.com/moxiegirl","followers_url":"https://api.github.com/users/moxiegirl/followers","following_url":"https://api.github.com/users/moxiegirl/following{/other_user}","gists_url":"https://api.github.com/users/moxiegirl/gists{/gist_id}","starred_url":"https://api.github.com/users/moxiegirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moxiegirl/subscriptions","organizations_url":"https://api.github.com/users/moxiegirl/orgs","repos_url":"https://api.github.com/users/moxiegirl/repos","events_url":"https://api.github.com/users/moxiegirl/events{/privacy}","received_events_url":"https://api.github.com/users/moxiegirl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moxiegirl/swarm","description":"Swarm: a Docker-native clustering system","fork":true,"url":"https://api.github.com/repos/moxiegirl/swarm","forks_url":"https://api.github.com/repos/moxiegirl/swarm/forks","keys_url":"https://api.github.com/repos/moxiegirl/swarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moxiegirl/swarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moxiegirl/swarm/teams","hooks_url":"https://api.github.com/repos/moxiegirl/swarm/hooks","issue_events_url":"https://api.github.com/repos/moxiegirl/swarm/issues/events{/number}","events_url":"https://api.github.com/repos/moxiegirl/swarm/events","assignees_url":"https://api.github.com/repos/moxiegirl/swarm/assignees{/user}","branches_url":"https://api.github.com/repos/moxiegirl/swarm/branches{/branch}","tags_url":"https://api.github.com/repos/moxiegirl/swarm/tags","blobs_url":"https://api.github.com/repos/moxiegirl/swarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moxiegirl/swarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moxiegirl/swarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/moxiegirl/swarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moxiegirl/swarm/statuses/{sha}","languages_url":"https://api.github.com/repos/moxiegirl/swarm/languages","stargazers_url":"https://api.github.com/repos/moxiegirl/swarm/stargazers","contributors_url":"https://api.github.com/repos/moxiegirl/swarm/contributors","subscribers_url":"https://api.github.com/repos/moxiegirl/swarm/subscribers","subscription_url":"https://api.github.com/repos/moxiegirl/swarm/subscription","commits_url":"https://api.github.com/repos/moxiegirl/swarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/moxiegirl/swarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/moxiegirl/swarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/moxiegirl/swarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/moxiegirl/swarm/contents/{+path}","compare_url":"https://api.github.com/repos/moxiegirl/swarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moxiegirl/swarm/merges","archive_url":"https://api.github.com/repos/moxiegirl/swarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moxiegirl/swarm/downloads","issues_url":"https://api.github.com/repos/moxiegirl/swarm/issues{/number}","pulls_url":"https://api.github.com/repos/moxiegirl/swarm/pulls{/number}","milestones_url":"https://api.github.com/repos/moxiegirl/swarm/milestones{/number}","notifications_url":"https://api.github.com/repos/moxiegirl/swarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moxiegirl/swarm/labels{/name}","releases_url":"https://api.github.com/repos/moxiegirl/swarm/releases{/id}","deployments_url":"https://api.github.com/repos/moxiegirl/swarm/deployments","created_at":"2015-04-25T01:32:52Z","updated_at":"2016-01-24T16:11:15Z","pushed_at":"2016-02-03T13:03:06Z","git_url":"git://github.com/moxiegirl/swarm.git","ssh_url":"git@github.com:moxiegirl/swarm.git","clone_url":"https://github.com/moxiegirl/swarm.git","svn_url":"https://github.com/moxiegirl/swarm","homepage":"","size":12789,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"eb5bcbdabaef3e3e8f07d71a0fde6739e3cc7d03","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":19360616,"name":"swarm","full_name":"docker/swarm","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/swarm","description":"Swarm: a Docker-native clustering system","fork":false,"url":"https://api.github.com/repos/docker/swarm","forks_url":"https://api.github.com/repos/docker/swarm/forks","keys_url":"https://api.github.com/repos/docker/swarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/swarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/swarm/teams","hooks_url":"https://api.github.com/repos/docker/swarm/hooks","issue_events_url":"https://api.github.com/repos/docker/swarm/issues/events{/number}","events_url":"https://api.github.com/repos/docker/swarm/events","assignees_url":"https://api.github.com/repos/docker/swarm/assignees{/user}","branches_url":"https://api.github.com/repos/docker/swarm/branches{/branch}","tags_url":"https://api.github.com/repos/docker/swarm/tags","blobs_url":"https://api.github.com/repos/docker/swarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/swarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/swarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/swarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/swarm/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/swarm/languages","stargazers_url":"https://api.github.com/repos/docker/swarm/stargazers","contributors_url":"https://api.github.com/repos/docker/swarm/contributors","subscribers_url":"https://api.github.com/repos/docker/swarm/subscribers","subscription_url":"https://api.github.com/repos/docker/swarm/subscription","commits_url":"https://api.github.com/repos/docker/swarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/swarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/swarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/swarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/swarm/contents/{+path}","compare_url":"https://api.github.com/repos/docker/swarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/swarm/merges","archive_url":"https://api.github.com/repos/docker/swarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/swarm/downloads","issues_url":"https://api.github.com/repos/docker/swarm/issues{/number}","pulls_url":"https://api.github.com/repos/docker/swarm/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/swarm/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/swarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/swarm/labels{/name}","releases_url":"https://api.github.com/repos/docker/swarm/releases{/id}","deployments_url":"https://api.github.com/repos/docker/swarm/deployments","created_at":"2014-05-01T23:15:17Z","updated_at":"2016-02-03T13:03:03Z","pushed_at":"2016-02-03T07:41:22Z","git_url":"git://github.com/docker/swarm.git","ssh_url":"git@github.com:docker/swarm.git","clone_url":"https://github.com/docker/swarm.git","svn_url":"https://github.com/docker/swarm","homepage":"","size":49166,"stargazers_count":3383,"watchers_count":3383,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":562,"mirror_url":null,"open_issues_count":152,"forks":562,"open_issues":152,"watchers":3383,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarm/pulls/1718"},"html":{"href":"https://github.com/docker/swarm/pull/1718"},"issue":{"href":"https://api.github.com/repos/docker/swarm/issues/1718"},"comments":{"href":"https://api.github.com/repos/docker/swarm/issues/1718/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarm/pulls/1718/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarm/pulls/1718/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarm/statuses/7657e399165ab05d9d7532f258dcc39465a0f817"}}}}