I just recently posted a SoftLayer activity library to the Citrix Developer Network (CDN). The SoftLayer activity library allows you to order and cancel Cloud Computing Instances (CCIs) on the SoftLayer CloudLayer. This library also allows you to retrieve information about the instances, create templates from the instances, change the power state, and much more!
The activity library and setup instructions can be downloaded here.
This activity library includes the following activities. There’s a lot more I can add to the library, but this should give you a great start for automating various functions on SoftLayer within Citrix Workflow Studio workflows.
|Connect To SoftLayer||Creates a SoftLayer connection using a specified API Username and API Key.|
|Cancel Instance||Cancels (deletes) an instance that is running on the SoftLayer account|
|Create Template||Creates a template from an existing virtual machine instance on the SoftLayer account|
|Disconnect From SoftLayer||Cancels the SoftLayer connection|
|Delete Template||Deletes a template from the SoftLayer account|
|Get Instance Info||Retrieves information for a single active instance running on the SoftLayer account|
|Get Instances||Retrieves the list of all active instances running on the SoftLayer account|
|Get Package Info||Retrieves package information from the SoftLayer account|
|Get Power State||Retrieves the current power state of an instance on the SoftLayer account|
|Get Pricing Info||Retrieves pricing code information from SoftLayer. Pricing codes include things such as OS ID, RAM ID, and CPU ID. This info is needed for placing an order for starting a new instance on the SoftLayer account.|
|Get Template Info||Gathers information about a template within the Softlayer account|
|Get Templates||Retrieves the list of templates stored on the SoftLayer account|
|Get Vlan Info||Retrieves vlan information from the Softlayer account|
|Place Order||Places an order to start a new virtual machine instance on the SoftLayer account|
|Pause Instance||Pauses an instance that is currently running on the SoftLayer account|
|Power Off Instance (Hard)||Performs a hard shutdown of an instance within the SoftLayer account. This is similar to the “force shutdown” command of a XenServer virtual machine that performs a hard shutdown.|
|Power Off Instance (Soft)||Performs a soft shutdown of an instance within the SoftLayer account. This is similar to the “shutdown” command of a XenServer virtual machine that performs a graceful shutdown.|
|Power On Instance||Starts an instance on the SoftLayer account that was previously shut down.|
|Reboot Instance (Hard)||Performs a hard reboot of an instance within the SoftLayer account. This is similar to the “force reboot” command of a XenServer virtual machine that performs a hard reboot.|
|Reboot Instance (Soft)||Performs a soft reboot of an instance within the SoftLayer account. This is similar to the “reboot” command of a XenServer virtual machine that performs a graceful reboot.|
|Resume Instance||Resumes an instance that is currently paused on the SoftLayer account|
To use this activity library, you need to be aware of the following items:
- SoftLayer API Username and API Key are required – once you have your SoftLayer account set up, navigate to https://manage.softlayer.com/Administrative/apiKeychain to generate your own API Key. The SoftLayer activity library will require the API username and API key assigned to your account.
- SoftLayer API is a private API – this means that to execute a workflow from the SoftLayer activity library, (1) your Workflow Studio machine needs to have a VPN connection to SoftLayer or (2) place Workflow Studio on a Cloud Computing Instance (CCI) running on SoftLayer. The instructions for creating your own VPN connection to SoftLayer are provided here – https://manage.softlayer.com/PrivateNetwork/vpn.
I’m going to start up a new blog series that discusses how to use the various activities within this library. Essentially all workflows will start with a Connect to SoftLayer activity and end with a Disconnect from SoftLayer activity. Stay tuned for this upcoming blog series!
The following resources were used in developing the SoftLayer activity library for Citrix Workflow Studio:
- SoftLayer Developer Network – http://sldn.softlayer.com/
- SoftLayer API – http://sldn.softlayer.com/wiki/index.php/The_SoftLayer_API
I created a blog series about how to use this activity library which is listed below.
- Getting Started
- Ordering instances on SoftLayer
- Checking status of instances on SoftLayer
- Cancelling instances on SoftLayer
- Creating templates on SoftLayer
Ask-the-Architect Site: http://community.citrix.com/p/product-automation#home
Follow Me on twitter: http://twitter.com/citrixedy