Aller au contenu

Setup the development environment

This guide provides comprehensive instructions for setting up a local development environment and contributing code to the Kunai project.

Prerequisites

The following tools are required for local development:

  • Kind: Kubernetes IN Docker.
  • Keycloak: For authentication.
  • FluxCD: For GitOps.
  • CAPI (Cluster API): For cluster management.
  • Docker: Container runtime.
  • Operating System: Linux. Kunai's development setup is currently Linux-based.
  • Hardware: 4 CPU cores, 8 GB RAM, 40GB disk
  • Ports: 80 and 443 must be available.

These prerequisites will be automatically installed during the environment setup process except docker which nned to be present.

Development Environment Setup

Info

If you are experiencing low disk space due to Docker layers, you can free up space by executing the following command to remove unused Docker images, volumes, and networks:

docker system prune -a --volumes

Note: This command will delete all unused data, so ensure that you do not need any of the images or volumes before running it.

DNS Configuration

  1. Obtain your machine's IP address:

    ip a
    
  2. Add the following entries to your /etc/hosts file, replacing <YOUR_MACHINE_IP> with your actual IP:

    <YOUR_MACHINE_IP> kunai.local
    <YOUR_MACHINE_IP> keycloak.local
    

Installation

  1. Navigate to the hacks directory:

    git clone https://gitlab.com/sylva-projects/sylva-elements/kunai.git
    cd kunai/hacks
    
  2. Execute the setup script:

    ./kind-with-registry.sh
    

Running the Application

  1. From the project root directory, run:

    tilt up
    
  2. Follow the on-screen instructions to access the application.