30
Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments Skill Level: Intermediate Dustin Amrhein Staff Software Engineer IBM Xiao Xing Liang ([email protected]) Software Engineer IBM 27 Jan 2010 The IBM® WebSphere® CloudBurst™ Appliance provides the capability to create highly customized IBM WebSphere Application Server environments and then deploy them into their own cloud. However, the job of the appliance does not end once the environments have been deployed. WebSphere CloudBurst delivers users function that helps you update and maintain these environments. This article discusses how to use WebSphere CloudBurst to apply WebSphere Application Server Hypervisor Edition iFixes, fixpacks, and your own fixes to both images and actual WebSphere Application Server virtual system environments. Introduction Throughout the course of this series, we have discussed how to use the IBM WebSphere CloudBurst Appliance to create and deploy highly customized WebSphere Application Server environments into your very own cloud. Using the appliance, these customizations can be delivered at each layer of the software stack, from the operating system all the way up to the middleware and your applications. The resultant customized environments can be saved on the appliance in the form of patterns, which provide you with the means to simply, rapidly, and consistently deploy complete application environments into a cloud. Maintaining virtualized WebSphere Application Server environments  © Copyright IBM Corporation 2010. All rights reserved. Page 1 of 30

Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

Embed Size (px)

Citation preview

Page 1: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 1/30

Customizing with WebSphere CloudBurst, Part 5:Maintaining virtualized WebSphere ApplicationServer environmentsSkill Level: Intermediate

Dustin AmrheinStaff Software EngineerIBM

Xiao Xing Liang ([email protected] )Software EngineerIBM

27 Jan 2010

The IBM® WebSphere® CloudBurst™ Appliance provides the capability to createhighly customized IBM WebSphere Application Server environments and then deploythem into their own cloud. However, the job of the appliance does not end once theenvironments have been deployed. WebSphere CloudBurst delivers users functionthat helps you update and maintain these environments. This article discusses howto use WebSphere CloudBurst to apply WebSphere Application Server HypervisorEdition iFixes, fixpacks, and your own fixes to both images and actual WebSphereApplication Server virtual system environments.

Introduction

Throughout the course of this series, we have discussed how to use the IBM

WebSphere CloudBurst Appliance to create and deploy highly customizedWebSphere Application Server environments into your very own cloud. Using theappliance, these customizations can be delivered at each layer of the softwarestack, from the operating system all the way up to the middleware and yourapplications. The resultant customized environments can be saved on the appliancein the form of patterns, which provide you with the means to simply, rapidly, andconsistently deploy complete application environments into a cloud.

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 1 of 30

Page 2: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 2/30

Of course, if the WebSphere CloudBurst Appliance only provided you with thecapability to create and deploy WebSphere Application Server environments into acloud, it would be overlooking a significant element in the application environmentlifecycle: maintenance.

Maintaining application environments, whether in a traditional or cloud environment,can occupy a significant and sometimes overwhelming portion of your time.Maintenance actions in such environments include delivering fixes and upgrades toyour applications and to the infrastructure on which they depend. Obviously, theWebSphere CloudBurst Appliance does not eliminate the need for suchmaintenance, but it does provide features that make the delivery of maintenance toyour applications and application infrastructure simple, safe, and fast.

Before looking at the appliance’s maintenance capabilities, it’s important to note thatyou can leverage the maintenance functionality of WebSphere CloudBurst from botha tactical and strategic perspective. The difference between these two approaches isthe resources that you interact with to deliver maintenance. From a tacticalstandpoint, you will primarily interact with WebSphere CloudBurst virtual systems.Strategically, you will deal with updating both WebSphere CloudBurst virtual imagesand patterns. The sections that follow address both tactical and strategicapproaches for these areas:

• Applying interim fixes to deployed virtual systems.

• Applying fixpacks to deployed virtual systems.

• Applying custom maintenance actions.

• Using the command line to automate maintenance actions.• Delivering application updates.

• Creating new, updated patterns.

Tactical maintenance: Virtual systems

Maintaining and updating environments dispensed by WebSphere CloudBurst canbe approached both tactically and strategically. When you talk about a tacticalapproach, you are talking about the capability to directly maintain and update the

deployed WebSphere CloudBurst virtual systems. These virtual systems representWebSphere Application Server cells, and you can use functionality in the applianceto deliver fixes and updates to that system. Specifically, you can use the applianceto apply interim fixes (iFixes), apply service (including the ability to move from oneWebSphere Application Server release level to the next), and deliver updates to yourapplications that are running in the cell.

Applying interim fixes

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 2 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 3: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 3/30

When a bug is discovered and subsequently fixed in the WebSphere ApplicationServer product, IBM delivers the fix in a package called an interim fix, or iFix forshort. As a WebSphere Application Server administrator, you can download thesefixes and then use tools like IBM’s Update Installer to apply the fixes to thenecessary WebSphere Application Server components.

For a virtualized WebSphere Application Server cell that has been dispensed byWebSphere CloudBurst, you could choose to still follow the same process you havealways used to apply iFixes to WebSphere Application Server environments, but theappliance provides a means to do this in a rapid and failsafe manner.

To apply interim fixes to a running virtual system, you first upload the interim fix intothe WebSphere CloudBurst catalog:

1. From the Catalog drop-down menu, select the Emergency Fixes link.

2. Click the green cross to add a new fix, provide the necessary informationin the panel displays, then click OK (Figure 1).Figure 1. Emergency fix information panel

3. You can now upload the PAK file for the interim fix using the file uploaddialog in the Emergency fix files section of the panel. The PAK file thatyou upload into the WebSphere CloudBurst Appliance is the same filethat you would use in a normal WebSphere Application Serverenvironment. There is no special packaging of these files for theappliance.

4. Once you have uploaded the file, you can select a Severity for the fix(optional), and then select the virtual image versions that the iFix isApplicable to . In Figure 2, the 7.0.0.7-ws-was-ifpk98482.pak file hasbeen attached to the emergency fix that was created. In addition, accesswas granted to two different users, the severity was set to normal, and thefix was applied to the WebSphere Application Server 7.0.0.7 virtual

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 3 of 30

Page 4: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 4/30

image. Now that the fix has been defined and a PAK file has beenprovided, you can use WebSphere CloudBurst to apply the iFix.Figure 2. Uploading a PAK file

5. Navigate to the Virtual Systems panel and click on any virtual system onwhich the fix is applicable.

6. Click the wrench icon in the upper-right corner of the page.

7. On the next panel, select Select service level or fixes (Figure 3).Figure 3. Applying an interim fix

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 4 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 5: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 5/30

8. To apply a PAK file that you have uploaded into the WebSphereCloudBurst catalog as an emergency fix, select Apply emergency fixes ,then select the fix or fixes that you want to apply.

9. The default activity is to click OK and apply the fix right away. However,you can schedule the application of the fix for a future time by selectingSchedule service and providing a date and time for the fix to be applied(Figure 4), then click OK.Figure 4. Scheduling fix application

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 5 of 30

Page 6: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 6/30

At this point, WebSphere CloudBurst drives the fix application process. Theappliance first shuts down each virtual machine in the virtual system. Next, theappliance takes a snapshot of the entire system, enabling you to rollback to theprevious system state if undesired behavior results after applying the fix. After takingthe snapshot, WebSphere CloudBurst applies the interim fix to the WebSphereApplication Server installations in each of the virtual machines in your virtual system,then restarts the virtual machines and WebSphere Application Server componentswithin those machines. The status of the virtual system is updated in the console(Figure 5).

Figure 5. Maintenance applied to a virtual system

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 6 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 7: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 7/30

Notice the new Service history section in the virtual system’s detail panel (Figure6). If you expand this section, you will see a complete history of the service that hasbeen applied to the virtual system.

Figure 6. Virtual system service history

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 7 of 30

Page 8: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 8/30

As mentioned above, WebSphere CloudBurst takes a snapshot of the virtual systembefore applying any fix. If you want to rollback to the previous state of the system,simply click the Restore button, circled in Figure 6.

By coupling a simple click-to-apply method for interim fixes with an automaticsnapshot process, applying these fixes with the appliance is both simple and safe.

Applying fixpacks to virtual systems

You can use features in WebSphere CloudBurst to apply fixpacks to the WebSphereApplication Server components in your deployed virtual systems. The process issimilar to the application of interim fixes, and it provides the same simplicity andsafety as that process.

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 8 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 9: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 9/30

Applying fixpacks begins by loading a new WebSphere Application ServerHypervisor Edition virtual image into the WebSphere CloudBurst catalog. This newvirtual image contains all the usual components of the WebSphere ApplicationServer Hypervisor Edition -- namely the operating system, IBM HTTP Server, andWebSphere Application Server parts -- but it also contains maintenance that has

been specifically packaged for WebSphere CloudBurst. This maintenance packageincludes updates to all of the parts (including the operating system) that make up theWebSphere Application Server Hypervisor Edition image.

Consider a case in which you have virtual systems based on WebSphere ApplicationServer V7.0.0.5 and you would like to upgrade those to V7.0.0.7:

1. Upload the new WebSphere Application Server Hypervisor Edition virtualimage that packages release 7.0.0.7. To do this, select the Catalog >Virtual Images , then click on the green arrow.

2. On next panel, provided an http(s) URL to the OVA file location for thevirtual image (Figure 7) and then click OK. The image download processwill begin.Figure 7. Adding a new virtual image

3. When the image download is complete, not only do you have a newvirtual image in your catalog that you can use to build patterns, butbecause of the special maintenance package described above you alsohave the ability to upgrade applicable virtual systems. However, in orderto use the new image to build patterns or apply upgrades, you must firstaccept the licenses associated with the image. To do this, click theAccept link in the License agreement field. Read through any license

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 9 of 30

Page 10: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 10/30

panels that display and click the OK button if you accept.

4. To upgrade existing virtual systems to the version of WebSphereApplication Server packaged in the new image, navigate to VirtualSystems and select the virtual system you want to upgrade.

5. The details for the virtual system display in the right panel. Click on thewrench icon and click the Select service level or fixes link in the dialog(Figure 8).Figure 8. Applying service to virtual systems

6. To apply the upgrade, select Move to service level and then choose the

desired level. WebSphere CloudBurst will only display appropriateupgrade levels for a given virtual system. As with the interim fixapplication process described earlier, you can optionally schedule theservice level upgrade to be applied at a future time. Once you havescheduled the upgrade process and selected the level to upgrade to, clickOK to begin the upgrade.

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 10 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 11: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 11/30

As in the interim fix application process, WebSphere CloudBurst shuts down thevirtual system, takes a snapshot of the entire thing, upgrades the WebSphereApplication Server components in the virtual machines, and then restarts thesystem. At the end, you can view the Service history section on the detail page ofthe virtual system and see that your upgrade was applied (Figure 9).

Figure 9. Upgrade service history

As was the case after applying interim fixes, if any undesired behavior occurred asthe result of applying the upgrade, you can easily roll back by clicking the Restorebutton in the Snapshot section of the virtual system’s detail page.

Using archives for emergency fixes

Earlier, you saw that you can upload PAK files into the WebSphere CloudBurstcatalog and subsequently apply those to a virtual system. In addition to uploadingPAK files into the catalog, you can also upload archive files to be used as anemergency fix.

The archive file contains XML metadata that tells WebSphere CloudBurst how toapply your custom fix, and it also packages the artifacts that you need in order tocarry out the fix action. Although intended primarily for maintenance purposes, fixactions can be anything that you can do in a script or module. The archive is

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 11 of 30

Page 12: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 12/30

restricted to 512 megabytes in size and it can only be run once against a giveneligible virtual system.

Why would you choose to package an emergency fix in an archive? There are manydifferent possibilities; for example, to applying custom fixes to an operating system

(if you are using your own image with Red Hat as the operating system), applyingfixes to custom vendor software that you added into an image during the extend andcapture process, and so on.

Suppose that you have custom anti-virus software installed in one of your virtualimages within the WebSphere CloudBurst catalog. If you have running virtualsystems that are based on this image and the anti-virus software vendor releasesnew updates, you probably want to apply those updates to the virtual systems. To dothis, you could create an archive file and upload it as an emergency fix.

The archive file contains three elements:

• service.xml file

• Custom shell script

• Binaries containing the necessary updates (optional).

Only the first two elements are required. You might not need to package the actualbinaries for the software update if, for example, you retrieve those from the vendorover a network connection during the application of the update. Your service.xml fileto apply this software update has the structure shown in Listing 1.

Listing 1. The service.xml file

<?xml version="1.0" encoding="UTF-8"?><rmsd:Service xmlns="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:rmsd="http://www.ibm.com/websphere/rainmaker/service/servicedescription"xsi:schemaLocation="http://www.ibm.com/websphere/rainmaker/service/servicedescription

./Service.xsd"><rmsd:ImagePrereqs>

<rmsd:prereq name="WAS 7.0.0.7 with anti-virus software" version="7.0.0.7"/></rmsd:ImagePrereqs><rmsd:Packages>

<rmsd:Package name="Anti-virus update" type="ifix" target="APPLICATION"><rmsd:Command name="/bin/sh /tmp/avupdate/updateAntiVirusSoftware.sh">

<rmsd:Log>/tmp/avupdate/logs</rmsd:Log><rmsd:Location>/tmp/avupdate</rmsd:Location>

<rmsd:Timeout>600000</rmsd:Timeout></rmsd:Command></rmsd:Package>

</rmsd:Packages></rmsd:Service>

In service.xml, the virtual image prerequisites for the maintenance package arespecified in the ImagePrereqs element. Details about how to apply themaintenance, including the working directory, log file location, timeout, and which

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 12 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 13: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 13/30

command to invoke, are specified within the Package element. In this case, themaintenance is applicable to the WAS 7.0.0.7 with anti-virus software virtualimage, and the updateAntiVirusSoftware.sh script will be invoked to apply themaintenance.

When you have all the elements needed for the emergency fix, compress them intoan archive, and create a new emergency fix in WebSphere CloudBurst in the samemanner described earlier for PAK files. However, instead of uploading a PAK file forthe emergency fix, upload the new archive.

Figure 10. Creating an emergency fix with an archive

When you upload the archive file, click the refresh icon in the upper-right toolbar(next to the red "X" in Figure 10) and the Applicable to field is automaticallyupdated. This is done by inspecting the metadata regarding image prerequisiteswithin the service.xml file of the archive.

You can now apply the emergency fix in the same manner that described earlier:Navigate to the Virtual Systems page, select the desired virtual system, and thenclick the Apply service wrench icon. When prompted to select the fix to be applied,select Apply emergency fixes and Anti-virus software fix (Figure 11).

Figure 11. Selecting the archive emergency fix

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 13 of 30

Page 14: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 14/30

At this point, simply click OK and WebSphere CloudBurst will apply the fix.Essentially, WebSphere CloudBurst will unzip your archive to the /tmp/avupdatedirectory on the target virtual machine(s) and invoke the /tmp/avupdate/updateAntiVirusSoftware.sh script.

The use cases for archives as emergency fixes in WebSphere CloudBurst areendless. Provided you package the archive with a valid service.xml and valid scriptor module, you can do just about anything you want.

Command line interface options

In WebSphere CloudBurst 1.1, updates were delivered to the command line

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 14 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 15: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 15/30

interface that provide capabilities for the creation and application of fixes andupgrades, as was shown using the Web console above. These new features enableyou to apply a single fix or upgrade, or multiple fixes and upgrades, to a virtualsystem in an automated fashion.

To support these new capabilities, a new resource and new resource collection existin the command line interface. The new resource is cloudburst.fix , and theresource collection is cloudburst.fixes . The resource collection is just that, acollection of cloudburst.fix resources.

The cloudburst.fix resource represents an emergency fix in the WebSphereCloudBurst catalog. You use this resource to create new emergency fixes to bestored in the catalog of your WebSphere CloudBurst Appliance.

In Listing 2, the first line shows the creation of a fix. A JSON structure containing thename of the new fix and location of a PAK file is passed to the create method. Thenext two lines retrieve the resource for a virtual image named WebSphereApplication Server 7.0.0.7 and update the fix resource’s prereqs property to denotethat the fix is applicable to that particular virtual image.

Listing 2. Creating a new emergency fix using cloudburst.fix

>> fix = cloudburst.fix.create({“archive”:”/opt/myfixes/7.0.0.7-ws-was-multios-ifpk97370.pak”, “name”:”PK97370”})

>> targetImage = cloudburst.virtualimages[“WebSphere Application Server 7.0.0.7”][0]>> fix.prereqs.append(targetImage)

Now that the new fix has been created, you can apply the fix on eligible virtualsystems. The cloudburst.virtualsystem resource contains a new method to applyfixes to the system. Consider the case that you have a virtual system created from apattern that is based off on the WebSphere Application Server 7.0.0.7 virtual image.The name of the virtual system is Function Testing for Single Server , and youneed to apply the fix created above to this system. Listing 3 shows how you could dothis.

Listing 3. Applying emergency fixes using cloudburst.virtualsystem

>> fix = cloudburst.fixes[‘PK97370’]>> virtualSystem = cloudburst.virtualsystems[‘Function Testing for Single server’][0]>> virtualSystem.applyFixes(fix)

You can also apply all fixes that are applicable for a given virtual system. To do this,you use the new findFixes method along with the applyFixes method seen above.

Listing 4. Using the findFixes method

>> virtualSystem = cloudburst.virtualsystems[‘Function Testing for Single server’][0]>> fixes = virtualSystem.findFixes()>> virtualSystem.applyFixes()

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 15 of 30

Page 16: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 16/30

Aside from the new findFixes and applyFixes method, there are similar findUpgradesand applyUpgrades methods for virtual system resources. The findUpgrades methodfinds any upgrades that apply to a virtual system resource, while the applyUpgradesmethod applies the upgrades to a given system. These two methods provide theability to apply fixpacks using the command line interface.

The new features delivered to the command line interface in WebSphere CloudBurstV1.1 enable you to automate the application of fixes, upgrades, and even groups offixes to your deployed virtual systems, thus making the task of applying maintenancea consistent and repeatable process.

Delivering application updates

Applying fixes and upgrades to the WebSphere Application Server components inyour application environment is likely only one piece of your overall maintenancepicture. Another significant maintenance responsibility in these environments is thedelivery of updates to the applications running on WebSphere Application Server. Anew feature in WebSphere CloudBurst V1.1 makes it very simple to deliverapplication updates into the environments deployed by the appliance.

In WebSphere CloudBurst V1.0, script packages were automatically invoked nearthe end of the pattern deployment process. While this is still the default behavior,you now have the option of declaring user-initiated script packages. These scriptpackages are invoked when you initiate them via the WebSphere CloudBurstconsole. This enables you to run a script at a time of your choosing, and as manytimes as you desire.

Now, consider a case in which you want to create a script package to install anapplication, but you also know that you will be updating that application over time.Even though WebSphere CloudBurst can provision an entire environment, withapplications, in mere minutes, you might prefer on occasion to simply deliverapplication updates to an already provisioned environment. This is a perfect usecase for the new user-initiated script package capability:

1. To satisfy this use case, it is best to define two new script packages inWebSphere CloudBurst. The first script package will be created toautomate the installing of the application during the pattern deploymentprocess. It will not be user-initiated, but rather it will be automatically

invoked by WebSphere CloudBurst once the necessary WebSphereApplication Server components in the virtual system have been started.Figure 12 shows the definition of a script package that installs anapplication into a WebSphere Application Server environment. TheinstallApp.jy script within the defaultAppInstall.zip file contains the logic toinstall the application. This script retrieves the application from thelocation denoted by the APPLICATION_URL variable, with the name

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 16 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 17: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 17/30

specified by the APPLICATION_NAME variable. When included in apattern, this script package will be automatically invoked by WebSphereCloudBurst near the end of pattern deployment because the Executesfield is set to at virtual system creation.

Figure 12. Default script package

2. With the script package for automating the application installation defined,another script package that is user initiated can be created. This scriptpackage will use the same .zip file and same script package definitionvalues as the first, except for the Working directory and Executes fieldvalues. In addition, there is no need to define environment variables forthe user initiated script package. This is because this script package willonly be used in concert with the one defined above. As such, theAPPLICATION_URL and APPLICATION_NAME environment variableswill already be present in the virtual machine.Figure 13. User initiated script package

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 17 of 30

Page 18: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 18/30

It is good practice for all of your script packages to have unique workingdirectory values, even though it is not necessary in this case becauseboth script packages are using the same .zip file with the same contents.The important distinction between these two script packages is theExecutes field value. In this case, the value is set to when you initiate it,which means that the script package is invoked when you decide, and itcan be invoked as many times as necessary. This is the script packagethat will deliver application updates into the WebSphere ApplicationServer environment.

3. The next step is to create a custom WebSphere CloudBurst pattern anduse the pattern editor to include both of the above script packages. InFigure 14, a basic single server pattern with these two script packages isshown.Figure 14. Pattern with application install and update scriptpackages

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 18 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 19: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 19/30

Deploy the pattern by clicking the Deploy button. Values for both theAPPLICATION_URL and APPLICATION_NAME parameters are suppliedas configuration information, as shown in Figure 15.

Figure 15. Deploying the pattern

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 19 of 30

Page 20: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 20/30

Page 21: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 21/30

5. A look at the WebSphere enterprise applications listing in the WebSphereApplication Server’s administration console should show theMyApplication_v0001 application listed (Figure 17).Figure 17. Application listing in the administration console

6. When a new version of the MyApplication application becomes available,it is delivered into the WebSphere Application Server environment byrunning the user initiated script created earlier. To run the user initiatedscript, return to the Virtual Systems page for this WebSphere ApplicationServer cell. Navigate to the single server’s virtual machine details, andyou should see the user initiated script in the Script Packages section(Figure 18).

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 21 of 30

Page 22: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 22/30

Figure 18. User initiated script package execution

Click the Execute now link to invoke the Install custom application –User Initiated . This will cause the invocation of the installApp.jy script,which will retrieve the application from the location you noted duringdeployment, uninstall the old application, and install the new applicationwith an updated version number. After the script runs, check theWebSphere Application Server administration console, and you shouldsee the new version of the application (Figure 19).

Figure 19. Updated version of MyApplication

You can see the updated MyApplication_v0002 application was successfullyinstalled into the WebSphere Application Server environment.

Strategic maintenance: Images and patterns

While the tactical approach for updating and maintaining WebSphere CloudBurstenvironments applies to running systems, the strategic approach applies to updatingand maintaining images and patterns. You can use functionality provided by theappliance to create customized images and patterns that contain all of the fixes andupdates necessary for your application environment. In addition, you can ensure thatthese updated images and patterns are available to all of the appliances in yourenvironment.

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 22 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 23: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 23/30

Extending virtual images with interim fixes and fixpacks

When you receive an interim fix or fixpack from IBM, there are two considerations forapplying the maintenance:

1. You need to apply the maintenance to any running WebSphereApplication Server environments, as discussed above.

2. Just as importantly, you need to ensure that any subsequent deploymentscontain the necessary update. In WebSphere CloudBurst this means thatyou want to capture that maintenance in a pattern that you can deploy asmany times as necessary.

You can do this by extending a WebSphere Application Server Hypervisor Editionvirtual image, applying the maintenance in the virtual machine created by theappliance, and then capturing the updated image and storing it in the WebSphereCloudBurst catalog. Once the image has been stored, you can create new custompatterns (or clone your existing custom patterns) and select this new image as thebasis for your patterns.

Image extension begins by selecting an image to start with from the WebSphereCloudBurst catalog. In this case, start by selecting the WebSphere ApplicationServer Hypervisor Edition 7.0.0.7 image. With the image is selected, click theExtend button (Figure 20).

Figure 20. Extend WebSphere Application Server 7.0.0.7 virtual image

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 23 of 30

Page 24: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 24/30

Because interim fixes nearly always affect only the WebSphereApplication Server binaries, they can be applied during the imageextension process. However, fixes affecting the configuration orprofiles space (/opt/IBM/WebSphere/Profiles) cannot be appliedduring image extension because changes to this area of the virtualimage are not preserved during the capture process. More detail isavailable in the Information Center .

As part of the image extension process, WebSphere CloudBurst automaticallycreates a standalone server pattern based on the selected virtual image. Thatpattern is then deployed by WebSphere CloudBurst into the private cloud to create arunning virtual machine that you can customize as necessary. These customizationscan be just about anything you need, but in this case we will focus on installinginterim fixes into the virtual machine instance.

When you initially extend a virtual image, WebSphere CloudBurst prompts you for,among other things, a name and version for the new image you are creating. Underthe covers, WebSphere CloudBurst creates and deploys a pattern based on theimage, thus resulting in the creation of a virtual system. The virtual system’s name isa combination of the name you provided for your new virtual image along with theversion you specified. Figure 21 shows a virtual system called WebSphereApplication Server 7.0.0.7 iFix 98482 1.0 that was created as the result of animage extension request.

Figure 21. Install interim fix by apply service

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 24 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 25: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 25/30

Because the extension process creates a virtual system, you can use the interim fixand fixpack techniques described earlier to apply fixes to the virtual system, andrecapture the extended image, including the fixes. Simply click the Apply serviceicon, select the fix or upgrade that you want to install, and then let the applianceapply the maintenance.

When the fix has been applied, the virtual machine state can be captured and storedin the WebSphere CloudBurst catalog as a new virtual image. To do this, navigateback to the Virtual Images section in the WebSphere CloudBurst catalog and selectthe WebSphere Application Server 7.0.0.7 iFix 98482 virtual image. The imageshould still be in Draft state, and you can capture it by clicking the capture icon in theupper-right toolbar. When the capture is complete and stored in the WebSphereCloudBurst catalog, the status message will be updated.

Figure 22. The captured virtual image

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 25 of 30

Page 26: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 26/30

Updating patterns with the new image

Now that you have captured the new image, you can create a new pattern based onthe new image:

1. Navigate to the Patterns page and select an existing pattern to clone, orclick the green cross to create an entirely new pattern. For this example,select the WebSphere single server pattern, and click the clone buttonin the upper-right tool bar.

2. In the next dialog, provide a unique name for your new pattern and, mostimportantly, select the WebSphere Application Server 7.0.0.7 iFix98482 image as the basis for the new pattern.Figure 23. Create new pattern based on new image

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 26 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 27: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 27/30

Selecting the patched image as the basis for your new pattern ensuresthat all virtual machines created as a result of deploying the pattern willcontain the interim fix installed in the custom image. It is important to notethat you can clone any pattern -- whether it is a pattern that was shippedon the appliance or one that you built and customized -- and simply selectthe new virtual image as the basis for the pattern. You might also want touse this process to update patterns even if you have not created customvirtual images. You can clone patterns and change the underlying virtualimage to create a pattern based on a new version of the WebSphereApplication Server, or you can create a new pattern that can be targetedfor a different hypervisor platform. By doing this, you do not lose any ofthe customizations that you have built into the pattern, such as customtopologies, script packages, and advanced options, but you do changethe virtual image from which the virtual machines will be created duringdeployment.

3. After creating the pattern, you can verify the interim fix’s presence bydeploying the pattern and checking the resulting environment. From thePatterns page on the WebSphere CloudBurst console, select your newpattern and click the Deploy button in the center of the panel to deploy avirtual system.

4. When deployment is complete, check that the environment contains thenecessary fixes by first logging into the virtual machine using the SSH linkin the WebSphere CloudBurst console, or by using your own SSH client.Then, you can again use the historyInfo command in the /opt/IBM/WebSphere/AppServer/bin directory. The7.0.0.7-ws-was-ifpk98482 fix should be listed in the installed maintenancepackages.

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 27 of 30

Page 28: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 28/30

Listing 5. Result of historyInfo command

