Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Terraform to 0.12.3 #899

Merged

Conversation

aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Jul 11, 2019

Fixed configuration tf files according to a new format.
terraform fmt all files.
Also updated providers versions.

As part of #657

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 9534da91-542c-4b3d-bf34-c7de9e0588be

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/899/head:pr_899 && git checkout pr_899
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-8c53a74

Copy link
Member

@roberthbailey roberthbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I'm really looking forward to the new and better syntax in terraform 0.12.

build/cluster.tf Outdated
location = "${var.cluster["zone"]}"
project = "${var.cluster["project"]}"
provider = "google-beta"
enable_legacy_abac = "${var.cluster["legacyAbac"]}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this. legacy ABAC has been disabled for a long time on GKE and I'm removing this option from the various ways to create GKE clusters.

build/cluster.tf Outdated
location = "${var.cluster["zone"]}"
project = "${var.cluster["project"]}"
provider = "google-beta"
enable_legacy_abac = "${var.cluster["legacyAbac"]}"

# Setting an empty username and password explicitly disables basic auth
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the master_auth block. Now that Mark switched GKE to 1.12 the defaults in GKE disable both basic auth and client certs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the information, will update soon

build/cluster.tf Outdated
node_count = 1

node_config {
preemptible = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we putting the agones controller onto a preemptible vm?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, I think this is a left-over from other Terraform configuration example.

@@ -39,7 +39,7 @@ endif
-var "cluster={name=\"$(GCP_CLUSTER_NAME)\", machineType=\"$(GCP_CLUSTER_NODEPOOL_MACHINETYPE)\", \
zone=\"$(GCP_CLUSTER_ZONE)\", project=\"$(GCP_PROJECT)\", \
initialNodeCount=\"$(GCP_CLUSTER_NODEPOOL_INITIALNODECOUNT)\", \
legacyABAC=\"$(GCP_CLUSTER_LEGACYABAC)\"}"'
legacyAbac=\"$(GCP_CLUSTER_LEGACYABAC)\"}"'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove legacyAbac

@@ -65,7 +65,7 @@ endif
-var "cluster={name=\"$(GCP_CLUSTER_NAME)\", machineType=\"$(GCP_CLUSTER_NODEPOOL_MACHINETYPE)\", \
zone=\"$(GCP_CLUSTER_ZONE)\", project=\"$(GCP_PROJECT)\", \
initialNodeCount=\"$(GCP_CLUSTER_NODEPOOL_INITIALNODECOUNT)\", \
legacyABAC=\"$(GCP_CLUSTER_LEGACYABAC)\"}"'
legacyAbac=\"$(GCP_CLUSTER_LEGACYABAC)\"}"'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove legacyAbac

@@ -14,7 +14,7 @@

provider "google-beta" {
version = "~> 2.4"
zone = "${lookup(var.cluster, "zone")}"
zone = "${lookup(var.cluster, "zone")}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the other file you changed places that had previously done a lookup(...) to a different syntax (${var.cluster["zone"]}) but this file still uses the lookup(...) syntax. Can you make this file consistent with build/cluster.tf?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for sure

build/modules/gke/cluster.tf Outdated Show resolved Hide resolved
provisioner "local-exec" {
command = "${"${format("echo Current variables set as following - name: %s, project: %s, machineType: %s, initialNodeCount: %s, zone: %s, legacyAbac: %s",
provisioner "local-exec" {
command = "${"${format("echo Current variables set as following - name: %s, project: %s, machineType: %s, initialNodeCount: %s, zone: %s, legacyAbac: %s",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove legacyAbac here too.

project = "${lookup(var.cluster, "project")}"
provider = "google-beta"

# Setting an empty username and password explicitly disables basic auth
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the whole master_auth block now that we are using 1.12.

@aLekSer aLekSer force-pushed the update-terraform-version branch 2 times, most recently from 86e3185 to ae087cc Compare July 16, 2019 15:06
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: aa404344-3a97-4089-a65c-f8c66460a2d3

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ff1324a3-af54-49ef-85ec-d471e3052bd6

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/899/head:pr_899 && git checkout pr_899
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-86e3185

@aLekSer aLekSer force-pushed the update-terraform-version branch 3 times, most recently from 08589ea to 499e7f5 Compare July 17, 2019 08:08
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: e023ac31-f81b-4288-b626-c95c06a22199

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 503eff12-a50d-4df8-bfc7-c427fe432fdb

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: b4af3a6b-9a41-4e57-a797-f083bb3bd2d3

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@aLekSer aLekSer marked this pull request as ready for review July 17, 2019 08:35
@aLekSer aLekSer force-pushed the update-terraform-version branch 2 times, most recently from 7353077 to e863123 Compare July 17, 2019 11:22
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: e9e0cc28-e5f5-4f49-8b9e-d4f1a2547b05

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 829c39d9-1a24-44ed-aee3-1c894f1d18ac

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Jul 17, 2019

While deploying Agones with Terraform I got sometimes timeout errors with agones-ping-udp-service. Screenshot of tiller-deployment is attached.
Screenshot 2019-07-17 at 15 24 27
Some terraform deployment completed successfully.

@markmandel
Copy link
Member

While deploying Agones with Terraform I got sometimes timeout errors with agones-ping-udp-service.

So does that mean that this PR is currently not stable?

@aLekSer
Copy link
Collaborator Author

aLekSer commented Jul 22, 2019

Yes, this version is unstable, I am fixing these issues now.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: c126bd03-2d17-4313-868f-7b69e532488f

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/899/head:pr_899 && git checkout pr_899
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-b82ce74

build/cluster.tf Outdated
]

labels = {
"stable.agones.dev/agones-system" = "true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The label (and taint) should just be agones.dev/agones-system now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for an update

build/cluster.tf Outdated
]

labels = {
"stable.agones.dev/agones-metrics" = "true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The label and taint should be agones.dev/agones-metrics.

]

labels = {
"stable.agones.dev/agones-system" = "true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above, please fix the label / taint names.

@@ -15,24 +15,31 @@
# Password for the Kubernetes API.
# Could be defined using GKE_PASSWORD env variable
# or by setting `password="somepass"` string in build/terraform.tfvars
variable "password" {default = ""}
variable "username" {default = "admin"}
variable "password" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be possible to remove the password and username variables.

build/modules/gke/cluster.tf Show resolved Hide resolved
@aLekSer aLekSer force-pushed the update-terraform-version branch 3 times, most recently from c1e3c6c to 00d17e2 Compare July 23, 2019 12:48
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 24c8e6ab-ce73-4d64-8822-e6f448fad597

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/899/head:pr_899 && git checkout pr_899
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-da06f8e

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3c705af4-42d5-41c9-81c0-439f3375fec0

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/899/head:pr_899 && git checkout pr_899
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-c1e3c6c

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 7cac8ab0-45e4-4782-baf4-b79eef0dbd41

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Jul 23, 2019

Error in E2E:

Step #17: time="2019-07-23 13:15:26.656" level=info msg="fleet simple-fleet-2mhnt has 0/1 ready replicas"
Step #17: --- FAIL: TestGameServerUnhealthyAfterDeletingPod (86.77s)
Step #17: gameserver_test.go:211: 
Step #17: Error Trace:	gameserver_test.go:211
Step #17: Error: Received unexpected error:
Step #17: timed out waiting for the condition
Step #17: waiting for GameServer to be Unhealthy default/udp-serverk4lj7
Step #17: agones.dev/agones/test/e2e/framework.(*Framework).WaitForGameServerState
Step #17: /go/src/agones.dev/agones/test/e2e/framework/framework.go:127
Step #17: agones.dev/agones/test/e2e.TestGameServerUnhealthyAfterDeletingPod
Step #17: /go/src/agones.dev/agones/test/e2e/gameserver_test.go:210
Step #17: testing.tRunner

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: e4e2acf3-a52d-491e-9523-15bab2b2c42b

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Jul 23, 2019

@roberthbailey applied all your comments. Now scripts are working.

  • make gcloud-terraform-install would install current version of agones,
  • make gcloud-terraform-cluster will install release version from agones helm chart.

Fixed configuration tf files according to a new format.
terraform fmt all files.
Update version of aks to 1.12.8.
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 241301b5-11c2-421d-99a3-3b299139947e

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/899/head:pr_899 && git checkout pr_899
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-b704a8f

@roberthbailey roberthbailey merged commit 330d750 into googleforgames:master Jul 23, 2019
@aLekSer aLekSer deleted the update-terraform-version branch July 23, 2019 16:01
@roberthbailey roberthbailey added this to the 0.12.0 milestone Jul 26, 2019
@markmandel markmandel added area/operations Installation, updating, metrics etc kind/cleanup Refactoring code, fixing up documentation, etc labels Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operations Installation, updating, metrics etc kind/cleanup Refactoring code, fixing up documentation, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants