The Big Picture
Ctrlplane orchestrates deployments by connecting three key dimensions:Key Entities
System
A System is a logical grouping of related deployments, environments, and resources. Think of it as a workspace for a product or platform. Example: “E-commerce Platform” system might contain:- Deployments: API Service, Frontend App, Payment Service
- Environments: Development, Staging, Production
- Resources: Multiple Kubernetes clusters, Lambda functions
name- Display nameslug- URL-friendly identifierdescription- What this system encompasses
Resource
A Resource is a deployment target - the actual infrastructure where your code runs. Examples:- A Kubernetes cluster (e.g., “us-east-1-prod-cluster”)
- A VM or EC2 instance
- A cloud function runtime
- A serverless application platform
name- Human-readable namekind- Type of resource (e.g., “kubernetes-cluster”, “vm”, “lambda”)identifier- Unique identifier for this resourcemetadata- Key-value pairs for classification (e.g.,region: us-east-1,env: prod)config- Resource-specific configurationversion- Resource version or state
- Kubernetes provider discovers clusters
- Cloud provider syncs VMs from AWS/GCP/Azure
- Custom providers sync your infrastructure
Environment
An Environment represents a logical deployment stage in your pipeline (dev, staging, production, etc.). Key Properties:name- Environment name (e.g., “Production”)systemId- The system this environment belongs toresourceSelector- A selector that determines which resources belong to this environmentdirectory- Optional path for organizing environments hierarchically
metadata.environment = "production".
Hierarchical Organization: You can use the directory field to create
nested environments:
""- Root level"regions"- First level"regions/us-east"- Nested
Deployment
A Deployment represents a service or application that you want to deploy. Examples:- “API Service”
- “Frontend Application”
- “Payment Processor”
- “Database Migration”
name- Deployment nameslug- URL-friendly identifierdescription- What this deployment doessystemId- The system this deployment belongs toresourceSelector- Optional selector to limit which resources can run this deploymentjobAgentId- The job agent that will execute deploymentsjobAgentConfig- Configuration passed to the job agent
Deployment Version
A Deployment Version represents a specific build or release of a deployment. Key Properties:deploymentId- Which deployment this version belongs totag- Version identifier (e.g., “v1.2.3”, “sha-abc123”, “2024-01-15-prod”)name- Optional human-readable nameconfig- Version-specific configurationjobAgentConfig- Job agent configuration for this versionmetadata- Version metadata (e.g., git commit, build number)status- Version status:building,ready, orfaileddependencies- Version dependencies on other deployments
building- Version is still being built (won’t be deployed)ready- Version is ready for deployment (default for policies)failed- Version failed to build (won’t be deployed)
Release Target
A Release Target is the combination of a deployment, environment, and resource. It represents a specific place where a deployment can be released. Formula:Deployment × Environment × Resource = Release Target
Example:
- Deployment: “API Service”
- Environment: “Production”
- Resource: “us-east-1 cluster”
- Release Target: “Deploy API Service to Production on us-east-1 cluster”
- Environment’s resource selector determines which resources are in the environment
- Deployment’s resource selector (if any) further filters resources
- The intersection creates release targets
Release
A Release is an instance of deploying a specific version to a release target. Key Properties:deploymentId- Which deploymentenvironmentId- Which environmentresourceId- Which resourceversionId- Which version to deploystatus- Current status of the releasejobId- The job executing this release (if any)
- Created - Ctrlplane determines a version should be deployed to a target
- Pending - Waiting for policies (approval, environment progression, etc.)
- Approved - Policies passed, job created
- Active - Job is executing
- Completed - Job finished successfully
- Failed - Job failed
- Cancelled - Release was cancelled
Job
A Job is the actual deployment task that gets executed by a job agent. Key Properties:releaseId- The release this job is deployingjobAgentId- Which agent will execute this jobstatus- Job status (pending,in_progress,completed,failed, etc.)externalId- External identifier (e.g., GitHub workflow run ID)message- Status message or error details
- Ctrlplane creates a job for an approved release
- Job agent polls
/job-agents/{agentId}/queue/nextand receives the job - Agent acknowledges the job
- Agent executes the deployment
- Agent updates job status as it progresses
- Agent marks job as completed or failed
- Deployment’s
jobAgentConfig - Version’s
jobAgentConfig(overrides deployment config) - Release variables
Policy
A Policy defines rules that govern when and how deployments can happen. Key Components:- Selectors - Which release targets this policy applies to
- Rules - The specific policies to enforce
-
Approval Policy - Requires manual approval before deployment
-
Environment Progression - Enforces deployment order between environments
-
Gradual Rollout - Deploys to resources in phases
- Finds all policies matching the target (via selectors)
- Evaluates each policy’s rules
- If all rules pass → create job
- If any rule requires action (approval, wait) → release is pending
- If any rule denies → release is blocked
Variables
Variables provide dynamic configuration for deployments. Deployment Variables: Defined at the deployment level, can have different values per environment. Resource Variables: Defined on resources, available during job execution. Example:How Entities Work Together
Complete Flow Example
Let’s walk through a complete deployment:-
Setup (One-time):
-
CI Build:
-
Ctrlplane Planning:
-
Approval:
-
Job Creation:
-
Job Execution:
-
Completion:
Entity Relationships Diagram
Key Takeaways
- Systems organize everything into logical boundaries
- Resources are where code runs (created by providers, matched by selectors)
- Environments group resources using selectors
- Deployments define what to deploy
- Versions are specific builds created by your CI
- Release Targets = Deployment × Environment × Resource (automatically created)
- Releases represent deploying a version to a target
- Jobs are the actual deployment tasks executed by agents
- Policies control when and how deployments happen
- Variables provide dynamic configuration
Next Steps
- Quickstart - Build your first deployment pipeline
- Selectors - Learn how to use selectors effectively
- Policies - Deep dive into policy configuration