Stopping all instances on your PureApplication System

If your PureApplication System is protected by an uninterruptible power supply (UPS), you likely want to automate a graceful and orderly system shutdown in case of a power loss. To do this, you might create a Linux or AIX virtual machine nearby or even within your PureApplication System, have it monitor for SNMP traps indicating the UPS has detected a power loss, and then trigger an orderly shutdown of both the deployed application instances in your system, as well as triggering the shutdown of the system itself.

Here is a simple PureApplication command-line script that will stop all application instances on a system. If you are running this within the system itself, you should remember to exclude your own deployment from the list of deployments being stopped, and stop it last. This script stops all deployments without regard to dependencies between deployments. You may need to modify it so that dependent deployments are stopped in a particular order.

Finally, this script uses a different method than calling stop() on virtual system and virtual application objects. The built-in stop() method waits for each instance to complete stopping before moving to the next. Instead, this script initiates the stop of all instances in parallel, and then waits for all instances to complete stopping.

# Collect all deployments
listOfVsysClassic = deployer.virtualsystems.list()
listOfVsysRegular = deployer.virtualsysteminstances.list()
listOfVApps = deployer.virtualapplicationinstances.list()

# Initiate stops for all deployments
for vsys in listOfVsysClassic :
  print "Stopping vsys classic: %s" %
  vsys.stop() # vsys classic method does not wait
for vsys in listOfVsysRegular :
  print "Stopping vsys: %s" % vsys.deployment_name
  deployer.http.putJSON(vsys.uri, {"operation": "stop"})
for vapp in listOfVApps : # This includes shared services
  print "Stopping vapp: %s" % vapp.deployment_name
  deployer.http.putJSON(vapp.uri, {"operation": "stop"})

# Wait for all deployments to reach a non-transient state
print "Waiting for all instances to stop"
for vsys in listOfVsysClassic :
for vsys in listOfVsysRegular :
for vapp in listOfVApps :

PureApplication 2.2

PureApplication 2.2

Last week, IBM announced the general availability of PureApplication System, Software, and Service version 2.2. There are a lot of exciting developments in this release.

As previously announced, there is now a beta offering of OpenStack Kilo on Intel-based systems.

There are a number of multi-system enhancements that I’m excited about. For example, we are raising the limit on the number of systems in a subdomain from two to four. We are also alleviating the problem of the proliferation of multi-system shared service deployments, by allowing you to link shared service deployments from one multi-system environment profile to another. We’ve also improved the workflow for managing multi-system certificate trust stores.

We’ve significantly enhanced the chargeback reporting capabilities for PureApplication System in version 2.2. And on top of this list of highlights, there are many additional minor enhancements and improvements.

I’m very proud to have had a small part in reaching this milestone. Congratulations to the rest of the PureApplication development team!

PureApplication and hybrid cloud

hybrid-redbookIBM has published a new Redbook that discusses how you can build a hybrid cloud solution using PureApplication System, Software and Service.

I’m privileged to have served as a contributor to this Redbook, with a particular focus on the ways in which PureApplication’s multi-system management and deployment capabilities allow you to build cross-site and hybrid business solutions.

But even beyond multi-system deployment, the power of patterns combined with the variety of PureApplication offerings allows for a genuine “write once, run anywhere” model for applications.

PureApplication in Malaysia

Last week I helped to facilitate an IBM PureApplication pattern camp in Kuala Lumpur, where we helped PureApplication customers and business partners from Malaysia, Thailand and Vietnam to build their own patterns. While there was snow and ice back home in Raleigh, it was very bright and warm in Kuala Lumpur!


Along the way we had a chance to discuss best practices for script packages and scripting, high availability and disaster recovery, multi-system deployment, IBM Bluemix running directly on PureApplication System, and best practices for backup. It’s exciting to see PureApplication growing in Southeast Asia!

Applying maintenace to your PureApplication instance using the command-line interface

The PureApplication Knowledge Center documents how to apply maintenance to your instance using the virtual system management console. If you have maintenance that you want to apply to a large number of virtual system instances, you may wish to automate the application of this maintenance using the command-line interface. The Knowledge Center also documents how you can find and apply ifixes and fixpacks to your virtual system instances using the CLI. The following interactive session using the PureApplication CLI demonstrates how you can do this. First, we apply an ifix to an instance:

[ibmadmin@smoonen pure.cli]$ bin/pure -h
User name: smoonen
Welcome to the IBM PureApplication System CLI.  Enter 'help' if you
need help getting started.
>>> import time
>>> # Locate the virtual system instance
>>> instance = deployer.virtualsysteminstances.list({"deployment_name":"WebSphere advanced cluster"})[0]
>>> # Show me the names of the available fixes
>>> [fix['name'] for fix in instance.findFixes()]
[u'scott-efix', u'']
>>> # Apply the efix to all of the applicable nodes
>>> efix = [fix for fix in instance.findFixes() if fix['name'] == 'scott-efix'][0]
>>> operation = instance.applyFixes([ {'vmtemplate': template, 'vmfixes': [efix] } for template in efix['applicableto'] ])
>>> for x in range(30) :
...    if operation.status != 'PENDING' and operation.status != 'ACTIVE' : break
...    time.sleep(30)
...    operation.refresh()
  "complete_time": "2016-01-19T06:30:15.479Z",
  "name": None,
  "operation_id": "o-f846360f-2f02-458c-873e-6cabbff4335f",
  "parameters": (nested object),
  "result": "{
     "ODRNode.11453175791583.MAINTENANCE": "SUCCESS",
     "IHSNode.11453175791582.MAINTENANCE": "SUCCESS",
     "CustomNode.11453175791585.MAINTENANCE": "SUCCESS",
     "DmgrNode.11453175791584.MAINTENANCE": "SUCCESS"
  "return_value": (nested object),
  "role": "MAINTENANCE",
  "status": "COMPLETED",
  "submit_time": "2016-01-19T06:29:20.119Z",
  "type": "configuration",
  "virtualapplication": (nested object)

