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

Terraform support to generate test cluster #670

Merged

Conversation

aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Mar 25, 2019

E2E test passed.
New make targets:

  1. terraform-init
  2. gcloud-terraform-cluster
  3. gcloud-terraform-destroy-cluster

Need to add install step of agones.

For #657 .

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from 5131219 to 25e433e Compare March 25, 2019 16:05
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 8031319f-3d81-45ce-99eb-acbf04384355

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 8b478815-267d-40a1-8227-cace3007b59e

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.9.0-25e433e

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch 2 times, most recently from 05310a3 to 96bb165 Compare March 25, 2019 17:32
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 9922ce9f-0d4a-4c24-abbf-6227c2b93a4a

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.9.0-05310a3

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ab8516fa-603f-4fb5-b538-4c8d5b17a316

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.9.0-96bb165

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch 2 times, most recently from a8d3c44 to c7ba721 Compare March 25, 2019 17:58
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 66969b53-d74f-4b4a-89ac-e1f45a2c21c8

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.9.0-a8d3c44

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d17571f8-a805-42e7-a185-76bc890ce52c

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.9.0-c7ba721


master_auth {
username = "admin"
password = "supersecretpassword"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should also be externalized and perhaps even set to fail if not changed from the default (perhaps we shouldn't even have a default for this).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added env variable for that, also we can use password = "${random_string.password.result}":
https://medium.com/@tsadoklf/cloud-recipes-use-terraform-to-create-kubernetes-cluster-and-memorystore-redis-instance-on-gcp-d51bb53df46a

@@ -0,0 +1,153 @@
# Copyright 2019 Google Inc. All Rights Reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Should this be in "build" - given that this will likely be our 'here's our opinionated way to install a cluster + Agones' - should this be in a more central place? What do you all think?

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, I can move this up to a "build" folder. Thinking on how to make this method of creating cluster universal (cloud platform agnostic), but this definitely would be separate change.

Copy link
Collaborator Author

@aLekSer aLekSer left a comment

Choose a reason for hiding this comment

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

Will refactor this tf file a bit.

@@ -0,0 +1,153 @@
# Copyright 2019 Google Inc. All Rights Reserved.
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, I can move this up to a "build" folder. Thinking on how to make this method of creating cluster universal (cloud platform agnostic), but this definitely would be separate change.

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from c7ba721 to f79c77d Compare March 26, 2019 16:10
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 86a2eb07-8519-44fc-b15c-614eb5d7f505

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.9.0-f79c77d

@markmandel markmandel added area/operations Installation, updating, metrics etc kind/feature New features for Agones feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) labels Mar 26, 2019
}

variable "cluster" {
type = "map"
Copy link
Collaborator

@cyriltovena cyriltovena Mar 27, 2019

Choose a reason for hiding this comment

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

nitpick: you could add a small description.

build/cluster.tf Outdated Show resolved Hide resolved
build/cluster.tf Outdated Show resolved Hide resolved
build/cluster.tf Outdated Show resolved Hide resolved
Copy link
Collaborator

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

I like this PR :)

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from f79c77d to 89cdcc9 Compare March 28, 2019 13:06
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 2224cb53-3647-4fc4-9d52-c2bd139e9cd4

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.9.0-89cdcc9

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from 89cdcc9 to db79f50 Compare March 28, 2019 14:04
@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 5, 2019

New version contains a one resource for google-container-cluster with 3 node pools nested in it.
Fluky test which is failing two times in this PR is:

--- FAIL: TestFleetRecreateGameServerOnPodDeletion (73.82s)
fleet_test.go:844: 
Error Trace:	fleet_test.go:844

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from 50b09d9 to 27d1857 Compare April 5, 2019 13:40
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 8836e337-a54c-4b03-9809-9bc5fe1037cd

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-27d1857

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from 27d1857 to 89601c6 Compare April 8, 2019 08:36
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 70d2c452-47d6-444e-8072-043a9200d90d

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

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from 89601c6 to f2150b9 Compare April 11, 2019 11:32
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 33a3a699-8b3d-4c19-8f1a-7f642ce100c2

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-f2150b9

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch 2 times, most recently from f49516d to d289704 Compare April 12, 2019 14:47
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d44bffb5-a2a9-459c-a853-89b306b22d23

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-f49516d

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from d289704 to fa9b949 Compare April 12, 2019 14:53
@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 12, 2019

@bbf I made password basic authentication optional. Reflected in README.md.
If user omit password or use "" empty kubernetes would disable basic auth.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: a3b583d9-d93e-49b0-87fe-e4fdd4edf4ec

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-d289704

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 4503b8cd-5b75-461d-94eb-d38a3b4a19e5

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-fa9b949

@markmandel markmandel removed feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) labels Apr 12, 2019
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

'coupla questions 👍

@@ -379,6 +379,13 @@ The Kubernetes config file used to access the cluster. Defaults to `~/.kube/conf
### CLUSTER_NAME
The (gcloud) test cluster that is being worked against. Defaults to `test-cluster`

### GCP_PROJECT
Copy link
Member

Choose a reason for hiding this comment

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

Does this default to the gcp project that is configured in make gcloud-init?

build/README.md Outdated
#### `make gcloud-terraform-cluster`
Run next command with your project ID specified:
```
GCP_PROJECT=<YOUR_PROJECT_ID> [GKE_PASSWORD="<YOUR_PASSWORD>"] make gcloud-terraform-cluster
Copy link
Member

Choose a reason for hiding this comment

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

There is a default project in gcloud - I take it that these two things are not linked?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They are linked, but I think here is better to have an option to explicitly choose, which project you are going to use.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Finally removed the GCP_PROJECT as prerequisites , I am setting it using gcloud command if not set.

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from fa9b949 to f83f0d5 Compare April 13, 2019 17:06
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 0e1778a6-9ff1-4274-bea3-3329a1f149b3

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-f83f0d5

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from f83f0d5 to 9e67fc1 Compare April 15, 2019 08:27
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 5dd616fa-37a1-47d3-8e56-6e27fc23a13d

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-9e67fc1

@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from 9e67fc1 to d5cda35 Compare April 15, 2019 09:22
Creating GKE cluster with three node pools: system, metrics,
gameservers. Added tfvars parameters and new make targets.
E2E tests pass on a terraform deployed cluster.
@aLekSer aLekSer force-pushed the feature/terraform-test-cluster branch from d5cda35 to a1e477a Compare April 15, 2019 09:26
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: b717c1d3-1cc2-4c69-a451-b2eb90c60bcd

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-d5cda35

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 9c2bc75c-da78-4796-af2a-68e35d8f43fa

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/670/head:pr_670 && git checkout pr_670
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-a1e477a

@markmandel markmandel merged commit c220987 into googleforgames:master Apr 15, 2019
@markmandel markmandel added the area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. label Apr 15, 2019
@markmandel markmandel added this to the 0.10.0 milestone Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/operations Installation, updating, metrics etc kind/feature New features for Agones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants