Instructions of the initial setup of the GCP project and GKE clusters for deploying Data Commons Mixer service.
-
Create a Google Cloud Project. If working on an existing project, you should have owner/editor role to perform the tasks.
-
Install yq. Make sure the version is 4
yq --version
-
Make a copy of the
config.yaml.tpl
asconfig.yaml
. We will populate the fields inconfig.yaml
as we progress through the walkthrough.cp config.yaml.tpl config.yaml
-
Add the GCP project id used for deployment in
config.yaml
, project field. -
Add the GCP project that hosts the Bigquery table in
config.yaml
, store field. -
Install Google Cloud SDK.
-
Authenticate
gcloud
operations locally.gcloud auth login gcloud components update
-
Create a global static IP in GCP.
-
Run:
./create_ip.sh
-
Record the IP address and update it in
config.yaml
, ip field.
-
-
Add the domain in
config.yaml
, domain field. If you want to use the domain from Cloud Endpoints, it would bemixer.endpoints.<PROJECT_ID>.cloud.goog
. -
Enable the GCP services.
./enable_services.sh
-
Create a service account.
./create_robot_account.sh
-
Setup service account.
-
Run
./setup_robot_account.sh
-
If you see authentication errors, need to contact DataCommons team to complete some of the role binding operations as the service account need access to the Cloud Bigtable and Big Query.
-
-
Deploy Extensive Service Proxy.
-
Add API title in
config.yaml
, api_title field. If omit, the API title would be the same as the domain. -
Run:
./setup_esp.sh
-
-
Create Google Managed SSL Certificate.
./setup_ssl.sh
-
Create the cluster.
-
Add the cluster region in
config.yaml
, region field. -
Add the number of nodes in
config.yaml
, nodes field. -
Run:
./create_cluster.sh
-
-
Make sure the managed SSL certificate is "ACTIVE" by checking "Load balancing" in GCP. This can take minutes up to hours.
-
[Optional] DNS Setup for custom domain
- This is only needed if you use custom domain (instead of the default domain provided by Cloud Endpoints).
- configure the DNS in the domain registrar.