Export and import packages
Kx Control contains a complete import/export facility to support export from one Control installation and import into another. The package structure contains a series of XML files in different directories with a package-definition file at the top of the structure.
Export a package
The package can be built manually using the Package Exporter.
Right-click on the
dhtPackage and select Open Package Exporter from the context menu.
A new tab opens with a list of all the entities in the package.
Some entities are missing from the package (e.g. dashboard, connections), because a package was not specified when these entities were created. They can be added.
Expand the Unpackaged Entities folder in the navigator tree.
Drag dhtRDBConnection and dhtDashboard into the Package Exporter tree.
In the Package Exporter check Include Child Dependencies
Include Child Dependencies means that any child entities of a selected parent are automatically included. For example, if exporting an Analytic Group, all its members will be exported
- Include Permissions means the permissions are exported as well. This will allow the set up of the same user groups, users and permissioning levels when a package is imported.
|Include Child Dependencies||Any child entities of a selected parent are automatically included. For example, if exporting an Analytics Group, all its members will be exported|
|Include Permissions||The permissions are exported as well. Set up the same user groups and users as when a package was imported.|
Save and Export All the package.
|Git commit/push||Pushes the current package to a git repository or just the changes since the last commit|
|Save||Saves just the package definition but not the package entities.|
|Export package locally||Saves the package to the client machine.|
|Export to||Saves the package to a directory you choose on the server|
|Export all||Export the entire package from scratch.|
Import a package
The package needs to be imported to test it against a clean installation.
- On the current environment, use the Export package locally option to obtain a ZIP file.
- On a different environment log in to Kx Control.
- Open the package importer from the Tools -> and click the Import Package Zip button.
- Type in the dhtPackage name (the export config file in zip must match this name).
- Press the Select zip to upload button in the dialog, and choose the ZIP file you just downloaded.
- The package should import successfully and show up in the navigator and the package importer tab.
Packages can be copied into the packages directory and imported using the package import option. In the image below, the dhtPackage is not visible in the navigator but is visible in the list of available packages. Select the package and press Select all in the right hand tree view. Then press Import and the package will be imported and appear in the navigator tree.
If required, a partial import of the package can be made using select by checking/unchecking entities. Kx Control will create a checkpoint before it does the import and, if there is a failure, it will automatically roll back.
It also does a dependency check to ensure all the required elements are available. If they aren’t, the import will fail with a dependency error. The package should be re-exported to include the missing items.
Kx Control can be set up to re-export packages automatically periodically using the
dc_housekeeping_auto_export process instance.
A package can also be imported from a git repository. Once imported, the package export and importer are the two means of committing changes and pulling changes. More information is available in the Kx Control documentation under Release management.