Quick Start: make help shows all available commands
# Complete dev deployment with custom version
make pipeline-dev VERSION=v$(date +%s)
# Or use the workflow integration
make bump# Check prerequisites
make check-prerequisites
# Build images only
make build-all-images VERSION=v99999
# Build and push images
make build-all-images push-all-images VERSION=v99999
# Generate and publish Helm chart
make helm-release VERSION=v99999
# Run security scans
make security-scan VERSION=v99999
# Verify deployment health
make verify-deployment-devmake check-prerequisitesChecks: docker, kubectl, helm, envsubst, git
make check-kubeconfig-dev
make check-kubeconfig-stg
make check-kubeconfig-prd# Builds but doesn't push (no network access needed except for base images)
make build-all-images VERSION=test
docker images | grep {{PROJECT_NAME}}make helm-generate VERSION=test
ls -la helm/server/Chart.yaml helm/server/values.yaml
cat helm/server/Chart.yamlmake check-prerequisites- Verifies required tools installed
- Checks: docker, kubectl, helm, envsubst, git
- Exit code 0: All tools found
- Exit code 1: Missing tools (shows which ones)
make build-all-images VERSION=v123Builds:
- API server (
api:v123) - Migration service (
migrations:v123) - Org provisioner (
org-provisioner:v123) - Agent ingestion (
agent-ingestion:v123) - Health controller (
health-controller:v123) - Probe controller (
probe-controller:v123) - Customer probe agent binaries (linux-amd64, linux-arm64)
Tags: Both VERSION and latest
make push-all-images VERSION=v123- Pushes all images to Harbor registry
- Pushes both version-specific and
latesttags - Requires: Docker login to Docker Hub
make helm-release VERSION=v123Steps:
- Generate
Chart.yamlandvalues.yamlfrom templates - Lint chart
- Package as
{{PROJECT_NAME}}-server-v123.tgz - Clone/update
helm-chart-privaterepo (SSH) - Copy package and update repo index
- Push to GitHub
- Poll for chart availability (30 tries, 10 sec intervals)
Requires: SSH key for SupportTools/helm-chart-private
make run-migrations-dev-ci VERSION=v123
make run-migrations-stg-ci VERSION=v123
make run-migrations-prd-ci VERSION=v123- Uses pre-built migration image
- Runs Kubernetes Job
- Waits for completion (timeout: 10 minutes)
- Note: These are called by pipeline targets
make argocd-deploy-dev VERSION=v123
make argocd-deploy-stg VERSION=v123
make argocd-deploy-prd VERSION=v123Steps:
- Apply ArgoCD project
- Patch or create ArgoCD Application
- Set
targetRevisionto new version - Wait for
Synced+Healthystatus (timeout: 7.5 minutes)
make verify-deployment-dev
make verify-deployment-stg
make verify-deployment-prdChecks:
- Pod readiness count
- Health endpoint (
/health) - WebSocket connectivity
make security-scan VERSION=v123- Installs Trivy if not present
- Scans all images for CRITICAL+HIGH vulnerabilities
- Outputs to
security-scan-*.txtfiles - Exit code 0: Always succeeds (for CI/CD)
make pipeline-dev VERSION=v123Executes:
check-prerequisitesbuild-all-imagespush-all-imageshelm-releaserun-migrations-dev-ciargocd-deploy-devverify-deployment-dev
Duration: ~10-15 minutes
make pipeline-stg VERSION=v123Same as dev, but for staging environment.
make pipeline-prd VERSION=v123Same as dev, but for production environment.
VERSION # Build version (default: timestamp)REGISTRY # Docker registry (default: docker.io/supporttools)
CHART_REPO_PATH # Helm chart repo path (default: ../helm-chart-private)
CHART_REPO_URL # Chart URL (default: https://charts-private.support.tools)KUBECONFIG_DEV # Dev cluster config
KUBECONFIG_STG # Staging cluster config
KUBECONFIG_PRD # Production cluster config# Install Docker
sudo apt-get install docker.io
# Or check if it's in PATH
which docker# Install gettext-base package
sudo apt-get install gettext-base# Check kubeconfig path
ls -la ~/.kube/mattox/
# Verify path in makefile matches your setup
grep KUBECONFIG makefile# Check if chart was actually published
cd ../helm-chart-private
git log -1
# Manually verify chart in repository
helm repo update
helm search repo private-charts/{{PROJECT_NAME}}-server --version v123# Check SSH key is added to ssh-agent
ssh-add -l
# Test SSH connection
ssh -T git@github.com
# Add SSH key if needed
ssh-add ~/.ssh/id_rsa# Check ArgoCD application status manually
kubectl --kubeconfig $KUBECONFIG_DEV -n argocd get application {{PROJECT_NAME}}-dev
# View ArgoCD application details
kubectl --kubeconfig $KUBECONFIG_DEV -n argocd describe application {{PROJECT_NAME}}-dev
# Check ArgoCD logs
kubectl --kubeconfig $KUBECONFIG_DEV -n argocd logs deployment/argocd-application-controller# Good - specific version for tracking
make pipeline-dev VERSION=v12345
# Avoid - timestamp makes it hard to track
make pipeline-dev # Uses timestamp by default# Always test individual stages before full pipeline
make build-all-images VERSION=test
make helm-generate VERSION=test# Run after system updates or fresh installs
make check-prerequisites# After running security-scan, review results
cat security-scan-api.txt
cat security-scan-migrations.txt# After deployment, check logs
make logs-api-dev
# Check pod status
kubectl --kubeconfig $KUBECONFIG_DEV -n {{PROJECT_NAME}}-dev get pods
# Health check
make health-check-dev# API deployment
cd api
./scripts/deploy-dev.sh
# Org management deployment
cd ../controllers/org-management
./scripts/deploy-dev.sh
# Different commands in CI/CD (GitHub Actions inline)# Same command locally and in CI/CD
make pipeline-dev VERSION=v123
# Or individual components
make build-all-images VERSION=v123
make helm-release VERSION=v123
make argocd-deploy-dev VERSION=v123make helpmake workflow-helpmake gh-helpmake workflow-statuskubectl --kubeconfig $KUBECONFIG_DEV -n {{PROJECT_NAME}}-dev get pods
kubectl --kubeconfig $KUBECONFIG_DEV -n {{PROJECT_NAME}}-dev get deploymentskubectl --kubeconfig $KUBECONFIG_DEV -n {{PROJECT_NAME}}-dev get deployment {{PROJECT_NAME}} -o jsonpath='{.spec.template.spec.containers[0].image}'make health-check-dev
# Or directly
curl -f https://api-dev.{{PROJECT_NAME}}.com/v1/healthzhelm repo update
helm search repo private-charts/{{PROJECT_NAME}}-server --versions | head -20# Patch ArgoCD to previous version
kubectl --kubeconfig $KUBECONFIG_DEV -n argocd patch application {{PROJECT_NAME}}-dev \
--type merge \
-p '{"spec":{"source":{"targetRevision":"v12344"}}}'
# Wait for sync
make argocd-wait-devmake restart-api-dev
# Or manually
kubectl --kubeconfig $KUBECONFIG_DEV -n {{PROJECT_NAME}}-dev rollout restart deployment/{{PROJECT_NAME}}# GitHub Actions runs
make gh-status
# Git commits
git log --oneline -10
# Helm chart versions
cd ../helm-chart-private && git log --oneline -10