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
CheckInterval
toHealthCheckInterval
- Rename
Timeout
toRequestTimeout
and change value to be duration string. i.e5000
changes to5s
- Add
MaxRequestSize
with value of0
Port
value 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
EnableAsyncReadings
to be under the[Device]
section - Move
AsyncBufferSize
to be under the[Device]
section - Move
labels
to 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
MaxResultCount
and 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-data
Metadata
=>core-metadata
Command
=>core-command
Notifications
=>support-notifications
Scheduler
=>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
Protocol
value to be'http'
- Change
Path
value to be'<service-key>/'
- Change
TokenFile
value to be'/tmp/edgex/secrets/<service-key>/secrets-token.json'
- Change
RootCaCertPath
value to be empty, i.e''
- Change
ServerName
value to be empty, i.e''