V2 Migration of Common Configuration
EdgeX 2.0
For EdgeX 2.0 there have been many breaking changes made to the configuration for all services.
This section describes how to migrate the configuration sections that are common to all services. This information only applies if you have existing 1.x configuration that you have modified and need to migrate, rather than use the new V2 version of the configuration and modify it as needed.
Writable
The Writable section has the new InsecureSecrets sub-section. All services need the following added so they can access the Database and/or MessageBus :
[Writable.InsecureSecrets]
[Writable.InsecureSecrets.DB]
path = "redisdb"
[Writable.InsecureSecrets.DB.Secrets]
username = ""
password = ""
Logging
Remove the [Logging] section.
Service
The service section is now common to all EdgeX services. The migration to this new version slightly differs for each class of service, i.e. Core/Support, Device or Application Service. The sub-sections below describe the migration for each class.
Core/Support
For the Core/Support services the following changes are required:
- Remove
BootTimeout - Remove
Protocol - Rename
CheckIntervaltoHealthCheckInterval - Rename
TimeouttoRequestTimeoutand change value to be duration string. i.e5000changes to5s - Add
MaxRequestSizewith value of0 Portvalue changes to be in proper range for new port assignments. See Port Assignments (TBD) section for more details
Device
For Device service the changes are the same as Core/Support above plus the following:
- Remove
ConnectRetries - Move
EnableAsyncReadingsto be under the[Device]section - Move
AsyncBufferSizeto be under the[Device]section - Move
labelsto be under the[Device]section
Application
For Application services the changes are the same as Core/Support above plus the following:
- Remove
ReadMaxLimit - Remove
ClientMonitor - Add
ServerBindAddr = "" # if blank, uses default Go behavior https://golang.org/pkg/net/#Listen - Add
MaxResultCountand set value to0
Databases
Remove the Username and Password settings
Registry
No changes
Clients
The map key names have changed to uses the service key for each of the target services. Each client entry must be changed to use the appropriate service key as follows:
CoreData=>core-dataMetadata=>core-metadataCommand=>core-commandNotifications=>support-notificationsScheduler=>support-scheduler
Remove the [Clients.Logging] section
SecretStore
All service now require the [SecretStore] section. For those that did not have it previously add the following replacing <service-key> with the service's actual service key:
[SecretStore]
Type = 'vault'
Protocol = 'http'
Host = 'localhost'
Port = 8200
Path = '<service-key>/'
TokenFile = '/tmp/edgex/secrets/<service-key>/secrets-token.json'
RootCaCertPath = ''
ServerName = ''
[SecretStore.Authentication]
AuthType = 'X-Vault-Token'
For those service that previously had the [SecretStore] section, make the following changes replacing <service-key> with the service's actual service key:
- Add the
Type = 'vault'setting - Remove
AdditionalRetryAttempts - Remove
RetryWaitPeriod - Change
Protocolvalue to be'http' - Change
Pathvalue to be'<service-key>/' - Change
TokenFilevalue to be'/tmp/edgex/secrets/<service-key>/secrets-token.json' - Change
RootCaCertPathvalue to be empty, i.e'' - Change
ServerNamevalue to be empty, i.e''