Installation and setup
Installation
-
Download the dct-toolkit executable for your platform (Linux, Windows, or macOS) from the Delphix download site and extract it to the machine from which you will run it.
-
Grant execute permission to the binary:
-
On Linux/macOS, open a terminal and run:
Copychmod 777 ./dct-toolkit
-
On Windows, use the following from an elevated Command Prompt (cmd.exe) or PowerShell to grant Full Control to a specified user:
Copyicacls .\dct-toolkit.exe /grant "<username>:F"
-
Replace <username> with the correct Windows user account name.
-
-
Note: The original instructions use CACLS, which is deprecated and may result in errors. The updated icacls command is the preferred method on modern Windows systems.
Setup
A plain text configuration file is needed to get started. The recommended way to create this configuration file is via the following command, available in dct-toolkit:
create_config
Note: HTTPS must be specified for the DCT instance URL for DCT engines when added to dct-toolkit configurations.
For creating a typical configuration with only the required properties, use the following command:
dct-toolkit create_config dctUrl=[URL_of_DCT_instance]/dct/ apiKey=<api key value>
Note: [URL_of_DCT_instance] should be replaced with a proper value and appended with an extra /dct/ path at the end.
This will create the configuration file in the default location under the user's home directory. The full path for the configuration file will be <users home directory>/.dct-toolkit/dct-toolkit.properties
. The create_config
command takes in the options mentioned below:
Option name | Required/optional | Description |
---|---|---|
|
Required |
HTTP/S URL of the DCT instance. |
|
Required |
API key of the account used to connect to the DCT instance pointed by the |
|
Optional |
Fully qualified path of the properties file. If this option is not specified, the properties file will be created in the |
|
Optional |
API version to be used for DCT APIs. If this is not set, the latest API version from the DCT instance will be used. |
|
Optional |
Location of the local api.yaml file. If this is not set, the latest api.yaml file will be downloaded from the DCT instance that is configured. |
|
Optional |
Whether to use insecure SSL connection to the DCT instance. By default, this will be set to false. |
|
Optional |
Whether to disable hostname verifier checks for SSL connection to the DCT instance. By default, this will be set to false. |
|
Optional |
PEM format SSL certificate path to be used for SSL connection to DCT instance. |
|
Optional |
Log level to set. Can be one of OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL. By default, the log level will be INFO. |
|
Optional |
Directory where the logs should be written. By default, logs will be written to the logs directory created under the |
All of these options and help can be requested with the following command:
./dct-toolkit create_config -h
All of the above properties can also be individually specified using environment variables. Environment variable mappings for each of the above properties are as follows:
Property name | Environment variable name |
---|---|
|
DCT_TOOLKIT_DCT_URL |
|
DCT_TOOLKIT_API_KEY |
|
DCT_TOOLKIT_API_VERSION |
|
DCT_TOOLKIT_API_YAML_LOCATION |
|
DCT_TOOLKIT_SSL_INSECURE |
|
DCT_TOOLKIT_SSL_UNSAFE_HOSTNAME_CHECK |
|
DCT_TOOLKIT_SSL_CERT |
|
DCT_TOOLKIT_LOG_LEVEL |
|
DCT_TOOLKIT_LOG_DIR |
Configuring non-sensitive properties in a properties file and sensitive properties (like apiKey
) via an environment variable is acceptable. Properties set via environment variable will take precedence over the ones specified in the properties file.
Once the required properties are available via either the properties file or the environment variable, dct-toolkit is ready for use.