diff --git a/env/darwin/macstadium/10_10/Makefile b/env/darwin/macstadium/10_10/Makefile new file mode 100644 index 0000000000..e5d6115846 --- /dev/null +++ b/env/darwin/macstadium/10_10/Makefile @@ -0,0 +1,10 @@ +usage: FORCE + # See Makefile targets. + exit 1 + +FORCE: + +upload: FORCE + go install golang.org/x/build/cmd/upload + upload --verbose --gzip --file=run-builder-darwin-10_10.sh -cacheable=false -public=true go-builder-data/run-builder-darwin-10_10.gz + diff --git a/env/darwin/macstadium/10_10/run-builder-darwin-10_10.sh b/env/darwin/macstadium/10_10/run-builder-darwin-10_10.sh new file mode 100755 index 0000000000..a390f91577 --- /dev/null +++ b/env/darwin/macstadium/10_10/run-builder-darwin-10_10.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +url="https://storage.googleapis.com/go-builder-data/buildlet.darwin-amd64.gz" +while ! curl -f -o buildlet.gz "$url"; do + echo + echo "curl failed to fetch $url" + echo "Sleeping before retrying..." + sleep 5 +done + +set -x +gunzip -f buildlet.gz +chmod +x buildlet + +export GO_BUILDER_ENV=macstadium_vm +exec ./buildlet diff --git a/env/darwin/macstadium/10_10/stage0.sh b/env/darwin/macstadium/10_10/stage0.sh new file mode 100755 index 0000000000..25d94944f4 --- /dev/null +++ b/env/darwin/macstadium/10_10/stage0.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# This is the file baked into the VM image. +# +# It fetches https://storage.googleapis.com/go-builder-data/run-builder-darwin-10_10.gz +# (which might be a shell script or an executable) and runs it to do the rest. + +set -e +url="https://storage.googleapis.com/go-builder-data/run-builder-darwin-10_10.gz" +while ! curl -f -o run-builder.gz "$url"; do + echo + echo "curl failed to fetch $url" + echo "Sleeping before retrying..." + sleep 2 +done + +set -x +gunzip -f run-builder.gz +chmod +x run-builder +exec ./run-builder diff --git a/env/darwin/macstadium/10_11/Makefile b/env/darwin/macstadium/10_11/Makefile new file mode 100644 index 0000000000..f763396be0 --- /dev/null +++ b/env/darwin/macstadium/10_11/Makefile @@ -0,0 +1,9 @@ +usage: FORCE + # See Makefile targets. + exit 1 + +FORCE: + +upload: FORCE + go install golang.org/x/build/cmd/upload + upload --verbose --gzip --file=run-builder-darwin-10_11.sh -cacheable=false -public=true go-builder-data/run-builder-darwin-10_11.gz diff --git a/env/darwin/macstadium/10_11/run-builder-darwin-10_11.sh b/env/darwin/macstadium/10_11/run-builder-darwin-10_11.sh new file mode 100755 index 0000000000..a390f91577 --- /dev/null +++ b/env/darwin/macstadium/10_11/run-builder-darwin-10_11.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +url="https://storage.googleapis.com/go-builder-data/buildlet.darwin-amd64.gz" +while ! curl -f -o buildlet.gz "$url"; do + echo + echo "curl failed to fetch $url" + echo "Sleeping before retrying..." + sleep 5 +done + +set -x +gunzip -f buildlet.gz +chmod +x buildlet + +export GO_BUILDER_ENV=macstadium_vm +exec ./buildlet diff --git a/env/darwin/macstadium/10_11/stage0.sh b/env/darwin/macstadium/10_11/stage0.sh new file mode 100755 index 0000000000..be05d0b6ed --- /dev/null +++ b/env/darwin/macstadium/10_11/stage0.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# This is the file baked into the VM image. +# +# It fetches https://storage.googleapis.com/go-builder-data/run-builder-darwin-10_11.gz +# (which might be a shell script or an executable) and runs it to do the rest. + +set -e +url="https://storage.googleapis.com/go-builder-data/run-builder-darwin-10_11.gz" +while ! curl -f -o run-builder.gz "$url"; do + echo + echo "curl failed to fetch $url" + echo "Sleeping before retrying..." + sleep 2 +done + +set -x +gunzip -f run-builder.gz +chmod +x run-builder +exec ./run-builder diff --git a/env/darwin/macstadium/10_8/Makefile b/env/darwin/macstadium/10_8/Makefile index 7a1b72a19d..f094e23378 100644 --- a/env/darwin/macstadium/10_8/Makefile +++ b/env/darwin/macstadium/10_8/Makefile @@ -6,5 +6,4 @@ FORCE: upload: FORCE go install golang.org/x/build/cmd/upload - gzip -c run-builder-darwin-10_8.sh > run.tmp.gz - upload --verbose --file=run.tmp.gz -cacheable=false -public=false go-builder-data/run-builder-darwin-10_8.gz + upload --verbose --gzip --file=run-builder-darwin-10_8.sh -cacheable=false -public=true go-builder-data/run-builder-darwin-10_8.gz diff --git a/env/darwin/macstadium/10_8/run-builder-darwin-10_8.sh b/env/darwin/macstadium/10_8/run-builder-darwin-10_8.sh old mode 100644 new mode 100755 index 1b5cee512d..a390f91577 --- a/env/darwin/macstadium/10_8/run-builder-darwin-10_8.sh +++ b/env/darwin/macstadium/10_8/run-builder-darwin-10_8.sh @@ -1,19 +1,18 @@ #!/bin/bash set -e -set -x - -ip=$(ifconfig | grep "inet 10.50.0." | perl -npe 's/.*\.(\d+) netmask.*/$1/') -echo "Running with hostname ms_$ip" +url="https://storage.googleapis.com/go-builder-data/buildlet.darwin-amd64.gz" +while ! curl -f -o buildlet.gz "$url"; do + echo + echo "curl failed to fetch $url" + echo "Sleeping before retrying..." + sleep 5 +done -# For now use the buildlet baked into the image. We'll probably want to stop -# doing that later, though: +set -x +gunzip -f buildlet.gz +chmod +x buildlet -while true; do - $HOME/bin/buildlet \ - -coordinator=farmer.golang.org \ - -halt=false \ - -hostname=ms_$ip \ - -reverse=darwin-amd64-10_8 || sleep 5 -done +export GO_BUILDER_ENV=macstadium_vm +exec ./buildlet diff --git a/env/darwin/macstadium/10_8/stage0.sh b/env/darwin/macstadium/10_8/stage0.sh old mode 100644 new mode 100755 diff --git a/env/darwin/macstadium/image-setup-notes.txt b/env/darwin/macstadium/image-setup-notes.txt index 267ce9aa4f..2356a3972c 100644 --- a/env/darwin/macstadium/image-setup-notes.txt +++ b/env/darwin/macstadium/image-setup-notes.txt @@ -6,6 +6,8 @@ System Preferences > Desktop & Screensaver > never screensaver System Preferences > Energy Saver > never sleep +System Preferences > Sharing > enable ssh (for later) + curl -o stage0.sh https://.... chmod +x stage0.sh @@ -16,9 +18,17 @@ System Preferences > Users & Groups > auto-login "gopher" user, run Desktop/run- passwordless sudo +install xcode + (as of 10.10 or 10.9, running git first time will propt for install; + before that, need to find old xcode version) + sudo visudo Change line from: %admin ALL=(ALL) ALL to: %admin ALL=(ALL) NOPASSWD: ALL +verbose boot: + +run-builder-darwin-10_11.sh + diff --git a/env/darwin/macstadium/vmware-notes.txt b/env/darwin/macstadium/vmware-notes.txt index 78c90b2441..db7c32ffcf 100644 --- a/env/darwin/macstadium/vmware-notes.txt +++ b/env/darwin/macstadium/vmware-notes.txt @@ -8,11 +8,11 @@ Then, to create more: # 10.11 -export VMHOST=12 -export VMWHICH=a +export VMHOST=4 +export VMWHICH=b export VMNAME=osx11_host${VMHOST}_${VMWHICH} date -govc vm.create -m 4096 -c 2 -on=false -net dvPortGroup-Private -ds "mac_host_$VMHOST" -g darwin14_64Guest $VMNAME +govc vm.create -m 4096 -c 2 -on=false -net dvPortGroup-Private -ds "BOOT_$VMHOST" -g darwin14_64Guest $VMNAME govc vm.change -e smc.present=TRUE -e ich7m.present=TRUE -e firmware=efi -vm $VMNAME govc device.usb.add -vm $VMNAME govc vm.disk.attach -vm $VMNAME -link=true -persist=false -ds=NetApp-1 -disk "osx_11_frozen/osx_11_frozen.vmdk"