What is a Deployment?
A deployment in Ctrlplane is:- A Logical Unit: Represents a single service, application, or piece of infrastructure that you want to deploy and manage.
- System-Bound: Each deployment belongs to a specific system, which contains multiple environments (e.g., Development, Staging, Production).
- Version Manager: Manages multiple deployment versions - each representing a specific iteration of your software (e.g., git commits, docker tags, build numbers).
- Job Configuration: Defines how deployment jobs should be executed via job agent configuration.
- Resource Selector: Optionally filters which resources within a system can be deployment targets.
Key Components of a Deployment
A deployment in Ctrlplane consists of:-
Deployment Versions: Individual versions of your software or
infrastructure (e.g.,
v1.2.3,main-abc123). Each version can have:- Name and tag for identification
- Configuration data
- Job agent specific configuration
- Status (building, ready, failed, rejected)
- Dependencies on other deployment versions
-
Job Agent Configuration: Specifies how jobs should be executed when
deploying this deployment, including:
- Which job agent to use (Kubernetes, GitHub Actions, etc.)
- Agent-specific configuration (manifests, workflow files, etc.)
- Resource Selector: Optional filter to limit which resources can be deployment targets.
- Retry and Timeout Settings: Configure automatic retry behavior and job timeouts.
How Deployments Work
The Release Target Concept
Ctrlplane creates release targets - the junction between a deployment, environment, and resource. A release target represents “what should deployment X be at for resource Y in environment Z?” For example:- Deployment:
web-app - Environment:
production - Resource:
k8s-cluster-us-east - Desired Version:
v1.2.3
web-app v1.2.3 should be deployed to
k8s-cluster-us-east in the production environment.
Deployment Workflow
- Create a Deployment: Define a new deployment within a system, specifying its name, job agent configuration, and resource selector.
- Push a Deployment Version: When you have a new version to deploy (from your CI/CD pipeline), create a deployment version with a unique tag.
-
Release Target Generation: Ctrlplane automatically creates release
targets for each combination of:
- The deployment
- Each environment in the system
- Each resource matching both the environment’s selector and the deployment’s selector
-
Policy Evaluation: Policies determine which version should be deployed to
each release target based on:
- Version dependencies
- Approval requirements
- Environment progression rules
- Release channels
- Job Creation: When a release target’s desired version changes, Ctrlplane creates a job to deploy that version to the resource.
- Job Execution: The job agent executes the deployment job in your CI/CD system.
Resource Selection
Deployments can specify a resource selector to control which resources are valid targets. Resources must match both:- The environment’s resource selector
- The deployment’s resource selector (if specified)
- A frontend deployment that only deploys to web-server resources
- A database deployment that only targets database resources
- Region-specific deployments
Creating and Managing Deployments
Via UI or API
Create deployments through the Ctrlplane UI or REST API, specifying:- Name and slug (unique within the system)
- System ID
- Job agent and configuration
- Resource selector (optional)
- Retry count and timeout settings