Deployments
A Deployment represents a service or application that you want to deploy across your infrastructure. Deployments have versions (created by your CI), which get released to environments and resources.What is a Deployment?
A deployment is a logical unit of software that you want to orchestrate:- API Service - Your backend API
- Frontend Application - Web or mobile frontend
- Background Worker - Async job processor
- Database Migration - Schema changes
- Configuration Update - Infrastructure configuration
Deployment Properties
name
Human-readable display name for the deployment. Examples:- “API Service”
- “Frontend Application”
- “Payment Processor”
- “User Service”
slug
URL-friendly identifier, unique within the system. Examples:api-servicefrontend-apppayment-processor
systemId
The system this deployment belongs to. Deployments are scoped to systems.jobAgentId
The ID of the job agent that will execute deployment jobs. Required: Every deployment must have a job agent configured.jobAgentConfig
Configuration passed to the job agent when executing deployments. The structure depends on the agent type. GitHub Actions Agent:resourceSelector (Optional)
Limits which resources this deployment can target. If specified, only resources matching this selector can receive this deployment. Use Cases:- Kubernetes-only deployments: Match
kind: kubernetes-cluster - Region-specific: Match
metadata.region: us-east-1 - Team-specific: Match
metadata.team: platform
description
Optional description of what this deployment does.metadata
Optional key-value pairs for classification. Common Metadata:Creating a Deployment
Via Web UI
- Navigate to your system
- Click “Deployments” tab
- Click “Create Deployment”
- Fill in:
- Name: “API Service”
- Slug: “api-service”
- Description: “Main backend API”
- Job Agent: Select from dropdown
- Job Agent Config: JSON configuration
- Resource Selector: (optional)
- Click “Create”
Via API
Via YAML
Deployment Versions
Versions represent specific builds or releases of your deployment. They are typically created by your CI system after building.Version Properties
Creating Versions (from CI)
After your CI builds an artifact, create a version in Ctrlplane:Version Status
Versions have a status field:building- Version is being built (won’t be deployed yet)ready- Version is ready for deployment (default for policies)failed- Build failed (won’t be deployed)
- CI starts building → Create version with status
building - Build succeeds → Update status to
ready - Ctrlplane creates releases/jobs for
readyversions
- Build completes → Create version with status
readyimmediately
Version Config vs Job Agent Config
config: General version configuration, visible in UIVersion Dependencies
Versions can declare dependencies on other deployment versions.Deployment Variables
Variables allow environment-specific or version-specific configuration.Creating Deployment Variables
Setting Environment-Specific Values
Using Variables in Jobs
Variables are resolved during job creation and passed to the job agent:Release Targets
When you create a deployment, Ctrlplane automatically creates release targets by crossing the deployment with environments and resources. Formula:Deployment × Environment × Resource = Release Targets
Example:
Given:
- Deployment: “API Service”
- Environments: Development, Staging, Production
- Resources in Production: 3 clusters
- API Service → Development → dev-cluster
- API Service → Staging → staging-cluster
- API Service → Production → prod-cluster-1
- API Service → Production → prod-cluster-2
- API Service → Production → prod-cluster-3
Filtering Release Targets
Use deployment’sresourceSelector to limit which targets are created:
Deployment Lifecycle
1. Create Deployment
Define the deployment in Ctrlplane with job agent configuration.2. CI Builds and Creates Version
Your CI pipeline builds the artifact and creates a deployment version.3. Ctrlplane Evaluates Policies
Ctrlplane checks policies (approvals, environment progression, etc.).4. Jobs Created
For each release target that should receive the version, a job is created.5. Job Agent Executes
The configured job agent picks up the job and executes the deployment.6. Status Updated
The job reports status back to Ctrlplane.Viewing Deployment Status
Via Web UI
- Navigate to the deployment
- See tabs:
- Versions: All versions created
- Releases: Active releases across targets
- Jobs: Execution history
- Variables: Configured variables
Via API
Get deployment details:Common Patterns
Microservices
Frontend + Backend
Database + Application
Multi-Platform
Best Practices
Naming
Good Names:- ✅ “API Service”
- ✅ “Frontend Application”
- ✅ “Payment Processor”
- ✅
api-service - ✅
frontend-app - ✅
payment-processor
- ❌ “Service” (too generic)
- ❌ “api_service” (use hyphens)
- ❌ “API-SERVICE” (use lowercase)
Job Agent Configuration
Do:- ✅ Use version’s
jobAgentConfigfor version-specific values (like image tags) - ✅ Use deployment’s
jobAgentConfigfor stable configuration - ✅ Keep sensitive data in secrets (not in config)
Version Tags
Good Tags:- ✅
v1.2.3(semantic version) - ✅
2024-01-15-prod(date-based) - ✅
abc123def(git commit)
- ❌
latest(not specific) - ❌
prod(not a version) - ❌
test(too vague)
Resource Selectors
Use resource selectors to:- Limit Kubernetes deployments to Kubernetes resources
- Separate platform-specific deployments
- Control which resources can receive a deployment
Troubleshooting
No release targets created
- Check resource selector matches some resources
- Verify environments have matching resources
- Ensure deployment and environments are in same system
Jobs not being created for new versions
- Check version status is
ready - Review policies for denials/pending approvals
- Verify job agent is configured
- Check release target exists
Job agent config not working
- Verify jobAgentConfig structure matches agent type
- Check version’s jobAgentConfig overrides correctly
- Review job agent logs for configuration errors
Next Steps
- Deployment Versions - Understand version lifecycle
- Release Targets - How the deployment matrix works
- Variables - Using variables for configuration
- CI/CD Integration - Integrate with your CI system