Skip to content

manikann/gke-terraform-helm-spinnaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install spinnaker in GKE using terraform and helm

Prerequisite

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

Variables

  • credential: Contents of a file that contains terraform service account private key in JSON format. Default filename is account.json. Refer below installation steps to generate key file
  • 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. terraform uses Service Usage API, this API needs to be enabled manually https://console.developers.google.com/apis/library/serviceusage.googleapis.com

  2. Create service account for terraform

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

    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 $(gcloud info --format='value(config.project)') --member serviceAccount:terraform@$(gcloud info --format='value(config.project)').iam.gserviceaccount.com --role roles/owner
    
  4. 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 
    
  5. After the command completes, run the following command to set up port forwarding to the Spinnaker UI

    export KUBECONFIG=$PWD/.kubeconfig 
    export DECK_POD=$(kubectl get pods --namespace default -l "component=deck" -o jsonpath="{.items[0].metadata.name}")
    kubectl port-forward --namespace default $DECK_POD 8080:9000 >> /dev/null &
    
  6. Access spinnaker UI at http://localhost:8080/

About

Install spinnaker in GKE using terraform and helm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages