Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/_deploy-loadtest-infra-aws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: _deploy-loadtest-infra-aws

on:
workflow_call:
secrets:
AWS_ACCESS_KEY:
required: true
AWS_SECRET_KEY:
required: true
CLUSTER_PREFIX:
required: true

env:
AWS_REGION: us-east-1 # Add your cluster zone here.
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: production

steps:
- name: Checkout
uses: actions/checkout@v3

- name: "Configure Kubeconfig w/ EKS"
run: aws eks update-kubeconfig --name ${{ secrets.CLUSTER_PREFIX }}-prod --region ${{ env.AWS_REGION }}

- name: Deploy InfluxDB and Grafana
run: |
helm repo add influxdata https://helm.influxdata.com/
helm upgrade --install influxdb influxdata/influxdb --namespace monitoring --create-namespace --values ./deploy/influxdb/values.yaml

helm repo add grafana https://grafana.github.io/helm-charts
helm upgrade --install grafana grafana/grafana --namespace monitoring --values ./deploy/grafana/values.yaml

- name: Deploy K6 Operator
run: |
helm upgrade k6 \
--atomic \
--install \
./deploy/k6 \
--values ./deploy/k6/values.yaml

- name: Deploy load test scripts
run: |
helm upgrade --install tests ./deploy/tests
71 changes: 71 additions & 0 deletions .github/workflows/_deploy-loadtest-infra-gke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: _deploy-loadtest-infra-gcp

# Started from GH Docs
# https://docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine

# REQUIRED REPO SECRETS
# - GCP_CREDENTIALS
# - CLUSTER_PREFIX

on:
workflow_call:
secrets:
GCP_CREDENTIALS:
required: true
CLUSTER_PREFIX:
required: true
env:
GKE_ZONE: us-east1 # Add your cluster zone here.
CLUSTER_PREFIX: ${{ secrets.CLUSTER_PREFIX }}

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: production

steps:
- name: Checkout
uses: actions/checkout@v3

- id: "auth"
uses: "google-github-actions/auth@v0"
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

- name: "Set up Cloud SDK"
uses: google-github-actions/setup-gcloud@v0

- name: "Use gcloud CLI"
run: gcloud info

# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- run: |-
gcloud --quiet auth configure-docker

# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ env.CLUSTER_PREFIX }}-prod
location: ${{ env.GKE_ZONE }}

- name: Deploy InfluxDB and Grafana
run: |
helm repo add influxdata https://helm.influxdata.com/
helm upgrade --install influxdb influxdata/influxdb --namespace monitoring --create-namespace --values ./deploy/influxdb/values.yaml

helm repo add grafana https://grafana.github.io/helm-charts
helm upgrade --install grafana grafana/grafana --namespace monitoring --values ./deploy/grafana/values.yaml

- name: Deploy K6 Operator
run: |
helm upgrade k6 \
--atomic \
--install \
./deploy/k6 \
--values ./deploy/k6/values.yaml

- name: Deploy load test scripts
run: |
helm upgrade --install tests ./deploy/tests
63 changes: 63 additions & 0 deletions .github/workflows/_deploy-otel-collector-aws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: _deploy-otel-collector-aws

# Started from GH Docs
# https://docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine

# REQUIRED REPO SECRETS
# - GCP_CREDENTIALS
# - CLUSTER_PREFIX

on:
workflow_call:
secrets:
AWS_ACCESS_KEY:
required: true
AWS_SECRET_KEY:
required: true
CLUSTER_PREFIX:
required: true

env:
AWS_REGION: us-east-1 # Add your cluster zone here.
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: production

steps:
- name: Checkout
uses: actions/checkout@v3

- name: "Configure Kubeconfig w/ EKS"
run: aws eks update-kubeconfig --name ${{ secrets.CLUSTER_PREFIX }}-prod --region ${{ env.AWS_REGION }}

- name: Deploy Otel
if: ${{ !inputs.dry-run }}
run: |
helm upgrade collector \
--atomic \
--install \
./deploy/collector \
--namespace monitoring \
--create-namespace \
--set serviceAccount.create=true \
--values ./deploy/collector/values.yaml

- name: Helm dependency update
run: |
helm dependency update ./deploy/zipkin

- name: Deploy Zipkin
if: ${{ !inputs.dry-run }}
run: |
helm upgrade zipkin \
--atomic \
--install \
./deploy/zipkin \
--namespace zipkin \
--create-namespace \
--values ./deploy/zipkin/values.yaml
77 changes: 77 additions & 0 deletions .github/workflows/_deploy-otel-collector-gke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: _deploy-otel-collector-gcp

# Started from GH Docs
# https://docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine

# REQUIRED REPO SECRETS
# - GCP_CREDENTIALS
# - CLUSTER_PREFIX

on:
workflow_call:
secrets:
GCP_CREDENTIALS:
required: true
CLUSTER_PREFIX:
required: true
env:
GKE_ZONE: us-east1 # Add your cluster zone here.
CLUSTER_PREFIX: ${{ secrets.CLUSTER_PREFIX }}

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: production

