Liquibase Enterprise was formerly known as Datical DB.

Using the CLI and the Composite Repository to install Liquibase Enterprise

Use Case: Automated Datical DB Installation

This process is designed to support an automated installation of Datical DB on Windows and Linux systems. Typically the process is run through automation software like Jenkins. Run through the process manually to test it. 

It can also be used for installations in environments that have no internet access. 

File Requirements

You need the following files for this type of installation: 

  • Datical DB .jar installer (not the .exe file in Windows)
  • Composite Repository (.zip file)
  • Datical DB license file (.lic file) obtained from Datical Support
  • Response file (.xml) created in one of two ways
    • Using the provided template as a basis
    • Generated at the end of a GUI based installation: The last step of the GUI installer has a button that will generate a response file based on the parameters you selected during that installation. This can be saved to the local system.

The procedure assumes that you have placed the files in your user directory. Example:

# Windows User Home
C:/USERS/DATUSER

# Linux User Home
/home/DATUSER


Installing Datical DB

1. Download Files

Get the following files from https://download.liquibase.com/ for the version of Datical DB you want to install. 

  • Windows installer (.exe file) - Example: DaticalDB-win-x86_64-7.16.7223.exe
  • Composite repository - Example: DaticalDBCompositeRepo-7.16.7223.zip

2. Verify the JRE Version on the Installation Host

Run the following "java -version" command from a command prompt to check that you are running a supported version of the JRE (version 1.11.x)

# java –version
java version "1.11.0_xx"
Java(TM) SE Runtime Environment (build 1.11.0_xxx)
Java HotSpot(TM) Client VM (build 24.75-b04, mixed mode, sharing)

3. Create a Response File

By modifying the provided sample response file

For your convenience, a sample XML response file with helpful comments can be downloaded here: response.xml

Sample installer response file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<AutomatedInstallation langpack="eng">
	<com.izforge.izpack.panels.HelloPanel id="UNKNOWN (com.izforge.izpack.panels.HelloPanel)"/>
	<com.izforge.izpack.panels.LicencePanel id="UNKNOWN (com.izforge.izpack.panels.LicencePanel)"/>
<!-- 
	INSTALL PATH SPECIFICATION
		Provide desired installation path in the 'installpath' element 
		Once specified, the installpath will be reused throughout response.xml to specify the location of product files, the uninstaller and shortcuts 
		Environment variables can be used when building out the 'installpath' 
		Access an environment variable by using the following format: ${ENV[variable_name]}
        NOTE: If your installpath element includes a space, you will get an ArrayIndexOutOfBoundsException after install that can be safely ignored. 
-->
	<com.izforge.izpack.panels.TargetPanel id="UNKNOWN (com.izforge.izpack.panels.TargetPanel)">
		<installpath>${ENV[USERPROFILE]}\DaticalInstallPath</installpath>
	</com.izforge.izpack.panels.TargetPanel>
<!-- 
	COMPONENT SPECIFICATION
		The section below allows you to select which components of Datical DB you widh to install.
		By default, all components are selected.
		To skip installation of a given component, set the 'selected' attribute for that component to 'false'
		
		NOTE: 
			- The following components are always installed regardless of changes to the settings below:
				- Datical DB UI
				- Datical DB license manager
				- Java 11 Runtime
			- If managing EnterpriseDB with this installation, installing the Edbplus Client is strongly recommended
			- If managing Oracle with this installation, installing the Oracle Instant Client is strongly recommended
-->
	<com.izforge.izpack.panels.PacksPanel id="UNKNOWN (com.izforge.izpack.panels.PacksPanel)">
		<pack index="0" name="Datical DB UI" selected="true"/>
		<pack index="1" name="Datical DB CLI" selected="true"/>
		<pack index="2" name="Datical DB license manager" selected="true"/>
		<pack index="3" name="Java 11 Runtime" selected="true"/>
		<pack index="4" name="Oracle Instant Client" selected="true"/>
		<pack index="5" name="Edbplus Client" selected="true"/>
	</com.izforge.izpack.panels.PacksPanel>
<!--
	LICENSE SPECIFICATION:
		Use the 'entry' element below to point to the location of your Datical License file on the system.
		This entry must be a fully qualified path.  Environment variables or other substitution methods MAY NOT be used.
		The license file will be installed during product installation if a path to a valid license is provided.
		If a path is not provided or the path does not lead to a valid license, you will be prompted to install the license when the product is launched.
-->
	<com.izforge.izpack.panels.UserInputPanel id="SelectLicenseFilePanel">
		<userInput>
			<entry key="license.path" value=""/>
		</userInput>
	</com.izforge.izpack.panels.UserInputPanel>
	<com.izforge.izpack.panels.InstallPanel id="UNKNOWN (com.izforge.izpack.panels.InstallPanel)"/>
	<com.izforge.izpack.panels.ShortcutPanel id="UNKNOWN (com.izforge.izpack.panels.ShortcutPanel)"/>
<!--
	SHORTCUT CREATION
		If you wish to create start menu and desktop shortcuts after a successful installation:
			- Delete the line that precedes this comment
			- Uncomment the block directly below
-->
<!--
	<com.izforge.izpack.panels.ShortcutPanel id="UNKNOWN (com.izforge.izpack.panels.ShortcutPanel)">
		<programGroup name="Datical"/>
		<shortcut KdeSubstUID="false" categories="" commandLine="" createForAll="false" description="This starts Datical DB" encoding="" group="false" icon="$INSTALL_PATH\img\datical.ico" iconIndex="0" initialState="1" mimetype="" name="Datical DB" target="$INSTALL_PATH\datical.exe" terminal="" terminalOptions="" tryexec="" type="2" url="" usertype="0" workingDirectory="$INSTALL_PATH"/>
		<shortcut KdeSubstUID="false" categories="" commandLine="" createForAll="false" description="This starts Datical DB" encoding="" group="true" icon="$INSTALL_PATH\img\datical.ico" iconIndex="0" initialState="1" mimetype="" name="Datical DB" target="$INSTALL_PATH\datical.exe" terminal="" terminalOptions="" tryexec="" type="1" url="" usertype="0" workingDirectory="$INSTALL_PATH"/>
		<shortcut KdeSubstUID="false" categories="" commandLine="-jar "$INSTALL_PATH\Uninstaller\uninstall.jar"" createForAll="false" description="Datical DB Uninstaller" encoding="" group="true" icon="$INSTALL_PATH\img\recycle.ico" iconIndex="0" initialState="0" mimetype="" name="Datical DB Uninstaller" target="$JAVA_HOME\bin\javaw.exe" terminal="" terminalOptions="" tryexec="" type="1" url="" usertype="0" workingDirectory=""/>
	</com.izforge.izpack.panels.ShortcutPanel>
-->
	<com.izforge.izpack.panels.FinishPanel id="UNKNOWN (com.izforge.izpack.panels.FinishPanel)"/>
</AutomatedInstallation>

As part of an installation using the GUI installer

Run a manual installation using the GUI. At the end you are prompted whether you want to save a script of the installation process. 

Click Generate an automatic installation script before you exit the installation. 

Save the script in the directory where the installer file was saved, for example:

  • Linux: /home/DATUSER/response.xml
  • Windows: C:\Users\DATUSER\response.xml

4. Edit the Response File

If there are changes you need to make (installation location, for example), edit the response file.  Consult the sample file for helpful comments on configuring the response file: response.xml

5. Run the Installation

In the directory that contains the installation .jar, composite repository .zip, and response file .xml, run the following command: 

java -jar <DaticalDB-installer>.jar  <response-file>.xml

Example:

java -jar ./DaticalDB-win32.win32.x86_64-5.13.5388.jar response.xml

6. Update the PATH

Update the PATH variable to include the path where Datical DB is installed. 

7. Install Database Drivers

Use a Datical DB CLI command to install the database drivers from the composite repository. 

hammer installDrivers jar:file:/<path-to-composite-repo>

Example:

Installing Drivers from the Command Line on Windows
# NOTE: Specify the drive letter as shown when installing drivers for Datical DB on Windows 
hammer installDrivers jar:file:/C:/Users/DATUSER/DaticalDBCompositeRepo-5.12.5833.zip!/
Installing Drivers from the Command Line on Linux
hammer installDrivers jar:file:/home/DATUSER/DaticalDBCompositeRepo-5.12.5833.zip\!/

8. Verify Database Drivers

Run the following command to check that the drivers were installed correctly: 

hammer checkDrivers

Automation Scripts

When you create an automated installation, there are two steps:

  1. Install Datical DB clients
  2. Install database drivers

For best results, place them in separate steps and set the script logic so that the second step runs only if the first step was successful. 




Copyright © Liquibase 2012-2022 - Proprietary and Confidential