cmd/coordinator/buildongce: make the dev coordinator have a static IP
I made it static in GCE's web UI but as always, I forgot you can't
rename IP addresses in GCE, so we get another special case here since
our auto-detect logic below wouldn't work. Oh well.
Change-Id: Iae2a435576e9b03959f2e634929da94f0e9275c2
Reviewed-on: https://go-review.googlesource.com/11902
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/cmd/coordinator/buildongce/create.go b/cmd/coordinator/buildongce/create.go
index 55946e7..6c6a7b7 100644
--- a/cmd/coordinator/buildongce/create.go
+++ b/cmd/coordinator/buildongce/create.go
@@ -104,11 +104,16 @@
if *proj == "" {
log.Fatalf("Missing --project flag")
}
- if *proj == "symbolic-datum-552" && *staticIP == "" {
+ if *staticIP == "" {
// Hard-code this, since GCP doesn't let you rename an IP address, and so
// this IP is still called "go-buidler-1-ip" in our project, from our old
// naming convention plan.
- *staticIP = "107.178.219.46"
+ switch *proj {
+ case "symbolic-datum-552":
+ *staticIP = "107.178.219.46"
+ case "go-dashboard-dev":
+ *staticIP = "104.154.113.235"
+ }
}
prefix := "https://www.googleapis.com/compute/v1/projects/" + *proj
machType := prefix + "/zones/" + *zone + "/machineTypes/" + *mach