Deployment and Operations¶
Recommended deployment model¶
Production uses the central GitOps model based on mago-onprem-infra. The Skill
Runtime repository owns the application code, the Helm chart, container image
builds, and the deployed image tag; the infrastructure repository manages the
Argo CD Application and per-environment values.
The deployment flow is:
- A push to
develop, or a manual run, starts theCD (on-prem)workflow. - GitHub Actions pushes the image to GAR tagged
<first 12 characters of the commit SHA>. - The workflow updates
deploy/values-onprem-image.yamlin this service repository. - Review the changed image tag and manifest diff in Argo CD.
- An administrator manually syncs the
sohri-skill-runtime-onpremApplication.
This separates application and operations permissions, and keeps change approval, auditing, and rollback clear.
Docker Compose¶
Run from the project root. The host port is 9213 and the container port is 59213.
Helm values files¶
deploy/values-dev.yaml: GKE developmentdeploy/values-prd.yaml: GKE productiondeploy/values-onprem.yaml: on-premises Kubernetes
Render check:
helm lint deploy
helm template sohri-skill-runtime deploy -f deploy/values-dev.yaml
helm template sohri-skill-runtime deploy -f deploy/values-prd.yaml
helm template sohri-skill-runtime deploy -f deploy/values-onprem.yaml
helm template sohri-skill-runtime deploy \
-f deploy/values-onprem.yaml \
-f deploy/values-onprem-image.yaml
Install directly only for development or emergency recovery. Production deployments go through Argo CD.
helm upgrade --install sohri-skill-runtime deploy \
--namespace mago-prod \
--create-namespace \
-f deploy/values-onprem.yaml
CI/CD¶
GitHub Actions¶
.github/workflows/ci.yml: Python, tests, Helm, Docker, secret scan.github/workflows/cd.yml: manual GKE fallback deployment.github/workflows/onprem-cd.yml: on push to develop, pushes the GAR image and updates the service repo's image tag
On-premises prerequisites¶
The following Secret must be available to the Skill Runtime GitHub repository:
GCP_ARTIFACT_REGISTRY_WRITER_KEY: GCP credential allowed to push images to GAR
If you use an Organization Secret, add holamago/sohri-skill-runtime to each
Secret's repository access. Never write Secret values into source code, Helm
values, or workflow logs.
The Kubernetes mago-prod namespace needs a GAR pull Secret.
The GitOps repository needs the following:
gitops/apps/sohri-skill-runtime-onprem.yaml
gitops/apps/values/sohri-skill-runtime-onprem/overrides.yaml
gitops/projects/mago-prod.yaml
The mago-prod AppProject's sourceRepos must allow this repository:
The Application references both the Skill Runtime deploy chart and the
infrastructure repository's values. Start the initial on-premises rollout with 1
replica and HPA/PDB disabled, then scale out once load and node capacity have
been checked.
On-premises deployment procedure¶
- Merge the Skill Runtime change into
developand run theCD (on-prem)workflow. - Confirm the workflow updated
deploy/values-onprem-image.yaml. - Merge the Application, AppProject, and values changes in the infrastructure repository into
main. - In Argo CD, Refresh
mago-projectsand thenmago-root, and sync them manually. - Confirm GAR has an image tag in this format:
- Confirm the workflow updated this file in the service repository:
- Hard Refresh
sohri-skill-runtime-onpremin Argo CD. - Review the image tag and Kubernetes manifest diff, then sync manually.
- Check the rollout and API health.
kubectl -n mago-prod rollout status deployment/sohri-skill-runtime
kubectl -n mago-prod get pod,service | grep sohri-skill-runtime
kubectl -n mago-prod port-forward service/sohri-skill-runtime 59213:59213
In another terminal:
Troubleshooting¶
- GAR authentication failure: check the repository access of
GCP_ARTIFACT_REGISTRY_WRITER_KEYand its Artifact Registry Writer role. - Image tag push failure: check the workflow's
contents: writepermission and the service repository's branch protection rules. - Application missing in Argo CD: Refresh
mago-rootand confirm the Application manifest is onmainin the infrastructure repository. ComparisonError: check the AppProject's allowed source repositories and the Application'stargetRevisionand values paths.ImagePullBackOff: check thegcp-artifact-registrySecret and that the image tag exists.- Readiness failure: check the Pod log and the
/health/readyresponse.
Configuration ownership¶
The service repository manages the chart and image tag; mago-onprem-infra
manages the AppProject, the Application, and per-cluster overrides. Argo CD
renders both repositories together, and the final deployment is always a manual
sync by an administrator.
Running helm upgrade directly from GitHub Actions would need a self-hosted
runner that can reach the on-premises cluster, plus Kubernetes credentials. That
concentrates production credentials on the CI runner, so it is not recommended
as the default deployment method.
GKE fallback¶
GKE fallback repository variables:
AR_REPOSITORY_URLGCP_WORKLOAD_IDENTITY_PROVIDERGCP_DEPLOYER_SERVICE_ACCOUNT
Cloud Build¶
cloudbuild.yaml uses the same image build/push and per-environment values tag
bump contract as Graph Builder. The infrastructure trigger must inject these
substitutions:
_AR_REPOSITORY_URL_IMAGE_NAME=sohri-skill-runtime_VALUES_FILE_ENV_NAME_GITHUB_REPO_SLUG=holamago/sohri-skill-runtime_GITHUB_PUSH_TOKEN_SECRET_VERSION
Probes¶
/health/live: checks that the process can serve requests/health/ready: checks that the Skill Engine URL is configured
Recommended production settings¶
- timeout: 5–10 seconds
- replicas: at least 2
- do not log request bodies
The Runtime never retries or caches execution POSTs, to avoid duplicate side effects.