steps:
- name: Checkout
uses: actions/checkout@v3

- id: "auth"
uses: "google-github-actions/auth@v0"
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

- name: "Set up Cloud SDK"
uses: google-github-actions/setup-gcloud@v0

- name: "Use gcloud CLI"
run: gcloud info

# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- run: |-
gcloud --quiet auth configure-docker

# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ env.CLUSTER_PREFIX }}-prod
location: ${{ env.GKE_ZONE }}

- name: Helm dependency update
run: |
helm dependency update ./deploy/zipkin

- name: Deploy Otel
if: ${{ !inputs.dry-run }}
run: |
helm upgrade collector \
--atomic \
--install \
./deploy/collector \
--namespace monitoring \
--create-namespace \
--values ./deploy/collector/values.yaml

- name: Deploy Zipkin
if: ${{ !inputs.dry-run }}
run: |
helm upgrade zipkin \
--atomic \
--install \
./deploy/zipkin \
--namespace zipkin \
--create-namespace \
--values ./deploy/zipkin/values.yaml
116 changes: 116 additions & 0 deletions .github/workflows/_deploy-router-aws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: _deploy-router-aws

on:
workflow_call:
inputs:
environment:
description: "Target variant"
type: string
required: true
default: dev
variant:
description: "Target variant"
type: string
required: true
default: dev
dry-run:
type: boolean
description: "Run a dry run with helm"
required: false
default: false
debug:
type: boolean
description: "Run helm in debug mode"
required: false
default: false
secrets:
AWS_ACCESS_KEY:
required: true
AWS_SECRET_KEY:
required: true
CLUSTER_PREFIX:
required: true
APOLLO_GRAPH_ID:
required: true
APOLLO_KEY:
required: true
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
AWS_REGION: us-east-1
CLUSTER_PREFIX: ${{ secrets.CLUSTER_PREFIX }}
APOLLO_GRAPH_ID: ${{ secrets.APOLLO_GRAPH_ID }}

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: "Configure Kubeconfig w/ EKS"
run: aws eks update-kubeconfig --name ${{ secrets.CLUSTER_PREFIX }}-${{ inputs.environment }} --region ${{ env.AWS_REGION }}

- name: Helm dependency update
run: |
helm dependency update ./deploy/router

# Deploy the Docker image to the GKE cluster with dry run
- name: Helm dry-run
if: ${{ inputs.dry-run }}
run: |
helm upgrade router \
--create-namespace \
--namespace router \
--set router.managedFederation.graphRef=$APOLLO_GRAPH_ID@${{ inputs.variant }} \
--set router.managedFederation.apiKey=${{ secrets.APOLLO_KEY }} \
--set ingress.annotations."kubernetes\.io/ingress\.class"=alb \
--set ingress.annotations."alb\.ingress\.kubernetes\.io/target-type"=ip \
--set ingress.annotations."alb\.ingress\.kubernetes\.io/scheme"=internet-facing \
--set ingress.gcp=false \
--dry-run \
--atomic \
--install \
./deploy/router \
--values ./deploy/router/values.yaml \
-f ./deploy/router/environments/${{ inputs.environment }}.yaml

# Deploy the Docker image to the GKE cluster for real with debug
- name: Deploy
if: ${{ !inputs.dry-run && inputs.debug }}
run: |
helm upgrade router \
--create-namespace \
--namespace router \
--set router.managedFederation.graphRef=$APOLLO_GRAPH_ID@${{ inputs.variant }} \
--set router.managedFederation.apiKey=${{ secrets.APOLLO_KEY }} \
--set ingress.annotations."kubernetes\.io/ingress\.class"=alb \
--set ingress.annotations."alb\.ingress\.kubernetes\.io/target-type"=ip \
--set ingress.annotations."alb\.ingress\.kubernetes\.io/scheme"=internet-facing \
--set ingress.gcp=false \
--atomic \
--install \
--debug \
./deploy/router \
--values ./deploy/router/values.yaml \
-f ./deploy/router/environments/${{ inputs.environment }}.yaml

# Deploy the Docker image to the GKE cluster for real
- name: Deploy
if: ${{ !inputs.dry-run }}
run: |
helm upgrade router \
--create-namespace \
--namespace router \
--set router.managedFederation.graphRef=$APOLLO_GRAPH_ID@${{ inputs.variant }} \
--set router.managedFederation.apiKey=${{ secrets.APOLLO_KEY }} \
--set ingress.annotations."kubernetes\.io/ingress\.class"=alb \
--set ingress.annotations."alb\.ingress\.kubernetes\.io/target-type"=ip \
--set ingress.annotations."alb\.ingress\.kubernetes\.io/scheme"=internet-facing \
--set ingress.gcp=false \
--atomic \
--install \
./deploy/router \
--values ./deploy/router/values.yaml \
-f ./deploy/router/environments/${{ inputs.environment }}.yaml
Loading