This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gke | |
export GKE_PROJECT_ID="my-gke-project" # CHANGE ME | |
export GKE_CLUSTER_NAME="csm-demo" | |
export GKE_REGION="us-central1" | |
export GKE_SA_NAME="gke-worker-nodes-sa" | |
export GKE_SA_EMAIL="$GKE_SA_NAME@${GKE_PROJECT_ID}.iam.gserviceaccount.com" | |
export KUBECONFIG=~/.kube/$GKE_REGION-$GKE_CLUSTER_NAME.yaml | |
# other | |
export USE_GKE_GCLOUD_AUTH_PLUGIN=True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
me(func:allofterms(name, "Star Wars")) @filter(ge(release_date, "1980")) { | |
name | |
release_date | |
revenue | |
running_time | |
director { | |
name | |
} | |
starring { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source env.sh | |
gcloud container clusters delete $GKE_CLUSTER_NAME \ | |
--project $GKE_PROJECT_ID --region $GKE_REGION | |
gcloud iam service-accounts delete $GKE_SA_EMAIL --project $GKE_PROJECT_ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source env.sh | |
# delete pydgraph-client | |
helmfile --file ./examples/dgraph/helmfile.yaml delete | |
kubectl delete namespace pydgraph-client | |
# delete dgraph | |
helmfile --file ./examples/dgraph/helmfile.yaml delete | |
kubectl delete pvc --selector app=dgraph --namespace "dgraph" | |
kubectl delete namespace dgraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd ./examples/pydgraph-client | |
################### | |
# STEP 1: Environment variables | |
####################################### | |
source env.sh | |
export DOCKER_REGISTRY="<your-docker-hub-account-goes-here>" | |
################### | |
# STEP 2: Build local image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd ./examples/pydgraph-client | |
################### | |
# STEP 1: Environment variables | |
####################################### | |
source env.sh | |
export GCR_PROJECT_ID="my-gcr-project" # CHANGE ME | |
export DOCKER_REGISTRY="gcr.io/$GCR_PROJECT_ID" | |
export ClOUD_BILLING_ACCOUNT="<my-cloud-billing-account>" # CHANGEME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories: | |
# https://artifacthub.io/packages/helm/main/raw | |
- name: bedag | |
url: https://bedag.github.io/helm-charts/ | |
releases: | |
- name: pydgraph-client | |
chart: bedag/raw | |
namespace: pydgraph-client | |
version: 1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories: | |
# https://artifacthub.io/packages/helm/dgraph/dgraph/0.0.19 | |
- name: dgraph | |
url: https://charts.dgraph.io | |
# https://artifacthub.io/packages/helm/main/raw | |
- name: bedag | |
url: https://bedag.github.io/helm-charts/ | |
releases: | |
# Dgraph additional resources required to support Consul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories: | |
# https://artifacthub.io/packages/helm/hashicorp/consul | |
- name: hashicorp | |
url: https://helm.releases.hashicorp.com | |
releases: | |
- name: consul | |
namespace: consul | |
chart: hashicorp/consul | |
version: 0.49.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source env.sh | |
####################### | |
# GSA with least priv for GKE | |
########################################## | |
ROLES=( | |
roles/logging.logWriter | |
roles/monitoring.metricWriter | |
roles/monitoring.viewer | |
roles/stackdriver.resourceMetadata.writer |