This guide aims to provide a detailed description on how to setup your development environment and contribute to this code base.
❗
|
This Guide assumes you are using a UNIX-like System and have git already installed!
|
At first, you have to download the source code from GitHub. This can be archived by running
git clone https://github.com/es-ude/elastic-ai.runtime.cloud.git cloud #(1)
cd cloud #(2)
in your terminal.
-
Download the Repository
-
Move inside the repository
To determine if all required tools are installed, it is recommended to run
./test_setup.sh
in your terminal. If you have missing dependencies, this script will show which are missing.
- Java Development Kit (JDK) version 22
-
→ Java Compiler and Runtime Environment
Can be installed via your local package manager like dnf, apt or brew. - Docker
-
→ Runtime for Container Execution
Can be installed based on the Docker Installation Guide
To ensure our guidelines, we recommend using Commitlint in combination with Pre-Commit. To assure you don’t corrupt your system we recommend installing the dependencies inside a virtual environment.
-
Create and checkout virtual environment
-
Install required packages from requirements.txt
-
Run
pre-commit install
to register the provided git hooks
❗
|
Pre-commit requires commitlint to be installed.
To install commitlint run npm install .
|
The project depends on the Docker-CLI to run the integration tests, because a local MQTT Broker is required.
💡
|
To ease your access to the docker-daemon, we recommend using a rootless docker instance. |
We use the HiveMQ-CE Broker for our Examples. A HiveMQ-CE Broker instance can be started locally via Docker:
docker run \
--network=runtime-network \ #(1)
--publish 1883:1883 \ #(2)
--name hivemq-ce \
--env HIVEMQ_LOG_LEVEL=INFO \ #(3)
--detach \ #(4)
hivemq/hivemq-ce
-
Required to communicate with another Elastic-AI container
-
Default Port for unsecured MQTT Communication
-
Decrease the Log Level to prevent unnecessary logging
-
Run the Container in the background
We recommend using IntelliJ IDEA as your IDE, because this is our standard IDE and all necessary configurations are distributed with this repository.
Start IntelliJ IDEA and import the repository folder as a new project. When IntelliJ IDEA has opened the project, it will download all required dependencies from Gradle.