First Deployment
Learn how to make your first deployment with Ctrlplane by following this tutorial. We’ll create a simple hello world deployment that can run across multiple servers.
Before starting, ensure you have:
- Access to a Ctrlplane Workspace (cloud-hosted or self-hosted)
- The Ctrlplane CLI installed
Create a new System
Systems organize related deployments and environments into logical groups, making it easier to manage deployment pipelines and maintain consistency across your infrastructure.
To create a new system:
- Click the
+
button in the top left corner to open the menu - Select
New System
from the dropdown - Give your system a descriptive name, for example,
Hello world
.
Create a new Deployment
A deployment represents a complete, end-to-end process for delivering changes to your system, organizing principle for managing and orchestrating the release of your software or infrastructure across various environments within a system.
- Click the
+
button in the top left corner to open the menu - Select
New Deployment
from the dropdown - For this example, keep the default option selected.
- Give your deployment a descriptive name, for example,
My First Deployment
. - Click
Create
.
Create a new Resource
Resources in Ctrlplane represent entities that your deployments can target - these can be infrastructure components like servers and databases, or abstract concepts like API endpoints and service accounts.
For this tutorial, we’ll create a simple resource to represent a server:
-
Click the
+
button in the top left corner to open the menu -
Select
New Resource
from the dropdown -
Fill in the following details:
Field Value Description Name server-a
A name for your resource Identifier deployment-server-a
A unique identifier used to reference this resource within your workspace Kind Server
The type of resource being created Version tutorial/v1
The API version for this resource type Configuration {}
Resource-specific configuration options (empty for this tutorial) Metadata tutorial = true
Additional metadata tags for organizing resources under environments -
Click
Create
In a real deployment, you would configure additional details like connection information and authentication. For this tutorial, we’re creating a placeholder resource just to demonstrate the workflow.
Configuring Environments
When you create a new system, Ctrlplane automatically creates three default
environments: QA
, Staging
, and Production
. For this simple
example, we’ll keep just one environment and delete the others.
To delete environments:
- Click on the “Environments” tab in the left sidebar under your system
- For each environment you want to delete:
- Click on the environment node in the tree view
- Click on the three dots menu (⋮) next to the environment name in the top left of the drawer
- Click the
Delete
button from the dropdown
- Keep only one environment (e.g.,
Production
) for this tutorial - Click on the
Production
environment node in the tree view - Go to the
Resources
tab - Here you can create a filter to down to the resources this environment to the resource we previously created (see image below).
While this tutorial uses a simple single environment setup, real-world deployments often require more sophisticated environment organization.
For example, in globally distributed systems, you might organize environments by geographic regions.
Create Job Agent
A Job Agent executes deployment tasks. For this tutorial, we’ll create a job agent to run scripts on your local machine.
-
Download and install the Ctrlplane CLI
-
Get your API key from
<Workspace Name> > Workspace Settings > API Keys
-
Get your workspace ID from
<Workspace Name> > Workspace Settings > General
-
Run the following command:
This agent will execute scripts that you configure in the UI when jobs are triggered.
Keep this process running as it listens for jobs to execute when deployments are triggered.
Job Agents execute deployment tasks in your infrastructure. In production, you would configure agents with appropriate permissions and access to your deployment targets. For this tutorial, we’re using a basic configuration.
Connect Agent to Deployment
- Navigate to your deployment settings page
- Find the
Job Agents
section - Select your job agent from the dropdown
- Add this simple script:
- Click
Save
Create a Release
- Go to the release page and click
Create Release
- Enter a name like
v1.0.0
- Click
Create
Deploy the Release
When the release is created, the job agent will be triggered. You should see this output in your job agent terminal: