DeMi Release
The DeMi release provides a collection of microservices and additional tools to operate the detector. The microservices are designed to be deployed in a containerized environment, allowing for easy scaling and management. The release includes the following stacks:
| Stack | Description |
|---|---|
| analysis-manager | Web-UI for orchestration of the analysis of scan results from a ConfigDB runkey |
| configdb | Central Database for storing and managing configuration and scan data for the detector microservices system |
| daqapi | Web-UI for orchestration of the data acquisition system based on configdb runkeys |
| dashboard | Web-based dashboard for the detector microservices and tools |
| dockge | Web-UI for orchestration of the docker containers |
| dozzle | Web-UI for monitoring the logs of the docker containers |
| felix | Operation and Monitoring of FELIX apps |
| felix-monitor | The official FELIX monitoring stack (Promoetheus and Grafana) |
| optoboard | Monitoring and operation of the Optoboards |
| pdb | API providing access to the production database |
| postgres | Backend database for the configdb |
| rabbitmq | Message broker for the detector microservices system |
| registry | Container registry for the detector microservices system, enabling communication between the microservices |
| wud | Web-UI for keeping the containers up to date |
For more information on the individual stacks, please refer to the respective README files in the corresponding repositories.
FAQ
For frequently asked questions and troubleshooting, please refer to the DeMi documentation FAQ section.
Prerequisites
As our microservices are typically deployed using containers, having docker installed is a prerequisite. A guide on how to install docker can be found in the demi-docs.
Creating the docker network
For the microservices to communicate with each other, a docker network is needed. This can be created with the following command:
docker network create deminet
Clone the DeMi release
To be able to run the microservices stacks, you need to clone the DeMi release from the git repository.
git clone https://gitlab.cern.ch/demi/itkpix/release.git
Starting the stacks
Setting up the local environment
To bring up the containers, first configure your local environment.
This can be done with the config scripts in the root directory of the release.
There is a bash version and a new Python version of the script.
BASH config
The script will create a .env file in the current directory, which contains the necessary environment variables for the containers.
The script will also copy these files into all the stacks dirs, allowing the stacks to be started seperately.
./config
| Variable | Description |
|---|---|
| HOST | Hostname of your system |
| PUID | UID of your user |
| PGID | GID of your user |
| PTZ | Timezone of your system |
| SITE | Name of your local site |
| BASE_DIR | Directory in which the stacks are located, needed for dockge tool |
| ITK_DEMO_SW_REGISTRY | URL to the gitlab group containing the microservices repositories |
Python config
Alternatively the Python version of the config script can be used. It is still a single file, but uses PEP 723 inline metadata to install dependencies.
It can be run using uv and needs Python 3.12.
To install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
To install Python 3.12 system wide from the AlmaLinux 9 distribution:
sudo dnf install python3.12
To install Python 3.12 in the user home using uv:
uv python install 3.12
Then, to run the config script:
./config.py
Starting the containers
You can bring up the backing services needed to operate the microservices by running the following command from the root directory of the DeMi release:
docker compose -f services.compose.yaml up -d
To bring up the rest of the microservices (including the optoboard, FELIX, analysis-manager, and the DAQ-UI), you can run the following command:
docker compose up -d
These commands will start all the containers listed in the compose.yaml file. You can comment out/in the stacks you do want to start.
Alternatively, you can start each stack individually like this:
docker compose -f stacks/<stack_name>/compose.yaml up -d
Creation of examplary runkey for analysis-manager
To test the functionality of the analysis-manager stack (and the runkey-UI), you can create an exemplary runkey in the configdb. This topic is covered by the configdb-tutorial, you can find in the tutorial repository.
Accessing the UIs
The easiest way to access the different UIs and APIs is via the dashboard. The dashboard is a web-based interface that provides access to all the different stacks. To access the dashboard, open your web browser and navigate to the following URL:
http://hostname:80/
Additional instructions
For additonal instructions on how to use the different UIs and API, please refer to their respective README files in the corresponding repositories or the DeMi documentation
Feedback
As the microservices are still in development, we are looking for feedback. If you have any suggestions or encounter any issues, feel free to contact us via the respective channel in the itksw Mattermost.