- Runs only on Linux or Mac
- Following tools needs to be installed in local machine and available via
PATH
- gcloud SDK
- kubectl (
gcloud components install kubectl
) - terraform
- halyard
project
: The ID of the GCP projectzone
: Compute engine zone where GKE cluster needs to be createdgcs_location
: Cloud storage bucket location for storing spinnaker dataBy default Nearline storage class is configured. Ensure correct location is configured based on the configured
zone
-
Following API needs to be enabled for the project
gcloud services enable serviceusage.googleapis.com gcloud services enable iam.googleapis.com
-
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 -
Grant owner role to terraform service account
gcloud projects add-iam-policy-binding $PROJECT --member serviceAccount:${SA_EMAIL} --role roles/owner
-
Setup google authentication. For more info refer this guide
export GOOGLE_APPLICATION_CREDENTIALS="[PATH]" (for e.g. $PWD/account.json)
-
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
-
After the command completes, run the following command to set up port forwarding to the Spinnaker UI
hal deploy connect
-
Access spinnaker UI at http://localhost:9000/