Installing MettleCI CLI on Windows
Before installing MettleCI Command Line Interface you will need to perform a pre-installation Java update to make sure your Java environment is compatible with MettleCI.
These instructions assume you have already obtained a MettleCI license file. If necessary, you can reuse the license file used by MettleCI Workbench. The installation of Workbench is not a prerequisite to installing the MettleCI Command Line Interface.
Installation
Download the latest MettleCI Command Shell distribution package (see Accessing the MettleCI Software Distribution). Note that Data Migrators provide a single multi-platform distribution package which supports both Unix and Windows.
Extract the distribution package to the
C:\MettleCI\cli
directory on your Windows hostIf you don’t have one already, obtain your MettleCI license file (
mettleci.lic
) from the account manager of the organisation who supplied MettleCI.Save the
mettleci.lic
file to the location specified in theconfig.properties
file. You can change the default location if required.
MettleCI Workbench requires the account running the Workbench Service to have read and write permissions to the MettleCI License file.
Add the MettleCI Command Line to your Windows path
Start the System Control Panel applet (commonly accessed via Start → Settings → Control Panel → System).
Select the Advanced tab, or Advanced System Settings, depending upon your version of Windows.
Click the Environment Variables button.
Under System Variables, select Path, then click either Edit or New, again depending upon your version of Windows.
You'll see a list of folders, such as
C:\Program Files\Windows Resource Kits\Tools\;%SystemRoot%\system32;%SystemRoot%;
… etc.Add
C:\MettleCI\cli;
to your system pathClick OK until you’re out of the Control Panel applet.
Add DataStage Client path to MettleCI Command Line config
The MettleCI CLI locates all required DataStage executables relative to a known DataStage Client or Engine directory.
Edit the config.properties
file to comment and uncomment lines appropriately so the file specifies configuration settings for Windows:
Navigate to your MettleCI CLI directory (
C:\MettleCI\cli
) and open theconfig.properties
fileUpdate
config.properties
with one of the following options, depending upon your deployment topology (ensure you use double backslashes):For a DataStage Client Tier on a Windows host (the most common use case), specify the path to the DataStage
Clients\Classic
directory to the file. i.e.,ds.client.path=C:\\IBM\\InformationServer\\Clients\\Classic
For a DataStage Engine Tier on a Windows host, specify the path to the
DSEngine
directory to the file. e.g.,ds.client.path=C:\\IBM\\InformationServer\\Server\\DSEngine
For a Combined DataStage Engine and Client Tier on a single Windows host (the least common topology), specify the path to the DataStage
Clients\Classic
directory to the file. i.e.,ds.client.path=C:\\IBM\\InformationServer\\Clients\\Classic
e.g.,
# MettleCI Command Line Interface Configure File
# (C)2018-2022 Data Migrators Pty Ltd
# This line is mandatory and tells the CLI where to find your MettleCI License
# file. If you are installing the CLI on the same tier as MettleCI Workbench
# then you should configure this line to point to the same license file used by
# Workbench (and referenced in its config.yml file). This might be...
# Unix
# license.file=../mettleci.lic
# Windows
license.file=mettleci.lic
# If the DataStage client executables directory is not on your system path you
# should uncomment one of the following lines and ensure it correctly points to
# a directory containing the DataStage dsadmin executable. Note that double
# backslashes are required for Windows systems.
# Unix
# ds.client.path=/opt/IBM/InformationServer/Server/DSEngine
# Windows
ds.client.path=C:\\IBM\\InformationServer\\Clients\\Classic
Test your MettleCI CLI
Start a new Command prompt and enter mettleci
to verify your path now contains the MettleCI CLI directory. You should now be presented with the MettleCI prompt like this:
C:\Users\MyUserName>mettleci
MettleCI Command Line (build nnn)
(C) 2018-2022 Data Migrators Pty Ltd
Enter [namespace] [command] [options]
or 'help' for more information, 'exit' or 'quit' to leave.
mettleci>
Use the following command to test that the CLI can work with DataStage properly:-
C:\Users\MyUserName>mettleci datastage execute -domain <domain:port> -server <engine> -username <user> -password <password> -project <project> -jobname TestJob
MettleCI Command Line (build nnn)
(C) 2018-2020 Data Migrators Pty Ltd
Preparing... TestJob
Executing... TestJob
TestJob executed successfully (10.361 seconds)
Upgrade/Downgrade your MettleCI CLI
Unzip your MettleCI CLI distribution media.
Replace your existing
mettleci.cmd
with the version extracted from the download media.Enter the MettleCI CLI console and see that you have a newer version number reported. e.g.,
© 2015-2024 Data Migrators Pty Ltd.