Control Plane
Self-hosting a DevZero Control Plane on AWS EKS.
By following this guide, you'll set up the Control Plane software in a region hosted on AWS EKS, enabling you to:
- Deploy an EKS cluster configured for DevZero integration.
- Launch self-hosted DevZero Workspaces and Kubernetes Clusters to kickstart your development projects.
- Automatically scale your application's infrastructure on AWS
This step-by-step guide will walk you through creating an AWS EKS cluster, deploying DevZero Helm charts, and integrating your setup with the DevZero dashboard allowing your team to quickly start building in a production-like environment.
Let's get started with creating an AWS EKS cluster, deploying DevZero Helm charts, and integrating your setup with the DevZero dashboard, so that you can start building in a production-like environment.
Hosting the DevZero Control Plane on AWS EKS
For a detailed overview of the DevZero Control Plane, click here
Prerequisites
The following tools are needed to setup a DevZero Control Plane hosted on EKS:
Permissions Required
Check out the Required Permissions on AWS
Also see Data Plane Permissions
Setting up Control Plane on the self-hosted Cluster
Configuring AWS CLI to interact with your AWS account locally
Create aws_access_key
and aws_secret_access_key
from IAM Console.
Select Security Credentials of your user and click on 'Create Access Key'
Set the usecase as CLI and give it a description in the next panel.
After creating the keys, copy them to configure your AWS CLI locally.
First, run this AWS command to configure your account:
You will have to enter your aws_access_key
and aws_secret_access_key
in the input.
You are now logged in to your AWS acount.
Setting up the Infrastructure
Clone this repository which contains all the Terraform configuration to set up the infrastructure (and change into that directory).
Contact DevZero Support if you don't have access to the repository.
If you already have an existing VPC and want to use it for your Terraform deployment, Open the terraform.tfvars
file in the Terraform project directory and update it with your VPC and subnet IDs. Since you're using an existing VPC, you need to tell Terraform not to create a new one. Set create_vpc
to false
.
Skip this step and allow Terraform to create a new VPC automatically. The default setup will handle VPC creation if create_vpc
is set to true
.
Set cluster_endpoint_public_access
to true
if you want to access the EKS cluster from the public internet else set it to false
for private access.
Run this to create the AWS resources such as VPC, EKS, ALB, VPN, etc.
Copy the cluster name, VPC ID and the Subnet IDs from the output for the next step.
Go to cluster-extension
directory and update the terraform.tfvars
.
Update the VPC ID, Subnet IDs, Region and the EKS cluster name from the previous step.
Run this Terraform in cluster-extension
to create EKS Addons, Storage Class and EFS.
Deploying the Control Plane
Kubeconfig set up
Set up your local kubeconfig to connect to the EKS cluster using the region and cluster name from the terraform output:
DockerHub Credentials
Contact the DevZero team at support@devzero.io to get the DockerHub credentials.
Setting Up the Dependencies
Go to the dz-control-plane-deps
directory to install the dependencies which are prerequisites to set up a DevZero Control Plane on the EKS cluster.
If you are using private subnets and all of your traffic is routed through the VPN (private network). You should modify the values/ingress-nginx_overrides.yaml
to reflect your configuration, but usually it should be something like this:
Modify the Grafana values too values/grafana_overrides.yaml
:
Run make install
after the changes.
Set up your Route 53 Domain
Ignore this step if you already have a domain. But if you don't have one, register a domain on AWS Route 53.
Install the Control Plane
Go to the dz-control-plane
directory to install the control plane. Contact the DevZero team at support@devzero.io to get the DockerHub credentials to install and set up the DevZero control plane.
Make sure to update the values.yaml
in dz-control-plane
directory with your domain
, credentials
(email
, username
and password
), and thelicenseKey
in backend
.
If your applications are behing private network and your are not using lets encrypt to issue certificates you should modify values.yaml
and change all ingress references from what we currently have to this:
This removes the annotations for cluster issuer and tls secrets as we potentially want to terminate SSL on the cluster. Now you can run make install
Create new Records in Route 53
Create a CNAME record and add the address of your ingress service in the value. Set the record name as *
:
Create an A record with an alias. Keep Subdomain empty, route traffic to Alias to Application and Classic Load Balancer
. Set dualstack.<your-ingress-service-address>
as the load balancer:
Visit the DevZero Dashboard
Go to <your-dz-control-plane-web-host>/dashboard
to check out the DevZero UI.
Setting up Data Plane on a self-hosted EKS cluster
To set up the data plane in the same cluster, follow the guide for Setting up the Data Plane in AWS EKS from here.