Skip to content

Commit

Permalink
feat: Add MessageBus config for all core/support services
Browse files Browse the repository at this point in the history
This is in preparation from when these service's publish Service Metrics
or System Events to the MessageBus

closes #258

fix: Fix service key for scalability-test-mqtt-export to have app-
prefix

Signed-off-by: Leonard Goodell <[email protected]>
  • Loading branch information
Leonard Goodell committed Aug 2, 2022
1 parent 382adc3 commit a9f3d90
Show file tree
Hide file tree
Showing 27 changed files with 380 additions and 58 deletions.
16 changes: 10 additions & 6 deletions compose-builder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# *******************************************************************************/

.PHONY: help portainer portainer-down \
build compose run pull gen \
build build-canned compose run pull gen \
build-taf taf-compose taf-compose-perf \
get-token upload-tls-cert get-consul-acl-token \
down clean err
Expand Down Expand Up @@ -607,10 +607,10 @@ endif

# Build compose for TAF secure testing (ignore all other compose file options)
ifeq (taf-secty, $(filter taf-secty,$(ARGS)))
TOKEN_LIST:=app-http-export,app-mqtt-export,app-functional-tests,scalability-test-mqtt-export,device-modbus,app-external-mqtt-trigger,device-camera
TOKEN_LIST:=app-http-export,app-mqtt-export,app-functional-tests,app-scalability-test-mqtt-export,device-modbus,app-external-mqtt-trigger,device-camera
# Note that the services in this list should be separated by ';', but that causes issues with build scripts, so
# have to list them individually.
KNOWN_SECRETS_LIST:=redisdb[app-rules-engine],redisdb[app-http-export],redisdb[app-mqtt-export],redisdb[scalability-test-mqtt-export],redisdb[device-modbus],redisdb[device-rest],redisdb[device-virtual],redisdb[device-camera]
KNOWN_SECRETS_LIST:=redisdb[app-rules-engine],redisdb[app-http-export],redisdb[app-mqtt-export],redisdb[app-scalability-test-mqtt-export],redisdb[device-modbus],redisdb[device-rest],redisdb[device-virtual],redisdb[device-camera]
EXTRA_PROXY_ROUTE_LIST:=device-modbus.http://edgex-device-modbus:59901

COMPOSE_FILES:= \
Expand Down Expand Up @@ -693,10 +693,10 @@ else
else
# Build compose for TAF secure performance testing (ignore all other compose file options)
ifeq (taf-perf, $(filter taf-perf,$(ARGS)))
TOKEN_LIST:=app-http-export,app-mqtt-export,app-functional-tests,scalability-test-mqtt-export
TOKEN_LIST:=app-http-export,app-mqtt-export,app-functional-tests,app-scalability-test-mqtt-export
# Note that the services in this list should be separated by ';', but that causes issues with build scripts, so
# have to list them individually.
KNOWN_SECRETS_LIST:=redisdb[app-rules-engine],redisdb[app-http-export],redisdb[app-mqtt-export],redisdb[scalability-test-mqtt-export],redisdb[device-rest],redisdb[device-virtual]
KNOWN_SECRETS_LIST:=redisdb[app-rules-engine],redisdb[app-http-export],redisdb[app-mqtt-export],redisdb[app-scalability-test-mqtt-export],redisdb[device-rest],redisdb[device-virtual]
EXTRA_PROXY_ROUTE_LIST:=device-modbus.http://edgex-device-modbus:59901

COMPOSE_FILES:= \
Expand Down Expand Up @@ -785,7 +785,9 @@ portainer:
portainer-down:
make -C ${RELEASE_FOLDER} portainer-down

build:
build: build-canned build-taf

build-canned:
make compose ds-rest ds-virtual
make compose ds-rest ds-virtual arm64
make compose ds-rest ds-virtual asc-sample
Expand All @@ -794,6 +796,8 @@ build:
make compose ds-rest ds-virtual no-secty arm64
make compose ds-rest ds-virtual asc-sample no-secty
make compose ds-rest ds-virtual asc-sample no-secty arm64

build-taf:
make taf-compose taf-secty
make taf-compose taf-no-secty
make taf-compose taf-secty arm64
Expand Down
39 changes: 34 additions & 5 deletions compose-builder/add-mqtt-messagebus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,45 @@ version: '3.7'

services:
data:
env_file:
- mqtt-bus.env
environment:
MESSAGEQUEUE_TYPE: mqtt
MESSAGEQUEUE_PROTOCOL: tcp
MESSAGEQUEUE_HOST: edgex-mqtt-broker
MESSAGEQUEUE_PORT: 1883
MESSAGEQUEUE_AUTHMODE: none
MESSAGEQUEUE_OPTIONAL_CLIENTID: core-data
depends_on:
- mqtt-broker

