Variation: Using the CLI and the Composite Repository to install Liquibase Business

Variation: Using the CLI and the Composite Repository to install Liquibase Business

Liquibase Business was formerly known as Datical DB.


Use Case: Automated Liquibase Enterprise Installation

This process is designed to support an automated installation of Liquibase Enterprise 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: 

  • Liquibase Enterprise .jar installer (not the .exe file in Windows)

  • Composite Repository (.zip file)

  • Liquibase Business license file (.lic file) obtained from Liquibase 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/LBUSER # Linux User Home /home/LBUSER

Installing Liquibase Business

1. Download Files

Get the following files from software.datical.com for the version of Datical DB you want to install. 

  • Windows or Linux .jar installer - Example: DaticalDB-win-x86_64-5.13.5833.jar

  • Composite  Repository - Example: DaticalDBCompositeRepo-5.12.5833.zip

2. 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' Acces an environment variable by using the following format: ${ENV[variable_name]} --> <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 8 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 8 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/LBUSER/response.xml

  • Windows: C:\Users\LBUSER\response.xml

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

4. Run the Installation

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

java -jar <Liquibase Business-installer>.jar <response-file>.xml

Example:

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

5. Update the PATH

Update the PATH variable to include the path where Liquibase Business is installed. 

6. Install Database Drivers

Use a Liquibaese Business 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 Liquibase Business on Windows hammer installDrivers jar:file:/C:/Users/LBUSER/DaticalDBCompositeRepo-5.12.5833.zip!/
Installing Drivers from the Command Line on Linux
hammer installDrivers jar:file:/home/LBUSER/DaticalDBCompositeRepo-5.12.5833.zip\!/

7. 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 Liquibase Business 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