The main.json
file specifies a toolkit's type and name, the set of parameters users must fill in when capturing or provisioning data, and schemas for discovering data.
Basic main.json
Structure
Field Name | Type | Description |
---|---|---|
type | String | Must always be "Toolkit" |
name | String | Must match the name of the toolkit's root directory. This name will uniquely identify the toolkit. Names can only include lower-case letters and typically use dashes to break up words. Names cannot start with the string "builtin:" |
prettyName | String | The name of the toolkit as displayed in the Delphix Management application. There are no formatting limitations on this name. |
version | String | The version of the toolkit. It must be of the form <major>.<minor>.<patch> where <major> and <minor> are non-negative integers and <patch> can be any string of letters, numbers, hyphens, and underscores. For example: "1.0.0" or "1.0.DLPX_HOTFIX-123". For more information, see Build a Toolkit: Versioning and Upgrading. |
hostTypes | Array of strings | The types of hosts compatible with the scripts in the toolkit. Must be either Unix toolkits will typically use Bash scripts to do most of their work, whereas Windows toolkits will use Powershell scripts. Is it quite rare to have a toolkit that supports both Unix and Windows. Even with a toolkit that supports both, individual datasets will always be locked to one or the other. That is, it is not possible to take a Unix-synced dataset and provision a clone to Windows target environment (nor vice-versa). Depending on the use case, it may be that writing separate Unix and Windows toolkits makes more sense than writing a single toolkit for both. |
discoveryDefinition | JSON Object | A specification of type For more information about this object, see Build A Toolkit: Discovering Data Sources and Dependencies. |
linkedSourceDefinition | JSON Object | A specification of type For more information about this object, see Build a Toolkit: Linking Data Sources. |
virtualSourceDefinition | JSON Object | A specification of type For more information about this object, see Build a Toolkit: Provisioning Virtual Data Sources. |
snapshotSchema | JSON Object | A JSON schema outlining the metadata stored with each snapshot of data. |
defaultLocale | String | The default locale supported by this toolkit. For example, "en-us". |
Delphix DB main.json
file
{ "type": "Toolkit", "name": "delphixdb", "prettyName": "DelphixDB", "version": "1.0.0", "defaultLocale": "en-us", "hostTypes": ["UNIX"], "discoveryDefinition": { "type": "ToolkitDiscoveryDefinition", "repositorySchema": [{ "type": "DynamicStringParameter", "name": "installPath", "prettyName": "Delphix DB Binary Installation Path", "description": "The path to the Delphix DB installation binaries" }, { "type": "DynamicStringParameter", "name": "version", "prettyName": "Version", "description": "The version of the Delphix DB binaries" }], "repositoryIdentityFields": ["installPath"], "repositoryNameField": "installPath", "sourceConfigSchema": [{ "type": "DynamicStringParameter", "name": "dataPath", "prettyName": "Data Path", "description": "The path to the Delphix DB instance's data" }, { "type": "DynamicIntegerParameter", "name": "port", "prettyName": "Port", "description": "The port of the Delphix DB" }, { "type": "DynamicStringParameter", "name": "dbName", "prettyName": "Delphix DB Name", "description": "The name of the Delphix DB instance." }], "sourceConfigIdentityFields": ["dataPath"], "sourceConfigNameField": "dataPath" }, "linkedSourceDefinition": { "type": "ToolkitLinkedStagedSource", "parameters": [{ "type": "ToolkitParameter", "parameter": { "type": "DynamicStringParameter", "name": "primaryDbName", "prettyName": "Primary DB Name", "description": "The name of the primary database to link." }, "default": "primaryDB" }, { "type": "ToolkitParameter", "parameter": { "type": "DynamicStringParameter", "name": "stagingDbName", "prettyName": "Staging DB Name", "description": "The name of the staging database to create." }, "default": "stagingDB" }, { "type": "ToolkitParameter", "parameter": { "type": "DynamicIntegerParameter", "name": "stagingPort", "prettyName": "Staging Port", "description": "The port of the staging database to create." }, "default": "1234" }] }, "virtualSourceDefinition": { "type": "ToolkitVirtualSource", "parameters": [{ "type": "ToolkitParameter", "parameter": { "type": "DynamicIntegerParameter", "name": "port", "prettyName": "Port", "description": "Port that provisioned database should use." }, "default": "1234" }, { "type": "ToolkitParameter", "parameter": { "type": "DynamicStringParameter", "name": "dbName", "prettyName": "Database Name", "description": "Name to use for newly provisioned database." }, "default": "vdb" }] }, "snapshotSchema": [{ "type": "DynamicStringParameter", "name": "snapshotID", "prettyName": "Snapshot ID", "description": "A unique ID for this snapshot" }] }
The Build API
The Build API is used to define what version of the Delphix Engine this toolkit was built for. It is added to the main.json file by the build-toolkit.py file. The Delphix upload-toolkit.py script uses the Build API when uploading the toolkit, because the script will create a session with the Delphix Engine that has the same version as the Build API. This ensures that the toolkit will go through the appropriate translation logic when being uploaded.
For example, a toolkit built with Delphix version 1.7.0 that is being uploaded to a Delphix Engine with version 1.9.0 will be uploaded via a 1.7.0 session. It will go through translation from 1.7.0 -> 1.8.0 -> 1.9.0 to conform to the current version of the Delphix Engine.