mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-24 04:19:33 +01:00
Create controller instances across zones in the region
* Change controller instances to automatically span zones in a region * Remove the `zone` required variable
This commit is contained in:
parent
7b38271212
commit
2b0296d671
@ -9,9 +9,11 @@ Notable changes between versions.
|
||||
* Add required variable `region` (e.g. "us-central1")
|
||||
* Reduce time to bootstrap a cluster
|
||||
* Change etcd to run on-host, across controllers (etcd-member.service)
|
||||
* Change worker managed instance group to automatically span zones in a region
|
||||
* Change controller instances to automatically span zones in the region
|
||||
* Change worker managed instance group to automatically span zones in the region
|
||||
* Remove support for self-hosted etcd
|
||||
* Remove `controller_preemptible` optional variable
|
||||
* Remove the `zone` required variable
|
||||
* Remove the `controller_preemptible` optional variable
|
||||
|
||||
## v1.8.2
|
||||
|
||||
|
@ -47,7 +47,6 @@ module "google-cloud-yavin" {
|
||||
|
||||
# Google Cloud
|
||||
region = "us-central1"
|
||||
zone = "us-central1-c"
|
||||
dns_zone = "example.com"
|
||||
dns_zone_name = "example-zone"
|
||||
os_image = "coreos-stable-1465-6-0-v20170817"
|
||||
|
@ -78,7 +78,6 @@ module "google-cloud-yavin" {
|
||||
|
||||
# Google Cloud
|
||||
region = "us-central1"
|
||||
zone = "us-central1-c"
|
||||
dns_zone = "example.com"
|
||||
dns_zone_name = "example-zone"
|
||||
os_image = "coreos-stable-1520-6-0-v20171012"
|
||||
@ -195,7 +194,6 @@ Learn about [version pinning](concepts.md#versioning), maintenance, and [addons]
|
||||
|:-----|:------------|:--------|
|
||||
| cluster_name | Unique cluster name (prepended to dns_zone) | "yavin" |
|
||||
| region | Google Cloud region | "us-central1" |
|
||||
| zone | Google Cloud zone | "us-central1-f" |
|
||||
| dns_zone | Google Cloud DNS zone | "google-cloud.example.com" |
|
||||
| dns_zone_name | Google Cloud DNS zone name | "example-zone" |
|
||||
| ssh_authorized_key | SSH public key for ~/.ssh_authorized_keys | "ssh-rsa AAAAB3NZ..." |
|
||||
|
@ -47,7 +47,6 @@ module "google-cloud-yavin" {
|
||||
|
||||
# Google Cloud
|
||||
region = "us-central1"
|
||||
zone = "us-central1-c"
|
||||
dns_zone = "example.com"
|
||||
dns_zone_name = "example-zone"
|
||||
os_image = "coreos-stable-1465-6-0-v20170817"
|
||||
|
@ -6,7 +6,7 @@ module "controllers" {
|
||||
# GCE
|
||||
network = "${google_compute_network.network.name}"
|
||||
count = "${var.controller_count}"
|
||||
zone = "${var.zone}"
|
||||
region = "${var.region}"
|
||||
dns_zone = "${var.dns_zone}"
|
||||
dns_zone_name = "${var.dns_zone_name}"
|
||||
machine_type = "${var.machine_type}"
|
||||
|
@ -14,12 +14,18 @@ resource "google_dns_record_set" "etcds" {
|
||||
rrdatas = ["${element(google_compute_instance.controllers.*.network_interface.0.address, count.index)}"]
|
||||
}
|
||||
|
||||
# Zones in the region
|
||||
data "google_compute_zones" "available" {
|
||||
region = "${var.region}"
|
||||
status = "UP"
|
||||
}
|
||||
|
||||
# Controller instances
|
||||
resource "google_compute_instance" "controllers" {
|
||||
count = "${var.count}"
|
||||
|
||||
name = "${var.cluster_name}-controller-${count.index}"
|
||||
zone = "${var.zone}"
|
||||
zone = "${element(data.google_compute_zones.available.names, count.index)}"
|
||||
machine_type = "${var.machine_type}"
|
||||
|
||||
metadata {
|
||||
|
@ -30,9 +30,9 @@ variable "count" {
|
||||
description = "Number of controller compute instances the instance group should manage"
|
||||
}
|
||||
|
||||
variable "zone" {
|
||||
variable "region" {
|
||||
type = "string"
|
||||
description = "Google zone that compute instances in the group should be created in (e.g. gcloud compute zones list)"
|
||||
description = "Google Cloud region (e.g. us-central1, see `gcloud compute regions list`)."
|
||||
}
|
||||
|
||||
variable "machine_type" {
|
||||
|
@ -8,11 +8,6 @@ variable "region" {
|
||||
description = "Google Cloud Region (e.g. us-central1, see `gcloud compute regions list`)"
|
||||
}
|
||||
|
||||
variable "zone" {
|
||||
type = "string"
|
||||
description = "Google Cloud Zone (e.g. us-central1-f, see `gcloud compute zones list`)"
|
||||
}
|
||||
|
||||
variable "dns_zone" {
|
||||
type = "string"
|
||||
description = "Google Cloud DNS Zone (e.g. google-cloud.dghubble.io)"
|
||||
|
@ -22,7 +22,7 @@ variable "count" {
|
||||
|
||||
variable "region" {
|
||||
type = "string"
|
||||
description = "Google Cloud region to create a regional managed group of workers (e.g. us-central1, see `gcloud compute regions list`)."
|
||||
description = "Google Cloud region (e.g. us-central1, see `gcloud compute regions list`)."
|
||||
}
|
||||
|
||||
variable "machine_type" {
|
||||
|
Loading…
Reference in New Issue
Block a user