Triage Party: Deployment Guide
October 7, 2020 ยท View on GitHub
Table of Contents
Environment variables
While Triage Party primarily uses flags for deployment configuration, several settings are available as environment variables to make it easier to deploy.
PORT:--portGITHUB_TOKEN: (contents of)--github-token-fileCONFIG_PATH:--configPERSIST_BACKEND:--persist-backendPERSIST_PATH:--persist-path
Integration
Docker
The simple Docker deployment is setup for easy cache persistence from disk:
docker build --tag=tp .
docker run -e GITHUB_TOKEN=<your token> -p 8080:8080 tp
Kubernetes
See deploy/kubernetes for example manifests. To install Triage Party into a Kubernetes cluster:
kubectl apply -f deploy/kubernetes
kubectl create secret generic triage-party-github-token -n triage-party --from-file=token=$HOME/.github-token
If you are using minikube, this will open Triage Party in your web browser: minikube service triage-party -n triage-party
For faster Pod restarts, configure a persistent cache using an external database or PersistentVolumeClaim
Google Cloud Run
Triage Party was designed to run well with Google Cloud Run. Here is an example command-line to deploy against Cloud Run with a Cloud SQL hosted persistent cache.
gcloud beta run deploy "${SERVICE_NAME}" \
--project "${PROJECT}" \
--image "${IMAGE}" \
--set-env-vars="GITHUB_TOKEN=${token},PERSIST_BACKEND=cloudsql,PERSIST_PATH=tp:${DB_PASS}@tcp(project/region/triage-party)/tp" \
--allow-unauthenticated \
--region us-central1 \
--platform managed
For a real-world example deployment script, see deploy/cloudrun/minikube-deploy.sh
Google Cloud Build
gcloud builds submit .
The built image is tagged with gcr.io/$PROJECT_ID/triage-party:latest. See the cloudbuild.yaml file for more options.