1
0
mirror of https://github.com/golang/go synced 2024-10-01 12:48:33 -06:00
go/dashboard/env/windows
Brad Fitzpatrick e1019ed0e1 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 <alex.brainman@gmail.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-05 01:23:09 +00:00
..
README dashboard/env/windows: instructions for setting up a buildlet 2015-01-05 01:23:09 +00:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Unlike the other operating systems which have a bash script that runs
on Linux and scripts qemu to prepare a GCE image, the Windows image
builder image is prepared by hand, following this list of
instructions:

-- in GCE, create a new Windows 2008 server instance. Set its initial username
   to "wingopher" and the password to something.

-- boot it. first boot is slow.

-- Connect with RDP to it. (I used the OS X Microsoft Remote Desktop
   in the Mac App Store)

-- In initial “Initial Configuration Tasks” window:
   * disable automatic installation of updates. Theyll just interrupt
     the builds later. And we don't care about security since this isn't
     going to be Internet-facing. No ports will be accessible
   * disable Windows Error Report (“Not participating”)

TODO: disable the Windows firewall too. might break some outgoing net
      tests? Figure out where to do this.

-- Enable auto-login:
   * Start > Run > Open: "control userpasswords2" [OK]
   * Uncheck the "Users must enter a user name..." box (it already was
     unchecked for me)
   * Press "OK"
   * Enter password twice.

-- Download winstrap.
   * Bring up cmd.exe (Start > Run > "cmd" [OK])
   * Copy/paste (Right click: paste) this into cmd.exe:

     bitsadmin /transfer mydownloadjob  /download /priority normal https://storage.googleapis.com/winstrap/winstrap-2015-01-03-440bb77.exe c:\users\wingopher\Desktop\winstrap.exe

   * It should appear on the desktop.

-- double click winstrap. type "go" and press <enter>. abort it once
   it's downloaded everything. (close the window)

-- make the Buildlet start on boot:
   * Start > All Programs > right click "Startup"
   * Right-mouse-drag "Start Buildlet" from the desktop (from winstrap) to the
     Startup folder and "Create shortcuts here"

-- Install git with middle option: "Use Git from Windows Command Prompt",
   otherwise all the defaults.

-- click yes yes yes on the tdm64-gcc installer question defaults.
   Then do the tdm64-gcc installer again but do 32-bit this time. You
   should then have two TDM installs at c:\TDM-GCC-64 and
   c:\TDM-GCC-32.  Dont pick other locations. The gobuilder adds
   those to your path.

TODO(bradfitz): this document is incomplete. Cover gcesysprep,
regedit(?), windows-startup-script-cmd, etc.  And I think winstrap
will need to write things to something outside of C:\Users, since
sysprep on reboot nukes all users, at least on GCE. We probably need
to run the buildlet's stage0 from the windows-startup-script-cmd. Find
& ask Windows experts.

-- 

Docs:
http://www.win2008workstation.com/configure-auto-logon/
https://cloud.google.com/compute/docs/operating-systems/windows
  -- notably "windows-startup-script-cmd" ala:
     gcloud compute instances add-metadata <INSTANCE> --zone <ZONE> --metadata windows-startup-script-cmd="net user <USERNAME> <PASSWORD>"
https://github.com/golang/winstrap
http://golang.org/s/windowsbuilderhowto