What You’ll Build
By the end of this guide, you’ll have:- A system with a deployment
- Two environments (staging and production)
- A resource (deployment target)
- An automated deployment triggered by your CI
Prerequisites
- Ctrlplane account (create one at app.ctrlplane.dev or self-host)
- API key (generate in Settings → API Keys)
- A GitHub repository with a CI workflow (or any CI system)
Step 1: Create Your First System
A system is a logical grouping for your deployments. Let’s create one for a sample application. Via Web UI:- Navigate to your workspace
- Click “Create System”
- Fill in:
- Name:
My Application - Slug:
my-app - Description:
Sample application for quickstart
- Name:
Step 2: Create Resources
Resources represent where your code will be deployed. For this quickstart, we’ll create a simple resource manually. (In production, you’d typically use resource providers to sync from your infrastructure.) Via Web UI:- Go to your system
- Navigate to “Resources” tab
- Click “Create Resource”
- Fill in:
- Name:
Production Server - Kind:
server - Identifier:
prod-server-1 - Metadata: Add
environment: production
- Name:
Step 3: Create Environments
Environments define logical deployment stages. We’ll create staging and production. Via Web UI:- Go to “Environments” in your system
- Click “Create Environment”
- For Staging:
- Name:
Staging - Resource Selector: Add condition
metadata.environment equals staging
- Name:
- Repeat for Production:
- Name:
Production - Resource Selector: Add condition
metadata.environment equals production
- Name:
Step 4: Create a Job Agent
Job agents execute your deployments. For this quickstart, we’ll use a GitHub Actions agent. Via Web UI:- Go to “Job Agents” in your system
- Click “Create Job Agent”
- Fill in:
- Name:
GitHub Actions Agent - Type:
github
- Name:
id returned - you’ll need it for the next step.
Step 5: Create a Deployment
A deployment represents your application or service. Via Web UI:- Go to “Deployments” in your system
- Click “Create Deployment”
- Fill in:
- Name:
API Service - Slug:
api-service - Description:
Main API service - Job Agent: Select “GitHub Actions Agent”
- Job Agent Config:
- Name:
Step 6: Set Up GitHub Actions Workflow
In your repository, create.github/workflows/deploy.yml:
CTRLPLANE_API_KEY to your GitHub repository secrets!
Step 7: Integrate with CI Build
Now integrate Ctrlplane into your existing build workflow. After building your artifact, create a deployment version: Add to your.github/workflows/build.yml:
Step 8: Trigger Your First Deployment
Now let’s trigger a deployment!- Push code to your
mainbranch - Your CI builds and creates a deployment version in Ctrlplane
- Go to the Ctrlplane UI and navigate to your deployment
- You should see the new version
- Ctrlplane automatically creates releases for both staging and production
- The jobs are dispatched to your GitHub Actions workflow
- Watch the deployment execute!
- Releases: See which versions are deployed to which targets
- Jobs: View job execution status
- Resources: Check which version is currently on each resource
Step 9: Add an Approval Policy (Optional)
Let’s add an approval requirement for production deployments. Via Web UI:- Go to “Policies” in your system
- Click “Create Policy”
- Fill in:
- Name:
Production Approval Required - Add selector: Environment name equals “Production”
- Add rule: Approval required (minimum 1 approval)
- Name:
What You’ve Accomplished
You now have a complete deployment pipeline: ✅ System to organize your deployments✅ Resources representing your infrastructure
✅ Environments for staging and production
✅ A deployment with automatic version creation from CI
✅ Job agent executing deployments via GitHub Actions
✅ Optional approval policy for production
Next Steps
Now that you have the basics working, explore:- Integration Guides - Integrate with other CI/CD systems
- Policies - Set up environment progression, gradual rollouts
- Job Agents - Deploy a Kubernetes job agent for cluster deployments
- Workflows - Learn common deployment patterns
- Variables - Use variables for environment-specific configuration
Troubleshooting
Jobs aren’t being created
- Check that your resource selectors match your resources
- Verify the deployment has a job agent configured
- Look for policy denials in the UI
GitHub Actions workflow not triggering
- Ensure the job agent type is
github - Verify the workflow name in
jobAgentConfigmatches your file - Check that the GitHub app is installed and has permissions
Jobs fail immediately
- Check the job agent configuration
- Verify API key has correct permissions
- Review job logs in the UI for error messages