You follow a similar procedure, using slightly different method names, to apply a fixpack rather than an ifix:

>>> fixpacks = instance.findFixpacks()['candidate_fixpacks']
>>> # List available fixpacks
>>> for name in fixpacks.keys() :
...   print name + ': ' + str([fixpack['version'] for fixpack in fixpacks[name]])
IBM WebSphere Application Server Network Deployment: [u'']
IBM HTTP Server for WebSphere Application Server: [u'']
WebSphere Customization Toolbox: [u'']
Web Server Plug-ins for IBM WebSphere Application Server: [u'']
>>> # Update WAS ND
>>> operation = instance.applyFixpack('IBM WebSphere Application Server Network Deployment', '')
>>> # Follow similar procedure as earlier to monitor for operation completion
>>> # Repeat to update other products

Powering off your PureApplication System using the command-line interface

The PureApplication knowledge center documents how you can initiate a shutdown of your PureApplication System using the system console, by navigating to the System | System Settings page and clicking the “Shut down the system” link in the Power section:


Alternately, you can use the following statement in the PureApplication command-line interface to initiate a shutdown:

[ibmadmin@smoonen pure.cli]$ bin/pure -h
User name: smoonen
Welcome to the IBM PureApplication Software CLI.  Enter 'help' if you
need help getting started.
>>> admin.racks[0]._restattrs["target_state"] = "shutdown"

Adding a network interface to your PureApplication VM: RedHat

Previously I described how you can add an additional network interface to an existing AIX LPAR on PureApplication System. The instructions are similar if you want to add an interface to an existing RedHat 6.x VM. You should follow the same procedure in the UI to add the new interface to the virtual machine. An asynchronous job is scheduled to add the address; after the job completes, take note of the MAC address and IP address:


Then, login to the virtual machine. Locate the network interface by finding its MAC address, and configure it using the new IP address and the subnet mask for the associated IP group:

[virtuser@ipas-pvm-073-020 ~]$ sudo bash
bash-4.1# ifconfig -a | fgrep -i 00:50:56:8f:1e:a4
eth2      Link encap:Ethernet  HWaddr 00:50:56:8F:1E:A4
bash-4.1# ipcalc -bn
bash-4.1# cat > /etc/sysconfig/network-scripts/ifcfg-eth2 << EOF
> TYPE=Ethernet
> DEVICE=eth2
> STARTMODE='auto'
> ONBOOT=yes
> _nm_name='static-eth2'
bash-4.1# ifup eth2
Determining if ip address is already in use for device eth2...

This configuration will persist across reboot.

The PureApplication family grows

The PureApplication family grows

Congratulations to my fellow PureApplication team members for their achievement in releasing IBM PureApplication Software for US Federal Services this month!

Previously, PureApplication was available in four forms: PureApplication System, a fully integrated appliance with x86 and POWER models; PureApplication Service, running in the IBM SoftLayer public cloud; PureApplication Software, allowing customers to use the PureApplication engine in their own VMWare or PowerVC private clouds; and PureApplication Software on Azure, supporting deployment to the Microsoft Azure public cloud.

Beginning this month, IBM now has PureApplication Software offerings for Amazon’s GovCloud and Commercial Cloud Services (C2S) cloud regions. PureApplication is the premier way to deploy IBM middleware to Amazon EC2.

Deploying a pattern across multiple PureApplication Software VLANs

PureApplication System supports the deployment of your pattern instance across multiple cloud groups using externally managed deployments. You can use this as a way to achieve physical separation of the virtual machines in your deployment onto different compute nodes, and also to achieve network separation of the tiers into different VLANs.

PureApplication Software does not currently support multi-cloud deployments, so in order to achieve physical separation of your workload tiers you must deploy them as separate patterns. However, PureApplication Software does support network separation of the virtual machines of a single pattern instance by selecting different IP groups for each virtual machine.

In order to select different IP groups for each virtual machine, you must click the Prepare to Deploy button instead of the Quick Deploy button when deploying your pattern:


The next screen will present you with a list of the virtual machines in your deployment. If you hover your mouse over any of the virtual machines, you will see details of the network interfaces and, if applicable, storage volumes:


Click on the pencil icon to bring up a dialog that allows you to configure the network interfaces and storage. In this dialog you can select any of the IP groups that are enabled in your environment profile:


Once you have selected the IP groups for each set of virtual machines, you can click Deploy to complete the deployment of the pattern.

PureApplication System Integration

I’m happy to report the publication of a new IBM Redbook, Integrating PureApplication System into an Existing Datacenter, to which I had the privilege of contributing.

In this Redbook we cover a variety of topics, from planning and installation of your PureApplication System, to various forms of post-installation integration with your existing processes. We even cover PureApplication-to-PureApplication integration in the form of multi-system management and deployment.