Browse code

add initial docs for windows client testing

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)

docs: crop and optimize images

Cropped and optimized images.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

Testing and updating the Windows material

Signed-off-by: Mary Anthony <mary@docker.com>

checkpoint

Signed-off-by: Mary Anthony <mary@docker.com>

Fitting the Windows specific material into the contributor guide

Signed-off-by: Mary Anthony <mary@docker.com>

Entering James comments

Signed-off-by: Mary Anthony <mary@docker.com>

Jessica Frazelle authored on 2015/03/11 03:21:09
Showing 10 changed files
... ...
@@ -34,6 +34,7 @@ pages:
34 34
 - ['installation/ubuntulinux.md', 'Installation', 'Ubuntu']
35 35
 - ['installation/mac.md', 'Installation', 'Mac OS X']
36 36
 - ['installation/windows.md', 'Installation', 'Microsoft Windows']
37
+- ['installation/testing-windows-docker-client.md', 'Installation', 'Building and testing the Windows Docker client']
37 38
 - ['installation/amazon.md', 'Installation', 'Amazon EC2']
38 39
 - ['installation/archlinux.md', 'Installation', 'Arch Linux']
39 40
 - ['installation/binaries.md', 'Installation', 'Binaries']
... ...
@@ -195,21 +196,21 @@ pages:
195 195
 - ['terms/image.md', '**HIDDEN**']
196 196
 
197 197
 
198
-
199
-
200 198
 # Project:
201 199
 - ['project/index.md', '**HIDDEN**']
202
-- ['project/who-written-for.md', 'Contribute', 'README first']
203
-- ['project/software-required.md', 'Contribute', 'Get required software']
204
-- ['project/set-up-git.md', 'Contribute', 'Configure Git for contributing']
205
-- ['project/set-up-dev-env.md', 'Contribute', 'Work with a development container']
206
-- ['project/test-and-docs.md', 'Contribute', 'Run tests and test documentation']
207
-- ['project/make-a-contribution.md', 'Contribute', 'Understand contribution workflow']
208
-- ['project/find-an-issue.md', 'Contribute', 'Find an issue']
209
-- ['project/work-issue.md', 'Contribute', 'Work on an issue']
210
-- ['project/create-pr.md', 'Contribute', 'Create a pull request']
211
-- ['project/review-pr.md', 'Contribute', 'Participate in the PR review']
212
-- ['project/advanced-contributing.md', 'Contribute', 'Advanced contributing']
213
-- ['project/get-help.md', 'Contribute', 'Where to get help']
214
-- ['project/coding-style.md', 'Contribute', 'Coding style guide']
215
-- ['project/doc-style.md', 'Contribute', 'Documentation style guide']
200
+- ['project/who-written-for.md', 'Contributor', 'README first']
201
+- ['project/software-required.md', 'Contributor', 'Get required software for Linux or OS X'] 
202
+- ['project/software-req-win.md', 'Contributor', 'Get required software for Windows']
203
+- ['project/set-up-git.md', 'Contributor', 'Configure Git for contributing'] 
204
+- ['project/set-up-dev-env.md', 'Contributor', 'Work with a development container'] 
205
+- ['project/test-and-docs.md', 'Contributor', 'Run tests and test documentation']
206
+- ['project/make-a-contribution.md', 'Contributor', 'Understand contribution workflow']
207
+- ['project/find-an-issue.md', 'Contributor', 'Find an issue'] 
208
+- ['project/work-issue.md', 'Contributor', 'Work on an issue'] 
209
+- ['project/create-pr.md', 'Contributor', 'Create a pull request'] 
210
+- ['project/review-pr.md', 'Contributor', 'Participate in the PR review'] 
211
+- ['project/advanced-contributing.md', 'Contributor', 'Advanced contributing']
212
+- ['project/get-help.md', 'Contributor', 'Where to get help']
213
+- ['project/coding-style.md', 'Contributor', 'Coding style guide']
214
+- ['project/doc-style.md', 'Contributor', 'Documentation style guide']
215
+
216 216
new file mode 100644
217 217
Binary files /dev/null and b/docs/sources/project/images/git_bash.png differ
218 218
new file mode 100644
219 219
Binary files /dev/null and b/docs/sources/project/images/include_gcc.png differ
220 220
new file mode 100644
221 221
Binary files /dev/null and b/docs/sources/project/images/path_variable.png differ
222 222
new file mode 100644
223 223
Binary files /dev/null and b/docs/sources/project/images/windows-env-vars.png differ
224 224
new file mode 100644
225 225
Binary files /dev/null and b/docs/sources/project/images/windows-mingw.png differ
... ...
@@ -46,9 +46,12 @@ target="_blank">docker/docker repository</a>.
46 46
     that instead. You'll need to convert what you see in the guide to what is
