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
Once you have created a fork you need to create a new branch to work for any new Terrakube feature
Open a new GitHub workspace using "new with options"
Select a 4 CPU configuration like the following.
Dev Containers setup will take a couple of minutes.
Once the environment setup is completed, you will see the following message
Now we can run the new development environment
You need to accept using the Java "Standard Mode".
The Dev Containers environment will download all the maven dependencies, this could take a couple of minutes
Once all dependencies are downloaded, you can see the four component running like the following
If not you can simply start the ui, api, registry and executor one by one using the following menu
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.
Example:
In the end it should look like this using public ports:
The development environment automatically creates "DEVCONTAINER.md" that contains all the URL for each component.
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.
You will see a message like this and click "continue"
Once you click continue
You need to do the same for the other components: api, registry, executor and dex
Now you can go back to the UI and click "Sign in"
This will redirect you to dex where you can use "admin@example.com" and "admin" to complete the login.
Grant Dex access
Now you can start testing the development environment and do any required changes
If you need to update the code for any java component, you can simply click "Stop"
Start a new instance
Once all the changes are completed, we pick the files an push the changes to our feature branch
You can return to GitHub and create a new pull request to the Terrakube main repository
In the end the pull request will look like this.
Now you have completed your open source contribution to Terrakube 🙂
Finally you can go to GitHub and delete your codespace.