Browse code

added better what's next topics to point to new machine docs related to Issue #18282

updated cloud install example per Olivier's comments, added better command examples

updates per @thaJeztah comments

fixed links per @theJeztah comments, renamed cloud.md to overview.md for better URL name

updates per @moxiegirl comments, added alias for renamed file, modified links, changed a title

fixed link errors

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

Victoria Bialas authored on 2016/02/02 08:15:37
Showing 7 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 <!--[metadata]>
2 2
 +++
3
-title = "Example: Manual install on a cloud provider"
3
+title = "Example: Manual install on cloud provider"
4 4
 description = "Example of a manual install of Docker Engine on a cloud provider, using Amazon Web Services (AWS) EC2. Shows how to create an EC2 instance, and install Docker Engine on it."
5 5
 keywords = ["cloud, docker, machine, documentation,  installation, AWS, EC2"]
6 6
 [menu.main]
... ...
@@ -8,7 +8,7 @@ parent = "install_cloud"
8 8
 +++
9 9
 <![end-metadata]-->
10 10
 
11
-# Example: Manual install on a cloud provider
11
+# Example: Manual install on cloud provider
12 12
 
13 13
 You can install Docker Engine directly to servers you have on cloud providers.  This example shows how to create an <a href="https://aws.amazon.com/" target="_blank"> Amazon Web Services (AWS)</a> EC2 instance, and install Docker Engine on it.
14 14
 
