The MettleCI Workbench is browser-based application which is served from a lightweight agent that resides on your DataStage development environment’s Engine Tier.
In order to be able to install Workbench, you must be in a terminal session either logged in as root
or as a user that can sudo
as root
.
Before installing MettleCI Workbench you will need to perform a pre-installation Java update to make sure your Java environment is compatible with MettleCI.
Pre-install steps if operating workbench with a non-default user
By default, the MettleCI Workbench installer creates a new user called mciworkb
(if it doesn’t already exist) and sets its primary group to dstage
. All files created during the installation are owned by that user and group.
If your environment requires you to use a different user, do the following:
As
root
, create an environment variable calledDM_WORKBENCH_USER
and set it to the name of the user you want to use (Note: the Workbench installer will then use this user’s primary group)
Installation / Upgrade
BEFORE YOU UPGRADE: i) Record the ownership and permissions for the MettleCI Home folder (usually ‘/opt/dm/mci’) ii) Back up the MettleCI Home folder.
Download the latest RPM distributable from the MettleCI software download website. The rest of these instructions assume this is located in your user’s HOME directory (~).
From that directory, install the package from the shell of your DataStage Development Engine using Package Manager (RPM) (NOTE: For new installations this will create a user called ‘mciworkb’. A full set of changes that this process performs are listed in the Installation Details section below.)
$> sudo rpm -U dm-mettleci-workbench-x.x-x.noarch.rpm $> # or for IBM AIX... $> sudo rpm -U dm-mettleci-workbench-x.x-x.noarch.rpm --nodeps --ignoreos
… where x.x.x is the build version of the workbench you downloaded.
Request a MettleCI licence from your Data Migrators contact, or request an evaluation licence from the MettleCI software download website. The license will be installed during the first step of the Post Installation wizard process.
In previous versions, it was required to copy your MettleCI licence file (which will be emailed to you) into the location:
/opt/dm/mci/mettleci.lic
. This directory was created for you by the RPM installation process.Start the MettleCI Workbench service using the following command
$> sudo service dm-mettleci-workbench start $> # or for AIX... $> mciworkbench.rc start
Verify your install/upgrade
Verify your Workbench service is running:
$> sudo service dm-mettleci-workbench status $> # or for AIX... $> mciworkbench.rc status
Opening the following URL in your browser:
http://[SERVER_URL]:8080
. and check the build number at the bottom of your Workbench browser screen. This should match the number in the number in the filename of the latest RPM distributable you downloaded and installed. If not, see the troubleshooting article A Workbench update doesn't appear to have installed.
Post-installation
Configure your MettleCI environment by opening the following URL in your browser:
http://[SERVER_URL]:8080
to start a wizard-based process.Follow the setup wizard to provide the various configuration information MettleCI requires, e.g.
Enter the license key which was requested earlier
DataStage environment details
Git repository details (including SSH public key)
Work item management system details (including SSH public key)
Uninstall Workbench
You can uninstall the MettleCI Workbench package like any other RPM package:
$> sudo rpm -e dm-mettleci-workbench-x.x-x.noarch
You'll need to use a similar command to uninstall the Unit Test Harness too.
Downgrading Workbench
If something goes wrong and you need to downgrade your version of MettleCI Workbench, without performing an uninstall/reinstall, you can use the following command:
$> rpm -Uvh --oldpackage dm-mettleci-workbench-x.x-x.noarch.rpm
… where x.x.x is the build version of the workbench you want to downgrade to.
Separating Workbench Application and Data Directories
In the event that there are constraints which prevent using the usual Mettle Home directory /opt/dm/mci
for storage, it is possible to move the ‘MettleHome’ directory to a different location residing in a data area. For example, this would be useful in a grid environment where /opt/dm/mci
is not on shared storage but the data area is on shared storage.
Steps for moving ‘MettleHome' to /data/mci
are as follows:
Shutdown the workbench service
Edit
/opt/dm/mci/config.yml
and changemettleHome
to/data/mci
Move files in
/opt/dm/mci/
to/data/mci
but leave the following files in place:-config.yml
dm-mettleci-workbench
mci.log
mettle-ui-x.x-xxx.jar
METTLE_UI.pid
start-mettleci.sh
Ensure that permissions on
/data/mci
match those of/opt/dm/mci
. By default this ismciworkb:dstage
Start the workbench service
Edit
/opt/IBM/InformationServer/Server/PXEngine/bin/osh-dm
and changeexport DM_METTLE_HOME
to/data/mci
Workbench and unit testing should now work fine. You don’t need to bounce datastage for changes to take effect.
Installing an update to the Unit Test harness will overwrite osh-dm
, so you will need reapply Step 6 after each Unit Test Harness Upgrade.
Workbench upgrades will not require the reapplication of Step 6.
Sysadmin Notes: Installation Details
This section is purely informational, and requires no action
When executed, the MettleCI RPM package installer performs the following actions:
Creates a MettleCI service user account if it doesn’t already exist. By default, this user is called
mciworkb
and is a member of the group DataStage is configured to use (commonlydsadmin
). An alternative MettleCI user and group can be specified.Creates the MettleCI home directory (default
/opt/dm/mci
), owned by the MettleCI service user, with the following contents:$> ls -al /opt/dm/mci/ total 52292 -r-xr----- 1 root dstage 1766 Oct 7 11:11 dm-mettleci-workbench -rwxrwxr-x 1 mciworkb dstage 53531885 Oct 7 11:11 mettle-ui-1.0-449.jar drwxrwxr-x 2 mciworkb dstage 6 Oct 7 11:11 reports drwxrwxr-x 2 mciworkb dstage 6 Oct 7 11:11 specs -rwx------ 1 mciworkb dstage 1675 Oct 7 11:11 workbench_rsa -rwxr-xr-x 1 mciworkb dstage 414 Oct 7 11:11 workbench_rsa.pub
Copies the workbench jar file (mettle-ui-x.x-x.jar) to the MettleCI home
Creates an SSH key pair for Git integration as
workbench_rsa.pub
(public key) andworkbench_rsa
(private) in the MettleCI homeChanges permissions on the private Git SSH key to 700
Creates a
SysVinit
service for the workbench
Running the MettleCI Workbench setup wizard has the following effect:
Creates a
config.yml
file in the MettleCI Home directoryWhen Jira issue management is selected, creates Jira App Link Private Key as
jira_privatekey.pcks8
in the MettleCI home