Installation Event------------------------------------------------------------------------Maintenance Package ID 7.0.0.0-WS-WAS-IFPK98482Action installPackage Filename 7.0.0.0-WS-WAS-IFPK98482.pakBackup File Name /opt/IBM/WebSphere/AppServer/properties/version/nif/backup

/7.0.0.0-WS-WAS-IFPK98482.pakTimestamp 2010-12-17 23:33:55-0500Result success

Component Installation Event---------------------------------------------------------------------Maintenance Package ID 7.0.0.0-WS-WAS-IFPK98482Component Name prereq.bansheeAction installUpdate Action replaceTimestamp 2010-12-17 23:33:55-0500Result success

Component Installation Event---------------------------------------------------------------------Maintenance Package ID 7.0.0.0-WS-WAS-IFPK98482Component Name bundle.wsfp.thinclientAction installUpdate Action replaceTimestamp 2010-12-17 23:33:55-0500Result success

The process of installing interim fixes into custom virtual images during theWebSphere CloudBurst extend and capture process provides you with the means toquickly upgrade your WebSphere Application Server environments. You simplycreate a custom virtual image containing the necessary fix or fixes, and create newpatterns based on this image. In this way, you can be sure that all of yourWebSphere Application Server environments created by future pattern deployments

contain the necessary fixes.

Summary

The WebSphere CloudBurst Appliance provides capabilities that address eachcomponent of the lifecycle of a WebSphere Application Server applicationenvironment. Namely, this means you can use the appliance to create, deploy, andmaintain your WebSphere Application Server environment running in a cloud. Inparticular to the maintenance phase of the lifecycle, you can use the WebSphereCloudBurst Appliance to apply both fixes and upgrades. In a tactical sense, this

means applying those fixes and upgrades to the WebSphere CloudBurst virtualsystems running in your cloud. From a strategic perspective, this means patchingand updating the images and patterns that form the environments you deploy to yourcloud. In either case, the WebSphere CloudBurst Appliance provides functionalitythat makes maintaining your application environments simple, safe, and fast.

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environmentsPage 28 of 30 © Copyright IBM Corporation 2010. All rights reserved.

Page 29: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 29/30

ResourcesLearn

• More in this series

• Cloud computing for the enterprise (series)

• WebSphere CloudBurst Appliance product information

• Cloud Computing Journal

• Is there value in cloud computing?

• IBM developerWorks WebSphere

Discuss

• Space: WebSphere Cloud Computing for Developers

• Space: Cloud Computing Central

• YouTube: WebSphere CloudBurst Appliance videos

• Forum: WebSphere CloudBurst Appliance Forum

• Blog: A view from the clouds: Cloud computing for the WebSphere developer

• Follow us on Twitter

About the authorsDustin AmrheinDustin Amrhein joined IBM as a member of the development team for WebSphereApplication Server. While in that position, Dustin worked on the development of Webservices infrastructure and Web services programming models. In addition, Dustinlead the technical effort in the development of a Java RESTful services framework. Inhis current role, Dustin is a technical evangelist for emerging technologies in IBM’sWebSphere portfolio. His current focus is on WebSphere technologies that delivercloud computing capabilities, including the WebSphere CloudBurst Appliance.

Xiao Xing LiangXiao Xing Liang is a software engineer working at the SOA Design Center in theChina Development Lab. He is an IBM Certified WebSphere Enterprise Developerand an IBM Certified SOA Solution Designer. His current focus is on SOA

ibm.com/developerWorks developerWorks®

Maintaining virtualized WebSphere Application Server environments © Copyright IBM Corporation 2010. All rights reserved. Page 29 of 30

Page 30: Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environments

8/14/2019 Customizing with WebSphere CloudBurst, Part 5: Maintaining virtualized WebSphere Application Server environme…

http://slidepdf.com/reader/full/customizing-with-websphere-cloudburst-part-5-maintaining-virtualized-websphere 30/30

governance and related topics including WebSphere Service Registry andRepository, Rational Asset Manager, Tivoli Application Dependency DiscoveryManager, and Tivoli Change and Configuration Management Database.

developerWorks® ibm.com/developerWorks

Maintaining virtualized WebSphere Application Server environments