... ...
@@ -197,8 +197,12 @@ For Ubuntu Trusty (and some other versions), it’s recommended to install the `
197 197
 
198 198
 ## Where to go next
199 199
 
200
-* Would you like a quicker way to do Docker cloud installs? See [Digital Ocean Example: Use Docker Machine to provision Docker on cloud hosts](cloud-ex-aws.md).
200
+_Looking for a quicker way to do Docker cloud installs and provision multiple hosts?_ You can use [Docker Machine](https://docs.docker.com/machine/overview/) to provision hosts.
201 201
 
202
-* To learn more about options for installing Docker Engine on cloud providers, see [Understand cloud install options and choose one](cloud.md).
202
+  * [Use Docker Machine to provision hosts on cloud providers](https://docs.docker.com/machine/get-started-cloud/)
203 203
 
204
-* To get started with Docker, see <a href="https://docs.docker.com/engine/userguide/" target="_blank"> Docker User Guide </a>.
204
+  * [Docker Machine driver reference](https://docs.docker.com/machine/drivers/)
205
+
206
+*  [Install Docker Engine](../index.md)
207
+
208
+* [Docker User Guide](../../userguide/intro.md)
... ...
@@ -14,7 +14,7 @@ Docker Machine driver plugins are available for many cloud platforms, so you can
14 14
 
15 15
 You'll need to install and run Docker Machine, and create an account with the cloud provider.
16 16
 
17
-Then you provide account verification, security credentials, and configuration options for the providers as flags to `docker-machine create`. The flags are unique for each cloud-specific driver.  For instance, to pass a Digital Ocean access token you use the `--digitalocean-access-token` flag.
17
+Then you provide account verification, security credentials, and configuration options for the providers as flags to `docker-machine create`. The flags are unique for each cloud-specific driver.  For instance, to pass a Digital Ocean access token, you use the `--digitalocean-access-token` flag.
18 18
 
19 19
 As an example, let's take a look at how to create a Dockerized <a href="https://digitalocean.com" target="_blank">Digital Ocean</a> _Droplet_ (cloud server).
20 20
 
... ...
@@ -44,7 +44,7 @@ To generate your access token:
44 44
 
45 45
     This is the personal access token you'll use in the next step to create your cloud server.
46 46
 
47
-### Step 3. Start Docker Machine
47
+### Step 3. Install Docker Machine
48 48
 
49 49
 1. If you have not done so already, install Docker Machine on your local host.
50 50
 
... ...
@@ -57,30 +57,6 @@ To generate your access token:
57 57
 2. At a command terminal, use `docker-machine ls` to get a list of Docker Machines and their status.
58 58
 
59 59
         $ docker-machine ls
60
-        NAME      ACTIVE   DRIVER       STATE     URL   SWARM
61
-        default   -        virtualbox   Stopped    
62
-
63
-3. If Machine is stopped, start it.
64
-
65
-        $ docker-machine start default
66
-        (default) OUT | Starting VM...
67
-        Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
68
-
69
-4. Set environment variables to connect your shell to the local VM.
70
-
71
-        $ docker-machine env default
72
-        export DOCKER_TLS_VERIFY="1"
73
-        export DOCKER_HOST="tcp://xxx.xxx.xx.xxx:xxxx"
74
-        export  DOCKER_CERT_PATH="/Users/londoncalling/.docker/machine/machines/default"
75
-        export DOCKER_MACHINE_NAME="default"
76
-        # Run this command to configure your shell:
77
-        # eval "$(docker-machine env default)"
78
-
79
-        eval "$(docker-machine env default)"
80
-
81
-5. Re-run `docker-machine ls` to check that it's now running.
82
-
83
-        $ docker-machine ls
84 60
         NAME      ACTIVE   DRIVER       STATE     URL                         SWARM
85 61
         default   *        virtualbox   Running   tcp:////xxx.xxx.xx.xxx:xxxx  
86 62
 
... ...
@@ -92,28 +68,15 @@ To generate your access token:
92 92
 
93 93
         Hello from Docker.
94 94
         This message shows that your installation appears to be working correctly.
95
+        ...
95 96
 
96
-        To generate this message, Docker took the following steps:
97
-        1. The Docker client contacted the Docker daemon.
98
-        2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
99
-        3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
100
-        4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
101
-
102
-        To try something more ambitious, you can run an Ubuntu container with:
103
-        $ docker run -it ubuntu bash
104
-
105
-        Share images, automate workflows, and more with a free Docker Hub account: https://hub.docker.com
106
-
107
-        For more examples and ideas, visit:
108
-        https://docs.docker.com/userguide/
109
-
110
-### Step 4. Use Docker Machine to Create the Droplet
97
+### Step 4. Use Machine to Create the Droplet
111 98
 
112 99
 1. Run `docker-machine create` with the `digitalocean` driver and pass your key to the `--digitalocean-access-token` flag, along with a name for the new cloud server.
113 100
 
114 101
     For this example, we'll call our new Droplet "docker-sandbox".
115 102
 
116
-        $ docker-machine create --driver digitalocean --digitalocean-access-token 455275108641c7716462d6f35d08b76b246b6b6151a816cf75de63c5ef918872 docker-sandbox
103
+        $ docker-machine create --driver digitalocean --digitalocean-access-token xxxxx docker-sandbox
117 104
         Running pre-create checks...
118 105
         Creating machine...
119 106
         (docker-sandbox) OUT | Creating SSH key...
... ...
@@ -163,45 +126,52 @@ To generate your access token:
163 163
         default          -        virtualbox     Running   tcp://192.168.99.100:2376   
164 164
         docker-sandbox   *        digitalocean   Running   tcp://45.55.222.72:2376     
165 165
 
166
-6. Log in to the Droplet with the `docker-machine ssh` command.
167
-
168
-        $ docker-machine ssh docker-sandbox
169
-        Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-71-generic x86_64)
166
+6. Run some `docker-machine` commands to inspect the remote host. For example, `docker-machine ip <machine>` gets the host IP adddress and `docker-machine inspect <machine>` lists all the details.
170 167
 
171
-        * Documentation:  https://help.ubuntu.com/
168
+        $ docker-machine ip docker-sandbox
169
+        104.131.43.236
172 170
 
173
-        System information as of Mon Dec 21 21:38:53 EST 2015
171
+        $ docker-machine inspect docker-sandbox
172
+        {
173
+            "ConfigVersion": 3,
174
+            "Driver": {
175
+            "IPAddress": "104.131.43.236",
176
+            "MachineName": "docker-sandbox",
177
+            "SSHUser": "root",
178
+            "SSHPort": 22,
179
+            "SSHKeyPath": "/Users/samanthastevens/.docker/machine/machines/docker-sandbox/id_rsa",
180
+            "StorePath": "/Users/samanthastevens/.docker/machine",
181
+            "SwarmMaster": false,
182
+            "SwarmHost": "tcp://0.0.0.0:3376",
183
+            "SwarmDiscovery": "",
184
+            ...
174 185
 
175
-        System load:  0.77               Processes:              70
176
-        Usage of /:   11.4% of 19.56GB   Users logged in:        0
177
-        Memory usage: 15%                IP address for eth0:    45.55.139.48
178
-        Swap usage:   0%                 IP address for docker0: 172.17.0.1
186
+7. Verify Docker Engine is installed correctly by running `docker` commands.
179 187
 
180
-        Graph this data and manage this system at:
181
-        https://landscape.canonical.com/
188
+    Start with something basic like `docker run hello-world`, or for a more interesting test, run a Dockerized webserver on your new remote machine.
182 189
 
183
-7. Verify Docker Engine is installed correctly by running `docker run hello-world`.
190
+    In this example, the `-p` option is used to expose port 80 from the `nginx` container and make it accessible on port `8000` of the `docker-sandbox` host.
184 191
 
185
-          ubuntu@ip-172-31-0-151:~$ sudo docker run hello-world
186
-          Unable to find image 'hello-world:latest' locally
187
-          latest: Pulling from library/hello-world
188
-          b901d36b6f2f: Pull complete
189
-          0a6ba66e537a: Pull complete
190
-          Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
191
-          Status: Downloaded newer image for hello-world:latest
192
+        $ docker run -d -p 8000:80 --name webserver kitematic/hello-world-nginx
193
+        Unable to find image 'kitematic/hello-world-nginx:latest' locally
194
+        latest: Pulling from kitematic/hello-world-nginx
195
+        a285d7f063ea: Pull complete
196
+        2d7baf27389b: Pull complete
197
+        ...
198
+        Digest: sha256:ec0ca6dcb034916784c988b4f2432716e2e92b995ac606e080c7a54b52b87066
199
+        Status: Downloaded newer image for kitematic/hello-world-nginx:latest
200
+        942dfb4a0eaae75bf26c9785ade4ff47ceb2ec2a152be82b9d7960e8b5777e65
192 201
 
193
-          Hello from Docker.
194
-          This message shows that your installation appears to be working correctly.
195
-          . . .
202
+    In a web browser, go to `http://<host_ip>:8000` to bring up the webserver home page. You got the `<host_ip>` from the output of the `docker-machine ip <machine>` command you ran in a previous step. Use the port you exposed in the `docker run` command.
196 203
 
197
-      You can type keyboard command Control-D or `exit` to log out of the remote server.
204
+    ![nginx webserver](../images/nginx-webserver.png)
198 205
 
199 206
 #### Understand the defaults and options on the create command
200 207
 
201 208
 For convenience, `docker-machine` will use sensible defaults for choosing settings such as the image that the server is based on, but you override the defaults using the respective flags (e.g. `--digitalocean-image`). This is useful if, for example, you want to create a cloud server with a lot of memory and CPUs (by default `docker-machine` creates a small server). For a full list of the flags/settings available and their defaults, see the output of `docker-machine create -h` at the command line. See also <a href="https://docs.docker.com/machine/drivers/os-base/" target="_blank">Driver options and operating system defaults</a> and information about the <a href="https://docs.docker.com/machine/reference/create/" target="_blank">create</a> command in the Docker Machine documentation.
202 209
 
203 210
 
204
-### Step 5. Use Docker Machine to remove the Droplet
211
+### Step 5. Use Machine to remove the Droplet
205 212
 
206 213
 To remove a host and all of its containers and images, first stop the machine, then use `docker-machine rm`:
207 214
 
... ...
@@ -220,8 +190,12 @@ If you create a host with Docker Machine, but remove it through the cloud provid
220 220
 
221 221
 ## Where to go next
222 222
 
