Installation and setup

Installation

  1. 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.

  2. Grant execute permission to the binary:

    1. On Linux/macOS, open a terminal and run:

      Copy
      chmod 777 ./dct-toolkit
    2. On Windows, use the following from an elevated Command Prompt (cmd.exe) or PowerShell to grant Full Control to a specified user:

      Copy
      icacls .\dct-toolkit.exe /grant "<username>:F"
      1. 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:

Copy
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:

Copy
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

dctUrl

Required

HTTP/S URL of the DCT instance.

apiKey

Required

API key of the account used to connect to the DCT instance pointed by the dctUrl option.

configFileOutputLocation

Optional

Fully qualified path of the properties file. If this option is not specified, the properties file will be created in the .dct-toolkit folder under the user's home directory. If this option is specified, the DCT_TOOLKIT_CONFIG_FILEenvironment variable needs to be exported to point to the config file, in order for the config file to be effective.

apiVersion

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.

apiYamlLocation

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.

--insecureSSL

Optional

Whether to use insecure SSL connection to the DCT instance. By default, this will be set to false.

--unsafeHostnameCheck

Optional

Whether to disable hostname verifier checks for SSL connection to the DCT instance. By default, this will be set to false.

sslCertificate

Optional

PEM format SSL certificate path to be used for SSL connection to DCT instance.

logLevel

Optional

Log level to set. Can be one of OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL. By default, the log level will be INFO.

logDir

Optional

Directory where the logs should be written. By default, logs will be written to the logs directory created under the .dct-toolkit folder in the user's home directory.

All of these options and help can be requested with the following command:

Copy
./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

dctUrl

DCT_TOOLKIT_DCT_URL

apiKey

DCT_TOOLKIT_API_KEY

apiVersion

DCT_TOOLKIT_API_VERSION

apiYamlLocation

DCT_TOOLKIT_API_YAML_LOCATION

--insecureSSL

DCT_TOOLKIT_SSL_INSECURE

--unsafeHostnameCheck

DCT_TOOLKIT_SSL_UNSAFE_HOSTNAME_CHECK

sslCertificate

DCT_TOOLKIT_SSL_CERT

logLevel

DCT_TOOLKIT_LOG_LEVEL

logDir

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.