emalloy / gke-terraform-hal-spinnaker

Install spinnaker in GKE using terraform and halyard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install spinnaker in GKE using terraform and hal

Prerequisite

  • Runs only on Linux or Mac
  • Following tools needs to be installed in local machine and available via PATH

Variables

  • project: The ID of the GCP project
  • zone: Compute engine zone where GKE cluster needs to be created
  • gcs_location: Cloud storage bucket location for storing spinnaker data

    By default Nearline storage class is configured. Ensure correct location is configured based on the configured zone

Installation steps

  1. Following API needs to be enabled for the project

    gcloud services enable serviceusage.googleapis.com
    gcloud services enable iam.googleapis.com
    
  2. Create service account for terraform

    PROJECT=$(gcloud info --format='value(config.project)')
    SA_EMAIL=terraform@${PROJECT}.iam.gserviceaccount.com
    
    gcloud iam service-accounts create terraform --display-name "terraform" 
    gcloud iam service-accounts keys create account.json --iam-account $SA_EMAIL
    

    Above command will download the key and store it in account.json file

  3. Grant owner role to terraform service account

    gcloud projects add-iam-policy-binding $PROJECT --member serviceAccount:${SA_EMAIL} --role roles/owner
    
  4. Setup google authentication. For more info refer this guide

    export GOOGLE_APPLICATION_CREDENTIALS="[PATH]" (for e.g. $PWD/account.json)
    
  5. Execute below commands. This will take some time to complete (5 to 8 mins)

    terraform init
    terraform plan -out terraform.plan
    terraform apply terraform.plan 
    
  6. After the command completes, run the following command to set up port forwarding to the Spinnaker UI

    hal deploy connect
    
  7. Access spinnaker UI at http://localhost:9000/

About

Install spinnaker in GKE using terraform and halyard

License:MIT License


Languages

Language:HCL 100.0%