47 47
     appropriate to your tool.
48 48
 
49
-5. Open a terminal window on your local host and change to your home directory. In Windows, you'll work in your Boot2Docker window instead of Powershell or cmd.
49
+5. Open a terminal window on your local host and change to your home directory. 
50 50
 
51 51
         $ cd ~
52
+        
53
+  In Windows, you'll work in your Boot2Docker window instead of Powershell or
54
+  a `cmd` window.
52 55
 
53 56
 6. Create a `repos` directory.
54 57
 
55 58
new file mode 100644
... ...
@@ -0,0 +1,258 @@
0
+page_title: Set up for development on Windows
1
+page_description: How to set up a server to test Docker Windows client
2
+page_keywords: development, inception, container, image Dockerfile, dependencies, Go, artifacts, windows
3
+
4
+
5
+# Get the required software for Windows
6
+
7
+This page explains how to get the software you need to use a  a Windows Server
8
+2012 or Windows 8 machine for Docker development. Before you begin contributing
9
+you must have:
10
+
11
+- a GitHub account
12
+- Git for Windows (msysGit)
13
+- TDM-GCC, a compiler suite for Windows
14
+- MinGW (tar and xz)
15
+- Go language
16
+
17
+> **Note**: This installation prcedure refers to the `C:\` drive. If you system's main drive
18
+is `D:\` you'll need to substitute that in where appropriate in these
19
+instructions.
20
+
21
+### Get a GitHub account
22
+
23
+To contribute to the Docker project, you will need a <a
24
+href="https://github.com" target="_blank">GitHub account</a>. A free account is
25
+fine. All the Docker project repositories are public and visible to everyone.
26
+
27
+You should also have some experience using both the GitHub application and `git`
28
+on the command line. 
29
+
30
+## Install Git for Windows
31
+
32
+Git for Windows includes several tools including msysGit, which is a build
33
+environment. The environment contains the tools you need for development such as
34
+Git and a Git Bash shell.
35
+
36
+1. Browse to the [Git for Windows](https://msysgit.github.io/) download page.
37
+
38
+2. Click **Download**.
39
+
40
+	Windows prompts you to save the file to your machine.
41
+
42
+3. Run the saved file.
43
+
44
+	The system displays the **Git Setup** wizard.
45
+
46
+4. Click the **Next** button to move through the wizard and accept all the defaults.
47
+
48
+5. Click **Finish** when you are done.
49
+
50
+## Installing TDM-GCC
51
+
52
+TDM-GCC is a compiler suite for Windows. You'll use this suite to compile the
53
+Docker Go code as you develop.
54
+
55
+1. Browse to
56
+   [tdm-gcc download page](http://tdm-gcc.tdragon.net/download).
57
+
58
+2. Click on the lastest 64-bit version of the package.
59
+
60
+	Windows prompts you to save the file to your machine
61
+
62
+3. Set up the suite by running the downloaded file.
63
+
64
+	The system opens the **TDM-GCC Setup** wizard.
65
+	
66
+4. Click **Create**.
67
+
68
+5. Click the **Next** button to move through the wizard and accept all the defaults.
69
+
70
+6. Click **Finish** when you are done.
71
+
72
+
73
+## Installing MinGW (tar and xz)
74
+
75
+MinGW is a minimalist port of the GNU Compiler Collection (GCC). In this
76
+procedure, you first download and install the MinGW installation manager. Then,
77
+you use the manager to install the `tar` and `xz` tools from the collection.
78
+
79
+1. Browse to MinGW 
80
+   [SourceForge](http://sourceforge.net/projects/mingw/).
81
+
82
+2. Click **Download**.
83
+
84
+	 Windows prompts you to save the file to your machine
85
+
86
+3. Run the downloaded file.
87
+
88
+   The system opens the **MinGW Installation Manager Setup Tool**
89
+
90
+4. Choose **Install**  install the MinGW Installation Manager.
91
+
92
+5. Press **Continue**.
93
+
94
+	The system installs and then opens the MinGW Installation Manager.
95
+	
96
+6. Press **Continue** after the install completes to open the manager.
97
+
98
+7. Select **All Packages > MSYS Base System** from the left hand menu.
99
+
100
+	The system displays the available packages.
101
+
102
+8. Click on the the **msys-tar bin** package and choose **Mark for Installation**.
103
+
104
+9. Click on the **msys-xz bin** package and choose **Mark for Installation**.
105
+  
106
+10. Select **Installation > Apply Changes**, to install the selected packages.
107
+
108
+	The system displays the **Schedule of Pending Actions Dialog**.
109
+
110
+    ![windows-mingw](/project/images/windows-mingw.png)
111
+    
112
+11. Press **Apply**
113
+
114
+	MingGW installs the packages for you.
115
+
116
+12. Close the dialog and the MinGW Installation Manager.
117
+
118
+
119
+## Set up your environment variables
120
+
121
+You'll need to add the compiler to your `Path` environment variable. 
122
+
123
+1. Open the **Control Panel**.
124
+
125
+2. Choose **System and Security > System**. 
126
+
127
+3. Click the **Advanced system settings** link in the sidebar.
128
+
129
+	The system opens the **System Properties** dialog.
130
+
131
+3. Select the **Advanced** tab.
132
+
133
+4. Click **Environment Variables**. 
134
+
135
+	The system opens the **Environment Variables dialog** dialog.
136
+
137
+5. Locate the **System variables** area and scroll to the **Path**
138
+   variable.
139
+
140
+    ![windows-mingw](/project/images/path_variable.png)
141
+
142
+6. Click **Edit** to edit the variable (you can also double-click it).
143
+
144
+	The system opens the **Edit System Variable** dialog.
145
+
146
+7. Make sure the `Path` includes `C:\TDM-GCC64\bin` 
147
+
148
+	 ![include gcc](/project/images/include_gcc.png)
149
+	 
150
+	 If you don't see `C:\TDM-GCC64\bin`, add it.
151
+		
152
+8. Press **OK** to close this dialog.
153
+	
154
+9. Press **OK** twice to close out of the remaining dialogs.
155
+
156
+## Install Go and cross-compile it
157
+
158
+In this section, you install the Go language. Then, you build the source so that it can cross-compile for `linux/amd64` architectures.
159
+
160
+1. Open [Go Language download](http://golang.org/dl/) page in your browser.
161
+
162
+2. Locate and click the latest `.msi` installer.
163
+
164
+	The system prompts you to save the file.
165
+
166
+3. Run the installer.
167
+
168
+	The system opens the **Go Programming Langauge Setup** dialog.
169
+
170
+4. Select all the defaults to install.
171
+
172
+5. Press **Finish** to close the installation dialog.
173
+
174
+6. Start a command prompt.
175
+
176
+7. Change to the Go `src` directory.
177
+
178
+		cd c:\Go\src 
179
+
180
+8. Set the following Go variables
181
+
182
+		c:\Go\src> set GOOS=linux
183
+		c:\Go\src> set GOARCH=amd64
184
+     
185
+9. Compile the source.
186
+
187
+		c:\Go\src> make.bat
188
+    
189
+	Compiling the source also adds a number of variables to your Windows environment.
190
+
191
+## Get the Docker repository
192
+
193
+In this step, you start a Git `bash` terminal and get the Docker source code from
194
+Github. 
195
+
196
+1. Locate the **Git Bash** program and start it.
197
+
198
+	Recall that **Git Bash** came with the Git for Windows installation.  **Git
199
+	Bash** just as it sounds allows you to run a Bash terminal on Windows.
200
+	
201
+	![Git Bash](/project/images/git_bash.png)
202
+
203
+2. Change to the root directory.
204
+
205
+		$ cd /c/
206
+				
207
+3. Make a `gopath` directory.
208
+
209
+		$ mkdir gopath
210
+
211
+4. Go get the `docker/docker` repository.
212
+
213
+		$ go.exe get github.com/docker/docker package github.com/docker/docker
214
+        imports github.com/docker/docker
215
+        imports github.com/docker/docker: no buildable Go source files in C:\gopath\src\github.com\docker\docker
216
+
217
+	In the next steps, you create environment variables for you Go paths.
218
+	
219
+5. Open the **Control Panel** on your system.
220
+
221
+6. Choose **System and Security > System**. 
222
+
223
+7. Click the **Advanced system settings** link in the sidebar.
224
+
225
+	The system opens the **System Properties** dialog.
226
+
227
+8. Select the **Advanced** tab.
228
+
229
+9. Click **Environment Variables**. 
230
+
231
+	The system opens the **Environment Variables dialog** dialog.
232
+
233
+10. Locate the **System variables** area and scroll to the **Path**
234
+   variable.
235
+
236
+11. Click **New**.
237
+
238
+	Now you are going to create some new variables. These paths you'll create in the next procedure; but you can set them now.
239
+
240
+12. Enter `GOPATH` for the **Variable Name**.
241
+
242
+13. For the **Variable Value** enter the following:
243
+ 
244
+		C:\gopath;C:\gopath\src\github.com\docker\docker\vendor
245
+		
246
+	
247
+14. Press **OK** to close this dialog.
248
+
249
+	The system adds `GOPATH` to the list of **System Variables**.
250
+	
251
+15. Press **OK** twice to close out of the remaining dialogs.
252
+
253
+
254
+## Where to go next
255
+
256
+In the next section, you'll [learn how to set up and configure Git for
257
+contributing to Docker](/project/set-up-git/).
0 258
\ No newline at end of file
... ...
@@ -2,9 +2,10 @@ page_title: Get the required software
2 2
 page_description: Describes the software required to contribute to Docker
3 3
 page_keywords: GitHub account, repository, Docker, Git, Go, make, 
4 4
 
5
-# Get the required software
5
+# Get the required software for Linux or OS X
6 6
 
7
-Before you begin contributing you must have:
7
+This page explains how to get the software you need to use a Linux or OS X
8
+machine for Docker development. Before you begin contributing you must have:
8 9
 
9 10
 *  a GitHub account
10 11
 * `git`
... ...
@@ -230,6 +230,46 @@ with new memory settings.
230 230
 6. Restart your container and try your test again.
231 231
 
232 232
 
233
+## Testing just the Windows client
234
+
235
+This explains how to test the Windows client on a Windows server set up as a
236
+development environment.  You'll use the **Git Bash** came with the Git for
237
+Windows installation.  **Git Bash** just as it sounds allows you to run a Bash
238
+terminal on Windows. 
239
+
240
+1.  If you don't have one, start a Git Bash terminal.
241
+
242
+	 ![Git Bash](/project/images/git_bash.png)
243
+
244
+2. Change to the `docker` source directory.
245
+
246
+		$ cd /c/gopath/src/github.com/docker/docker
247
+    
248
+3. Set `DOCKER_CLIENTONLY` as follows:
249
+
250
+		$ export DOCKER_CLIENTONLY=1
251
+     
252
+	This ensures you are building only the client binary instead of both the
253
+	binary and the daemon.
254
+	
255
+4. Set `DOCKER_TEST_HOST` to the `tcp://IP_ADDRESS:2376` value; substitute your
256
+machine's actual IP address, for example:
257
+
258
+		$ export DOCKER_TEST_HOST=tcp://263.124.23.200:2376
259
+
260
+5. Make the binary and the test:
261
+
262
+		$ hack/make.sh binary test-integration-cli
263
+  	
264
+   Many tests are skipped on Windows for various reasons. You see which tests
265
+   were skipped by re-running the make and passing in the 
266
+   `TESTFLAGS='-test.v'` value.
267
+        
268
+
269
+You can now choose to make changes to the Docker source or the tests. If you
270
+make any changes just run these commands again.
271
+
272
+
233 273
 ## Build and test the documentation
234 274
 
235 275
 The Docker documentation source files are under `docs/sources`. The content is