Skip to content

Commit

Permalink
renamed search cluster role to just "search"
Browse files Browse the repository at this point in the history
* adjusted Ditto sandbox to not start connectivity
* start ditto-ui in Ditto sandbox compose

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Aug 19, 2022
1 parent 0a0c12b commit 65f537f
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 30 deletions.
64 changes: 39 additions & 25 deletions deployment/docker/sandbox/docker-compose.yml
Expand Up @@ -95,30 +95,30 @@ services:
retries: 4
start_period: 300s

connectivity:
image: docker.io/eclipse/ditto-connectivity:${DITTO_VERSION:-latest}
mem_limit: 768m
cpu_shares: 300
restart: always
networks:
default:
aliases:
- ditto-cluster
depends_on:
- policies
environment:
- TZ=Europe/Berlin
- BIND_HOSTNAME=0.0.0.0
- DITTO_DEVOPS_FEATURE_WOT_INTEGRATION_ENABLED=true
# if connections to rabbitmq broker are used, you might want to disable ExitOnOutOfMemoryError, because the amqp-client has a bug throwing OOM exceptions and causing a restart loop
- JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=""
- MONGO_DB_HOSTNAME=mongodb
healthcheck:
test: curl --fail `hostname`:8558/alive || exit 1
interval: 30s
timeout: 15s
retries: 4
start_period: 300s
# connectivity:
# image: docker.io/eclipse/ditto-connectivity:${DITTO_VERSION:-latest}
# mem_limit: 768m
# cpu_shares: 300
# restart: always
# networks:
# default:
# aliases:
# - ditto-cluster
# depends_on:
# - policies
# environment:
# - TZ=Europe/Berlin
# - BIND_HOSTNAME=0.0.0.0
# - DITTO_DEVOPS_FEATURE_WOT_INTEGRATION_ENABLED=true
# # if connections to rabbitmq broker are used, you might want to disable ExitOnOutOfMemoryError, because the amqp-client has a bug throwing OOM exceptions and causing a restart loop
# - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=""
# - MONGO_DB_HOSTNAME=mongodb
# healthcheck:
# test: curl --fail `hostname`:8558/alive || exit 1
# interval: 30s
# timeout: 15s
# retries: 4
# start_period: 300s

gateway:
image: docker.io/eclipse/ditto-gateway:${DITTO_VERSION:-latest}
Expand All @@ -137,14 +137,28 @@ services:
- ENABLE_PRE_AUTHENTICATION=true
- DEVOPS_SECURE_STATUS=false
- DITTO_DEVOPS_FEATURE_WOT_INTEGRATION_ENABLED=true
- JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=""
- |
JAVA_TOOL_OPTIONS=
-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500
-Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=""
-Dditto.gateway.health-check.cluster-roles.expected.0=policies
-Dditto.gateway.health-check.cluster-roles.expected.1=things
-Dditto.gateway.health-check.cluster-roles.expected.2=search
-Dditto.gateway.health-check.cluster-roles.expected.3=gateway
-Dditto.gateway.health-check.cluster-roles.expected.4=
healthcheck:
test: curl --fail `hostname`:8558/alive || exit 1
interval: 30s
timeout: 15s
retries: 4
start_period: 300s

ditto-ui:
image: docker.io/eclipse/ditto-ui:${DITTO_VERSION:-latest}
mem_limit: 32m
cpu_shares: 50
restart: always

swagger-ui:
image: docker.io/swaggerapi/swagger-ui:v3.38.0
mem_limit: 32m
Expand Down
11 changes: 9 additions & 2 deletions deployment/docker/sandbox/html/index.html
Expand Up @@ -100,7 +100,7 @@
<article>
<h1><img src="./images/ditto.svg" class="ditto-logo" alt="Eclipse Ditto logo"> - Sandbox</h1>
<div style="clear: both">
<p>Welcome to the Eclipse Ditto sandbox.</p>
<p>Welcome to the Eclipse Ditto sandbox.</p>
<p>
You can use this sandbox to gather first experiences with the Eclipse Ditto <a href="/apidoc">HTTP
API</a>.<br/> The Swagger UI for exploring the API will require authentication.
Expand All @@ -112,10 +112,17 @@ <h1><img src="./images/ditto.svg" class="ditto-logo" alt="Eclipse Ditto logo"> -
<p>
Please consider that this sandbox has (very) limited resources - so don't expect a high performance setup.
</p>
<h2>Eclipse Ditto explorer UI</h2>
<p>
The sandbox also hosts the <a href="/ui">Ditto explorer UI</a>.
</p>
<p>
Choose "ditto_sandbox" from the environment drop-down at the top right in order to explore the things in the sandbox.
</p>
<h2>Authentication</h2>
<p>
When using the <a href="/apidoc">HTTP API</a> you can authenticate with your Google account in order to use
an user ID belonging to only you.
a user ID belonging to only you.
</p>
<p>
Alternatively (also in order to connect to the WebSocket API) you can use one of the pre-defined user/password
Expand Down
7 changes: 7 additions & 0 deletions deployment/docker/sandbox/nginx.conf
Expand Up @@ -232,6 +232,13 @@ http {
proxy_set_header X-Forwarded-User $remote_user;
}

# ui
location /ui/ {
proxy_pass http://ditto-ui:8080/;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
}

# swagger
location /apidoc/ {
proxy_pass http://swagger-ui:8080/;
Expand Down
Expand Up @@ -13,7 +13,7 @@ Ditto **TODO:version** introduces a new search index schema based on [wildcard i
a smooth upgrade, the service name, cluster role, database name and collections of Search service are changed as
follows.
- The service name is changed from `things-search` to `search`.
- The cluster role is changed from `things-search` to `things-wildcard-search`.
- The cluster role is changed from `things-search` to `search`.
- The default database is changed from `searchDB` to `search`.
- The collections used for the search index are changed from `searchThings` and `searchThingsSync` to `search` and
`searchSync`.
Expand Down
Expand Up @@ -28,7 +28,7 @@ public final class ThingsSearchConstants {
/**
* Name of the akka cluster role.
*/
public static final String CLUSTER_ROLE = "things-wildcard-search";
public static final String CLUSTER_ROLE = "search";

private static final String PATH_DELIMITER = "/";

Expand Down
1 change: 0 additions & 1 deletion thingsearch/service/src/main/resources/search.conf
Expand Up @@ -294,7 +294,6 @@ akka {

roles = [
${ditto.service-name},
"things-wildcard-search",
"blocked-namespaces-aware",
"thing-event-aware"
]
Expand Down
1 change: 1 addition & 0 deletions ui/Dockerfile
Expand Up @@ -17,3 +17,4 @@ COPY ./index.html .
COPY ./index.css .
COPY ./main.js .
COPY ./modules ./modules
COPY ./templates ./templates

0 comments on commit 65f537f

Please sign in to comment.