Skip to content

Latest commit

 

History

History
113 lines (82 loc) · 3.53 KB

SETUP_GUIDE.adoc

File metadata and controls

113 lines (82 loc) · 3.53 KB

Setup Guide

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!

Get the Source Code

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.

  1. Download the Repository

  2. Move inside the repository

System Requirements

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.

Dependencies

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

Pre-Commit [optional]

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.

Installation
  1. Create and checkout virtual environment

  2. Install required packages from requirements.txt

  3. Run pre-commit install to register the provided git hooks

Pre-commit requires commitlint to be installed. To install commitlint run npm install.

Docker

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.

MQTT Broker

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
  1. Required to communicate with another Elastic-AI container

  2. Default Port for unsecured MQTT Communication

  3. Decrease the Log Level to prevent unnecessary logging

  4. Run the Container in the background

IDE

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.