Infrastructure at your Service

Nabil Saoual

Control-M EM – Control-M Automation API Overview and Installation

By December 15, 2021 Control-M No Comments

Hi Everybody,

Today we will see how to use jobs as code with Control-M.We are aware that Jenkins is able to do that, but now we will try the new BMC product called Control-M Automation API.
As described by BMC ,it is a set of programmatic interfaces that give developers and DevOps engineers access to the capabilities of Control-M within the modern application release process.Job flows and related configuration objects are built in JSON and managed together with other application artifacts in any source code management solution, such as GIT.
It will allow Developers to performs tests and builds with a high flexibility
With Control-M Automation API you will have a set of commands that enables you to test, run and deploy job definitions and packages to Control-M.

Prerequisites

To use this tool you need to install following tools:
-Control-M Workbench
-Nodejs
-Java
-Automation API CLI

Download Control-M Workbench

It is personal Control-M development environment that contains the REST API and enables you to build, run, and test your job flows, without the need for a Control-M installation.

You can install it using Virtual BOX, VMWARE and even Docker!
go to https://controlm.github.io/ and chose the way you want to install workbench

Download and install NODEJS

link to download it:https://nodejs.org/en/

let the folder installation by default:

Check the box to install necessary tools:

Once done a prompt will appear and tool installation will begin

start Workbench appliance using Virtual box

start workbench appliance using Vmware

I have not tested it on my machine but here are the steps to follow if you have Vmware installed:

  • Download the Control-M Workbench for VMware (an OVA file).
  • In the VMware vCenter, select the host where you want to deploy the OVA file.
    Note: The Workbench appliance must be deployed in a vlan with DHCP.
  • Select Actions > Deploy OVF Template.
  • Select the workbench.ova file that you downloaded to your computer, and then follow the instructions in the wizard until you complete the import.
  • After the import has completed, select the imported VM and select Power On.
  • After the Workbench is up and running in the VMware environment, check the Instance screen for the exact IP address. Then, to get started, go to:
    https://8443/automation-api/startHere.html

start Workbench appliance with Docker

You should have Docker installed on your machine ( will prepare a blog regarding this installation )

load then run the workbench image and that’s it you can go to your workbench URL and begin to work

now you can run the image by using this command

C:\Users\nso\Downloads>docker run -dt --hostname=workbench -p 8443:8443 -p 7005 controlm-workbench:9.20.225

Install automation API CLI

Once workbench installation is done you must go to this URL
https://localhost:8443
You have to download this file and load it in order to get all Control-M commands to perform you actions

install it by using the below command:

npm -g install cd ctm-cli.tgz

run the ctm command to have the list of Control-M actions:

Conclusion

Now you have installed Control-M workbench and you can use Control-M Automation API with CTM CLI to import jobs and make your tests for example, as we want to test jobs on our local environment we will need a Control-M agent installation , but we will see that in the incoming  part two of this blog as it is a huge topic. 🙂
Thanks to BMC for giving a complete documentation regarding this tool you can find it on BMC site , so next time we will continue to explore it further by making tests and jobs then why not compare it to Jenkins(by the way I have already seen that we can associate it)
Stay tuned for next part!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Nabil Saoual
Nabil Saoual

Consultant