> ## Documentation Index
> Fetch the complete documentation index at: https://www.diadata.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# DIA Test‐Space with Minikube

> Developing, Testing, and Building the DIA platform with Minikube

## Preparing the local files

<Steps>
  <Step title="Clone repo and change directory">
    ```bash theme={"system"}
    git clone git@github.com:diadata-org/diadata.git
    cd diadata
    ```
  </Step>
</Steps>

## Preparing a local cluster

> Note: Minikube runs on a virtualization layer on the host. The [docker](https://minikube.sigs.k8s.io/docs/drivers/docker/) driver is usually the recommended and default option and should be seen as a requirement. For other supported drivers, please refer to [Minikube's official documentation](https://minikube.sigs.k8s.io/docs/drivers/). You can also check [Minikube's handbook](https://minikube.sigs.k8s.io/docs/handbook/) for advanced command usage.

<Steps>
  <Step>
    First, install dependencies: [Minikube](https://github.com/kubernetes/minikube#installation) and [Docker](https://www.docker.com/).
  </Step>

  <Step>
    Next, start the development environment by running the following command to start a Minikube node:

    ```bash theme={"system"}
    ./testenv.sh start
    ```
  </Step>

  <Step>
    Build the necessary service containers by executing the following commands:

    ```bash theme={"system"}
    ./testenv.sh build
    ```
  </Step>

  <Step>
    Run the installation script to set up the necessary services (Redis cache, Kafka streams, PostgreSQL, and InfluxDB databases) by executing the following commands:

    ```bash theme={"system"}
    ./testenv.sh install
    ```

    Now that you have the local cluster running, you are ready to start.
  </Step>

  <Step>
    Import the test data from the diadata snapshot service. This requires the default structure to be empty and created inside the postgres server. The script will automatically download the snapshot, install it and remove the downloaded snapshot again:

    ```bash theme={"system"}
    ./testenv.sh snapshot
    ```
  </Step>
</Steps>

## Other useful commands

To stop the cluster:

```bash theme={"system"}
./testenv.sh stop
```

To delete the cluster node:

```bash theme={"system"}
./testenv.sh delete
```
