What is a Deployment?
A deployment in Ctrlplane is:- A Logical Unit: It typically represents a single service, application, or piece of infrastructure.
- System-Bound: Each deployment is assigned to a specific system, which contains multiple environments (e.g., QA, Staging, Production). When you create a deployment, it automatically becomes part of all environments within that system.
- Version Control: It manages multiple releases (versions) of your software or infrastructure configuration.
- Pipeline Definition: It includes a defined CI/CD pipeline that outlines the steps for building, testing, and deploying your changes.
- Release Manager: It groups and organizes releases, providing a historical view of all deployments.
Key Components of a Deployment
A deployment in Ctrlplane typically includes:- Releases: Individual versions of your software or infrastructure configuration.
- CI/CD Pipeline: The defined process for deploying releases.
- System and Environment Association: The deployment is part of all environments within its assigned system, allowing for consistent deployment across different stages.
- Job Configurations: Specifications for the jobs that will be created and run for each release and resource.
- Variables: Resource-specific variables that allow the same pipeline to be used across different environments.
Systems, Environments, and Resource Filtering
Ctrlplane uses a hierarchical structure to manage deployments:- Systems: The top-level organizational unit. A system contains multiple environments and is associated with one or more deployments.
- Environments: Subsets of a system (e.g., QA, Staging, Production). Each environment can be configured with specific settings and policies.
- Environment Configuration: Each environment is configured with label filters to determine which resources fall under that environment. This allows for fine-grained control over where deployments are applied.
- Resource Filtering: When a release is created, Ctrlplane uses the environment’s label filters to identify matching resources. It then runs the appropriate jobs for each of these resources.
- Inter-Environment Policies: Environments are connected by policies that determine when and how jobs should run. These policies control the progression of deployments through environments (e.g., from Staging to Production).
Deployment Workflow
- Deployment Creation: A deployment is created and assigned to a system.
- Release Initiation: A new release is created within the deployment.
-
Environment Processing: For each environment in the system:
- The environment’s label filters are applied to identify relevant resources.
- Jobs are created for each matching resource based on the deployment’s job definitions.
- Policy Enforcement: Inter-environment policies determine when jobs can run, allowing for controlled progression through environments.
- Job Execution: Jobs are executed on the identified resources, applying the release changes.
Creating and Managing Deployments
Deployments can be created and managed in two primary ways:- Manual Creation: Through the Ctrlplane UI or API, specifying the system it belongs to.
-
Automated Creation: By including a
.ctrlplane.yaml
file in your Git repository. This method allows for automatic deployment creation when new repositories are added, with system assignment specified in the configuration.
.ctrlplane.yaml
: