githubEdit

Dev Container

This page contains the configuration for a development container that provides a consistent environment for working with Terrakube.

The devcontainer includes all the necessary tools and dependencies to develop both the Java backend, TypeScript frontend components and includes terraform CLI.

circle-info

The below was tested using Ubuntu-based distribution and Windows 11 with Firefox browser.

Features

  • Java 25 (Liberica)

  • Maven 3.9.9

  • Node.js 22.x with Yarn

  • VS Code extensions for Java, JavaScript/TypeScript

Getting Started

Prerequisites

Local Development Domains

To use the devcontainer we need to setup the following domains in our local computer:

terrakube.platform.local
terrakube-api.platform.local
terrakube-registry.platform.local
terrakube-dex.platform.local

HTTPS Local Certificates

Install mkcertarrow-up-right to generate the local certificates.

To generate local CA certificate execute the following:

Local DNS entries

Update the /etc/hosts or C:\Windows\System32\drivers\etc\hosts file adding the following entries:

Opening the Project in a Dev Container

  • Clone the Terrakube repository and run the project:

  1. When prompted to "Reopen in Container", click "Reopen in Container". Alternatively, you can:

    • Press F1 or Ctrl+Shift+P

    • Type "Remote-Containers: Reopen in Container" and press Enter

  2. Wait for the container to build and start. This may take a few minutes the first time.

  3. Start all Terrakube component

  4. Terrakube should be availabe with the following url https://terrakube.platform.local using [email protected] with password admin

Windows devcontainer

Sometimes in windows the postCreateCommand fails because of how windows manage the new lines characters

To fix this it is required to open a terminal in VS Code and run the following:

Running Terrakube

Ports

The devcontainer forwards the following ports:

  • 8080: Terrakube API

  • 8075: Terrakube Registry

  • 8090: Terrakube Executor

  • 3000: Terrakube UI

  • 80/443: Traefik Gateway

Customization

You can customize the devcontainer by modifying:

  • .devcontainer/devcontainer.json: VS Code settings and extensions

  • .devcontainer/Dockerfile: Container image configuration

Last updated

Was this helpful?