updated swarm and voting app tutorials per d4mac, d4win, toolbox and driver issues

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
This commit is contained in:
Victoria Bialas 2017-02-23 17:48:22 -08:00
parent d4add4ee20
commit 7aaf72119d
5 changed files with 58 additions and 46 deletions

View File

@ -19,7 +19,7 @@ To shut down the voting app, simply stop the machines on which it is running. If
manager - virtualbox Running tcp://192.168.99.100:2376 v1.13.1 manager - virtualbox Running tcp://192.168.99.100:2376 v1.13.1
worker - virtualbox Running tcp://192.168.99.101:2376 v1.13.1 worker - virtualbox Running tcp://192.168.99.101:2376 v1.13.1
``` ```
2. Use `docker-machine stop` to stop each machine, beginning with the worker. 2. Use `docker-machine stop` to shut down each machine, beginning with the worker.
``` ```
$ docker-machine stop worker $ docker-machine stop worker

View File

@ -17,21 +17,17 @@ Docker Engine.
## Got Docker? ## Got Docker?
If you haven't yet downloaded Docker or installed it, go to If you haven't yet downloaded Docker or installed it, go to [Get
[Get Docker](/engine/getstarted/step_one.md#step-1-get-docker) Docker](/engine/getstarted/step_one.md#step-1-get-docker) and grab Docker for
and grab Docker for your platform. You can follow along and your platform. You can follow along and run this example using Docker for Mac,
run this example using Docker for Mac, Docker for Windows or Docker for Windows or Docker for Linux.
Docker for Linux.
Once you have Docker installed, you can run `docker run hello-world` Once you have Docker installed, you can run `docker run hello-world` or other
or other commands described in the Get Started with Docker commands described in the Get Started with Docker tutorial to [verify your
tutorial to [verify your installation](/engine/getstarted/step_one.md#step-3-verify-your-installation). installation](/engine/getstarted/step_one.md#step-3-verify-your-installation).
If you are totally new to Docker, you might continue through If you are totally new to Docker, you might continue through the full [Get
the full [Get Started with Docker tutorial](/engine/getstarted/index.md) Started with Docker tutorial](/engine/getstarted/index.md) first, then come
first, then come back. back.
>**Note:** If you are using Docker for Windows, you will not be able to
follow the [machine setup](node-setup.md) part of this tutorial because it describes a legacy driver that is incompatible with Docker for Windows. However, you can use a cloud setup instead, as described in the relevant steps.
## What you'll learn and do ## What you'll learn and do

View File

@ -9,35 +9,62 @@ for the swarm nodes. You could create these Docker hosts on different physical
machines, virtual machines, or cloud providers. machines, virtual machines, or cloud providers.
For this example, we use [Docker Machine](/machine/get-started.md) to create two For this example, we use [Docker Machine](/machine/get-started.md) to create two
virtual machines on a single system. (See [Docker Machine virtual machines on a single system. We'll also verify the setup, and
Overview](/machine/overview.md) to learn more.) We'll also verify the setup, and
run some basic commmands to interact with the machines. run some basic commmands to interact with the machines.
>**Note:** If you are using Docker for Windows, you will not be able to ## Prerequisites
follow along with this machine setup part of the tutorial because it describes
using the Docker Machine legacy `virtualbox` driver, which is not compatible * **Docker Machine** - These steps rely on use of
with Docker for Windows Hyper-V. (See [What to know before you [Docker Machine](/machine/get-started.md) (`docker-machine`), which
install](/docker-for-windows/install.md#what-to-know-before-you-install)). comes auto-installed with both Docker for Mac and Docker for Windows.
However, you can set up your Dockerized machines in the cloud, and follow
the rest of the steps to create a swarm and deploy this sample app. You can use * **VirtualBox driver on Docker for Mac** - On Docker for Mac, you'll use `docker-machine` with
[Docker Cloud](/docker-cloud/index.md) or [use Docker Machine to the `virtualbox` driver to create machines. If you had a legacy installation
provision hosts on your cloud provider](/machine/get-started-cloud.md). Once you have your cloud machines set up, skip directly to the next step, where we [create a swarm](create-swarm.md) across the two nodes. of Docker Toolbox, you already have Oracle VirtualBox installed as part of
that. If you started fresh with Docker for Mac, then you need to install
VirtualBox independently. We recommend doing this rather than using the Toolbox
installer because it can [conflict](/docker-for-mac/docker-toolbox.md) with
Docker for Mac. You can [download VirtualBox
here](https://www.virtualbox.org/wiki/Downloads). Click the link for `OS X
hosts`, click the `.dmg` intaller, and follow the instructions to install. You
do not need to start it, as we are simply using the driver.
* **Hyper-V driver on Docker for Windows** - On Docker for Windows, you
will use `docker-machine` with the [`Hyper-V`](/machine/drivers/hyper-v/) driver
to create machines. You will need to follow the instructions in the [Hyper-V
example](/machine/drivers/hyper-v#example) reference topic to set up a new
external network switch (a one-time task), reboot, and then
[create the machines (nodes)](/machine/drivers/hyper-v.md#create-the-nodes-with-docker-machine-and-the-microsoft-hyper-v-driver)
in an elevated PowerShell per those instructions.
### Commands to create machines
The Docker Machine commands to create local virtual machines on Mac and Windows are are as follows. The rest of the `docker-machine` commands are the same on both.
#### Mac
```
docker-machine create --driver virtualbox HOST-NAME
```
#### Windows
```
docker-machine create -d hyperv --hyperv-virtual-switch "NETWORK-SWITCH"
MACHINE-NAME`
```
This must be done in an elevated PowerShell, using a custom-created external network switch. See [Hyper-V example](/machine/drivers/hyper-v#example).
## Create manager and worker machines ## Create manager and worker machines
The Docker Machine command to create a local virtual machine is:
```
docker-machine create --driver virtualbox <HOSTNAME>
```
Create two machines and name them to anticipate what their roles will be in the swarm: Create two machines and name them to anticipate what their roles will be in the swarm:
* manager * manager
* worker * worker
Here is an example of creating the `manager`. Create this one, then do the same for `worker`. Here is an example of creating the `manager` on Docker for Mac. Create this one, then do the same for `worker`.
``` ```
$ docker-machine create --driver virtualbox manager $ docker-machine create --driver virtualbox manager

View File

@ -67,7 +67,7 @@ single-node and multi-node swarm scenarios on Linux machines.
#### Use Docker for Mac or Docker for Windows #### Use Docker for Mac or Docker for Windows
Alternatively, install the latest [Docker for Mac](/docker-for-mac/index.md) or Alternatively, install the latest [Docker for Mac](/docker-for-mac/index.md) or
[Docker for Windows](/docker-for-windows/index.md) application on a one [Docker for Windows](/docker-for-windows/index.md) application on one
computer. You can test both single-node and multi-node swarm from this computer, computer. You can test both single-node and multi-node swarm from this computer,
but you will need to use Docker Machine to test the multi-node scenarios. but you will need to use Docker Machine to test the multi-node scenarios.
@ -88,18 +88,6 @@ or `worker2` in our example). After you create the nodes, you can run all
swarm commands as shown from the Mac terminal or Windows PowerShell with swarm commands as shown from the Mac terminal or Windows PowerShell with
Docker for Mac or Docker for Windows running. Docker for Mac or Docker for Windows running.
>**Note:** If you are using Docker for Windows, you will not be able to
use Docker Machine to create nodes locally because that worklfow relies on using
a legacy `virtualbox` driver, which is not compatible with Docker for Windows.
(See [What to know before you
install](/docker-for-windows/install.md#what-to-know-before-you-install)).
However, if you set up your Dockerized instances in the cloud, you can follow
the rest of the steps to create a swarm and deploy this sample app. There are a
few ways to do this. You can use [Docker Cloud](/docker-cloud/index.md) or you
can [use Docker Machine to provision hosts on your cloud
provider](/machine/get-started-cloud.md).
### The IP address of the manager machine ### The IP address of the manager machine
The IP address must be assigned to a network interface available to the host The IP address must be assigned to a network interface available to the host

View File

@ -2,6 +2,7 @@
description: Microsoft Hyper-V driver for machine description: Microsoft Hyper-V driver for machine
keywords: machine, Microsoft Hyper-V, driver keywords: machine, Microsoft Hyper-V, driver
title: Microsoft Hyper-V title: Microsoft Hyper-V
toc_max: 4
--- ---
Creates a Boot2Docker virtual machine locally on your Windows machine Creates a Boot2Docker virtual machine locally on your Windows machine