Skip to content
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
88522d6
Minor Quickstart refactoring
Dec 5, 2024
d64bb8c
Merge changes from master branch
Dec 5, 2024
b33711b
Additional remove commands for actions, conditions, sessions, rules t…
Dec 5, 2024
9633313
Initial working OpenSearch implementation. Basic functionality is wor…
Dec 5, 2024
542e185
Merges from master
Dec 5, 2024
9a2a6c4
Bump all versions to 2.7
Dec 5, 2024
d3f3d52
Merge remote-tracking branch 'origin/master' into opensearch-persistence
Dec 5, 2024
fd3d315
Fix interface in blueprint descriptor
Dec 7, 2024
157e195
Fix interface in blueprint descriptor
Dec 7, 2024
aad652b
Fix interface in blueprint descriptor
Dec 7, 2024
e3fc559
- Fix issues with integration tests, ES tests now work 100%
Dec 17, 2024
0213604
- Remove old build scripts
Dec 17, 2024
88bfdc1
- Add new conditions bundle for ElasticSearch-specific conditions
Dec 20, 2024
16c6de9
Work on making integration tests work with OpenSearch:
Dec 22, 2024
8b6da3d
Work on making integration tests work with OpenSearch:
Dec 22, 2024
11c64e2
Add missing ASL header
Dec 22, 2024
4675847
- Introduce new ProgressListener system to indicate the current progr…
Dec 31, 2024
dc14b20
- Introduce new ProgressListener system to indicate the current progr…
Dec 31, 2024
00584ac
- Small cosmetic changes to the progress listener's top 10 slowest te…
Dec 31, 2024
1746cbe
- Add auto-start and no-karaf options to build script
Jan 2, 2025
f38336c
- Fix NO_COLOR handling
Jan 2, 2025
3827c24
- Add support for OpenSearch in docker images
Jan 3, 2025
c277570
- Improve plugin documentation to explain how to implement plugins fo…
Jan 5, 2025
1f7e585
- Add support for OpenSearch in docker images
Jan 6, 2025
9398f38
Merge remote-tracking branch 'origin/master' into opensearch-persistence
Jan 6, 2025
43016ca
Change max parallel stragegy to 1 to avoid port conflicts
Jan 6, 2025
e2125d6
- Make the search port configurable so that we can avoid conflicts be…
Jan 7, 2025
e4d021b
Update persistence-opensearch/conditions/src/main/java/org/apache/uno…
Feb 4, 2025
13b8018
Update persistence-opensearch/conditions/src/main/java/org/apache/uno…
Feb 4, 2025
1706f2b
Update persistence-opensearch/conditions/src/main/java/org/apache/uno…
Feb 4, 2025
65d035e
Update persistence-opensearch/core/src/main/java/org/apache/unomi/per…
Feb 4, 2025
43933c9
Merge remote-tracking branch 'origin/master' into opensearch-persistence
Oct 13, 2025
e73b3a0
Merge remote-tracking branch 'origin/master' into opensearch-persistence
Oct 13, 2025
591dd9d
- Remove Claude config file
Oct 13, 2025
b5e7c80
Fix some minor dependencies
Oct 13, 2025
52b8644
Make sure all OpenSearch documentation points to v3
Oct 13, 2025
76266de
Fix Unomi version in documentation
Oct 13, 2025
179927c
Refactor entrypoint.sh to build node URLs array for both OpenSearch a…
Oct 13, 2025
6a12089
Added a maximum number of retries to address issued raised during cod…
Oct 13, 2025
66bcd84
To address issue in code review, made sure we output to both the logg…
Oct 13, 2025
9f4e1b9
Enhance ProgressListener with detailed JUnit test run reporting featu…
Oct 13, 2025
4158fd0
Enhance ProgressSuite with detailed documentation and improved test m…
Oct 13, 2025
e037e71
Update RuleServiceIT to clarify default condition and action settings…
Oct 13, 2025
ea26460
Update healthcheck configuration to correct HTTP client settings for …
Oct 13, 2025
fc881bf
Update Unomi version in quickstart and migration documentation from 2…
Oct 13, 2025
3703d7c
Clarify integration test impact of Maven profile selection for OpenSe…
Oct 13, 2025
ce7c0b8
Update setenv.sh to modify KARAF_OPTS for OpenSearch integration and …
Oct 13, 2025
ddfbf1e
Refactor PropertyConditionEvaluator to use foldToASCII for string com…
Oct 13, 2025
d7da93b
Revert IPv6 fix
Oct 13, 2025
71368be
Refactor monthly index properties to rollover properties in configura…
Oct 14, 2025
ced81c5
Quick fix on description
Oct 14, 2025
d5e3f81
Refactor error handling in HealthCheckIT and OpenSearchPersistenceSer…
Oct 14, 2025
63d34f5
Revert test unit runner to default one, will introduce new ProgressLi…
Oct 14, 2025
65cf66e
- Rename all query builder IDs to no longer use a reference to Elasti…
Oct 14, 2025
f1f3e76
Add detailed Javadoc comments to aggregation and condition interfaces…
Oct 14, 2025
88d5aef
- Removed non OpenSearch specific changes
Oct 14, 2025
e8ca52a
Update CI workflow to use actions/setup-java@v4 and improve OpenSearc…
Oct 14, 2025
17adcff
Implement legacy query builder ID mapping for backward compatibility …
Oct 15, 2025
a6c8851
Refactor ConditionESQueryBuilderDispatcher and ConditionOSQueryBuilde…
Oct 15, 2025
13daeaf
Run the build serially to avoid parallel interference
Oct 15, 2025
91fd3ff
Merge branch 'master' into opensearch-persistence
sergehuber Nov 13, 2025
cd118d1
Update new poms to version 3.1.0
Nov 13, 2025
6d63ae0
Refactor condition query builder dispatchers to extend a new base cla…
Nov 28, 2025
0b0321f
Merge branch 'master' into opensearch-persistence
sergehuber Nov 28, 2025
b78ade3
Merge branch 'master' into opensearch-persistence
sergehuber Nov 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions .github/workflows/unomi-ci-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,56 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 17
cache: maven
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Build and Unit tests
run: mvn -U -ntp -e clean install

integration-tests:
name: Execute integration tests
needs: unit-tests
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
include:
- search-engine: elasticsearch
port: 9400
- search-engine: opensearch
port: 9401
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 17
cache: maven
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Integration tests
run: mvn -ntp clean install -Pintegration-tests
run: |
FLAGS="-Pintegration-tests"
if [ "${{ matrix.search-engine }}" = "opensearch" ]; then
# Trigger OpenSearch profile activation via property; do not pass any -P profile toggles
FLAGS="$FLAGS -Duse.opensearch=true"
fi
mvn -ntp clean install $FLAGS \
-Dopensearch.port=${{ matrix.port }} \
-Delasticsearch.port=${{ matrix.port }}
- name: Archive code coverage logs
uses: actions/upload-artifact@v4
if: false # UNOMI-746 Reactivate if necessary
with:
name: unomi-code-coverage-jdk17-${{ github.run_number }}
name: unomi-code-coverage-jdk17-${{ matrix.search-engine }}-${{ github.run_number }}
path: itests/target/site/jacoco
- name: Archive unomi logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: unomi-log-jdk17-${{ github.run_number }}
name: unomi-log-jdk17-${{ matrix.search-engine }}-${{ github.run_number }}
path: |
itests/target/exam/**/data/log
itests/target/elasticsearch0/data
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/NOTICE-generated
.settings
.vscode
target
.classpath
.project
Expand All @@ -16,4 +17,5 @@ rest/.miredot-offline.json
/extensions/salesforce-connector/test.properties
**/*.versionsBackup
itests/src/main
.mvn/.develocity/develocity-workspace-id
dependency_tree.txt
.mvn/.develocity/develocity-workspace-id
63 changes: 54 additions & 9 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ required Unomi tarball.

## Launching docker-compose using Maven project

Unomi requires ElasticSearch so it is recommended to run Unomi and ElasticSearch using docker-compose:
Unomi requires a search engine (ElasticSearch or OpenSearch) so it is recommended to run Unomi and the search engine using docker-compose:

```
mvn docker:start
```

You will need to wait while Docker builds the containers and they boot up (ES will take a minute or two). Once they are
You will need to wait while Docker builds the containers and they boot up (the search engine will take a minute or two). Once they are
up you can check that the Unomi services are available by visiting http://localhost:8181 in a web browser.

## Manually launching ElasticSearch & Unomi docker images
## Manually launching Search Engine & Unomi docker images

If you want to run it without docker-compose you should then make sure you setup the following environments properly.

Expand All @@ -48,21 +48,66 @@ For ElasticSearch:
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.4.2
docker network create unomi
docker run --name elasticsearch --net unomi -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e cluster.name=contextElasticSearch docker.elastic.co/elasticsearch/elasticsearch:7.4.2

For OpenSearch:

docker pull opensearchproject/opensearch:3.0.0
docker network create unomi
export OPENSEARCH_ADMIN_PASSWORD=enter_your_custom_admin_password_here
docker run --name opensearch --net unomi -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_ADMIN_PASSWORD} opensearchproject/opensearch:3.0.0

For Unomi:
For Unomi (with ElasticSearch):

docker pull apache/unomi:3.0.0-SNAPSHOT
docker run --name unomi --net unomi -p 8181:8181 -p 9443:9443 -p 8102:8102 \
-e UNOMI_ELASTICSEARCH_ADDRESSES=elasticsearch:9200 \
apache/unomi:3.0.0-SNAPSHOT

docker pull apache/unomi:2.0.0-SNAPSHOT
docker run --name unomi --net unomi -p 8181:8181 -p 9443:9443 -p 8102:8102 -e UNOMI_ELASTICSEARCH_ADDRESSES=elasticsearch:9200 apache/unomi:2.0.0-SNAPSHOT
For Unomi (with OpenSearch):

## Using a host OS ElasticSearch installation (only supported on macOS & Windows)
docker pull apache/unomi:3.0.0-SNAPSHOT
docker run --name unomi --net unomi -p 8181:8181 -p 9443:9443 -p 8102:8102 \
-e UNOMI_AUTO_START=opensearch \
-e UNOMI_OPENSEARCH_ADDRESSES=opensearch:9200 \
-e UNOMI_OPENSEARCH_PASSWORD=${OPENSEARCH_ADMIN_PASSWORD} \
apache/unomi:3.0.0-SNAPSHOT

## Using a host OS Search Engine installation (only supported on macOS & Windows)

For ElasticSearch:

docker run --name unomi -p 8181:8181 -p 9443:9443 -p 8102:8102 -e UNOMI_ELASTICSEARCH_ADDRESSES=host.docker.internal:9200 apache/unomi:2.0.0-SNAPSHOT
docker run --name unomi -p 8181:8181 -p 9443:9443 -p 8102:8102 \
-e UNOMI_ELASTICSEARCH_ADDRESSES=host.docker.internal:9200 \
apache/unomi:3.0.0-SNAPSHOT

For OpenSearch:

docker run --name unomi -p 8181:8181 -p 9443:9443 -p 8102:8102 \
-e UNOMI_AUTO_START=opensearch \
-e UNOMI_OPENSEARCH_ADDRESSES=host.docker.internal:9200 \
-e UNOMI_OPENSEARCH_PASSWORD=${OPENSEARCH_ADMIN_PASSWORD} \
apache/unomi:3.0.0-SNAPSHOT

Note: Linux doesn't support the host.docker.internal DNS lookup method yet, it should be available in an upcoming version of Docker. See https://github.com/docker/for-linux/issues/264

## Environment Variables

### Common Variables
- `UNOMI_AUTO_START`: Specifies the search engine type (`elasticsearch` or `opensearch`, defaults to `elasticsearch`)

### ElasticSearch-specific Variables
- `UNOMI_ELASTICSEARCH_ADDRESSES`: ElasticSearch host:port (default: localhost:9200)
- `UNOMI_ELASTICSEARCH_USERNAME`: Optional username for ElasticSearch
- `UNOMI_ELASTICSEARCH_PASSWORD`: Optional password for ElasticSearch
- `UNOMI_ELASTICSEARCH_SSL_ENABLE`: Enable SSL for ElasticSearch connection (default: false)

### OpenSearch-specific Variables
- `UNOMI_OPENSEARCH_ADDRESSES`: OpenSearch host:port (default: localhost:9200)
- `UNOMI_OPENSEARCH_PASSWORD`: Required admin password for OpenSearch (SSL and authentication are mandatory)

# Using docker build tools

If you want to rebuild the images or use docker compose directly, you must still first use `mvn clean install` to generate
the filtered project in `target/filtered-docker`.

You can then use `docker-compose up` to start the project
You can then use `docker compose -f docker-compose-es.yml up` to start the project with ElasticSearch or `docker compose -f docker-compose-os.yml up` to start the project with OpenSearch.
25 changes: 18 additions & 7 deletions docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,21 @@
<directory>${project.basedir}/src/main/docker</directory>
<filtering>true</filtering>
<includes>
<include>docker-compose.yml</include>
<include>docker-compose-build.yml</include>
<include>docker-compose-es.yml</include>
<include>docker-compose-build-es.yml</include>
<include>docker-compose-os.yml</include>
<include>docker-compose-build-os.yml</include>
</includes>
</resource>
<!-- # Unfiltered Resources -->
<resource>
<directory>${project.basedir}/src/main/docker</directory>
<filtering>false</filtering>
<excludes>
<exclude>docker-compose.yml</exclude>
<include>docker-compose-build.yml</include>
<exclude>docker-compose-es.yml</exclude>
<exclude>docker-compose-build-es.yml</exclude>
<exclude>docker-compose-os.yml</exclude>
<exclude>docker-compose-build-os.yml</exclude>
</excludes>
</resource>
</resources>
Expand Down Expand Up @@ -133,7 +137,7 @@
<external>
<type>compose</type>
<basedir>${project.build.directory}/filtered-docker</basedir>
<composeFile>${project.build.directory}/filtered-docker/docker-compose-build.yml</composeFile>
<composeFile>${project.build.directory}/filtered-docker/docker-compose-build-es.yml</composeFile>
</external>
</image>
</images>
Expand Down Expand Up @@ -161,10 +165,17 @@
<artifacts>
<artifact>
<file>
${project.build.directory}/filtered-docker/docker-compose.yml
${project.build.directory}/filtered-docker/docker-compose-es.yml
</file>
<type>yml</type>
<classifier>docker-compose</classifier>
<classifier>docker-compose-es</classifier>
</artifact>
<artifact>
<file>
${project.build.directory}/filtered-docker/docker-compose-os.yml
</file>
<type>yml</type>
<classifier>docker-compose-os</classifier>
</artifact>
</artifacts>
</configuration>
Expand Down
13 changes: 12 additions & 1 deletion docker/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ FROM library/eclipse-temurin:17
# Unomi environment variables
ENV UNOMI_HOME=/opt/apache-unomi
ENV PATH=$PATH:$UNOMI_HOME/bin
ENV KARAF_OPTS="-Dunomi.autoStart=true"

ENV UNOMI_AUTO_START=true

# Debug configuration (disabled by default)
ENV KARAF_DEBUG=false
ENV KARAF_DEBUG_PORT=5005
ENV KARAF_DEBUG_SUSPEND=n

ENV UNOMI_ELASTICSEARCH_ADDRESSES=localhost:9200
ENV UNOMI_OPENSEARCH_ADDRESSES=localhost:9200

WORKDIR $UNOMI_HOME

Expand All @@ -34,8 +42,11 @@ RUN mv unomi-*/* . \

