Skip to content

Commit

Permalink
Update device-services configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Cherry Wang <[email protected]>
  • Loading branch information
cherrycl committed May 27, 2021
1 parent 8f771ee commit c5a22b4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 176 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ TAF-Common/*
TAF/utils/scripts/docker/*.yml*
TAF/utils/scripts/docker/docker-compose*yaml*
TAF/utils/scripts/docker/common.env
TAF/config/*/configuration.toml
86 changes: 0 additions & 86 deletions TAF/config/device-modbus/configuration.toml

This file was deleted.

2 changes: 1 addition & 1 deletion TAF/config/device-virtual/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

SECURITY_SERVICE_NEEDED = os.getenv("SECURITY_SERVICE_NEEDED")
if SECURITY_SERVICE_NEEDED == 'true':
SERVICE_PORT = "8443/virtualdevice"
SERVICE_PORT = "8443/device-virtual"
else:
SERVICE_PORT = 59900

Expand Down
88 changes: 0 additions & 88 deletions TAF/config/device-virtual/configuration.toml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Resource TAF/testCaseModules/keywords/common/commonKeywords.robot

*** Variables ***
${systemAgentUrl} http://${BASE_URL}:${SYS_MGMT_AGENT_PORT}
${systemAgentUrl} ${URI_SCHEME}://${BASE_URL}:${SYS_MGMT_AGENT_PORT}
11 changes: 11 additions & 0 deletions TAF/utils/scripts/docker/deploy-edgex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ if [ "$TEST_STRATEGY" = "PerformanceMetrics" ]; then
${COMPOSE_IMAGE} -f "${WORK_DIR}/TAF/utils/scripts/docker/docker-compose${APPSERVICE}.yaml" up -d
sleep 5
else
for PROFILE in device-virtual device-modbus; do
docker run --rm -v ${WORK_DIR}:${WORK_DIR}:rw,z -w ${WORK_DIR} -v /var/run/docker.sock:/var/run/docker.sock \
--security-opt label:disable --env CONF_DIR=${CONF_DIR} --env WORK_DIR=${WORK_DIR} ${COMPOSE_IMAGE} -f \
"${WORK_DIR}/TAF/utils/scripts/docker/docker-compose.yaml" up --no-start --no-deps ${PROFILE}

# copy device service default configuration in the res to TAF/config/{service}/res
docker cp edgex-${PROFILE}:/res/configuration.toml ${WORK_DIR}/TAF/config/${PROFILE}
sed -i '/DevicesDir/d' ${WORK_DIR}/TAF/config/${PROFILE}/configuration.toml
sed -i "s/ProfilesDir.*/ProfilesDir = '\\$CONF_DIR'/g" ${WORK_DIR}/TAF/config/${PROFILE}/configuration.toml

done

docker run --rm -v ${WORK_DIR}:${WORK_DIR}:rw,z -w ${WORK_DIR} -v /var/run/docker.sock:/var/run/docker.sock \
--env-file ${WORK_DIR}/TAF/utils/scripts/docker/common-taf.env \
Expand Down

0 comments on commit c5a22b4

Please sign in to comment.