Closed lenny-goodell closed 1 year ago
Test Coverage
Test UoM URI with username-password in URI(non-secty)
Test UoM URI with secret credentials(secty)
core-metadata
with the following data
type=httpheader
headername=Authorization
headercontents=Basic bXl1c2VyOm15cGFzc3dvcmQ=
Test configuration file, device profiles, devices and provision watchers with username-password in URI (non-secty)
EDGEX_CONFIG_FILE
on device-onvif-camera to use the file which located on remote http serverDEVICE > PROFILESDIR, DEVICESDIR, and PROVISIONWATCHERSDIR
to use the file which located on remote http server. examples
PROFILESDIR="http://example.com/devices/profile.json"
DEVICESDIR="http://example.com/devices/device.json"
PROVISIONWATCHERSDIR="http://example.com/devices/provisionwatcher.json"
Test common configuration file (non-secty)
EDGEX_COMMON_CONFIG
to use the file which located on remote http server under core-common-config-bootstrapper in compose fileEDGEX_CONFIG_PROVIDER: none
under core-common-config-bootstrapper in compose file@lenny-intel Would you please help review the test coverage for URI for Files? Please let me know if any concerns. Thank you
@cherrycl , basic UOM cases looks good. but please specify that the remote http server requires basic auth
and that the secret data is stored for Core Metadata.
On the Device service file please specify that the remote http server has the index file for each type that contains the the list of files to load for that file type.
Also, we need case for configuration files (private and common)
https://github.com/edgexfoundry/go-mod-bootstrap/pull/558
EDGEX_CONFIG_FILE
for private and EDGEX_COMMON_CONFIG
for common.
You will need to set EDGEX_CONFIG_PROVIDER
to none
when using EDGEX_COMMON_CONFIG
for common so Consul isn't used to get the common config. You can set EDGEX_COMMON_CONFIG=https://raw.githubusercontent.com/edgexfoundry/edgex-go/main/cmd/core-common-config-bootstrapper/res/configuration.yaml
Use similar for approach for private.
one more missing PR for URI4Files - this is the implementation for device files:
@lenny-intel I tried to deploy services by the compose file which adding the variables under core-common-config-bootstrapper.
EDGEX_COMMON_CONFIG: https://raw.githubusercontent.com/edgexfoundry/edgex-go/main/cmd/core-common-config-bootstrapper/res/configuration.yaml
EDGEX_CONFIG_PROVIDER: none
But got error
level=INFO ts=2023-08-24T03:28:40.601269647Z app=core-common-config-bootstrapper source=config.go:630 msg="Using Configuration provider () from: http://:0 with base path of edgex/v3/core-common-config-bootstrapper"
level=ERROR ts=2023-08-24T03:28:40.601278723Z app=core-common-config-bootstrapper source=main.go:97 msg="failed to create provider client for the common configuration: unable to create Configuration Client: Configuration service host and/or port or serviceKey not set"
Is this an issue or I put the variables to incorrect service?
@lenny-intel The comment for test scenarios were updated.
Test UoM URI with username-password in URI
(non-secty test) and Test UoM URI with secret credentials
(secty test), both are UoM test.Test configuration file, device profiles, devices and provision watchers with username-password in URI
. This includes profile, device and provision watchers remote URI test.Test common configuration file
. Need to confirm the correct behavior.@lenny-intel I am not sure the usage of EDGEX_COMMON_CONFIG
and EDGEX_CONFIG_PROVIDER
. Would you please help me to review the following scenario for the variables?
core-data
service to overwrite the environment variable
EDGEX_COMMON_CONFIG: https://raw.githubusercontent.com/edgexfoundry/edgex-go/main/cmd/core-common-config-bootstrapper/res/configuration.yaml
EDGEX_CONFIG_PROVIDER: none
DATABASE_HOST: edgex-redis
MESSAGEBUS_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
Thanks.
@lenny-intel I tried to deploy services by the compose file which adding the variables under core-common-config-bootstrapper.
EDGEX_COMMON_CONFIG: https://raw.githubusercontent.com/edgexfoundry/edgex-go/main/cmd/core-common-config-bootstrapper/res/configuration.yaml EDGEX_CONFIG_PROVIDER: none
But got error
level=INFO ts=2023-08-24T03:28:40.601269647Z app=core-common-config-bootstrapper source=config.go:630 msg="Using Configuration provider () from: http://:0 with base path of edgex/v3/core-common-config-bootstrapper" level=ERROR ts=2023-08-24T03:28:40.601278723Z app=core-common-config-bootstrapper source=main.go:97 msg="failed to create provider client for the common configuration: unable to create Configuration Client: Configuration service host and/or port or serviceKey not set"
Is this an issue or I put the variables to incorrect service?
I've discussed with Cherry. These envrionment variables should not be defined in the core-common-config-bootstrapper service. They should be defined in the individual service. Thus, there is no problem now.
See ADR here: https://docs.edgexfoundry.org/3.0/design/adr/0027-URIs%20for%20Files/
See PRs here: