Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removal of OpenSearch #1044

Merged
merged 7 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 0 additions & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ CAMUNDA_WEB_MODELER_VERSION=8.6.4
# renovate: datasource=docker depName=elasticsearch
ELASTIC_VERSION=8.16.1
KEYCLOAK_SERVER_VERSION=24.0.5
OPENSEARCH_VERSION=2.16.0
# renovate: datasource=docker depName=axllent/mailpit
MAILPIT_VERSION=v1.21.5
POSTGRES_VERSION=14.5-alpine
Expand All @@ -46,8 +45,3 @@ RESOURCE_AUTHORIZATIONS_ENABLED=false
# ZEEBE_AUTHENTICATION_MODE=identity
#
MULTI_TENANCY_ENABLED=false

OPENSEARCH_INITIAL_ADMIN_PASSWORD=OpenSearch_Admin1234!

# search engine app: opensearch or elasticsearch
SEARCH_DB=elasticsearch
10 changes: 0 additions & 10 deletions .env.elasticsearch

This file was deleted.

7 changes: 0 additions & 7 deletions .env.elasticsearch.core

This file was deleted.

21 changes: 0 additions & 21 deletions .env.opensearch

This file was deleted.

11 changes: 0 additions & 11 deletions .env.opensearch.core

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/template-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ on:
description: runs a single test
required: false
type: string
search_db:
description: elasticsearch or opensearch
required: false
default: elasticsearch
type: string

jobs:
test_compose_deploy:
Expand All @@ -39,10 +34,6 @@ jobs:
sudo killall xsp4 || true
- uses: actions/checkout@v4
- name: change search db
if: ${{ contains(inputs.search_db, 'opensearch') }}
run: |
sudo sed -i 's/SEARCH_DB=elasticsearch/SEARCH_DB=opensearch/g' .env

- name: Login to private registry
if: ${{ inputs.directory != 'docker-compose/camunda-8.6' }}
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/test-core-opensearch.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/test-default.opensearch.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- compose_args: "-f docker-compose.yaml"
run_e2e_tests: false
directory: ""
- compose_args: "--profile full"
- compose_args: ""
run_e2e_tests: false
directory: "docker-compose/camunda-8.6"
uses: ./.github/workflows/template-deploy.yaml
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/test-modeler.opensearch.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test-modeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- compose_args: "-f docker-compose.yaml -f docker-compose-web-modeler.yaml"
run_e2e_tests: true
directory: ""
- compose_args: "--profile modeling"
- compose_args: "-f docker-compose.yaml -f docker-compose-web-modeler.yaml"
run_e2e_tests: true
run_single_test: "web_modeler_login.spec.ts"
directory: "docker-compose/camunda-8.6"
Expand Down
32 changes: 3 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The full environment contains these components:
- Connectors
- Optimize
- Identity
- Elasticsearch/Opensearch
- Elasticsearch
- Keycloak
- PostgreSQL

Expand Down Expand Up @@ -80,13 +80,6 @@ If Optimize, Identity, and Keycloak are not needed you can use the [docker-compo
```
docker compose -f docker-compose-core.yaml up -d
```
**OR**

Set parameter ```SEARCH_DB=opensearch``` in the file ```.env``` if you want to use OpenSearch instead of ElasticSearch
```
docker compose -f docker-compose-core.yaml --profile opensearch up -d
```

### Deploying BPMN diagrams

In addition to the local environment setup with docker compose, use the [Camunda Desktop Modeler](#desktop-modeler) to locally model BPMN diagrams for execution and directly deploy them to your local environment.
Expand Down Expand Up @@ -173,16 +166,10 @@ $ docker login registry.camunda.cloud
Username: your_username
Password: ******
Login Succeeded
```

#### To run Camunda Platform with Elasticsearch execute this commands

1. Edit ```.env``` file and set parameter ```SEARCH_DB=elasticserach``` (this default value)
2. Run command
```
$ docker compose -f docker-compose.yaml -f docker-compose-web-modeler.yaml up -d
```
3. To tear down the whole environment with ```ElasticSearch``` run the following command

### To tear down the whole environment run the following command

```
$ docker compose -f docker-compose.yaml -f docker-compose-web-modeler.yaml down -v
Expand All @@ -195,19 +182,6 @@ Alternatively, if you want to keep the data run:
$ docker compose -f docker-compose.yaml -f docker-compose-web-modeler.yaml down
```

To run Camunda Platform with ```OpenSearch``` execute this commands

1. Edit ```.env``` file and set parameter ```SEARCH_DB=opensearch```
2. Run command
```
$ docker compose -f docker-compose.yaml -f docker-compose-web-modeler.yaml --profile opensearch up -d
```
3. To tear down the whole environment with Elasticsearch run the following command (-v is optional flag. Use it, if you want to delete all the data)

```
$ docker compose -f docker-compose.yaml -f docker-compose-web-modeler.yaml --profile opensearch down -v
```

### Login
You can access Web Modeler Self-Managed and log in with the user `demo` and password `demo` at [http://localhost:8070](http://localhost:8070).

Expand Down
73 changes: 12 additions & 61 deletions docker-compose-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,19 @@
# See docker-compose.yml for a configuration that also includes Optimize, Identity, and Keycloak.

services:
init: # recommended config https://opensearch.org/docs/1.1/opensearch/install/important-settings/
image: bash
profiles: ["opensearch"]
privileged: true
user: root
command: [ "sysctl", "-w", "vm.max_map_count=262144" ]

zeebe: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#zeebe
image: camunda/zeebe:${CAMUNDA_PLATFORM_VERSION}
container_name: zeebe
profiles: ["", "opensearch"]
ports:
- "26500:26500"
- "9600:9600"
- "8088:8080"
env_file:
- .env.${SEARCH_DB}.core
environment: # https://docs.camunda.io/docs/self-managed/zeebe-deployment/configuration/environment-variables/
# allow running with low disk space
- ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_CLASSNAME=io.camunda.zeebe.exporter.ElasticsearchExporter
- ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_URL=http://elasticsearch:9200
# default is 1000, see here: https://github.com/camunda/zeebe/blob/main/exporters/elasticsearch-exporter/src/main/java/io/camunda/zeebe/exporter/ElasticsearchExporterConfiguration.java#L259
- ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_BULK_SIZE=1
- ZEEBE_BROKER_DATA_DISKUSAGECOMMANDWATERMARK=0.998
- ZEEBE_BROKER_DATA_DISKUSAGEREPLICATIONWATERMARK=0.999
- "JAVA_TOOL_OPTIONS=-Xms512m -Xmx512m"
Expand All @@ -44,18 +38,17 @@ services:
networks:
- camunda-platform
depends_on:
- ${SEARCH_DB}
- elasticsearch

operate: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#operate
image: camunda/operate:${CAMUNDA_OPERATE_VERSION}
container_name: operate
profiles: ["", "opensearch"]
ports:
- "8081:8080"
env_file:
- .env.${SEARCH_DB}.core
environment: # https://docs.camunda.io/docs/self-managed/operate-deployment/configuration/
- CAMUNDA_OPERATE_ZEEBE_GATEWAYADDRESS=zeebe:26500
- CAMUNDA_OPERATE_ELASTICSEARCH_URL=http://elasticsearch:9200
- CAMUNDA_OPERATE_ZEEBEELASTICSEARCH_URL=http://elasticsearch:9200
- CAMUNDA_OPERATE_CSRFPREVENTIONENABLED=false
- management.endpoints.web.exposure.include=health
- management.endpoint.health.probes.enabled=true
Expand All @@ -69,19 +62,18 @@ services:
- camunda-platform
depends_on:
- zeebe
- ${SEARCH_DB}
- elasticsearch

tasklist: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#tasklist
image: camunda/tasklist:${CAMUNDA_TASKLIST_VERSION}
container_name: tasklist
profiles: ["", "opensearch"]
ports:
- "8082:8080"
env_file:
- .env.${SEARCH_DB}.core
environment: # https://docs.camunda.io/docs/self-managed/tasklist-deployment/configuration/
- CAMUNDA_TASKLIST_ZEEBE_GATEWAYADDRESS=zeebe:26500
- CAMUNDA_TASKLIST_ZEEBE_RESTADDRESS=http://zeebe:8080
- CAMUNDA_TASKLIST_ELASTICSEARCH_URL=http://elasticsearch:9200
- CAMUNDA_TASKLIST_ZEEBEELASTICSEARCH_URL=http://elasticsearch:9200
- CAMUNDA_TASKLIST_CSRFPREVENTIONENABLED=false
- management.endpoints.web.exposure.include=health
- management.endpoint.health.probes.enabled=true
Expand All @@ -95,12 +87,11 @@ services:
- camunda-platform
depends_on:
- zeebe
- ${SEARCH_DB}
- elasticsearch

connectors: # https://docs.camunda.io/docs/components/integration-framework/connectors/out-of-the-box-connectors/available-connectors-overview/
image: camunda/connectors-bundle:${CAMUNDA_CONNECTORS_VERSION}
container_name: connectors
profiles: ["", "opensearch"]
ports:
- "8085:8080"
environment:
Expand All @@ -124,48 +115,9 @@ services:
- zeebe
- operate

opensearch:
image: opensearchproject/opensearch:${OPENSEARCH_VERSION}
container_name: opensearch
profiles: ["opensearch"]
depends_on:
- init
environment:
cluster.name: opensearch-cluster
network.bind_host: 0.0.0.0
node.name: opensearch
plugins.security.disabled: true
discovery.type: single-node
discovery.seed_hosts: opensearch
bootstrap.memory_lock: true
OPENSEARCH_JAVA_OPTS: "-Xms1G -Xmx1G"
OPENSEARCH_INITIAL_ADMIN_PASSWORD: ${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- "9200:9200"
- "9601:9600"
restart: always
healthcheck:
# Single node OpenSearch clusters are considered 'yellow', see https://github.com/opensearch-project/opensearch-build/issues/4285
test: [ "CMD-SHELL", "curl -k -f http://localhost:9200/_cluster/health -u admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} | grep -q -E 'yellow|green'" ]
interval: 60s
timeout: 10s
retries: 5
volumes:
- opensearch-data:/usr/share/opensearch/data
networks:
- camunda-platform

elasticsearch: # https://hub.docker.com/_/elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
container_name: elasticsearch
profiles: [""]
ports:
- "9200:9200"
- "9300:9300"
Expand Down Expand Up @@ -201,14 +153,13 @@ services:
networks:
- camunda-platform
depends_on:
- ${SEARCH_DB}
- elasticsearch
profiles:
- kibana

volumes:
zeebe:
elastic:
opensearch-data:
kibana:

networks:
Expand Down
Loading
Loading