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: docs/setup.md
+67-31Lines changed: 67 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Setup of your environment
1
+
# Docker Machine with Dimension Data cloud services
2
2
3
3
Docker Machine provides a unified experience of running containers across multiple cloud platforms. On this page we focus specifically on the [Managed Cloud Platform from Dimension Data](http://cloud.dimensiondata.com/). As a software developer, you may want to handle containers at shared or at on-premises cloud facilities provided by Dimension Data. Follow instructions below and learn how to harness the power of containers, right from your laptop.
4
4
@@ -8,11 +8,11 @@ As a starting point, the diagram below puts Docker, Docker Machine and Docker En
8
8
9
9
[Docker](https://www.docker.com/) and [Docker Machine](https://docs.docker.com/machine/overview/) are sitting at the development workstation. Docker Machine is a tool that lets you install [Docker Engine](https://www.docker.com/products/docker-engine) on virtual hosts, and manage the hosts with `docker-machine` commands. You can use Machine to create Docker hosts on your local Mac or Windows workstation, on your company network, in your data center, or on cloud providers like AWS or Dimension Data. In other terms, Docker Machine allows software engineers to handle containers almost anywhere on Earth.
10
10
11
-
Docker Machine interact with any [Managed Cloud Platform](http://cloud.dimensiondata.com/), be it a public, hosted or on-premises cloud facilities delivered by Dimension Data or by one partner of the One Cloud alliance.
11
+
Docker Machine interact with any [Managed Cloud Platform](http://cloud.dimensiondata.com/), be it a public, hosted or on-premises cloud facilities delivered by Dimension Data or by a partner of the One Cloud alliance.
12
12
13
13
## From CloudControl to Docker Machine
14
14
15
-
The consumption of Docker containers on the Managed Cloud Platform is based on following elements:
15
+
The consumption of Docker containers on the Managed Cloud Platform requires following elements:
16
16
* a working Docker and Docker Machine environment
17
17
* the addition of the Docker Machine driver from Dimension Data
18
18
* MCP credentials
@@ -21,7 +21,7 @@ In other terms, if you have already used the CloudControl web interface, then yo
21
21
22
22
## How to install Docker Machine?
23
23
24
-
The Docker Machine executable can be downloaded and installed directly. For example on Mac and on Linux run following command:
24
+
The Docker Machine executable can be downloaded and installed directly. For example on macOS and on Linux run following command:
For workstations with Windows or any other operating system, you can download the latest release of Docker Machine from https://github.com/docker/machine/releases
32
32
33
+
As an alternative, on macOS and on Windows, Docker Machine is coming along with other Docker products when you install the Docker Toolbox. For details, check [the download page for Docker Toolbox](https://www.docker.com/products/docker-toolbox) first, then look either at [macOS installation instructions](https://docs.docker.com/toolbox/toolbox_install_mac/) or [Windows installation instructions](https://docs.docker.com/toolbox/toolbox_install_windows/).
33
34
34
-
As an alternative, on Mac and on Windows, Docker Machine is coming along along with other Docker products when you install the Docker Toolbox. For details, check [the download page for Docker Toolbox](https://www.docker.com/products/docker-toolbox) first, then look either at [Mac installation instructions](https://docs.docker.com/toolbox/toolbox_install_mac/) or [Windows installation instructions](https://docs.docker.com/toolbox/toolbox_install_windows/).
35
-
36
-
Whatever option you considered, you can quickly check the installation of Docker Machine with following command:
35
+
Whatever option you consider, you can quickly check the installation of Docker Machine with following command:
On macOS and Linux you should edit variables for your own user profile:
47
66
48
67
```
49
68
$ nano ~/.bash_profile
@@ -114,7 +133,7 @@ If your containers accept other protocols over the internet then you will create
114
133
115
134
## How to create a host with Docker Machine?
116
135
117
-
Use the command `docker-machine create` with appropriate parameters, and indicate the name of the new host. The sample command below creates the machine `mcp-eu-01` at EU6:
136
+
Use the command `docker-machine create` with appropriate parameters, and indicate the name of the new host. The sample command below creates the machine `mcp-eu-01` at EU6 on macOS or on Linux:
You can check the IP address of the new host, and locate security artifacts, with following command.
130
154
131
155
```bash
132
-
$ docker-machine config mcp-eu6-01
156
+
docker-machine config mcp-eu6-01
133
157
```
134
158
135
159
The output should be similar to this:
@@ -142,16 +166,22 @@ The output should be similar to this:
142
166
-H=tcp://168.128.13.169:2376
143
167
```
144
168
145
-
Now that you have one host up and running you can activate it with following command:
169
+
Now that you have one host up and running you can activate it with following command on macOS or Linux:
146
170
147
171
```bash
148
172
$ eval$(docker-machine env mcp-eu6-01)
149
173
```
150
174
175
+
On Windows you may have to use following command instead:
176
+
177
+
```
178
+
C:\>@FOR /f "tokens=*" %i IN ('docker-machine env mcp-eu6-01') DO @%i
179
+
```
180
+
151
181
As an example, let's try running the official Nginx container:
152
182
153
-
```bash
154
-
$ docker run -d -p 8080:80 --name httpserver nginx
183
+
```
184
+
docker run -d -p 8080:80 --name httpserver nginx
155
185
```
156
186
157
187
In this command, port 80 in the Nginx container is mapped to port 8080 on the host. This is meaning that we can access the default Nginx page from anywhere. Open the link in a web browser, using the IP address given by the `config` command.
@@ -169,28 +199,28 @@ Congratulations! At this stage you have created a host and deployed a container,
169
199
At the Managed Cloud Platform a stopped server costs far less than a running server. Therefore, a good practice is to stop unused
170
200
hosts when possible.
171
201
172
-
```shell
173
-
$ docker-machine stop mcp-eu6-01
202
+
```
203
+
docker-machine stop mcp-eu6-01
174
204
```
175
205
You can start a host when you want using the following command.
176
206
177
-
```shell
178
-
$ docker-machine start mcp-eu6-01
207
+
```
208
+
docker-machine start mcp-eu6-01
179
209
```
180
210
181
211
If for some reason you have to restart a host, use the following command.
182
212
183
-
```shell
184
-
$ docker-machine restart mcp-eu6-01
213
+
```
214
+
docker-machine restart mcp-eu6-01
185
215
```
186
216
187
217
## How to handle multiple hosts?
188
218
189
219
Since it is so easy to create remote hosts with Docker Machine, you can quickly end up with several hosts.
190
220
The list of hosts is shown with following command.
0 commit comments