Skip to content

Latest commit

 

History

History
140 lines (71 loc) · 6.41 KB

File metadata and controls

140 lines (71 loc) · 6.41 KB

Terrakube GitHub codespaces.

GitHub Codespaces

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

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

  • Java 25 (Liberica)
  • Maven 3.9.9
  • Node.js 24.x with Yarn
  • VS Code extensions for Java, JavaScript/TypeScript

Prerequisites

  • GitHub Account

Prepare project

The first step is to create a GitHub fork to work with Terrakube

image

Once you have created a fork you need to create a new branch to work for any new Terrakube feature

image

Open a new GitHub workspace using "new with options"

image

Select a 4 CPU configuration like the following.

image

Dev Containers setup will take a couple of minutes.

image

Once the environment setup is completed, you will see the following message

image

Now we can run the new development environment

image

You need to accept using the Java "Standard Mode".

image

The Dev Containers environment will download all the maven dependencies, this could take a couple of minutes

image

Once all dependencies are downloaded, you can see the four component running like the following

image

If not you can simply start the ui, api, registry and executor one by one using the following menu

image

After we have the components running, we need to change the port configuration, we need to make sure Dex, the api, registry and ui are using public ports.

image

Example:

image

In the end it should look like this using public ports:

image

The development environment automatically creates "DEVCONTAINER.md" that contains all the URL for each component.

image

You will need to visit the URL for dex, ui, api and registry in order to accept that we need to use a public port for our environment.

image

You will see a message like this and click "continue"

image

Once you click continue

image

You need to do the same for the other components: api, registry, executor and dex

image

Now you can go back to the UI and click "Sign in"

image

This will redirect you to dex where you can use "admin@example.com" and "admin" to complete the login.

image

Grant Dex access

image

Now you can start testing the development environment and do any required changes

image

If you need to update the code for any java component, you can simply click "Stop"

image

Start a new instance

image

Once all the changes are completed, we pick the files an push the changes to our feature branch

image

You can return to GitHub and create a new pull request to the Terrakube main repository

image

In the end the pull request will look like this.

image

Now you have completed your open source contribution to Terrakube 🙂

Finally you can go to GitHub and delete your codespace.

image