dashboard/coordinator: add SSD disk option, turn off auto-update
Change-Id: I4d2dfe34a6c2fde8603704e716b7c91ad285ecec Reviewed-on: https://go-review.googlesource.com/1561 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
c6dbbb5857
commit
cf555faef7
|
@ -32,6 +32,7 @@ var (
|
||||||
sshPub = flag.String("ssh_public_key", "", "ssh public key file to authorize. Can modify later in Google's web UI anyway.")
|
sshPub = flag.String("ssh_public_key", "", "ssh public key file to authorize. Can modify later in Google's web UI anyway.")
|
||||||
staticIP = flag.String("static_ip", "", "Static IP to use. If empty, automatic.")
|
staticIP = flag.String("static_ip", "", "Static IP to use. If empty, automatic.")
|
||||||
reuseDisk = flag.Bool("reuse_disk", true, "Whether disk images should be reused between shutdowns/restarts.")
|
reuseDisk = flag.Bool("reuse_disk", true, "Whether disk images should be reused between shutdowns/restarts.")
|
||||||
|
ssd = flag.Bool("ssd", false, "use a solid state disk (faster, more expensive)")
|
||||||
|
|
||||||
writeObject = flag.String("write_object", "", "If non-empty, a VM isn't created and the flag value is Google Cloud Storage bucket/object to write. The contents from stdin.")
|
writeObject = flag.String("write_object", "", "If non-empty, a VM isn't created and the flag value is Google Cloud Storage bucket/object to write. The contents from stdin.")
|
||||||
)
|
)
|
||||||
|
@ -62,6 +63,9 @@ var config = &oauth.Config{
|
||||||
|
|
||||||
const baseConfig = `#cloud-config
|
const baseConfig = `#cloud-config
|
||||||
coreos:
|
coreos:
|
||||||
|
update:
|
||||||
|
group: alpha
|
||||||
|
reboot-strategy: off
|
||||||
units:
|
units:
|
||||||
- name: gobuild.service
|
- name: gobuild.service
|
||||||
command: start
|
command: start
|
||||||
|
@ -266,6 +270,11 @@ func instanceDisk(svc *compute.Service) *compute.AttachedDisk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diskType := ""
|
||||||
|
if *ssd {
|
||||||
|
diskType = "https://www.googleapis.com/compute/v1/projects/" + *proj + "/zones/" + *zone + "/diskTypes/pd-ssd"
|
||||||
|
}
|
||||||
|
|
||||||
return &compute.AttachedDisk{
|
return &compute.AttachedDisk{
|
||||||
AutoDelete: !*reuseDisk,
|
AutoDelete: !*reuseDisk,
|
||||||
Boot: true,
|
Boot: true,
|
||||||
|
@ -274,6 +283,7 @@ func instanceDisk(svc *compute.Service) *compute.AttachedDisk {
|
||||||
DiskName: diskName,
|
DiskName: diskName,
|
||||||
SourceImage: imageURL,
|
SourceImage: imageURL,
|
||||||
DiskSizeGb: 50,
|
DiskSizeGb: 50,
|
||||||
|
DiskType: diskType,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue