Skip to content

scalr-eap/gce-gke-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google GKE cluster

Creates and GKE Cluster in the given Region.

User can choose:

  1. Name of the cluster
  2. Region

Template can be run as follows:

  • Locally
  • Scalr Next-gen as the remote backend
  • Scalr Next-Gen Service Catalog Offering

Using Locally

  1. Pull the repo
  2. Set variable values in terraform.tvars.(json)
  3. Set your access keys for GCE using environment variables export GOOGLE_CREDENTIALS=<access_key> GOOGLE_PROJECT=<project_id>
  4. Run terraform init;terraform apply and watch the magic happen.

Using with Scalr Next-Gen as Remote Backend

  1. Pull the repo
  2. Create a CLI workspace in Scalr Next-Gen and configure the backend to match in main.tf.
  3. Create an TF API token in Scalr Next-Gen and add it to ~/.terraformrc.
  4. In Scalr Workspace add Terraform variables and values as follows (note that terraform.tfvars(.json) in the template is not used with a remote backend).
    1. region
    2. cluster_name
  5. Run terraform init;terraform apply and watch the magic happen.

Using with Scalr Next-Gen Service Catalog Offering.

In general follow the example here https://scalr-athena.readthedocs-hosted.com/en/latest/next-gen/service_catalog.html#service-catalog

  1. Create Policies (scalr-module.hcl shows the policy bindings that are required)
    1. cloud.locations - Policy to limit the cloud locations (note this can be all locations but the policy must exist)
    2. cloud.instance_types - Restrict the instance types that are allowed. Minimum 4GB of ram.
  2. Create a Global Variable name_fmt with REGEX ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  3. Create a Global Variable numeric_fmt with REGEX ^[0-9][0-9]*$
  4. Fork or clone the Source repo (https://github.com/scalr-eap/gce-gke-cluster)
  5. Create the Service Catalog offering pointing to your copy repo
  6. Request the offering. It can take 10-15 minutes to deploy the cluster.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages