diff --git a/docker/docker-compose-postgres-es7.yaml b/docker/docker-compose-postgres-es7.yaml new file mode 100644 index 000000000..1dff23682 --- /dev/null +++ b/docker/docker-compose-postgres-es7.yaml @@ -0,0 +1,88 @@ +version: '2.3' + +services: + conductor-server: + environment: + - CONFIG_PROP=config-postgres-es7.properties + image: conductor:server + container_name: conductor-server + build: + context: ../ + dockerfile: docker/server/Dockerfile + networks: + - internal + ports: + - 8080:8080 + - 5000:5000 + healthcheck: + test: [ "CMD", "curl","-I" ,"-XGET", "http://localhost:8080/health" ] + interval: 60s + timeout: 30s + retries: 12 + links: + - conductor-postgres:postgresdb + - conductor-elasticsearch:es + depends_on: + conductor-postgres: + condition: service_healthy + conductor-elasticsearch: + condition: service_healthy + logging: + driver: "json-file" + options: + max-size: "1k" + max-file: "3" + + conductor-postgres: + image: postgres + environment: + - POSTGRES_USER=conductor + - POSTGRES_PASSWORD=conductor + volumes: + - pgdata-conductor:/var/lib/postgresql/data + networks: + - internal + ports: + - 6432:5432 + healthcheck: + test: timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/5432' + interval: 5s + timeout: 5s + retries: 12 + logging: + driver: "json-file" + options: + max-size: "1k" + max-file: "3" + + conductor-elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:7.17.11 + environment: + - "ES_JAVA_OPTS=-Xms512m -Xmx1024m" + - xpack.security.enabled=false + - discovery.type=single-node + volumes: + - esdata-conductor:/usr/share/elasticsearch/data + networks: + - internal + ports: + - 9201:9200 + healthcheck: + test: curl http://localhost:9200/_cluster/health -o /dev/null + interval: 5s + timeout: 5s + retries: 12 + logging: + driver: "json-file" + options: + max-size: "1k" + max-file: "3" + +volumes: + pgdata-conductor: + driver: local + esdata-conductor: + driver: local + +networks: + internal: diff --git a/docker/docker-compose-postgres.yaml b/docker/docker-compose-postgres.yaml index 12a6b7046..1e86fc69a 100644 --- a/docker/docker-compose-postgres.yaml +++ b/docker/docker-compose-postgres.yaml @@ -20,11 +20,8 @@ services: timeout: 30s retries: 12 links: - - conductor-elasticsearch:es - conductor-postgres:postgresdb depends_on: - conductor-elasticsearch: - condition: service_healthy conductor-postgres: condition: service_healthy logging: @@ -55,34 +52,9 @@ services: max-size: "1k" max-file: "3" - conductor-elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.11 - environment: - - "ES_JAVA_OPTS=-Xms512m -Xmx1024m" - - xpack.security.enabled=false - - discovery.type=single-node - volumes: - - esdata-conductor:/usr/share/elasticsearch/data - networks: - - internal - ports: - - 9201:9200 - healthcheck: - test: curl http://localhost:9200/_cluster/health -o /dev/null - interval: 5s - timeout: 5s - retries: 12 - logging: - driver: "json-file" - options: - max-size: "1k" - max-file: "3" - volumes: pgdata-conductor: driver: local - esdata-conductor: - driver: local networks: internal: diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 9b44f47a9..c7ffe1c0e 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -1,52 +1,48 @@ # -# conductor:server - Combined conductor server & UI +# conductor:server - Build Conductor Server # # =========================================================================================================== -# 0. Builder stage +# 0. Builder stage 1 # =========================================================================================================== -FROM alpine:3.18 AS builder +FROM openjdk:17-bullseye AS builder LABEL maintainer="Orkes OSS " +# Copy the project directly onto the image +COPY . /conductor +WORKDIR /conductor + +# Build the server on run +RUN ./gradlew build -x test +WORKDIR /server/build/libs +RUN ls -ltr + + +# +# conductor:server - Build Conductor UI +# # =========================================================================================================== -# 0. Build Conductor Server +# 1. Builder stage 2 # =========================================================================================================== +FROM alpine:3.18 AS ui-builder +LABEL maintainer="Orkes OSS " # Install dependencies -RUN apk add openjdk17 -RUN apk add git RUN apk add --update nodejs npm yarn COPY . /conductor WORKDIR /conductor/ui + # Include monaco sources into bundle (instead of using CDN) ENV REACT_APP_MONACO_EDITOR_USING_CDN=false RUN yarn install && cp -r node_modules/monaco-editor public/ && yarn build RUN ls -ltr RUN echo "Done building UI" -# Checkout the community project -WORKDIR / -RUN mkdir server-build -WORKDIR server-build -RUN ls -ltr - -RUN git clone https://github.com/conductor-oss/conductor-community.git - -# Copy the project directly onto the image -WORKDIR conductor-community -RUN ls -ltr - -# Build the server on run -RUN ./gradlew build -x test --stacktrace -WORKDIR /server-build -RUN ls -ltr -RUN pwd - # =========================================================================================================== -# 1. Bin stage +# 2. Bin stage # =========================================================================================================== FROM alpine:3.18 @@ -61,13 +57,13 @@ RUN mkdir -p /app/config /app/logs /app/libs # Copy the compiled output to new image COPY docker/server/bin /app COPY docker/server/config /app/config -COPY --from=builder /server-build/conductor-community/community-server/build/libs/*boot*.jar /app/libs/conductor-server.jar +COPY --from=builder /conductor/server/build/libs/*boot*.jar /app/libs/conductor-server.jar # Copy compiled UI assets to nginx www directory WORKDIR /usr/share/nginx/html RUN rm -rf ./* -COPY --from=builder /conductor/ui/build . -COPY --from=builder /conductor/docker/server/nginx/nginx.conf /etc/nginx/http.d/default.conf +COPY --from=ui-builder /conductor/ui/build . +COPY --from=ui-builder /conductor/docker/server/nginx/nginx.conf /etc/nginx/http.d/default.conf # Copy the files for the server into the app folders RUN chmod +x /app/startup.sh diff --git a/docker/server/config/config-mysql.properties b/docker/server/config/config-mysql.properties index 6b618dc2e..34526588f 100755 --- a/docker/server/config/config-mysql.properties +++ b/docker/server/config/config-mysql.properties @@ -1,13 +1,17 @@ # Database persistence type. conductor.db.type=mysql + # mysql spring.datasource.url=jdbc:mysql://mysql:3306/conductor spring.datasource.username=conductor spring.datasource.password=conductor -# Use redis queues +# redis queues conductor.queue.type=redis_standalone +conductor.redis.hosts=rs:6379:us-east-1c +conductor.redis-lock.serverAddress=redis://rs:6379 + # Elastic search instance indexing is enabled. conductor.indexing.enabled=true diff --git a/docker/server/config/config-postgres-es7.properties b/docker/server/config/config-postgres-es7.properties new file mode 100755 index 000000000..0bc4f6320 --- /dev/null +++ b/docker/server/config/config-postgres-es7.properties @@ -0,0 +1,23 @@ +# Database persistence type. +conductor.db.type=postgres +conductor.queue.type=postgres +conductor.external-payload-storage.type=postgres + +# postgres +spring.datasource.url=jdbc:postgresql://postgresdb:5432/postgres +spring.datasource.username=conductor +spring.datasource.password=conductor + +# Elastic search instance indexing is enabled. +conductor.indexing.enabled=true +conductor.elasticsearch.url=http://es:9200 +conductor.elasticsearch.indexName=conductor +conductor.elasticsearch.version=7 +conductor.elasticsearch.clusterHealthColor=yellow + +# Additional modules for metrics collection exposed to Prometheus (optional) +conductor.metrics-prometheus.enabled=true +management.endpoints.web.exposure.include=prometheus + +# Load sample kitchen-sink workflow +loadSample=true diff --git a/docker/server/config/config-postgres.properties b/docker/server/config/config-postgres.properties index 43aa64a0f..04b51a58c 100755 --- a/docker/server/config/config-postgres.properties +++ b/docker/server/config/config-postgres.properties @@ -1,21 +1,23 @@ # Database persistence type. conductor.db.type=postgres +conductor.queue.type=postgres +conductor.external-payload-storage.type=postgres -# postgres +# Database connectivity spring.datasource.url=jdbc:postgresql://postgresdb:5432/postgres spring.datasource.username=conductor spring.datasource.password=conductor -# Elastic search instance indexing is enabled. + +# Indexing Properties conductor.indexing.enabled=true -conductor.elasticsearch.url=http://es:9200 -conductor.elasticsearch.indexName=conductor -conductor.elasticsearch.version=7 -conductor.elasticsearch.clusterHealthColor=yellow +conductor.indexing.type=postgres +# Required to disable connecting to elasticsearch. +conductor.elasticsearch.version=0 # Additional modules for metrics collection exposed to Prometheus (optional) conductor.metrics-prometheus.enabled=true management.endpoints.web.exposure.include=prometheus # Load sample kitchen-sink workflow -loadSample=true +loadSample=true \ No newline at end of file diff --git a/docker/server/config/config-redis.properties b/docker/server/config/config-redis.properties index 5afd33797..b43e4b3c1 100755 --- a/docker/server/config/config-redis.properties +++ b/docker/server/config/config-redis.properties @@ -1,15 +1,14 @@ # Database persistence type. # Below are the properties for redis conductor.db.type=redis_standalone +conductor.queue.type=redis_standalone + conductor.redis.hosts=rs:6379:us-east-1c conductor.redis-lock.serverAddress=redis://rs:6379 conductor.redis.taskDefCacheRefreshInterval=1 conductor.redis.workflowNamespacePrefix=conductor conductor.redis.queueNamespacePrefix=conductor_queues -#Use redis queues -conductor.queue.type=redis_standalone - # Elastic search instance indexing is enabled. conductor.indexing.enabled=true conductor.elasticsearch.url=http://es:9200 diff --git a/docker/server/config/config.properties b/docker/server/config/config.properties index 74d414520..a85b02433 100755 --- a/docker/server/config/config.properties +++ b/docker/server/config/config.properties @@ -2,7 +2,7 @@ # db.type determines the type of database used # See various configurations below for the values -conductor.db.type=SET_THIS +#conductor.db.type=SET_THIS # =====================================================# # Redis Configuration Properties diff --git a/docker/ui/Dockerfile b/docker/ui/Dockerfile index 5762f7d1f..076774b6c 100644 --- a/docker/ui/Dockerfile +++ b/docker/ui/Dockerfile @@ -2,7 +2,7 @@ # conductor:ui - Netflix Conductor UI # FROM node:20-alpine -LABEL maintainer="Netflix OSS " +LABEL maintainer="Orkes OSS " # Install the required packages for the node build # to run on alpine diff --git a/mysql-persistence/build.gradle b/mysql-persistence/build.gradle index 3b060c6bc..80f3c24c4 100644 --- a/mysql-persistence/build.gradle +++ b/mysql-persistence/build.gradle @@ -20,9 +20,6 @@ dependencies { testImplementation "org.apache.groovy:groovy-all:${revGroovy}" - - testImplementation "org.elasticsearch:elasticsearch:6.8.23" - testImplementation "org.elasticsearch.client:transport:6.8.23" testImplementation "org.elasticsearch.client:elasticsearch-rest-client:6.8.23" testImplementation "org.elasticsearch.client:elasticsearch-rest-high-level-client:6.8.23" testImplementation "org.testcontainers:elasticsearch:${revTestContainer}" diff --git a/postgres-persistence/build.gradle b/postgres-persistence/build.gradle index d0fef0332..15ae8a3c8 100644 --- a/postgres-persistence/build.gradle +++ b/postgres-persistence/build.gradle @@ -19,8 +19,6 @@ dependencies { testImplementation "org.apache.groovy:groovy-all:${revGroovy}" -// testImplementation "org.elasticsearch:elasticsearch:6.8.23" -// testImplementation "org.elasticsearch.client:transport:6.8.23" testImplementation "org.elasticsearch.client:elasticsearch-rest-client:6.8.23" testImplementation "org.elasticsearch.client:elasticsearch-rest-high-level-client:6.8.23" testImplementation "org.testcontainers:elasticsearch:${revTestContainer}"