eu-nebulous / optimiser-controller

Mozilla Public License 2.0
0 stars 0 forks source link

The NebulOuS optimizer controller

This module serves two purposes:

The nebulous-requirements-extractor library

This library offers the utility class KubevelaAnalyzer that extracts component requirements from KubeVela files. This code is used both in the optimiser-controller and in other components of the NebulOuS optimiser.

The library will be built and deployed automatically as part of the build process of the optimiser-controller.

Building

To compile, install a JDK (Java Development Kit) version 17 or greater on the build machine.

# Compile:
./gradlew assemble
# Compile and test:
./gradlew build

Building the container

A container can be built and run with the following commands:

docker build -t optimiser-controller -f Dockerfile .
docker run --rm optimiser-controller

Running

To run, install a JRE (Java Runtime Environment) version 17 or greater.

A successful build creates the jar file dist/optimiser-controller-all.jar. This file is self-contained and can be executed via the following command:

java -jar optimiser-controller/dist/optimiser-controller-all.jar

Running in jshell

The command ./gradlew --console plain jshell opens a REPL (read-eval-print loop) with the package eu.nebulous.optimiser.controller pre-imported. On the REPL, one can write Java snippets such as:

SalConnector conn = new SalConnector(new URI("http://localhost:8088"));
conn.isConnected();

For command-line editing and history support, use the rlwrap command: rlwrap ./gradlew --console plain jshell.