COPY entrypoint.sh ./entrypoint.sh

# Expose standard ports
EXPOSE 9443
EXPOSE 8181
EXPOSE 8102
# Expose debug port
EXPOSE 5005

CMD ["/bin/bash", "./entrypoint.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ services:
build: .
image: apache/unomi:${project.version}
environment:
- UNOMI_AUTO_START=elasticsearch
- UNOMI_ELASTICSEARCH_ADDRESSES=elasticsearch:9200
# Debug settings
- KARAF_DEBUG=${DEBUG:-false}
- KARAF_DEBUG_PORT=${DEBUG_PORT:-5005}
- KARAF_DEBUG_SUSPEND=${DEBUG_SUSPEND:-n}
ports:
- 8181:8181
- 9443:9443
Expand Down
122 changes: 122 additions & 0 deletions docker/src/main/docker/docker-compose-build-os.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
version: '2.4'

# Define networks first
networks:
unomi-net:
driver: bridge

services:
opensearch-node1:
image: opensearchproject/opensearch:3.0.0
container_name: opensearch-node1
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node1
- discovery.seed_hosts=opensearch-node1,opensearch-node2
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data
ports:
- 9200:9200
- 9600:9600
networks:
unomi-net:
aliases:
- opensearch-node1

opensearch-node2:
image: opensearchproject/opensearch:3.0.0
container_name: opensearch-node2
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node2
- discovery.seed_hosts=opensearch-node1,opensearch-node2
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data2:/usr/share/opensearch/data
networks:
unomi-net:
aliases:
- opensearch-node2

opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:3.0.0
container_name: opensearch-dashboards
ports:
- 5601:5601
environment:
OPENSEARCH_HOSTS: '["https://opensearch-node1:9200","https://opensearch-node2:9200"]'
networks:
unomi-net:
aliases:
- opensearch-dashboards
depends_on:
- opensearch-node1
- opensearch-node2

unomi:
build: .
image: apache/unomi:${project.version}
container_name: unomi
environment:
- UNOMI_AUTO_START=opensearch
- UNOMI_OPENSEARCH_ADDRESSES=opensearch-node1:9200
- UNOMI_OPENSEARCH_USERNAME=admin
- UNOMI_OPENSEARCH_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
# Debug settings
- KARAF_DEBUG=${DEBUG:-false}
- KARAF_DEBUG_PORT=${DEBUG_PORT:-5005}
- KARAF_DEBUG_SUSPEND=${DEBUG_SUSPEND:-n}
ports:
- 8181:8181
- 9443:9443
- 8102:8102
# Debug port
- "${DEBUG_PORT:-5005}:5005"
depends_on:
- opensearch-node1
- opensearch-node2
networks:
unomi-net:
aliases:
- unomi

volumes:
opensearch-data1:
opensearch-data2:
Loading