One of the latest advancements in Workload Automation is the introduction of the Orchestration Command Line Interface (OCLI). This tool allows users to interact with the master engine via the command line, enabling powerful automation capabilities. Next month, we will directly compare OCLI to Conman and Composer. For now, let’s focus on setting up OCLI properly.
OCLI Configuration Overview
OCLI relies on a hidden directory to store access configurations, including encryption-secured authentication details. The directory is located at:
/home/{userid}/.OCLI
Within this directory, multiple files and subdirectories exist, but the most critical file is config.yaml, which holds all necessary configuration data. If you have never used OCLI before, this directory does not yet exist, so we must initiate its setup.
Initial Setup Steps
1. Source the Workload Automation Environment
source /TWShomedir/twa_env.sh
Expected output:
Setting CLI environment variables for server CLI .... IBM Workload Scheduler Environment Successfully Set !!! IBM Workload Automation Environment Successfully Set !!!
2. Run an OCLI Command to Trigger Setup
ocli plan sj @#final.@
Upon execution, you will be prompted for:
- Hostname: Enter the fully qualified master server name.
- Port: Default is 443, but typically, it should be 31116.
Example response:
Enter a valid hostname:
Enter a valid port. If no value is specified, the port 443 is used by default.
3. Handling Certificate Issues If you receive the error:
AWSMRC025E An error occurred during the communication to the server: [x509: certificate is not valid for any names, but wanted to match <hostname>].
Solution:
- Edit the config.yaml file located in /home/{userid}/.OCLI
- Locate the line with insecure: and change it to:
insecure: true
Ensure proper spacing (insecure: true with a space between the colon and true).
4. Download Required Certificates
- Re-run the ocli command.
- When prompted, confirm downloading certificates by selecting Yes.
5. Fixing Authentication Issues If you encounter:
AWSMRC019E An error occurred during the communication to the server. Check your connection parameters.
Follow these steps:
- Log in to the DWC.
- Click on the user icon (top-right corner) > Manage API Keys.
- Select the master engine used for the hostname.
- Click Add New, assign a name (avoid reserved characters), and click Submit.
- Copy the generated JWT key.
- Edit the config.yaml file and paste the JWT key into the jwt: field.
6. Verify OCLI Functionality
- Run the command again:
ocli plan sj @#final.@
- Expected output example:
.OCLI]$ ocli plan sj @#final.@
HCL Orchestration Command Line Interface(linux)/OCLI 2.1.0.0
Licensed Materials – Property of HCL
(c) Copyright HCL Technologies Ltd. 2019, 2024.
(Est) (Est)
Workstation Job Stream SchedTime Job State Pr Start Elapse ReturnCode Dependencies
EU-HWS-LNX275_XA#FINAL 2359 02/12 **************************************** SUCC 10 02/12 00:00 {02/12/25}
[Carry]
SWITCHPLAN SUCC 10 02/12 00:00 0 #J9944
EU-HWS-LNX275_XA#FINAL 2359 02/13 **************************************** HOLD 10(23:59)(00:00) [Carry];<02/16
STARTAPPSERVER HOLD 10 (00:00) 0
MAKEPLAN HOLD 10 (00:00) 0 STARTAPPSERVER
EU-HWS-LNX275_XA#FINAL 2359 02/12 **************************************** SUCC 10 02/12 00:00 {02/12/25}
[Carry]
MAKEPLAN SUCC 10 02/12 00:00 0 #J9813
EU-HWS-LNX275_XA#FINAL 2359 02/13 **************************************** HOLD 10(23:59)(00:00) [Carry];<02/16
SWITCHPLAN HOLD 10 (00:00) 0 MAKEPLAN
EU-HWS-LNX275_XA#FINAL 2359 02/12 **************************************** SUCC 10 02/12 00:00 {02/12/25}
[Carry]
STARTAPPSERVER SUCC 10 02/12 00:00 0 #J9682
Your OCLI is now successfully configured and ready to use for automating and monitoring Workload Automation tasks!