Files
trailofbits-buttercup/deployment/env.template
T
Dan Guido a18c86a3e0 docs: add local minikube deployment guide
Add comprehensive documentation for local development deployment:
- Docker Desktop resource configuration (CPU, memory, disk)
- Common errors and solutions (resource insufficiency, pending pods, GHCR auth)
- Resource expectations table for different memory allocations
- macOS ARM64 (Apple Silicon) notes
- Verification steps and useful debugging commands

Also update env.template with inline comments explaining minikube resource
settings and their relationship to Docker Desktop resources.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:29:46 +01:00

105 lines
4.8 KiB
Plaintext

# Reference a values file for kubernetes deployment. This should be a template
# file, filled by crs-architecture.sh with the correct variables.
# See values-upstream-minikube.template, values-minikube.template, values-aks.template, values-prod.template
export BUTTERCUP_K8S_VALUES_TEMPLATE="k8s/values-upstream-minikube.template"
# Namespace used to install the whole CRS in.
export BUTTERCUP_NAMESPACE=crs
# Choose whether to deploy the k8s cluster. If not, the cluster should already
# be accessible with kubectl
export DEPLOY_CLUSTER=true # or false
# When DEPLOY_CLUSTER is set to true, this variable defines what kind of cluster
# to deploy
export CLUSTER_TYPE=minikube # or "aks"
# These are terraform variables, necessary only for actual deployment in AKS
# See README.md for instructions on how to set them up.
# export TF_VAR_ARM_CLIENT_ID="<your-client-id>"
# export TF_VAR_ARM_CLIENT_SECRET="<your-client-secret>"
# export TF_VAR_ARM_TENANT_ID="<your-tenant-id>"
# export TF_VAR_ARM_SUBSCRIPTION_ID="<your-sub-id>"
# export TF_VAR_usr_node_count=50
# export TF_VAR_resource_group_name_prefix="<resource-prefix>"
# export TF_VAR_resource_group_name="<existing-resource-group-name>"
# TailScale variables, necessary only for production/staging deployments
export TAILSCALE_ENABLED=false # or true
# export TS_CLIENT_ID="<your-tailscale-oauth-client-id>"
# export TS_CLIENT_SECRET="<your-tailscale-oauth-client-secret>"
# export TS_OP_TAG="<your-tailscale-operator-tag>"
# export TAILSCALE_DOMAIN="tail123456.ts.net"
# AIxCC - Competition API settings, used to properly connect to the right endpoint and
# with the right authentication. If COMPETITION_API_ENABLED is true, a test API
# will be deployed and configured according to the variables.
# SCANTRON_GITHUB_PAT is a GitHub PAT with at least package:read and repo:write
# permissions.
# export COMPETITION_API_ENABLED=false # or true
# export COMPETITION_API_KEY_ID="11111111-1111-1111-1111-111111111111"
# export COMPETITION_API_KEY_TOKEN="secret"
# export COMPETITION_API_URL="<competition-api-url>"
# export SCANTRON_GITHUB_PAT="<gh-pat-with-repo-read+packages-read>"
# Start an additional pod for running challenges from blobs and in the same times and using same ids
# as in the organized round. See the orchestrator/src/buttercup/orchestrator/mock_competition_api/README.md
# for more details.
export MOCK_COMPETITION_API_ENABLED=false # or true
# CRS settings
export CRS_KEY_ID="515cc8a0-3019-4c9f-8c1c-72d0b54ae561"
export CRS_KEY_TOKEN="VGuAC8axfOnFXKBB7irpNDOKcDjOlnyB"
export CRS_KEY_TOKEN_HASH='$argon2id$v=19$m=65536,t=3,p=4$Dg1v6NPGTyXPoOPF4ozD5A$wa/85ttk17bBsIASSwdR/uGz5UKN/bZuu4wu+JIy1iA'
# export CRS_URL="<your-crs-api-url>"
# export CRS_API_HOSTNAME="<your-crs-api-hostname>"
# GitHub Container Registry auth, base64 encoded
# echo "USERNAME:$GHCR_PAT" | base64 --wrap=0
# The PAT should have at least package:read permissions
# NOTE: Comment out for local builds - images will be built locally without GHCR access.
# Only needed when pulling pre-built images from GHCR.
# export GHCR_AUTH="<your-ghcr-base64-auth>"
# LiteLLM/LLMs settings
export LITELLM_MASTER_KEY="d5179c62ae1c7366e3ee09775d0993d5" # Generate with: openssl rand -hex 16
export LITELLM_MAX_BUDGET="100"
export AZURE_API_BASE="<disabled>"
export AZURE_API_KEY="<disabled>"
export OPENAI_API_KEY="<your-openai-api-key>"
export ANTHROPIC_API_KEY="<your-anthropic-api-key>"
# export GEMINI_API_KEY="<your-gemini-api-key>"
# LangFuse settings, instructing LLM-applications to log their LLM traces
# export LANGFUSE_ENABLED=true
# export LANGFUSE_HOST="<your-langfuse-host-url>"
# export LANGFUSE_PUBLIC_KEY="<your-langfuse-public-key>"
# export LANGFUSE_SECRET_KEY="<your-langfuse-secret-key>"
# OpenTelemetry endpoint settings (e.g. SigNoz)
export DEPLOY_SIGNOZ=false
# Your otel endpoint
# export OTEL_ENDPOINT="<your-otel-endpoint>"
# Your otel token, including basic or bearer
# export OTEL_TOKEN="dXNlcm5hbWU6cGFzc3dvcmQ="
# export OTEL_PROTOCOL=grpc
# Docker Hub credentials for doing logged requests while getting Container
# Images from DockerHub. If not set, the system will perform unauthenticated requests.
# export DOCKER_USERNAME="<your-docker-username>"
# export DOCKER_PAT="<your-docker-pat>"
# Docker build arguments, useful for local deployment
export FUZZER_BASE_IMAGE="gcr.io/oss-fuzz-base/base-runner"
# Minikube cluster size
# NOTE: Docker Desktop typically limits resources. Check Docker Desktop > Settings > Resources.
# For macOS Docker Desktop with 8GB RAM allocated to Docker:
# - Use MINIKUBE_CPU=4 and MINIKUBE_MEMORY_GB=7
# - Some pods may remain Pending due to resource constraints (this is expected)
# For larger systems or dedicated Linux machines with 16GB+ RAM:
# - Use MINIKUBE_CPU=6 and MINIKUBE_MEMORY_GB=10
export MINIKUBE_CPU=6
export MINIKUBE_MEMORY_GB=10
export MINIKUBE_DISK_GB=80