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
#!/usr/bin/env bash | |
# Reference: https://gist.github.com/mikesparr/8985378640242d8e453cc2212509814d | |
# set these to your specific environment | |
export PROJECT_ID=db-cluster-tests | |
export REDIS_INSTANCE=myinstance | |
export REDIS_VERSION="redis_4_0" | |
export GCP_REGION=us-central1 | |
export GCP_NETWORK=default |
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
kubectl get nodes |
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
apiVersion: argoproj.io/v1alpha1 | |
kind: Application | |
metadata: | |
name: k8s-config | |
namespace: argocd | |
finalizers: | |
- resources-finalizer.argocd.argoproj.io | |
spec: | |
destination: | |
namespace: argocd |
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
# app.yaml | |
env: standard | |
runtime: nodejs10 | |
service: app-engine-react-demo | |
handlers: | |
- url: /static | |
static_dir: build/static |
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
apiVersion: argoproj.io/v1alpha1 | |
kind: Application | |
metadata: | |
name: kong | |
namespace: argocd | |
finalizers: | |
- resources-finalizer.argocd.argoproj.io | |
spec: | |
destination: | |
namespace: argocd |
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 | |
# export PROJECT_ID=<from .env> | |
# export AUTH_NETWORK=<from .env> | |
export DNS_ZONE_NAME=msparr-com | |
# create dns zone (you will need to point nameservers to Cloud DNS) | |
gcloud beta dns --project=$PROJECT_ID managed-zones create $DNS_ZONE_NAME \ | |
--description= \ | |
--dns-name=msparr.com. |
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
apiVersion: kustomize.config.k8s.io/v1beta1 | |
kind: Kustomization | |
bases: | |
- ../../base | |
commonLabels: | |
env: review | |
patchesStrategicMerge: |
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
--- | |
apiVersion: extensions/v1beta1 # networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: demo-app-msparr-com | |
spec: | |
# tls: | |
# - secretName: tls-demo-app-msparr-com | |
# hosts: | |
# - demo-app.msparr.com |
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
# dynamically create DNS CNAME entry for review app | |
- name: 'gcr.io/cloud-builders/gcloud' | |
entrypoint: 'bash' | |
args: | |
- '-c' | |
- | | |
gcloud dns --project=devops-pipeline-demo record-sets transaction start --zone=msparr-com | |
gcloud dns --project=devops-pipeline-demo record-sets transaction add kong-proxy.msparr.com. \ | |
--name=demo-app-review-$_PR_NUMBER.msparr.com. \ | |
--ttl=300 \ |
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
#!/usr/bin/env bash | |
# https://cloud.google.com/anthos/gke/docs/aws/how-to/installing-management | |
# NOTE: MUST have `jq` installed for JSON parsing to set ENV vars | |
export PROJECT_ID=$(gcloud config get-value project) | |
export PROJECT_OWNER=$(gcloud config get-value core/account) # set orig val | |
export ANTHOS_GKE_VERSION=$(anthos-gke version) | |
export AWS_REGION="us-east-2" | |
export ADMIN_AWS_IAM_ARN=$(aws sts get-caller-identity | jq '.Arn') |