DX Engine Configuration Tool
All Orchestration Flows are defined by a DX Engine Configuration which is stored as plain JSON. One environment maps to one DX Engine Configuration. The DX Engine Configuration can be stored on disk as:
Format | Description |
---|---|
DX Engine Config File | One file with one JSON object |
DX Engine Config Folder | Multiple files split across folder where each folder represents a type of DX Engine Element (e.g. connection, component, webhook, etc.) This is the recommended format and lends itself to versioning. |
The DX Engine Configuration Tool is a CLI tool, dxengine-config
, that allows you to import and export DX Engine Configurations. As such, it is useful for:
- Configuration Management
- Versioning
- CI/CD
- Backup and Restore
- Migration
- Sharing & Collaboration
Structure of a DX Engine Config Folder
channels/
mychannel.json
myOtherChannel.json
components/
componentCodeOne.json
componentCodeTwo.json
secrets/
secretToken.json
otherSecret.json
Each filename is the code of the element. For example: components/componentCodeOne.json
describes the Component with the Component Code componentCodeOne
.
Import a DX Engine Config File
dxengine-config importFromFile --server prod --token xxx.yyy.zzz --log mylog.json <<customerCode>> <<environmentCode>> <<filename>>
When this is run, a backup is created in a folder called _backups
alongside the a DX Engine Config File.
Import a DX Engine Config Folder
dxengine-config importFromFolder --server staging --token xxx.yyy.zzz --log mylog.json <<customerCode>> <<environmentCode>> <<folder>>
When this is run, a backup is created in a folder called _backups
inside the specified a DX Engine Config Folder.
Export to a DX Engine Config File
dxengine-config exportToFile --server prod --token xxx.yyy.zzz <<customerCode>> <<environmentCode>> <<filename>>
Export to a DX Engine Config Folder
dxengine-config exportToFolder --server staging --token xxx.yyy.zzz <<customerCode>> <<environmentCode>> <<folder>>
Log File structure
The log file is a JSON file that contains the following fields:
Field | Description |
---|---|
ts | Timestamp in ISO date format |
message | Message describing the action |
elementType | Type of DX Engine Element (e.g. connection, component, webhook, etc.) |
code | Code of the DX Engine Element |
message | Message describing the action |
isError | Boolean indicating if this log line is an error |
Example:
{ "ts": "2023-09-18T14:27:00Z", "message": "Importing DX Engine Config..." }
{ "ts": "2023-09-18T14:30:00Z", "isError": true, "elementType": "component", "code": "get-product", "message": "Error. Connection Code 'acme' does not exist." }
Having the log file be a JSON file makes it easier to parse and process with tools like jq
.
Working with DX Engine Config Files
If you prefer to work with DX Engine Config Files directly (instead of using the Web UI), the process would be as follows:
- Export to a DX Engine Config Folder
- Add the DX Engine Config Folder to your version control system
- Whenever a files are chanhged, import the DX Engine Config Folder into the DX Engine