IBM SoftLayer jobs
An IBM SoftLayer job defines, schedules, monitors, and controls operations related to IBM SoftLayer virtual servers. You can add one or more IBM SoftLayer jobs in the job stream that automates your business process flow, to provide a flexible and dynamic allocation of cloud resources to your workload.
Prerequisites
Before you can define IBM SoftLayer jobs, you must have a SoftLayer account. Log in to the SoftLayer Customer Portal and get the user name and API key required to connect to the SoftLayer cloud.
IBM SoftLayer job definition
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 creating jobs using the various supported product interfaces, see Defining a job.
Attribute | Description and value | Required |
---|---|---|
Connection attributes | ||
Url | The SoftLayer cloud URL. Default value is api-dev.softlayer.com/rest/v3. | ✓ |
Username | The user name associated to your IBM SoftLayer account. | ✓ |
Key | The API access key associated to your IBM SoftLayer account. | ✓ |
Action attributes when managing an existing IBM SoftLayer virtual server | ||
Virtual Server | The IBM SoftLayer virtual server whose configuration you want to change. | ✓ |
Change Power State | To change the power state of the virtual server, specify the new state:
|
|
Take Snapshot | To capture an image of the virtual server to quickly replicate its configuration. | |
Image Type | The image type:
|
|
Image Name | The Image Template name. | |
Notes | Any note about the image template. | |
Remove | To remove the virtual server. | |
Action attributes when creating a new IBM SoftLayer virtual server | ||
Host Name | The host name for the new virtual server. | ✓ |
Domain | The domain for the new virtual server. | ✓ |
Location | The IBM SoftLayer geographical location (data center) for the new virtual server. | ✓ |
O.S. | The operating system to install on the new virtual server. | ✓ |
Number of CPUs | The number of CPU cores to allocate. | ✓ |
Memory | The amount of memory to allocate in megabytes. | ✓ |
Billing | The billing type for the new virtual server:
|
✓ |
Disk Type | The disk type for the new virtual server:
|
✓ |
IBMSoftLayerJobExecutor.properties file
The properties file is automatically generated either when you perform a "Test Connection" from the Dynamic Workload Console in the job definition panels, or when you submit the job to run the first time. Once the file has been created, you can customize it. This is especially useful when you need to schedule several jobs of the same type. You can specify the values in the properties file and avoid having to provide information such as credentials and other information, for each job. You can override the values in the properties files by defining different values at job definition time.
url=url (default value is api-dev.softlayer.com/rest/v3)username=username
timeout=number of seconds (default value is 3600)
location=[{"longname”:”longname”,”name”:”name” },
{"longname”:”longname”,”name”:”name” },…]
operating system=[{"operatingsystemlongname":"operatingsystemlongname",
"operatingSystemReferenceCode":"operatingSystemReferenceCode "},
{"operatingsystemlongname":"operatingsystemlongname",
"operatingSystemReferenceCode":"operatingSystemReferenceCode "},…]
The timeout property can be specified only in the properties file and represents the maximum
time in seconds that the job waits for IBM SoftLayer to complete the requested
action. When the timeout expires, the job is terminated with ABEND status. When the properties file
is created, the timeout default is set to 3600. If the property is modified and the timeout is set
to blank, the job waits for 600 seconds. For a description of each of the properties, see the
corresponding job attribute description. The following is an example of the IBM SoftLayer properties file:
url=api-dev.softlayer.com/rest/v3
username=my_name
timeout=44400
location=[{"longname":"Amsterdam","name":"ams01"},{"longname":"Amsterdam","name":"ams03"},
{"longname":"Chennai","name":"che01"},{"longname":"Dallas","name":"dal01"},{"longname":"Dallas","name":"dal05"},
{"longname":"Dallas","name":"dal06"},{"longname":"Dallas","name":"dal09"},{"longname":"Dallas","name":"dal10"},
{"longname":"Dallas","name":"dal12"},{"longname":"Dallas","name":"dal13"},{"longname":"Frankfurt","name":"fra02"}]
operatingsystem=[{"operatingsystemlongname":"CentOS Latest","operatingSystemReferenceCode":"CENTOS_LATEST"},
{"operatingsystemlongname":"CentOS Latest (64 bit)","operatingSystemReferenceCode":"CENTOS_LATEST_64"},
{"operatingsystemlongname":"CentOS Latest (32 bit)","operatingSystemReferenceCode":"CENTOS_LATEST_32"},
{"operatingsystemlongname":"Red Hat Enterprise Linux 7.x Minimal Install
(64 bit)","operatingSystemReferenceCode":"REDHAT_7_64"}]
Scheduling and stopping a job in HCL Workload Automation
You schedule HCL Workload Automation IBM SoftLayer jobs by defining them in job streams. Add the job to a job stream with all the necessary scheduling arguments and submit the job stream.
You can submit jobs by using the Dynamic Workload Console, Application Lab or the conman command line. See Scheduling and submitting jobs and job streams for information about how to schedule and submit jobs and job streams using the various interfaces.
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.
Monitoring a job
If the HCL Workload Automation agent stops when you submit the IBM SoftLayer job, or while the job is running, the job restarts automatically as soon as the agent restarts.
For information about how to monitor jobs using the different product interfaces available, see Monitoring HCL Workload Automation jobs.
Job properties
While the job is running, you can track the status of the job and analyze the properties of the job. In particular, in the Extra Information section, if the job contains variables, you can verify the value passed to the variable from the remote system. Some job streams use the variable passing feature, for example, the value of a variable specified in job 1, contained in job stream A, is required by job 2 in order to run in the same job stream.
conman sj <job_name>;props
where
<job_name> is the IBM SoftLayer job name. The properties are listed in the Extra Information section of the output command.
For information about passing job properties, see Passing job properties from one job to another in the same job stream instance.
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.xxx.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdlsoftlayer="http://www.xxx.com/xmlns/prod/scheduling/1.0/jsdlsoftlayer" name="SOFTLAYER">
<jsdl:application name="softlayer">
<jsdlsoftlayer:softlayer>
<jsdlsoftlayer:SoftLayerParameters>
<jsdlsoftlayer:Connection>
<jsdlsoftlayer:connectionInfo>
<jsdlsoftlayer:url></jsdlsoftlayer:url>
<jsdlsoftlayer:username>my_name</jsdlsoftlayer:username>
<jsdlsoftlayer:key>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</jsdlsoftlayer:key>
</jsdlsoftlayer:connectionInfo>
</jsdlsoftlayer:Connection>
<jsdlsoftlayer:ManageInstance>
<jsdlsoftlayer:virtualserver>
<jsdlsoftlayer:virtualservername></jsdlsoftlayer:virtualservername>
</jsdlsoftlayer:virtualserver>
<jsdlsoftlayer:actions>
<jsdlsoftlayer:changepowerstate>
<jsdlsoftlayer:powerstate>nonepowerstate</jsdlsoftlayer:powerstate>
</jsdlsoftlayer:changepowerstate>
</jsdlsoftlayer:actions>
</jsdlsoftlayer:ManageInstance>
<jsdlsoftlayer:CreateInstance>
<jsdlsoftlayer:hostname>hostname</jsdlsoftlayer:hostname>
<jsdlsoftlayer:domain>example.com</jsdlsoftlayer:domain>
<jsdlsoftlayer:location>Amsterdam - ams01</jsdlsoftlayer:location>
<jsdlsoftlayer:operatingsystem>CentOS 6.x Minimal Install (64 bit) –
CENTOS_6_64</jsdlsoftlayer:operatingsystem>
<jsdlsoftlayer:numberofcpus>cpus1</jsdlsoftlayer:numberofcpus>
<jsdlsoftlayer:memory>memory1</jsdlsoftlayer:memory>
<jsdlsoftlayer:billing>hourly</jsdlsoftlayer:billing>
<jsdlsoftlayer:disktype>local</jsdlsoftlayer:disktype>
</jsdlsoftlayer:CreateInstance>
</jsdlsoftlayer:SoftLayerParameters>
</jsdlsoftlayer:softlayer>
</jsdl:application>
</jsdl:jobDefinition>
Job log content
For information about how to display the job log from the various supported interfaces, see Analyzing the job log.
For example, you can see the job log content by running conman sj <job_name>;stdlist, where <job_name> is the IBM SoftLayer job name.
See also
From the Dynamic Workload Console you can perform the same task as described in
For more information about how to create and edit scheduling objects, see