223
-* To learn more about options for installing Docker Engine on cloud providers, see [Understand cloud install options and choose one](cloud.md).
223
+* [Docker Machine driver reference](https://docs.docker.com/machine/drivers/)
224
+
225
+* [Docker Machine Overview](https://docs.docker.com/machine/overview/)
226
+
227
+* [Use Docker Machine to provision hosts on cloud providers](https://docs.docker.com/machine/get-started-cloud/)
224 228
 
225
-* To learn more about using Docker Machine to provision cloud hosts, see <a href="https://docs.docker.com/machine/get-started-cloud/" target="_blank">Using Docker Machine with a cloud provider</a>.
229
+*  [Install Docker Engine](../../installation/index.md)
226 230
 
227
-* To get started with Docker, see <a href="https://docs.docker.com/engine/userguide/" target="_blank"> Docker User Guide</a>.
231
+* [Docker User Guide](../../userguide/intro.md)
228 232
deleted file mode 100644
... ...
@@ -1,53 +0,0 @@
1
-<!--[metadata]>
2
-+++
3
-title = "Choose how to install"
4
-description = "Installation instructions for Docker on cloud."
5
-keywords = ["cloud, docker, machine, documentation,  installation"]
6
-[menu.main]
7
-parent = "install_cloud"
8
-weight=-3
9
-+++
10
-<![end-metadata]-->
11
-
12
-# Understand cloud install options and choose one
13
-
14
-You can install Docker Engine on any cloud platform that runs an operating system (OS) that Docker supports. This includes many flavors and versions of Linux, along with Mac and Windows.
15
-
16
-You have two options for installing:
17
-
18
-* Manually install on the cloud (create cloud hosts, then install Docker Engine on them)
19
-* Use Docker Machine to provision cloud hosts
20
-
21
-## Manually install Docker Engine on a cloud host
22
-
23
-To install on a cloud provider:
24
-
25
-1. Create an account with the cloud provider, and read cloud provider documentation to understand their process for creating hosts.
26
-
27
-2. Decide which OS you want to run on the cloud host.
28
-
29
-3. Understand the Docker prerequisites and install process for the chosen OS. See [Install Docker Engine](index.md) for a list of supported systems and links to the install guides.
30
-
31
-4. Create a host with a Docker supported OS, and install Docker per the instructions for that OS.
32
-
33
-[Example: Manual install on a cloud provider](cloud-ex-aws.md) shows how to create an <a href="https://aws.amazon.com/" target="_blank"> Amazon Web Services (AWS)</a> EC2 instance, and install Docker Engine on it.
34
-
35
-
36
-## Use Docker Machine to provision cloud hosts
37
-
38
-Docker Machine driver plugins are available for several popular cloud platforms, so you can use Machine to provision one or more Dockerized hosts on those platforms.
39
-
40
-With Docker Machine, you can use the same interface to create cloud hosts with Docker Engine on them, each configured per the options you specify.
41
-
42
-To do this, you use the `docker-machine create` command with the driver for the cloud provider, and provider-specific flags for account verification, security credentials, and other configuration details.
43
-
44
-[Example: Use Docker Machine to provision cloud hosts](cloud-ex-machine-ocean.md) walks you through the steps to set up Docker Machine and provision a Dockerized host on [Digital Ocean](https://www.digitalocean.com/).
45
-
46
-## Where to go next
47
-* [Example: Manual install on a cloud provider](cloud-ex-aws.md) (AWS EC2)
48
-
49
-* [Example: Use Docker Machine to provision cloud hosts](cloud-ex-machine-ocean.md) (Digital Ocean)
50
-
51
-* [Using Docker Machine with a cloud provider](https://docs.docker.com/machine/get-started-cloud/)
52
-
53
-* <a href="https://docs.docker.com/engine/userguide/" target="_blank"> Docker User Guide </a> (after your install is complete, get started using Docker)
... ...
@@ -8,7 +8,7 @@ aliases = [
8 8
   "/engine/installation/rackspace/",
9 9
   "/engine/installation/joyent/"
10 10
 ]
11
-title = "In the cloud"
11
+title = "On cloud providers"
12 12
 description = "Cloud Installations"
13 13
 keywords = ["Docker install "]
14 14
 [menu.main]
... ...
@@ -20,6 +20,6 @@ weight="-60"
20 20
 
21 21
 # Install Engine in the cloud
22 22
 
23
-* [Understand cloud install options and choose one](cloud.md)
24
-* [Example: Use Docker Machine to provision cloud hosts](cloud-ex-machine-ocean.md)
23
+* [Understand cloud install options and choose one](overview.md)
24
+* [Example: Use Machine to provision cloud hosts](cloud-ex-machine-ocean.md)
25 25
 * [Example: Manual install on a cloud provider](cloud-ex-aws.md)
26 26
new file mode 100644
... ...
@@ -0,0 +1,56 @@
0
+<!--[metadata]>
1
+aliases = [
2
+  "/engine/installation/cloud/cloud/",
3
+]
4
+title = "Choose how to install"
5
+description = "Installation instructions for Docker on cloud."
6
+keywords = ["cloud, docker, machine, documentation,  installation"]
7
+[menu.main]
8
+parent = "install_cloud"
9
+weight=-3
10
+<![end-metadata]-->
11
+
12
+# Choose how to install
13
+
14
+You can install Docker Engine on any cloud platform that runs an operating system (OS) that Docker supports. This includes many flavors and versions of Linux, along with Mac and Windows.
15
+
16
+You have two options for installing:
17
+
18
+* Manually install on the cloud (create cloud hosts, then install Docker Engine on them)
19
+* Use Docker Machine to provision cloud hosts
20
+
21
+## Manually install Docker Engine on a cloud host
22
+
23
+To install on a cloud provider:
24
+
25
+1. Create an account with the cloud provider, and read cloud provider documentation to understand their process for creating hosts.
26
+
27
+2. Decide which OS you want to run on the cloud host.
28
+
29
+3. Understand the Docker prerequisites and install process for the chosen OS. See [Install Docker Engine](../index.md) for a list of supported systems and links to the install guides.
30
+
31
+4. Create a host with a Docker supported OS, and install Docker per the instructions for that OS.
32
+
33
+[Example (AWS): Manual install on a cloud provider](cloud-ex-aws.md) shows how to create an <a href="https://aws.amazon.com/" target="_blank"> Amazon Web Services (AWS)</a> EC2 instance, and install Docker Engine on it.
34
+
35
+
36
+## Use Docker Machine to provision cloud hosts
37
+
38
+Docker Machine driver plugins are available for several popular cloud platforms, so you can use Machine to provision one or more Dockerized hosts on those platforms.
39
+
40
+With Docker Machine, you can use the same interface to create cloud hosts with Docker Engine on them, each configured per the options you specify.
41
+
42
+To do this, you use the `docker-machine create` command with the driver for the cloud provider, and provider-specific flags for account verification, security credentials, and other configuration details.
43
+
44
+[Example: Use Docker Machine to provision cloud hosts](cloud-ex-machine-ocean.md) walks you through the steps to set up Docker Machine and provision a Dockerized host on <a href="https://www.digitalocean.com/" target="_blank">Digital Ocean</a>).
45
+
46
+## Where to go next
47
+* [Example: Manual install on a cloud provider](cloud-ex-aws.md) (AWS EC2)
48
+
49
+* [Example: Use Docker Machine to provision cloud hosts](cloud-ex-machine-ocean.md) (Digital Ocean)
50
+
51
+* For supported platforms, see [Install Docker Engine](../index.md).
52
+
53
+* To get started with Docker post-install, see [Docker User Guide](../../userguide/intro.md).
0 54
new file mode 100644
1 55
Binary files /dev/null and b/docs/installation/images/nginx-webserver.png differ
... ...
@@ -30,7 +30,7 @@ Docker Engine is supported on Linux, Cloud, Windows, and OS X. Installation inst
30 30
 If your linux distribution is not listed above, don't give up yet. To try out Docker on a distribution that is not listed above, go here: [Installation from binaries](binaries.md).
31 31
 
32 32
 ## On Cloud
33
-* [Choose how to Install](cloud/cloud.md)
33
+* [Choose how to Install](cloud/overview.md)
34 34
 * [Example: Manual install on a cloud provider](cloud/cloud-ex-aws.md)
35 35
 * [Example: Use Docker Machine to provision cloud hosts](cloud/cloud-ex-machine-ocean.md)
36 36