1
0
mirror of https://github.com/golang/go synced 2024-10-01 07:28:35 -06:00
go/dashboard/coordinator/Makefile
Brad Fitzpatrick 005d2be0ba dashboard/coordinator: periodically clean stale VMs
This isn't used yet, but will be for the new-style builders (VMs on
GCE running the buildlet, started by the coordinator).

From the code's comments:

cleanUpOldVMs periodically enumerates virtual machines and deletes
any which have a "delete-at" attribute having a unix timestamp
before the current time. These VMs are created to run a single
build and should be shut down by a controlling process. Due to
various types of failures, they might get stranded. To prevent them
from getting stranded and wasting resources forever, we instead set
the "delete-at" metadata attribute on them when created to some
time that's well beyond their expected lifetime, and then this is
the backup mechanism to delete them if they get away.

Update golang/go#8639
Update golang/go#8640
Update golang/go#8642

Change-Id: I489e97926e7ab56487571c2bf0bd255cdf49570d
Reviewed-on: https://go-review.googlesource.com/2199
Reviewed-by: Burcu Dogan <jbd@google.com>
2015-01-02 18:48:53 +00:00

10 lines
383 B
Makefile

coordinator: main.go
GOOS=linux go build --tags=build_coordinator -o coordinator .
# After "make upload", either reboot the machine, or ssh to it and:
# sudo systemctl restart gobuild.service
# And watch its logs with:
# sudo journalctl -f -u gobuild.service
upload: coordinator
cat coordinator | (cd buildongce && go run create.go --write_object=go-builder-data/coordinator)