Skip to content

Commit 01b5ed1

Browse files
committed
dashboard/env/windows: instructions for setting up a buildlet
Updates golang/go#8640 Change-Id: I3f0b10c237f437137ed46415d7cc443d4c6a419b Reviewed-on: https://go-review.googlesource.com/2269 Reviewed-by: Alex Brainman <[email protected]> Reviewed-by: Andrew Gerrand <[email protected]>
1 parent c6e4020 commit 01b5ed1

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

env/windows/README

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
Unlike the other operating systems which have a bash script that runs
2+
on Linux and scripts qemu to prepare a GCE image, the Windows image
3+
builder image is prepared by hand, following this list of
4+
instructions:
5+
6+
-- in GCE, create a new Windows 2008 server instance. Set its initial username
7+
to "wingopher" and the password to something.
8+
9+
-- boot it. first boot is slow.
10+
11+
-- Connect with RDP to it. (I used the OS X Microsoft Remote Desktop
12+
in the Mac App Store)
13+
14+
-- In initial “Initial Configuration Tasks” window:
15+
* disable automatic installation of updates. They’ll just interrupt
16+
the builds later. And we don't care about security since this isn't
17+
going to be Internet-facing. No ports will be accessible
18+
* disable Windows Error Report (“Not participating”)
19+
20+
TODO: disable the Windows firewall too. might break some outgoing net
21+
tests? Figure out where to do this.
22+
23+
-- Enable auto-login:
24+
* Start > Run > Open: "control userpasswords2" [OK]
25+
* Uncheck the "Users must enter a user name..." box (it already was
26+
unchecked for me)
27+
* Press "OK"
28+
* Enter password twice.
29+
30+
-- Download winstrap.
31+
* Bring up cmd.exe (Start > Run > "cmd" [OK])
32+
* Copy/paste (Right click: paste) this into cmd.exe:
33+
34+
bitsadmin /transfer mydownloadjob /download /priority normal https://storage.googleapis.com/winstrap/winstrap-2015-01-03-440bb77.exe c:\users\wingopher\Desktop\winstrap.exe
35+
36+
* It should appear on the desktop.
37+
38+
-- double click winstrap. type "go" and press <enter>. abort it once
39+
it's downloaded everything. (close the window)
40+
41+
-- make the Buildlet start on boot:
42+
* Start > All Programs > right click "Startup"
43+
* Right-mouse-drag "Start Buildlet" from the desktop (from winstrap) to the
44+
Startup folder and "Create shortcuts here"
45+
46+
-- Install git with middle option: "Use Git from Windows Command Prompt",
47+
otherwise all the defaults.
48+
49+
-- click yes yes yes on the tdm64-gcc installer question defaults.
50+
Then do the tdm64-gcc installer again but do 32-bit this time. You
51+
should then have two TDM installs at c:\TDM-GCC-64 and
52+
c:\TDM-GCC-32. Don’t pick other locations. The gobuilder adds
53+
those to your path.
54+
55+
TODO(bradfitz): this document is incomplete. Cover gcesysprep,
56+
regedit(?), windows-startup-script-cmd, etc. And I think winstrap
57+
will need to write things to something outside of C:\Users, since
58+
sysprep on reboot nukes all users, at least on GCE. We probably need
59+
to run the buildlet's stage0 from the windows-startup-script-cmd. Find
60+
& ask Windows experts.
61+
62+
--
63+
64+
Docs:
65+
http://www.win2008workstation.com/configure-auto-logon/
66+
https://cloud.google.com/compute/docs/operating-systems/windows
67+
-- notably "windows-startup-script-cmd" ala:
68+
gcloud compute instances add-metadata <INSTANCE> --zone <ZONE> --metadata windows-startup-script-cmd="net user <USERNAME> <PASSWORD>"
69+
https://github.com/golang/winstrap
70+
http://golang.org/s/windowsbuilderhowto

0 commit comments

Comments
 (0)