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

Revved version of the GCP TF Provider #98

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

knee-berts
Copy link

@knee-berts knee-berts commented Aug 10, 2022

#96
Updated the GCP TF Provider to "4.31.0".
Ran in to issues with SSH keys. I think the GCE resource was changed to support OS login in-between 3.5 and 4.31.
Reworked the SSH login to use GCP OS Login by:

  • Creating a cloud storage bucket and using gsutil to push the vm_assets folder to the bucket
  • Gave the VM service account read on the bucket
  • Updated the startup script to pull down vm_assets from the bucket

Two additional small changes:

  • gitignore default tf vars file
  • Updated the instance series to "e" as "g" does not exist :)

Signed-off-by: Nick Eberts <nickeberts@google.com>
@lann
Copy link
Contributor

lann commented Aug 10, 2022

@FrankYang0529

@@ -118,5 +117,9 @@ export HIPPO_FOLDER='${home_path}/hippo/linux-x64'
export DNS_ZONE='${dns_zone}'
export ENABLE_LETSENCRYPT='${enable_letsencrypt}'

echo "Copying vm_assets to local instance"
gsutil cp -r ${storage_bucket_path}/* ./
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't tested this, but this shared script works for AWS and DigitalOcean too. Probably, it's not good to use GCP specific command here.

Copy link
Author

Choose a reason for hiding this comment

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

Gotcha. Slimmed down the PR to JUST update the TF GCP version.

knee-berts and others added 6 commits August 11, 2022 09:44
Signed-off-by: Nicholas Eberts <neberts12@gmail.com>
Signed-off-by: Nicholas Eberts <neberts12@gmail.com>
@@ -30,7 +30,7 @@ variable "instance_name" {
variable "instance_type" {
description = "The type of VM Instance to run for each node in the cluster (Default: g1-small)"
type = string
default = "g1-small"
default = "e1-small"
Copy link
Contributor

Choose a reason for hiding this comment

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

May you share where did you find e1-small type? I tried to find it at https://gcpinstances.doit-intl.com/, but it's not there.
Also, please help to change related terms at line 31 Default: e1-small and README.md under gcp folder. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants