You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: engine/getstarted-voting-app/node-setup.md
+44-11Lines changed: 44 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ run some basic commmands to interact with the machines.
18
18
[Docker Machine](/machine/get-started.md) (`docker-machine`), which
19
19
comes auto-installed with both Docker for Mac and Docker for Windows.
20
20
21
+
<p />
22
+
21
23
***VirtualBox driver on Docker for Mac** - On Docker for Mac, you'll
22
24
use `docker-machine` with the `virtualbox` driver to create machines. If you had
23
25
a legacy installation of Docker Toolbox, you already have Oracle VirtualBox
@@ -29,7 +31,7 @@ using the Toolbox installer because it can
29
31
here](https://www.virtualbox.org/wiki/Downloads), and follow install
30
32
instructions. You do not need to start VirtualBox. The `docker-machine create`
31
33
command will call it via the driver.
32
-
34
+
<p />
33
35
***Hyper-V driver on Docker for Windows** - On Docker for Windows, you
34
36
will use `docker-machine` with the [`Hyper-V`](/machine/drivers/hyper-v/) driver
35
37
to create machines. You will need to follow the instructions in the [Hyper-V
@@ -40,7 +42,8 @@ in an elevated PowerShell per those instructions.
40
42
41
43
### Commands to create machines
42
44
43
-
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.
45
+
The Docker Machine commands to create local virtual machines on Mac and Windows
46
+
are are as follows.
44
47
45
48
#### Mac
46
49
@@ -118,11 +121,20 @@ You will need the IP address of the manager for a later step.
118
121
119
122
## Interacting with the machines
120
123
121
-
There are several ways to interact with these machines directly on the command line or programatically. We'll cover two methods for managing the machines directly from the command line:
124
+
There are a few ways to interact with these machines directly on the command
125
+
line or programatically. We'll cover two methods for managing the machines
126
+
directly from the command line:
127
+
128
+
*[Manage the machines from a pre-configured shell](#manage-the-machines-from-a-pre-configured-shell)
129
+
130
+
*[`docker ssh` into a machine](#ssh-into-a-machine)
122
131
123
132
#### Manage the machines from a pre-configured shell
124
133
125
-
You can use `docker-machine` to set up environment variables in a shell that connect to the Docker client on a virtual machine. With this setup, the Docker commands you type in your local shell will run on the given machine. We'll set up a shell to talk to our manager machine.
134
+
You can use `docker-machine` to set up environment variables in a shell that
135
+
connect to the Docker client on a virtual machine. With this setup, the Docker
136
+
commands you type in your local shell will run on the given machine. As an
137
+
example, we'll set up a shell to talk to our manager machine.
126
138
127
139
1. Run `docker-machine env manager` to get environment variables for the manager.
128
140
@@ -138,15 +150,22 @@ You can use `docker-machine` to set up environment variables in a shell that con
138
150
```
139
151
140
152
2. Connect your shell to the manager.
153
+
154
+
On Mac:
155
+
141
156
```
142
157
$ eval $(docker-machine env manager)
143
158
```
144
159
145
-
This sets environment variables for the current shell that the Docker client will read which specify the TLS settings.
160
+
On Windows PowerShell:
146
161
147
-
**Note**: If you are using `fish`, or a Windows shell such as
148
-
Powershell/`cmd.exe` the above method will not work as described.
149
-
Instead, see the [env command reference documentation](/machine/reference/env.md) to learn how to set the environment variables for your shell.
The asterisk next `manager` indicates that the current shell is connected to that machine. Docker commands run in this shell will execute on the `manager.` (Note that you could change this by re-running the above commands to connect to the `worker`, or open multiple terminals to talk to multiple machines.)
179
+
The asterisk next `manager` indicates that the current shell is connected to
180
+
that machine. Docker commands run in this shell will execute on the `manager.`
181
+
(Note that you could change this by re-running the above commands to connect to
182
+
the `worker`, or open multiple terminals to talk to multiple machines.)
183
+
184
+
If you use this method, you'll need to re-configure the environment setup each
185
+
time you want to switch between the manager and the worker, or keep two shells
186
+
open.
161
187
162
188
#### ssh into a machine
163
189
164
-
You can use the command `docker-machine ssh <MACHINE-NAME>` to log into a machine:
190
+
Alternatively, you can use the command `docker-machine ssh <MACHINE-NAME>` to
191
+
log into a machine.
165
192
166
193
```
167
194
$ docker-machine ssh manager
@@ -185,7 +212,13 @@ Boot2Docker version 1.13.0-rc6, build HEAD : 5ab2289 - Wed Jan 11 23:37:52 UTC 2
185
212
Docker version 1.13.0-rc6, build 2f2d055
186
213
```
187
214
188
-
We'll use this method later in the example.
215
+
You _do not_ have to set up `docker-machine` environment variables, as in the
216
+
previous section, for `docker ssh` to work. You can run this command in that
217
+
same shell you configured to talk to the manager, or in a new one, and it will
218
+
work either way.
219
+
220
+
This tutorial will employ the `docker ssh` method to run commands on the
221
+
machines, but which approach you use is really a matter of personal preference.
Copy file name to clipboardExpand all lines: engine/getstarted-voting-app/test-drive.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Click on either cats or dogs to vote.
20
20
21
21
## View the results tally
22
22
23
-
Now, go to `<MANAGER-IP:>5001` in a web browser to view the voting results tally, as one might do in the role of poll coordinator. The tally is shown by percentage in the current configuration of the app.
23
+
Now, go to `MANAGER-IP:5001` in a web browser to view the voting results tally, as one might do in the role of poll coordinator. The tally is shown by percentage in the current configuration of the app.
0 commit comments