HCL Workload Automation, Version 9.4

IBM SmartCloud Provisioning jobs

A Provisioning job interacts with IBM SmartCloud Provisioning to manage resources in a cloud computing environment; you can manage resources, build and manage cloud configurations, and deploy virtual images with patterns and scripts.

To read a real-life scenario that demonstrates how HCL Workload Automation and IBM SmartCloud Provisioning can help you achieve your business goals, see Scenarios: Managing workloads in dynamic environments.

A description of the job properties and valid values are detailed in the context-sensitive help in the Dynamic Workload Console by clicking the question mark (?) icon in the top-right corner of the properties pane.

For more information about Provisioning, see IBM SmartCloud Provisioning Information Center

This section describes the required and optional attributes for Provisioning jobs. Each job definition has the following format and arguments:
Table 1. Required and optional attributes for the definition of a Provisioning job
Attribute Description and value Required
application name provisioning
actionType Valid values:
deploy
Deploy a virtual image in the cloud group and create a new virtual system instance containing the number of virtual image instances you specify.
manage
Start, stop or delete virtual resources (such as virtual machines or virtual images of complex environment).
cloudGroupId The unique identifier of the cloud group from which you are choosing the virtual instance to be deployed.
instanceId The unique identifier of the existing virtual instance on which you are acting. A virtual instance can be one or more virtual machines. If you want to act only on a single virtual machine belonging to current instance, specify its ID as the virtualMachineId attribute.
virtualMachineId The unique identifier of the existing virtual machine on which you are acting.  
VirtualImageId The unique identifier of the existing virtual image that is used as a template for a new virtual image that you are deploying.
instanceNameDeploy The unique name of the virtual instance.
numberOfVirtualMachines The number of virtual machines you are deploying.
description A text string describing the virtual system instance.  
tags An array of tags defined by the user. These user data specified here can be retrieved inside the virtual machine. It can be used to configure a virtual machine at first boot or to run a boot script registered in the virtual machine.  
Size The size of the instance. This is the size of each single virtual machine belonging to the instance. Valid values:
  • xsmall: Extra small
  • small: Small
  • medium: Medium
  • large: Large
  • xlarge: Extra Large
winPassword The administrator password to access the deployed Windows systems.  
unixSSHPublicKey Applicable for UNIX only. The Secure Shell key must be provided by the Provisioning administrator.  

userName

password

