Build the Q Coordination Engine (or qbox) and the Istio BookInfo application on top of GKE.
-
Terraform 0.12 or later. If not installed, I strongly recommend using
tfswitch(which can be installed here) to install and move between Terraform versions. -
A working
kubectl. Follow these instructions to set upkubectllocally if not set. -
The third-party
kubectlTerraform provider. Unfortunately, the standard Kubernetes provider does not currently support applying arbitrary YAMLs. This means we cannot apply CRDs or other resources through that provider. So we're using this one instead. -
gcloudinstalled locally. Follow these instructions to installgcloudfor your platform. -
makeinstalled locally. This is so that you can run commands from theMakefileas needed. -
A service account key generated from Google Cloud for the project stored on your machine somewhere. This is necessary so that you can use
gcloudto connect to GCP. If you don't have a service account, follow these instructions. If you need to generate a key for an existing service account, follow these instructions to generate and download. -
A Terraform cloud storage bucket that you have access to. This is used to store Terraform state remotely so that teams can work together on the same resources. A bucket called
tfstate-backendhas already been created for you, and Terraform has already been configured to use it for state in this repo. If it is ever deleted, please create a new bucket and updateterraform-backend.tfaccordingly. -
A variable file called
values.tfvarsat the top-level of this repository. The following is a template, please replace the values:
service_account_key_path = "<full path to the service account key JSON file you generated as a prereq>"
password = "<Kubernetes API password for use with kubectl; consult with other team member for this value>"
yaml_folders_path = "<Local file path to the folder containing Kubernetes manifests e.g. ../microservices-demo/kubernetes-manifests/"
- Run
make buildto build a new cluster and deploy your YAML files. - Run
make destroyto teardown the cluster and all YAMLs running on it. - Run
make showto inspect the current state of the Terraform resources (YAMLs and GKE cluster)