Skip to content

Commit

Permalink
feat: Update services with Dictionary RS. (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed May 5, 2024
1 parent f4432d9 commit 3be6466
Show file tree
Hide file tree
Showing 21 changed files with 150 additions and 130 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The application stack consists of the following services defined in the *docker-
- **zookeeper**: controller for *kafka* service
- **kafka**: messaging and streaming
- **kafdrop**: a Kafka Cluster Overview
- **opensearch.gateway.rs**:
- **dictionary.rs**:
- **keycloak**: user management on service *postgresql.service*
- **ui.gateway**:
- **s3.storage**: for attachments
Expand Down
34 changes: 15 additions & 19 deletions docker-compose/.env
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ ADEMPIERE_DB_PASSWORD="adempiere"


# S3 Minio Storage
S3_VERSION="RELEASE.2024-01-31T20-20-33Z"
S3_IMAGE="quay.io/minio/minio:${S3_VERSION}"
S3_IMAGE="quay.io/minio/minio:RELEASE.2024-05-01T01-11-10Z"
S3_CONTAINER_NAME="${COMPOSE_PROJECT_NAME}.s3.storage"
S3_HOSTNAME="${CLIENT_NAME}.s3"
S3_PORT=9000
Expand All @@ -79,17 +78,15 @@ S3_BUCKET_NAME=${ADEMPIERE_DB_NAME}
S3_VOLUME="${COMPOSE_PROJECT_NAME}.volume_s3"

# S3 Minio Client to create default bucket
S3_CLIENT_VERSION="RELEASE.2024-01-31T08-59-40Z"
S3_CLIENT_IMAGE="minio/mc:${S3_CLIENT_VERSION}"
S3_CLIENT_IMAGE="minio/mc:RELEASE.2024-04-29T09-56-05Z"
S3_CLIENT_CONTAINER_NAME="${COMPOSE_PROJECT_NAME}.s3.client"
S3_CLIENT_HOSTNAME="${CLIENT_NAME}.s3.client"
S3_CLIENT_ACCESS_KEY="${S3_USER}"
S3_CLIENT_SECRET_KEY="${S3_PASSWORD}"
S3_CLIENT_BUCKET_NAME="${S3_BUCKET_NAME}"

# S3 Gateway RS
S3_GATEWAY_RS_VERSION="1.2.3"
S3_GATEWAY_RS_IMAGE="openls/s3-gateway-rs:${S3_GATEWAY_RS_VERSION}"
S3_GATEWAY_RS_IMAGE="openls/s3-gateway-rs:1.2.3"
S3_GATEWAY_RS_CONTAINER_NAME="${COMPOSE_PROJECT_NAME}.s3.gateway.rs"
S3_GATEWAY_RS_HOSTNAME="${CLIENT_NAME}.s3.rs"
S3_GATEWAY_RS_PORT=7878
Expand Down Expand Up @@ -123,7 +120,7 @@ ADEMPIERE_ZK_PERSISTENT_FILES_PATH_ON_HOST=${ADEMPIERE_ZK_CONTEXT_PATH_ON_HOST}/


# ADempiere Processors gRPC Server
ADEMPIERE_PROCESSOR_IMAGE="openls/adempiere-processors-service:alpine-1.0.2"
ADEMPIERE_PROCESSOR_IMAGE="openls/adempiere-processors-service:alpine-1.0.3"
ADEMPIERE_PROCESSOR_CONTAINER_NAME=${COMPOSE_PROJECT_NAME}.processor
ADEMPIERE_PROCESSOR_HOSTNAME=${CLIENT_NAME}.processor
ADEMPIERE_PROCESSOR_PORT=50060
Expand All @@ -146,15 +143,14 @@ DKRON_VOLUME="${COMPOSE_PROJECT_NAME}.volume_dkron"


# Zookeeper to manage kafka brokers
ZOOKEEPER_IMAGE="confluentinc/cp-zookeeper:7.6.0"
ZOOKEEPER_IMAGE="confluentinc/cp-zookeeper:7.6.1"
ZOOKEEPER_CONTAINER_NAME="${COMPOSE_PROJECT_NAME}.zookeeper"
ZOOKEEPER_HOSTNAME="${CLIENT_NAME}.zookeeper"
ZOOKEEPER_PORT=2181
ZOOKEEPER_TICK_TIME=2000

# Kafka queue manager
KAFKA_BROKER_HOST=${HOST_IP}
KAFKA_IMAGE="confluentinc/cp-kafka:7.6.0"
KAFKA_IMAGE="confluentinc/cp-kafka:7.6.1"
KAFKA_CONTAINER_NAME="${COMPOSE_PROJECT_NAME}.kafka"
KAFKA_HOSTNAME="${CLIENT_NAME}.kafka"
KAFKA_PORT=9092
Expand Down Expand Up @@ -194,18 +190,18 @@ OPENSEARCH_DASHBOARDS_EXTERNAL_PORT=5601
OPENSEARCH_DASHBOARDS_OPENSEARCH_HOSTS="[\"http://${OPENSEARCH_HOSTNAME}:${OPENSEARCH_PORT}\"]"

# OpenSearch API RESTful
OPENSEARCH_GATEWAY_RS_IMAGE="openls/opensearch-gateway-rs:1.1.8"
OPENSEARCH_GATEWAY_RS_CONTAINER_NAME="${COMPOSE_PROJECT_NAME}.opensearch.gateway.rs"
OPENSEARCH_GATEWAY_RS_HOSTNAME="${CLIENT_NAME}.opensearch.gateway"
OPENSEARCH_GATEWAY_RS_PORT=7878
OPENSEARCH_GATEWAY_RS_EXTERNAL_PORT=7879
OPENSEARCH_GATEWAY_RS_KAFKA_HOST="${KAFKA_BROKERCONNECT}"
OPENSEARCH_GATEWAY_RS_OPENSEARCH_URL="http://${OPENSEARCH_CONTAINER_NAME}:${OPENSEARCH_PORT}"
DICTIONARY_RS_IMAGE="openls/dictionary-rs:1.2.0"
DICTIONARY_RS_CONTAINER_NAME="${COMPOSE_PROJECT_NAME}.dictionary.rs"
DICTIONARY_RS_HOSTNAME="${CLIENT_NAME}.dictionary"
DICTIONARY_RS_PORT=7878
DICTIONARY_RS_EXTERNAL_PORT=7879
DICTIONARY_RS_KAFKA_HOST="${KAFKA_BROKERCONNECT}"
DICTIONARY_RS_OPENSEARCH_URL="http://${OPENSEARCH_CONTAINER_NAME}:${OPENSEARCH_PORT}"



# ADempiere Vue Backend (gRPC Server)
VUE_BACKEND_GRPC_SERVER_VERSION="3.2.0"
VUE_BACKEND_GRPC_SERVER_VERSION="3.2.1"
VUE_BACKEND_GRPC_SERVER_IMAGE="solopcloud/adempiere-backend:alpine-${VUE_BACKEND_GRPC_SERVER_VERSION}"
VUE_BACKEND_GRPC_SERVER_CONTAINER_NAME=${COMPOSE_PROJECT_NAME}.vue.grpc.server
VUE_BACKEND_GRPC_SERVER_HOSTNAME=${CLIENT_NAME}-grpc
Expand Down Expand Up @@ -245,7 +241,7 @@ NGINX_UI_GATEWAY_VOLUME="${COMPOSE_PROJECT_NAME}.volume_nginx" #


# ADempiere UI Vue
VUE_UI_IMAGE="solopcloud/adempiere-vue:alpine-3.7.9"
VUE_UI_IMAGE="solopcloud/adempiere-vue:alpine-3.8.1"
VUE_UI_CONTAINER_NAME="${COMPOSE_PROJECT_NAME}.vue.ui"
VUE_UI_HOSTNAME="${CLIENT_NAME}.vue.ui"
VUE_UI_EXTERNAL_PORT=9526
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@

# For modes: STANDARD, CACHE, AUTH
opensearch.gateway.rs:
image: ${OPENSEARCH_GATEWAY_RS_IMAGE}
container_name: ${OPENSEARCH_GATEWAY_RS_CONTAINER_NAME}
hostname: ${OPENSEARCH_GATEWAY_RS_HOSTNAME}
dictionary.rs:
image: ${DICTIONARY_RS_IMAGE}
container_name: ${DICTIONARY_RS_CONTAINER_NAME}
hostname: ${DICTIONARY_RS_HOSTNAME}
depends_on:
opensearch.node:
condition: service_healthy
kafka:
condition: service_healthy
restart: ${GENERIC_RESTART}
healthcheck:
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${OPENSEARCH_GATEWAY_RS_PORT}; exit $?;'"
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${DICTIONARY_RS_PORT}; exit $?;'"
interval: 10s
retries: 60
start_period: 20s
timeout: 10s
environment:
PORT: ${OPENSEARCH_GATEWAY_RS_PORT}
KAFKA_HOST: ${OPENSEARCH_GATEWAY_RS_KAFKA_HOST}
OPENSEARCH_URL: ${OPENSEARCH_GATEWAY_RS_OPENSEARCH_URL}
PORT: ${DICTIONARY_RS_PORT}
KAFKA_HOST: ${DICTIONARY_RS_KAFKA_HOST}
OPENSEARCH_URL: ${DICTIONARY_RS_OPENSEARCH_URL}
ALLOWED_ORIGIN: ${ALLOWED_ORIGIN}
# ports:
# - ${OPENSEARCH_GATEWAY_RS_EXTERNAL_PORT}:${OPENSEARCH_GATEWAY_RS_PORT}
# - ${DICTIONARY_RS_EXTERNAL_PORT}:${DICTIONARY_RS_PORT}
volumes:
- ${TIMEZONE_PATH_ON_HOST}:${TIMEZONE_PATH_ON_CONTAINER}:${TIMEZONE_OPTIONS} # Map the Timezone of the host to the Timezone of the container
- ${LOCALTIME_PATH_ON_HOST}:${LOCALTIME_PATH_ON_CONTAINER}:${LOCALTIME_OPTIONS} # Map the Localtime of the host to the Timezone of the container
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@

# For modes: DEVELOP
opensearch.gateway.rs:
image: ${OPENSEARCH_GATEWAY_RS_IMAGE}
container_name: ${OPENSEARCH_GATEWAY_RS_CONTAINER_NAME}
hostname: ${OPENSEARCH_GATEWAY_RS_HOSTNAME}
dictionary.rs:
image: ${DICTIONARY_RS_IMAGE}
container_name: ${DICTIONARY_RS_CONTAINER_NAME}
hostname: ${DICTIONARY_RS_HOSTNAME}
depends_on:
opensearch.node:
condition: service_healthy
restart: ${GENERIC_RESTART}
healthcheck:
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${OPENSEARCH_GATEWAY_RS_PORT}; exit $?;'"
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${DICTIONARY_RS_PORT}; exit $?;'"
interval: 10s
retries: 60
start_period: 20s
timeout: 10s
environment:
PORT: ${OPENSEARCH_GATEWAY_RS_PORT}
KAFKA_HOST: ${OPENSEARCH_GATEWAY_RS_KAFKA_HOST}
OPENSEARCH_URL: ${OPENSEARCH_GATEWAY_RS_OPENSEARCH_URL}
PORT: ${DICTIONARY_RS_PORT}
KAFKA_HOST: ${DICTIONARY_RS_KAFKA_HOST}
OPENSEARCH_URL: ${DICTIONARY_RS_OPENSEARCH_URL}
ALLOWED_ORIGIN: ${ALLOWED_ORIGIN}
ports:
- ${OPENSEARCH_GATEWAY_RS_EXTERNAL_PORT}:${OPENSEARCH_GATEWAY_RS_PORT}
- ${DICTIONARY_RS_EXTERNAL_PORT}:${DICTIONARY_RS_PORT}
volumes:
- ${TIMEZONE_PATH_ON_HOST}:${TIMEZONE_PATH_ON_CONTAINER}:${TIMEZONE_OPTIONS} # Map the Timezone of the host to the Timezone of the container
- ${LOCALTIME_PATH_ON_HOST}:${LOCALTIME_PATH_ON_CONTAINER}:${LOCALTIME_OPTIONS} # Map the Localtime of the host to the Timezone of the container
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/17a-ui_gateway_service_auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
container_name: ${NGINX_UI_GATEWAY_CONTAINER_NAME}
hostname: ${NGINX_UI_GATEWAY_HOSTNAME}
depends_on:
opensearch.gateway.rs:
dictionary.rs:
condition: service_started
s3.gateway.rs:
condition: service_started
Expand Down
8 changes: 4 additions & 4 deletions docker-compose/17b-ui_gateway_service_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
condition: service_healthy
# vue.ui:
# condition: service_healthy
opensearch.gateway.rs:
dictionary.rs:
condition: service_started
# adempiere.site:
# condition: service_started
Expand All @@ -20,9 +20,9 @@
- ./nginx/gateway/api_gateway_vue.conf:/etc/nginx/api_gateway.conf
- ./nginx/api_json_errors.conf:/etc/nginx/api_json_errors.conf
#- ./keys/api_keys.conf:/etc/nginx/api_keys.conf
# open search
- ./nginx/upstreams/opensearch_gateway_rs.conf:/etc/nginx/api_upstreams_conf.d/opensearch_gateway_rs.conf
- ./nginx/api/opensearch/:/etc/nginx/api_conf.d/opensearch/
# dictionary
- ./nginx/upstreams/dictionary_rs.conf:/etc/nginx/api_upstreams_conf.d/dictionary_rs.conf
- ./nginx/api/dictionary_rs/:/etc/nginx/api_conf.d/dictionary_rs/
# grpc proxy
- ./nginx/upstreams/adempiere_backend.conf:/etc/nginx/api_upstreams_conf.d/adempiere_backend.conf
- ./nginx/api/backend/:/etc/nginx/api_conf.d/backend/
Expand Down
8 changes: 4 additions & 4 deletions docker-compose/17c-ui_gateway_service_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
condition: service_healthy
# vue.ui:
# condition: service_healthy
opensearch.gateway.rs:
dictionary.rs:
condition: service_started
# adempiere.site:
# condition: service_started
Expand All @@ -22,9 +22,9 @@
# backend
- ./nginx/upstreams/adempiere_backend.conf:/etc/nginx/api_upstreams_conf.d/adempiere_backend.conf
- ./nginx/api/backend/:/etc/nginx/api_conf.d/backend/
# open search
- ./nginx/upstreams/opensearch_gateway_rs.conf:/etc/nginx/api_upstreams_conf.d/opensearch_gateway_rs.conf
- ./nginx/api/opensearch/:/etc/nginx/api_conf.d/opensearch/
# dictionary
- ./nginx/upstreams/dictionary_rs.conf:/etc/nginx/api_upstreams_conf.d/dictionary_rs.conf
- ./nginx/api/dictionary_rs/:/etc/nginx/api_conf.d/dictionary_rs/
# s3
- ./nginx/upstreams/s3_storage.conf:/etc/nginx/api_upstreams_conf.d/s3_storage.conf
- ./nginx/upstreams/s3_console_ui.conf:/etc/nginx/api_upstreams_conf.d/s3_console_ui.conf
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/17d-ui_gateway_service_standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
condition: service_healthy
# vue.ui:
# condition: service_healthy
opensearch.gateway.rs:
dictionary.rs:
condition: service_started
adempiere.site:
condition: service_started
Expand Down
20 changes: 10 additions & 10 deletions docker-compose/docker-compose-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,13 @@ services:
networks:
- adempiere_network

opensearch.gateway.rs:
image: ${OPENSEARCH_GATEWAY_RS_IMAGE}
container_name: ${OPENSEARCH_GATEWAY_RS_CONTAINER_NAME}
hostname: ${OPENSEARCH_GATEWAY_RS_HOSTNAME}
dictionary.rs:
image: ${DICTIONARY_RS_IMAGE}
container_name: ${DICTIONARY_RS_CONTAINER_NAME}
hostname: ${DICTIONARY_RS_HOSTNAME}
restart: ${GENERIC_RESTART}
healthcheck:
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${OPENSEARCH_GATEWAY_RS_PORT}; exit $?;'"
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${DICTIONARY_RS_PORT}; exit $?;'"
interval: 10s
retries: 60
start_period: 20s
Expand All @@ -399,17 +399,17 @@ services:
- ${TIMEZONE_PATH_ON_HOST}:${TIMEZONE_PATH_ON_CONTAINER}:${TIMEZONE_OPTIONS} # Map the Timezone of the host to the Timezone of the container
- ${LOCALTIME_PATH_ON_HOST}:${LOCALTIME_PATH_ON_CONTAINER}:${LOCALTIME_OPTIONS} # Map the Localtime of the host to the Timezone of the container
environment:
PORT: ${OPENSEARCH_GATEWAY_RS_PORT}
KAFKA_HOST: ${OPENSEARCH_GATEWAY_RS_KAFKA_HOST}
OPENSEARCH_URL: ${OPENSEARCH_GATEWAY_RS_OPENSEARCH_URL}
PORT: ${DICTIONARY_RS_PORT}
KAFKA_HOST: ${DICTIONARY_RS_KAFKA_HOST}
OPENSEARCH_URL: ${DICTIONARY_RS_OPENSEARCH_URL}
ALLOWED_ORIGIN: ${ALLOWED_ORIGIN}
depends_on:
opensearch.node:
condition: service_healthy
kafka:
condition: service_healthy
# ports:
# - ${OPENSEARCH_GATEWAY_RS_EXTERNAL_PORT}:${OPENSEARCH_GATEWAY_RS_PORT}
# - ${DICTIONARY_RS_EXTERNAL_PORT}:${DICTIONARY_RS_PORT}
networks:
- adempiere_network

Expand Down Expand Up @@ -450,7 +450,7 @@ services:
container_name: ${NGINX_UI_GATEWAY_CONTAINER_NAME}
hostname: ${NGINX_UI_GATEWAY_HOSTNAME}
depends_on:
opensearch.gateway.rs:
dictionary.rs:
condition: service_started
s3.gateway.rs:
condition: service_started
Expand Down
26 changes: 13 additions & 13 deletions docker-compose/docker-compose-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ services:
networks:
- adempiere_network

opensearch.gateway.rs:
image: ${OPENSEARCH_GATEWAY_RS_IMAGE}
container_name: ${OPENSEARCH_GATEWAY_RS_CONTAINER_NAME}
hostname: ${OPENSEARCH_GATEWAY_RS_HOSTNAME}
dictionary.rs:
image: ${DICTIONARY_RS_IMAGE}
container_name: ${DICTIONARY_RS_CONTAINER_NAME}
hostname: ${DICTIONARY_RS_HOSTNAME}
restart: ${GENERIC_RESTART}
healthcheck:
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${OPENSEARCH_GATEWAY_RS_PORT}; exit $?;'"
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${DICTIONARY_RS_PORT}; exit $?;'"
interval: 10s
retries: 60
start_period: 20s
Expand All @@ -249,17 +249,17 @@ services:
- ${TIMEZONE_PATH_ON_HOST}:${TIMEZONE_PATH_ON_CONTAINER}:${TIMEZONE_OPTIONS} # Map the Timezone of the host to the Timezone of the container
- ${LOCALTIME_PATH_ON_HOST}:${LOCALTIME_PATH_ON_CONTAINER}:${LOCALTIME_OPTIONS} # Map the Localtime of the host to the Timezone of the container
environment:
PORT: ${OPENSEARCH_GATEWAY_RS_PORT}
KAFKA_HOST: ${OPENSEARCH_GATEWAY_RS_KAFKA_HOST}
OPENSEARCH_URL: ${OPENSEARCH_GATEWAY_RS_OPENSEARCH_URL}
PORT: ${DICTIONARY_RS_PORT}
KAFKA_HOST: ${DICTIONARY_RS_KAFKA_HOST}
OPENSEARCH_URL: ${DICTIONARY_RS_OPENSEARCH_URL}
ALLOWED_ORIGIN: ${ALLOWED_ORIGIN}
depends_on:
opensearch.node:
condition: service_healthy
kafka:
condition: service_healthy
# ports:
# - ${OPENSEARCH_GATEWAY_RS_EXTERNAL_PORT}:${OPENSEARCH_GATEWAY_RS_PORT}
# - ${DICTIONARY_RS_EXTERNAL_PORT}:${DICTIONARY_RS_PORT}
networks:
- adempiere_network

Expand All @@ -274,7 +274,7 @@ services:
condition: service_healthy
# vue.ui:
# condition: service_healthy
opensearch.gateway.rs:
dictionary.rs:
condition: service_started
# adempiere.site:
# condition: service_started
Expand All @@ -285,9 +285,9 @@ services:
- ./nginx/gateway/api_gateway_vue.conf:/etc/nginx/api_gateway.conf
- ./nginx/api_json_errors.conf:/etc/nginx/api_json_errors.conf
#- ./keys/api_keys.conf:/etc/nginx/api_keys.conf
# open search
- ./nginx/upstreams/opensearch_gateway_rs.conf:/etc/nginx/api_upstreams_conf.d/opensearch_gateway_rs.conf
- ./nginx/api/opensearch/:/etc/nginx/api_conf.d/opensearch/
# dictionary
- ./nginx/upstreams/dictionary_rs.conf:/etc/nginx/api_upstreams_conf.d/dictionary_rs.conf
- ./nginx/api/dictionary_rs/:/etc/nginx/api_conf.d/dictionary_rs/
# grpc proxy
- ./nginx/upstreams/adempiere_backend.conf:/etc/nginx/api_upstreams_conf.d/adempiere_backend.conf
- ./nginx/api/backend/:/etc/nginx/api_conf.d/backend/
Expand Down
Loading

0 comments on commit 3be6466

Please sign in to comment.