The credentials associated with the Provisioning server. As an alternative to hard-coding actual values, you can parametrize in one of the following ways:
  • Enter a username specified in the database with the user definition (it is applicable to all operating systems on this job type) and key the statement:
    <jsdl:password>${password:username}</jsdl:password>
    The password is retrieved from the username user definition in the database and resolved at runtime. See Using user definitions on job types with advanced options for further details.
    You can also specify the user of a different workstation and use the following syntax for the password:
    <jsdl:password>${password:workstation#username}
      </jsdl:password>
  • Enter a user and password defined with the param utility command locally on the dynamic agent that will run the job (if the job is to be submitted to a pool or to a dynamic pool, the definition must be present on all the agents of the pool). Provided you defined the user name with the variable user and a password, the corresponding credential statements would be:
    <jsdl:userName>${agent:user}</jsdl:userName>
    <jsdl:password>${agent:password.user}</jsdl:password>
    The user and password variables are resolved on the agent at runtime. See Defining variables and passwords for local resolution on dynamic agents for further details.
hostname The host name of the Provisioning server.
port The port number of the Provisioning server. The default value is 443.
manageType Valid values:
  • actionStart: Starts the virtual system instance.
  • actionStop: Stops the virtual system instance.
  • actionDelete: Deletes the virtual system instance.
The following example shows a job definition to be used to deploy a virtual machine in the Provisioning environment:
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:
   jsdlprovisioning="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlprovisioning" 
           name="PROVISIONING">
  <jsdl:application name="provisioning">
    <jsdlprovisioning:provisioning>
			<jsdlprovisioning:ProvisioningParameters>
				<jsdlprovisioning:actions>
					<jsdlprovisioning:actionType>
						<jsdlprovisioning:deploy>
							<jsdlprovisioning:groupCloud>
								<jsdlprovisioning:cloudGroupId>8</jsdlprovisioning:cloudGroupId>
							</jsdlprovisioning:groupCloud>
							<jsdlprovisioning:groupVirtualImage>
								<jsdlprovisioning:virtualImageId>52</jsdlprovisioning:virtualImageId>
							</jsdlprovisioning:groupVirtualImage>
							<jsdlprovisioning:instanceNameDeploy>TESTPROP</jsdlprovisioning:instanceNameDeploy>
							<jsdlprovisioning:numberOfVirtualMachines>1</jsdlprovisioning:numberOfVirtualMachines>
							<jsdlprovisioning:description/>
							<jsdlprovisioning:tags/>
							<jsdlprovisioning:size>xsmall</jsdlprovisioning:size>
							<jsdlprovisioning:winPassword/>
							<jsdlprovisioning:unixSSHPublicKey/>
						</jsdlprovisioning:deploy>
					</jsdlprovisioning:actionType>
				</jsdlprovisioning:actions>
				<jsdlprovisioning:connectionInfo>
					<jsdlprovisioning:credentials>
						<jsdl:userName>cbadmin</jsdl:userName>
						<jsdl:password>{aes}2WfJH/3aOxyX2f+QXeW+1YnrN2tM4z338QMYlYVgpOA=</jsdl:password>
					</jsdlprovisioning:credentials>
					<jsdlprovisioning:server>
						<jsdlprovisioning:hostname>9.168.58.192</jsdlprovisioning:hostname>
						<jsdlprovisioning:port>443</jsdlprovisioning:port>
					</jsdlprovisioning:server>
				</jsdlprovisioning:connectionInfo>
			</jsdlprovisioning:ProvisioningParameters>
		</jsdlprovisioning:provisioning>
  </jsdl:application>
</jsdl:jobDefinition>
The following example shows a job definition to be used to stop a virtual machine:
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:
   jsdlprovisioning="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlprovisioning" 
             name="PROVISIONING">
  <jsdl:application name="provisioning">
    <jsdlprovisioning:provisioning>
			<jsdlprovisioning:ProvisioningParameters>
				<jsdlprovisioning:actions>
					<jsdlprovisioning:actionType>
						<jsdlprovisioning:manage>
							<jsdlprovisioning:manageType>actionStop</jsdlprovisioning:manageType>
							<jsdlprovisioning:instanceId>102</jsdlprovisioning:instanceId>
							<jsdlprovisioning:virtualMachineId/>
						</jsdlprovisioning:manage>
					</jsdlprovisioning:actionType>
				</jsdlprovisioning:actions>
				<jsdlprovisioning:connectionInfo>
					<jsdlprovisioning:credentials>
						<jsdl:userName>cbadmin</jsdl:userName>
						<jsdl:password>{aes}2WfJH/3aOxyX2f+QXeW+1YnrN2tM4z338QMYlYVgpOA=</jsdl:password>
					</jsdlprovisioning:credentials>
					<jsdlprovisioning:server>
						<jsdlprovisioning:hostname>9.168.58.192</jsdlprovisioning:hostname>
						<jsdlprovisioning:port>443</jsdlprovisioning:port>
					</jsdlprovisioning:server>
				</jsdlprovisioning:connectionInfo>
			</jsdlprovisioning:ProvisioningParameters>
		</jsdlprovisioning:provisioning>
  </jsdl:application>
</jsdl:jobDefinition>

Scheduling and stopping a job in HCL Workload Automation

You schedule IBM SmartCloud Provisioning jobs by defining them in job streams. Add the job to a job stream with all the necessary scheduling arguments and submit it.

You can submit jobs using the Dynamic Workload Console, Application Lab, or the conman command line.

After submission, when the job is running and is reported in EXEC status in HCL Workload Automation, you can stop it if necessary, by using the kill command. However, this action is effective only on the HCL Workload Automation job, and it does not affect the process or processes running on the IBM SmartCloud Provisioning workstation. When you stop the HCL Workload Automation job, HCL Workload Automation assigns the Error or ABEND status to the HCL Workload Automation job, regardless of the status of the IBM SmartCloud Provisioning job.

Monitoring the job

If the HCL Workload Automation stops when you submit the Provisioning job or while the job is running, HCL Workload Automation begins monitoring the job from where it stopped as soon as the agent restarts.

See also

From the Dynamic Workload Console you can perform the same task as described in

Creating job definitions.

For more information about how to create and edit scheduling objects, see

Designing your Workload.