Allow Google accelerators (i.e. GPUs) on workers
This commit is contained in:
parent
6c5e287c29
commit
2592a0aad4
|
@ -36,6 +36,8 @@ Notable changes between versions.
|
||||||
* Add kubelet `--volume-plugin-dir` flag to allow flexvolume plugins ([#142](https://github.com/poseidon/typhoon/pull/142))
|
* Add kubelet `--volume-plugin-dir` flag to allow flexvolume plugins ([#142](https://github.com/poseidon/typhoon/pull/142))
|
||||||
* Add `kubeconfig` variable to `controllers` and `workers` submodules ([#147](https://github.com/poseidon/typhoon/pull/147))
|
* Add `kubeconfig` variable to `controllers` and `workers` submodules ([#147](https://github.com/poseidon/typhoon/pull/147))
|
||||||
* Remove `kubeconfig_*` variables from `controllers` and `workers` submodules ([#147](https://github.com/poseidon/typhoon/pull/147))
|
* Remove `kubeconfig_*` variables from `controllers` and `workers` submodules ([#147](https://github.com/poseidon/typhoon/pull/147))
|
||||||
|
* Allow initial experimentation with accelerators (i.e. GPUs) on workers ([#161](https://github.com/poseidon/typhoon/pull/161)) (unofficial)
|
||||||
|
* Require `terraform-provider-google` v1.6.0
|
||||||
|
|
||||||
#### Addons
|
#### Addons
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ terraform {
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "google" {
|
provider "google" {
|
||||||
version = "~> 1.2"
|
version = "~> 1.6"
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "local" {
|
provider "local" {
|
||||||
|
|
|
@ -77,3 +77,17 @@ variable "cluster_domain_suffix" {
|
||||||
type = "string"
|
type = "string"
|
||||||
default = "cluster.local"
|
default = "cluster.local"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# unofficial, undocumented, unsupported, temporary
|
||||||
|
|
||||||
|
variable "accelerator_type" {
|
||||||
|
type = "string"
|
||||||
|
default = ""
|
||||||
|
description = "Google Compute Engine accelerator type (e.g. nvidia-tesla-k80, see gcloud compute accelerator-types list)"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "accelerator_count" {
|
||||||
|
type = "string"
|
||||||
|
default = "0"
|
||||||
|
description = "Number of compute engine accelerators"
|
||||||
|
}
|
||||||
|
|
|
@ -63,9 +63,13 @@ resource "google_compute_instance_template" "worker" {
|
||||||
}
|
}
|
||||||
|
|
||||||
can_ip_forward = true
|
can_ip_forward = true
|
||||||
|
|
||||||
tags = ["worker", "${var.cluster_name}-worker", "${var.name}-worker"]
|
tags = ["worker", "${var.cluster_name}-worker", "${var.name}-worker"]
|
||||||
|
|
||||||
|
guest_accelerator {
|
||||||
|
count = "${var.accelerator_count}"
|
||||||
|
type = "${var.accelerator_type}"
|
||||||
|
}
|
||||||
|
|
||||||
lifecycle {
|
lifecycle {
|
||||||
# To update an Instance Template, Terraform should replace the existing resource
|
# To update an Instance Template, Terraform should replace the existing resource
|
||||||
create_before_destroy = true
|
create_before_destroy = true
|
||||||
|
|
Loading…
Reference in New Issue