JetBrains CodeCanvas 2025.1 Help

Single-Cluster Installation to Amazon EKS (CloudFormation)

This guide describes how to install the CodeCanvas application to a Kubernetes cluster hosted in AWS EKS (Elastic Kubernetes Service) using AWS CloudFormation.

The single-cluster installation implies that the CodeCanvas application and dev environment infrastructure are deployed to a single Kubernetes cluster. Learn more

This installation uses Karpenter to provision EC2 instances automatically based on resource requests from running pods. This means you don't need to choose specific EC2 instance types: Karpenter selects the most appropriate nodes to meet the requirements of the deployed workloads.

I. Prerequisites

  • Access to an AWS account with permissions to create CloudFormation stacks.

  • AWS CLI (optional, for troubleshooting).

II. Install CodeCanvas using CloudFormation

  1. Log in to your AWS account and open the CodeCanvas CloudFormation template.

  2. By default, the CloudFormation template will install CodeCanvas in the eu-west-1 region. If needed, you can change the region in the AWS Console using the top-right region selector.

  3. In the template settings:

    • Specify a unique Stack name.

    • In Deployment Type, select Single-Cluster.

    • Keep all other parameters as default.

      The default settings work for most installations. However, if you need more control over networking and access, you can adjust the following parameters:

      EKS Cluster Configuration
      • Additional EKS admin role – Allows specifying an additional IAM role for cluster administration.

      Network Configuration

      The installation creates a Virtual Private Cloud (VPC) with a structured network layout to ensure high availability. The network is divided into six subnets, evenly distributed across three Availability Zones (AZs):

      • Three public subnets with internet access.

      • Three private subnets with no direct external access.

      Each AZ receives one public and one private subnet. You can customize the VPC address range and subnet size using the parameters below.

      • VPC CIDR Block – Defines the address range for the VPC. Ensure that this CIDR block can be split into six subnets according to the specified Subnet Mask. Default: 10.0.0.0/16

      • Subnet Mask – Defines the size of each subnet within the VPC. Default: /20 (each subnet gets 4096 IP addresses)

    You can keep the default settings for the rest of the parameters or adjust them if needed.

  4. Review the settings, acknowledge required capabilities, and click Create stack.

    The stack creation process will begin.

  5. Once the stack creation is complete, go to the Outputs tab. This tab contains important information about the created resources:

    • CodeCanvasInitAdminPassword – the initial password for the admin user. Copy this password and store it securely. You will need it when you first log in to the CodeCanvas application.

    • CodeCanvasMasterSecret – the encryption key used to secure sensitive data in the database. This value is not shown in the CloudFormation UI.

      To retrieve the master secret:

      1. Open AWS CloudShell or use any terminal where you have kubectl access to the EKS cluster.

      2. Run the following command:

        kubectl --namespace=codecanvas-app get secret codecanvas-app-envs -o jsonpath="{.data.MASTER_SECRET}" | base64 -d

      Store the Master Secret securely (e.g., in a password manager). It is required to restore the database in a new environment or to reinstall CodeCanvas with an existing database.

    • CodeCanvasURL – the URL to access the CodeCanvas UI.

    • EKSClusterName – the name of the EKS cluster created for the CodeCanvas app.

    • RDSSecretArn – the ARN (Amazon Resource Name) of the AWS Secrets Manager secret that contains the database credentials.

III. Verify the installation

  1. Copy the admin password on the Outputs tab and open the CodeCanvas URL in a browser.

  2. Log in using the following credentials:

    • Username: admin

    • Password: (paste the copied password)

IV. Activate CodeCanvas

Follow the instructions on how to activate your CodeCanvas instance.

V. (Optional) Configure a computing platform

In CodeCanvas, a computing platform represents the infrastructure used to run dev environments. It includes a Kubernetes cluster with the CodeCanvas operator, a Relay, and a Jump server.

In a single-cluster installation, all components of the computing platform (the operator, the Relay, and the Jump server) are installed in the same Kubernetes cluster with the CodeCanvas application. However, if your organization grows or needs to support developers in other regions, you can scale the infrastructure by adding more computing platforms.

The easiest way to create a cluster for a new computing platform is to reuse the same CloudFormation template. After that, you can connect the new cluster to CodeCanvas and finish platform configuration. See the instructions below.

  1. Log in to your AWS account and open the CodeCanvas CloudFormation template.

  2. In the template settings:

    • Provide a unique Stack name.

    • In Deployment Type, select Dev-Environment-Cluster.

    • Leave other parameters with default values or adjust as needed.

    You can keep the default settings for the rest of the parameters or adjust them if needed.

  3. Review the settings and click Create stack.

    The stack creation process will begin.

  4. Once the stack is created, open CodeCanvas and go to Administration | Computing Platforms.

  5. Follow the steps in the Distributed Installation documentation to configure the computing platform: deploy the operator in the newly created cluster and create a Jump and a Relay server.

VI. Post-installation steps

After successfully verifying the installation, you can proceed to configuration of your CodeCanvas instance: creating dev environment instance types, adding users, namespaces, and so on.

02 April 2025