This page outlines how to automate the Liquibase Enterprise GUI installation on a Windows machine using a .bat file.
The page also provides a sample build.yml file for running via a GitHub Action.
This automation performs the following using an install.bat file:
Moves any existing DaticalDB installation folder to DaticalDB-YYYY-MM-DD-hh-mm-ss
Renames the installation files from eg. DaticalDB-win32.win32.x86_64-7.17.7272.jar to datical.jar, DaticalDBCompositeRepo-7.17.7272.zip to datical.zip, and CustomerEnterpriseLicense.lic to datical.lic
Does a silent install of the GUI using an install_script.xml
Installs the Datical license
Installs the Datical drivers on the CLI
Installs the Datical drivers on the GUI
Copies the Datical license to the install’s repl folder
Step 1: Download necessary installation files and license
The below necessary files have been downloaded from http://software.datical.com and are located in a datical_install folder on the Windows machine, eg.
C:\Users\Administrator\datical_install
. Filenames need to end in .jar, .zip, and .lic.DaticalDB-win32.win32.x86_64-7.XX.XXXX.jar
DaticalDBCompositeRepo-7.XX.XXXX.zip
CustomerEnterpriseLicense.lic
Ensure there is only one version of the install files located in the datical_install folder.
Step 2: Customize the following install_script.xml
Update the <installpath> if required. Currently set to
C:\Users\Administrator\DaticalDB
Make similar adjustments to the <shortcut> nodes below to match the <installpath>
This file needs to also be placed on the Agent in the datical_install folder.
Alternatively you can check this file into source control along with any build scripts for this automation.
<?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)"/> <com.izforge.izpack.panels.TargetPanel id="UNKNOWN (com.izforge.izpack.panels.TargetPanel)"> <installpath>C:\Users\Administrator\DaticalDB</installpath> </com.izforge.izpack.panels.TargetPanel> <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> <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)"> <programGroup name="Datical"/> <shortcut KdeSubstUID="false" categories="" commandLine="" createForAll="false" description="This starts Datical DB" encoding="" group="false" icon="C:\Users\Administrator\DaticalDB\img\datical.ico" iconIndex="0" initialState="1" mimetype="" name="Datical DB" target="C:\Users\Administrator\DaticalDB\datical.exe" terminal="" terminalOptions="" tryexec="" type="2" url="" usertype="0" workingDirectory="C:\Users\Administrator\DaticalDB"/> <shortcut KdeSubstUID="false" categories="" commandLine="" createForAll="false" description="This starts Datical DB" encoding="" group="true" icon="C:\Users\Administrator\DaticalDB\img\datical.ico" iconIndex="0" initialState="1" mimetype="" name="Datical DB" target="C:\Users\Administrator\DaticalDB\datical.exe" terminal="" terminalOptions="" tryexec="" type="1" url="" usertype="0" workingDirectory="C:\Users\Administrator\DaticalDB"/> <shortcut KdeSubstUID="false" categories="" commandLine="-jar "C:\Users\Administrator\DaticalDB\Uninstaller\uninstall.jar"" createForAll="false" description="Datical DB Uninstaller" encoding="" group="true" icon="C:\Users\Administrator\DaticalDB\img\recycle.ico" iconIndex="0" initialState="0" mimetype="" name="Datical DB Uninstaller" target="C:\Program Files (x86)\Java\jre1.8.0_271\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>
Step 3: Call the following install.bat file
The following install.bat file can be called to perform the installation. The following values must be passed to the install.bat:
home_dir, eg.
C:\Users\Administrator
(this needs to be the same <installpath> in Step 2)install_files_dir, eg.
C:\Users\Administrator\datical_install
(this needs to be the same as the datical_install directory in Step 1)
SET home_dir=%1 SET install_files_dir=%2 SET product_dir=%home_dir%\DaticalDB SET REPO=jar:file:/%install_files_dir%/datical.zip!/ echo 'Home Directory: %home_dir%' echo 'Product Directory: %product_dir%' echo 'Install Files Directory: %install_files_dir%' move %product_dir% %product_dir%-%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%-%time:~-11,2%-%time:~-8,2%-%time:~-5,2% rename %install_files_dir%\*.lic datical.lic rename %install_files_dir%\*.jar datical.jar rename %install_files_dir%\*CompositeRepo*.zip datical.zip cd install_files java -jar %install_files_dir%/datical.jar %install_files_dir%/install_script.xml echo 'Install License' call hammer installLicense %install_files_dir%\datical.lic echo 'Show License' call hammer show license echo 'Install Drivers for the CLI' call hammer installDrivers %REPO% echo 'Check Drivers for the CLI' call hammer checkDrivers echo 'Install Drivers for the GUI' %product_dir%\eclipsec.exe -application org.eclipse.equinox.p2.director ^ -noSplash ^ -repository %REPO% ^ -destination %product_dir% ^ -installIUs ^ com.datical.db.drivers.mssql.feature.feature.group,^ com.datical.db.drivers.oracle.feature.feature.group,^ com.datical.db.drivers.db2.feature.feature.group,^ com.datical.db.drivers.postgresql.feature.feature.group,^ com.datical.db.drivers.DaticalJDBC.feature.group %product_dir%\eclipsec.exe -application org.eclipse.equinox.p2.director ^ -noSplash ^ -repository %REPO% ^ -destination %product_dir%\repl ^ -installIUs ^ com.datical.db.drivers.mssql.feature.feature.group,^ com.datical.db.drivers.oracle.feature.feature.group,^ com.datical.db.drivers.db2.feature.feature.group,^ com.datical.db.drivers.postgresql.feature.feature.group,^ com.datical.db.drivers.DaticalJDBC.feature.group echo 'Copy license to repl folder' copy %install_files_dir%\datical.lic %product_dir%\repl
Sample build.yml file for calling the install.bat script via a GitHub Action:
# This is a basic workflow to help you get started with GitHub Actions name: liquibase_install # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch push: branches: - 'main' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: [ self-hosted, windows ] # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 # Runs the Liquibase Install Windows - name: Install Liquibase Enterprise (Windows) if: runner.os == 'Windows' run: | $HOME_DIR=$Env:USERPROFILE $INSTALL_FILES_DIR=$Env:USERPROFILE + "\datical_install" .\install.bat $HOME_DIR $INSTALL_FILES_DIR