metadata:
env_file:
- mqtt-bus.env
environment:
MESSAGEQUEUE_OPTIONAL_CLIENTID: core-metadata
depends_on:
- mqtt-broker

command:
env_file:
- mqtt-bus.env
environment:
MESSAGEQUEUE_OPTIONAL_CLIENTID: core-command
depends_on:
- mqtt-broker

notifications:
env_file:
- mqtt-bus.env
environment:
MESSAGEQUEUE_OPTIONAL_CLIENTID: support-notifications
depends_on:
- mqtt-broker

scheduler:
env_file:
- mqtt-bus.env
environment:
MESSAGEQUEUE_OPTIONAL_CLIENTID: support-scheduler
depends_on:
- mqtt-broker

app-service-rules:
environment:
EDGEX_PROFILE: rules-engine
Expand Down
6 changes: 3 additions & 3 deletions compose-builder/add-taf-app-services-secure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ services:
- common-security.env
- common-sec-stage-gate.env
environment:
SECRETSTORE_PATH: /v1/secret/edgex/scalability-test-mqtt-export/
SECRETSTORE_TOKENFILE: /tmp/edgex/secrets/scalability-test-mqtt-export/secrets-token.json
SECRETSTORE_PATH: /app-scalability-test-mqtt-export
SECRETSTORE_TOKENFILE: /tmp/edgex/secrets/app-scalability-test-mqtt-export/secrets-token.json
volumes:
- edgex-init:/edgex-init:ro,z
- /tmp/edgex/secrets/scalability-test-mqtt-export:/tmp/edgex/secrets/scalability-test-mqtt-export:ro,z
- /tmp/edgex/secrets/app-scalability-test-mqtt-export:/tmp/edgex/secrets/app-scalability-test-mqtt-export:ro,z
depends_on:
- security-bootstrapper
2 changes: 1 addition & 1 deletion compose-builder/add-taf-app-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
- as-common.env
- asc-mqtt-export.env
environment:
EDGEX_SERVICE_KEY: scalability-test-mqtt-export
EDGEX_SERVICE_KEY: app-scalability-test-mqtt-export
SERVICE_HOST: edgex-scalability-test-mqtt-export
WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_CLIENTID: scalability-test-mqtt-export
WRITABLE_LOGLEVEL: DEBUG
Expand Down
1 change: 1 addition & 0 deletions compose-builder/common.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ CLIENTS_CORE_COMMAND_HOST=edgex-core-command
CLIENTS_SUPPORT_NOTIFICATIONS_HOST=edgex-support-notifications
CLIENTS_SUPPORT_SCHEDULER_HOST=edgex-support-scheduler
DATABASES_PRIMARY_HOST=edgex-redis
MESSAGEQUEUE_HOST=edgex-redis
1 change: 0 additions & 1 deletion compose-builder/docker-compose-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ services:
- common.env
environment:
SERVICE_HOST: edgex-core-data
MESSAGEQUEUE_HOST: edgex-redis
depends_on:
- consul
- database
Expand Down
5 changes: 5 additions & 0 deletions compose-builder/mqtt-bus.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MESSAGEQUEUE_TYPE=mqtt
MESSAGEQUEUE_PROTOCOL=tcp
MESSAGEQUEUE_HOST=edgex-mqtt-broker
MESSAGEQUEUE_PORT=1883
MESSAGEQUEUE_AUTHMODE=none
7 changes: 7 additions & 0 deletions docker-compose-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ services:
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_PROFILE: rules-engine
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
Expand Down Expand Up @@ -109,6 +110,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
Expand Down Expand Up @@ -281,6 +283,7 @@ services:
DATABASECONFIG_PATH: /run/redis/conf
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
Expand Down Expand Up @@ -572,6 +575,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
NOTIFICATIONS_SENDER: edgex-core-metadata
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
Expand Down Expand Up @@ -631,6 +635,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
Expand Down Expand Up @@ -801,6 +806,7 @@ services:
EDGEX_SECURITY_SECRET_STORE: "true"
INTERVALACTIONS_SCRUBAGED_HOST: edgex-core-data
INTERVALACTIONS_SCRUBPUSHED_HOST: edgex-core-data
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
Expand Down Expand Up @@ -950,6 +956,7 @@ services:
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
EXECUTORPATH: /sys-mgmt-executor
MESSAGEQUEUE_HOST: edgex-redis
METRICSMECHANISM: executor
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
Expand Down
7 changes: 7 additions & 0 deletions docker-compose-no-secty-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ services:
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_PROFILE: rules-engine
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-app-rules-engine
TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redis
Expand Down Expand Up @@ -71,6 +72,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-core-command
hostname: edgex-core-command
Expand Down Expand Up @@ -140,6 +142,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
hostname: edgex-redis
image: redis:6.2-alpine
Expand Down Expand Up @@ -224,6 +227,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
NOTIFICATIONS_SENDER: edgex-core-metadata
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-core-metadata
Expand Down Expand Up @@ -251,6 +255,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-support-notifications
hostname: edgex-support-notifications
Expand Down Expand Up @@ -308,6 +313,7 @@ services:
EDGEX_SECURITY_SECRET_STORE: "false"
INTERVALACTIONS_SCRUBAGED_HOST: edgex-core-data
INTERVALACTIONS_SCRUBPUSHED_HOST: edgex-core-data
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-support-scheduler
hostname: edgex-support-scheduler
Expand Down Expand Up @@ -339,6 +345,7 @@ services:
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
EXECUTORPATH: /sys-mgmt-executor
MESSAGEQUEUE_HOST: edgex-redis
METRICSMECHANISM: executor
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-sys-mgmt-agent
Expand Down
8 changes: 8 additions & 0 deletions docker-compose-no-secty-with-app-sample-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ services:
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_PROFILE: rules-engine
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-app-rules-engine
TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redis
Expand Down Expand Up @@ -72,6 +73,7 @@ services:
DATABASE_HOST: edgex-redis
EDGEX_PROFILE: sample
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-app-sample
TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redis
Expand Down Expand Up @@ -101,6 +103,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-core-command
hostname: edgex-core-command
Expand Down Expand Up @@ -170,6 +173,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
hostname: edgex-redis
image: redis:6.2-alpine
Expand Down Expand Up @@ -254,6 +258,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
NOTIFICATIONS_SENDER: edgex-core-metadata
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-core-metadata
Expand Down Expand Up @@ -281,6 +286,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-support-notifications
hostname: edgex-support-notifications
Expand Down Expand Up @@ -338,6 +344,7 @@ services:
EDGEX_SECURITY_SECRET_STORE: "false"
INTERVALACTIONS_SCRUBAGED_HOST: edgex-core-data
INTERVALACTIONS_SCRUBPUSHED_HOST: edgex-core-data
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-support-scheduler
hostname: edgex-support-scheduler
Expand Down Expand Up @@ -369,6 +376,7 @@ services:
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
EXECUTORPATH: /sys-mgmt-executor
MESSAGEQUEUE_HOST: edgex-redis
METRICSMECHANISM: executor
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-sys-mgmt-agent
Expand Down
8 changes: 8 additions & 0 deletions docker-compose-no-secty-with-app-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ services:
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_PROFILE: rules-engine
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-app-rules-engine
TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redis
Expand Down Expand Up @@ -72,6 +73,7 @@ services:
DATABASE_HOST: edgex-redis
EDGEX_PROFILE: sample
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-app-sample
TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redis
Expand Down Expand Up @@ -101,6 +103,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-core-command
hostname: edgex-core-command
Expand Down Expand Up @@ -170,6 +173,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
hostname: edgex-redis
image: redis:6.2-alpine
Expand Down Expand Up @@ -254,6 +258,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
NOTIFICATIONS_SENDER: edgex-core-metadata
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-core-metadata
Expand Down Expand Up @@ -281,6 +286,7 @@ services:
CLIENTS_SUPPORT_SCHEDULER_HOST: edgex-support-scheduler
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-support-notifications
hostname: edgex-support-notifications
Expand Down Expand Up @@ -338,6 +344,7 @@ services:
EDGEX_SECURITY_SECRET_STORE: "false"
INTERVALACTIONS_SCRUBAGED_HOST: edgex-core-data
INTERVALACTIONS_SCRUBPUSHED_HOST: edgex-core-data
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-support-scheduler
hostname: edgex-support-scheduler
Expand Down Expand Up @@ -369,6 +376,7 @@ services:
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "false"
EXECUTORPATH: /sys-mgmt-executor
MESSAGEQUEUE_HOST: edgex-redis
METRICSMECHANISM: executor
REGISTRY_HOST: edgex-core-consul
SERVICE_HOST: edgex-sys-mgmt-agent
Expand Down
Loading

0 comments on commit a9f3d90

Please sign in to comment.