Skip to content
Marcin Przepiorowski edited this page Mar 22, 2019 · 12 revisions

Overview

DxToolkit is a set of scripts, which are delivered by the Delphix professional services team. DxToolkit scripts look and feel like UNIX executables, following the typical conventions of using flags for arguments. DxToolkit is written in Perl, but no knowledge of Perl is required unless you want to extend it. In fact, no programming experience whatsoever is required to use the DxToolkit.

Working with DxToolkit

Installation

Dxtoolkit is provided as an archive package of precompiled scripts or as a source code.

Compiled version

Prerequisites

  • OpenSSL 1.0 library is required for Solaris Sparc, Solaris x64, Red Hat 6 and Red Hat 7
  • OpenSSL 0.98 library is required for Red Hat 5

If you don't have required version of OpenSSL library download a version with -openssl- in name, where those libraries are embedded. All Windows version include OpenSSL library.

Archive packages for most popular operating systems can be downloaded from a releases page.

Source version

Prerequisites

Perl version 5.16 or higher

Required packages

  • JSON
  • Date::Manip
  • DateTime::Event::Cron::Quartz
  • DateTime::Format::DateParse
  • Crypt::CBC
  • Crypt::Blowfish
  • Text::CSV
  • Try::Tiny
  • LWP::UserAgent
  • Net::SSLeay
  • IO::Socket::SSL
  • LWP::Protocol::https
  • Term::ReadKey
  • Log::Syslog::Fast

Source code can be downloaded from a main page of dxtoolkit

Configuration

DxToolkit reads the configuration file in JSON format. By default it's looking for dxtools.conf file in location of dxtoolkit script. Configuration file location can specified by -configfile parameter or value of environment variable DXTOOLKIT_CONF.

Field description

  • hostname - Delphix identifier
  • ip__address - Delphi appliance IP address or hostname
  • username - Delphix username
  • password - Delphix username password [ if password is blank or not specified script will ask for it and create a session ]
  • port - Delphix Engine port number
  • default - is this Delphix Engine, a default one - true | false
  • encrypted - is password encrypted - true | false
  • protocol - what protocol will be used for communication - http|https
  • timeout - API call timeout - default 60 sec

Example

{
	"data":[
	{
		"hostname" : "Landshark",
		"ip_address" : "delphix01",
		"username" : "delphix_admin",
		"password" : "delphix",
		"port" : "80",
		"default" : "false",
		"encrypted" : "false",
		"timeout" : "60"
	},
	{
		"hostname" : "Landshark2",
		"ip_address" : "delphix02",
		"username" : "delphix_admin",
		"password" : "delphix",
		"port" : "443",
		"default" : "true",
		"protocol" : "https",
		"encrypted" : "false"
	},
	{
		"hostname" : "Delphix32",
		"ip_address" : "192.168.1.32",
		"username" : "delphix_admin",
		"password" : "818bd243bee573105b258c36489f351b806ee111eeba928ddb4d704f6e797bb6c1ac057e84c851f2",
		"port" : "80",
		"default" : "true",
		"encrypted" : "true"
	}
	]
}

Password encryption procedure

Password encryption is based on an encryption key build as combination of user name, Delphix Engine IP and from version 2.4.X a host name where dxtoolkit is installed. If dxtoolkit configuration file will be shared between different host, password should be encrypted with -shared option and in that case a host name of dxtoolkit installation is excluded from encryption key.

To encrypt a password inside a configuration file the following steps have to be executed:

  • create a configuration file with plain text password and set a flag encrypted to true
  • run a dx_encrypt command to generate a configuration file with an encrypted password.
  • delete a configuration file with a plain passwords

Example of encryption command:

dx_encrypt -plainconfig dxtools.conf.plain -encryptedconfig dxtools.conf
New config file dxtools.conf created.

Example of encryption command with a shared key

dx_encrypt -plainconfig dxtools.conf.plain -encryptedconfig dxtools.conf -shared
New config file dxtools.conf created.

Connecting to Delphix engines

DxToolkit can run an operation on one or all engines configured in configuration file. After successful connection to the Delphix Engine a session is saved for a future usage. Default expired time for a session is set to 30 min and it's a Delphix Engine not a DxToolkit parameter. An existing user session can be destroyed using dx_logout command.

If there is no -d nor -all option specified dxtoolkit command will connect to all engines defined with default=true in configuration file.

  • -d name or –engine name Run command for one Delphix Engine specified by name
  • -all Run command for all Delphix Engines defined in configuration file
  • -dever Set version of API to particular Delphix Engine version. Supported values are 4.1, 4.2, 4.3, 5.0, 5.1, 5.2, 5.3

Common parameters

  • -configfile file Location of configuration file
  • -version Display version
  • -debug n Enable debug mode at level n
  • -help Display help
  • -format Format ( [pretty] | csv | json )
  • -nohead Turns off header

Usage examples

DxToolkit commands

Dxtoolkit commands can be dived into three different groups. First group contains scripts to perform actions on the datasets levels. Examples are: adding a dSource, provisioning a VDB, refreshing a VDB, etc. Second group contains scripts to create and control a Self Service objects from a command line. The last group is a set of commands working on the engine level. This group contains scripts to create or delete users, gather performance statistics, etc.

Dataset commands:

  • dx_get_db_env - to list dSources and VDB's from engine(s) using filters
  • dx_ctl_dsource - to control dSource operations
  • dx_get_dsourcesize - list a size of dSources without Delphix compression ( can be used for ingestion model license check )
  • dx_provision_vdb - to provision a new VDB
  • dx_refrsh_db - to refresh a VDB using snapshot or point in time
  • dx_rewind_db - to rewind a VDB using snapshot or point in time
  • dx_get_hierarchy - to list hierarchy dependency between VDB's and dSource on single engine or between primary and replica engines
  • dx_get_dbhooks - to list or save hooks from dSource or VDB
  • dx_ctl_dbhooks - to create or change hooks on dSource or VDB

Self service commands:

Engine commands:

A full list of DxToolkit command can be found here

You can’t perform that action at this time.