DevZero Logo
DevZero

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:

  1. Deploy an EKS cluster configured for seamless DevZero integration.
  2. Launch self-hosted DevZero Workspaces and Kubernetes Clusters to kickstart your development projects.
  3. Manage and scale your infrastructure directly on AWS with ease.

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!

Hosting the DevZero Control Plane on AWS EKS

For a detailed overview of the DevZero Control Plane, click here

Control Plane Architecture (AWS EKS)

Modules Overview

1. AWS

The control plane can be deployed on AWS infrastructure, leveraging services like:

  • Amazon EKS for Kubernetes orchestration.

  • Amazon RDS for database management.

  • Amazon S3 for persistent storage.

  • IAM for fine-grained access control.

2. EKS (Elastic Kubernetes Service)

  • Cluster Management: Deploy the control plane using Helm charts or Terraform modules on EKS.

  • Node Groups: Configure scaling policies and node templates to optimize performance and cost.

  • Monitoring: Integrate with Prometheus and Grafana for detailed insights.

3. VPC (Virtual Private Cloud)

  • Configure private and public subnets for secure traffic routing.

  • Set up Internet Gateways, NAT Gateways, and route tables for proper networking.

4. Autoscaler

  • Manage workloads efficiently using Horizontal Pod Autoscalers (HPA) and Cluster Autoscalers.

  • Enable resource scaling based on CPU/memory usage.

5. EFS (Elastic File System)

  • Provide shared, persistent storage for stateful workloads within the control plane.

  • Optimize cost and performance by using lifecycle management policies.

6. DevZero CLI

  • Cluster Interaction: Manage control plane components with commands like devzero start or kubectl integration.

  • Configuration Management: Update or debug settings using CLI commands.

  • Add-ons: Install additional components via devzero addons list.

Prerequisites

The following tools are needed to setup a DevZero Control Plane hosted on EKS:

Permissions Needed

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'

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.

Copy Access Key

First, run this AWS command to configure your account:

aws configure

You will have to enter your aws_access_key and aws_secret_access_key in the input.

Configure AWS

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).

git clone https://github.com/devzero-inc/self-hosted-tf.git
cd self-hosted-tf/examples/aws/control-and-data-plane

Run this to install all the required Providers.

terraform init

Run this to create all the AWS resources such as VPC, EKS, EFS, Autoscaler, etc.

terraform apply

Deploying the Helm Charts

Kubeconfig set up

Set up your local kubeconfig to connect to the EKS cluster:

aws eks update-kubeconfig --region <region> --name <cluster-name>

Helm Registry Credentials

Contact the DevZero team at support@devzero.io to get the helm registry credentials.

helm registry login registry.devzero.io --username <your-username> --password <your-password>

Helm Login

Setting up CRDs

Install the CRDs which are prerequisites to set up a DevZero Control Plane on the EKS cluster.

helm install dz-control-plane-crds oci://registry.devzero.io/devzero-control-plane/beta/dz-control-plane-crds -n devzero --create-namespace

Installing the control plane credentials

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.

Route 53 Domain

Install Helm Charts

Install the helm charts to set up the DevZero control plane.

helm install dz-control-plane oci://registry.devzero.io/devzero-control-plane/beta/dz-control-plane -n devzero --set domain=<domain_name> --set issuer.email=<your_email_address>

Installing the helm charts

Ingress Setup

Get the ingress service in the cluster:

kubectl get ingress -n devzero

Running ingress

Copy the address of your ingress services.

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 *: CNAME Record

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: A Record

Visit the DevZero Dashboard

Go to <your-dz-control-plane-web-host>/dashboard to check out the DevZero UI.

DevZero dashboard

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.