This article shows how to maintain software bundles on IBM SmartCloud Enterprise. Using an example, this article describes the steps for capturing a new private image with a pre-installed software bundle and use the software on a Linux® virtual machine. You should have a basic familiarity with cloud concepts. To try the steps in this article, you need a user account on IBM SmartCloud Enterprise.
In Part 1, you learned how to create software bundles for virtual machines on IBM SmartCloud Enterprise. Now you'll use that bundle to create a custom image. Let's jump right in.
- Go to ICCT UI, click Images > Build Images. You can also go back to the Welcome page and click Build and Manage Images.
Figure 1. Building images in ICCT
- Click Import from Cloud Provider.
- Select RedHat Enterprise Linux 6 64-bit in the left panel and click
Add to add it to the Images to import panel. Click Import.
Figure 2. Import RedHat Enterprise Linux 6 64-bit image
-
The image metadata is imported and listed in the left pane.
Select the image to see image details displayed in the right pane.
Figure 3. Details of RedHat Enterprise Linux 6 64-bit
- Click the Extend icon in the right pane, enter the information, and
click Create. This starts a new Image Design visible in the left pane.
Figure 4. Extend image
- In the right pane, click Start Editing. An image status message
displays "Out of Sync". Expand the Software Bundles section
to add the Google Chrome software bundle created in Part 1.
Figure 5. Expand Software Bundles
- Click Add Bundle. A dialog box appears to let you select bundles
compatible with this image. Google Chrome is listed.
Figure 6. Add Google Chrome software bundle to image
-
Select Google Chrome and click Add.
Figure 7. GoogleChrome added to image design
- Click Save, Done Editing, and
Synchronize. The agreement page is displayed. Note the local Enablement bundle that is added by ICCT by default.
Click I agree, then click Done.
Figure 8. Synchronize image
-
ICCT calls the SmartCloud APIs to provision the base image. After the instance is created,
ICCT downloads and installs the software bundles. Login to the SmartCloud Portal
to see the instances. You can see the temporary instance requesting (see the name with a
unique ID after the image name RHEL6WithGoogleChrome) and then in a provisioning state in
the SmartCloud Portal. You might have to refresh the Control Panel to see the software bundle in the list after the instance is provisioned.
Figure 9. Provisioning instance in SmartCloud after synchronization
- When the temporary instance is created, it's status becomes Active in the SmartCloud portal.
Figure 10. Instance provisioned in SmartCloud after synchronization
- After the instance is Active, ICCT starts installing the software bundles. You can
go back to the ICCT GUI and click Refresh for the image. The image
status shows Synchronizing with a description below it, "Installing execution
package on VM."
Figure 11. Refresh image status in Image Construction and Composition Tool
Figure 12. Synchronization failed in ICCT
If there is an error, then login to the temporary instance, check and fix the error in the scripts in RAM and ICCT, and click again on Synchronize. The old temporary instance is deleted and a new one is created by ICCT.
Figure 13. Successful synchronization in ICCT
The image status is updated to Synchronized when ICCT is done installing the software
bundles. You can login to the instance and check that Google Chrome is installed. Check the IP address of the temporary instance on the SmartCloud Portal with ${SmartCloud_VM} so that you can SSH to the instance as idcuser.
Verify Google Chrome is working
To verify that Google Chrome works on this temporary instance:
- Start the vncserver on the instance and open port 5901, connect using vncviewer, and start Google Chrome. Use your IP address for the instructions, not the ones shown in the code.
ssh idcuser@${SmartCloud_VM} Last login: Fri Mar 2 14:43:35 2012 from vhost4244.site2.compute.ihost.com [idcuser@vhost0134 ~]$ vncserver -geometry 1280x1024 -depth 16
- A password is required to access your desktops.
Password: Verify: xauth: creating new authority file /home/idcuser/.Xauthority New 'vhost0134:1 (idcuser)' desktop is vhost0134:1 Creating default startup script /home/idcuser/.vnc/xstartup Starting applications specified in /home/idcuser/.vnc/xstartup Log file is /home/idcuser/.vnc/vhost0134:1.log [idcuser@vhost0134 ~]$ sudo iptables -I INPUT -m state --state NEW -p tcp --destination-port 5901 -j ACCEPT
- Run
vncviewer ${SmartCloud_VM}:1andstart /opt/google/chrome/google-chrometo verify that it works.
For security purposes, instead of using the process above, you may want to start the VNC over an SSH tunnel, like so:
ssh -i ~/.ssh/key_name -L 5901:${SmartCloud_VM}:5901 idcuser@${SmartCloud_VM}
|
Then run vncviewer localhost:1 and start /opt/google/chrome/google-chrome to verify that it works.
Figure 14. Start Chrome in SmartCloud instance
Close Google Chrome. Make any further manual changes that you want to persist to the instance and logout of the instance.
Now that the temporary instance is working as expected, capture this as an image to avoid reinstalling Google Chrome during later deployments.
- Click the Capture button in ICCT. The image moves to a synchronizing state in the ICCT GUI.
Figure 15. Using Capture to create image in ICCT
- A notification for the saved image is listed on the Instance tab for the temporary instance in the SmartCloud
Portal.
Figure 16. Image save notification
This starts the capture of a new private image with Google Chrome pre-installed.
- On the Image tab in the SmartCloud Portal, the new private RHEL6WithGoogleChrome image is in the capturing state.
Figure 17. Capturing image in SmartCloud
After a new image is captured, you can create a new instance from the captured image directly from SmartCloud Portal. The temporary instance is automatically deleted by ICCT.
- When the image shows a Captured status, refresh the Control Panel, go back to the
Images tab and select the captured image to see the software bundles for the image. The software bundles are updated when ICCT updates the Semantic Topology file for the RAM image asset after the image is successfully captured.
Figure 18. Image available in SmartCloud
The image with Google Chrome pre-installed is now available to create new instances.
-
When you click the Refresh icon in ICCT, you should see the image status as Capture Complete.
Figure 19. Capture complete in ICCT
-
You can check the details of the RHEL6WithGoogleChrome image (Template Topology asset) in RAM.
Figure 20. General details of the Template Topology asset in RAM
-
Looking at the topology file, Rhel6.1_x64.topology, you can see the link to the asset for GoogleChrome SoftwareBundle with the RAM UUID and version.
Figure 21. Semantic topology file for asset
Listing 1. Semantic topology file for asset<core:unit uuid="_z79cOWSIEeG4Dsea31AM7A" name="bundle_455977" goalInstallState="installed" initInstallState="installed"> <core:capability uuid="_z79cOmSIEeG4Dsea31AM7A" name="cap" linkType="any"> <core:extendedAttribute uuid="_dZzakWSpEeG4Dsea31AM7A" name="symbolicName"> <core:data xsi:type="xsd:string" uuid="_z79cO2SIEeG4Dsea31AM7A"> <strong>com.google.chrome</strong> </core:data> </core:extendedAttribute> <core:extendedAttribute uuid="_dZzakmSpEeG4Dsea31AM7A" name="version"> <core:data xsi:type="xsd:string" uuid="_z79cPGSIEeG4Dsea31AM7A"> 1.0.0 </core:data> </core:extendedAttribute> <core:extendedAttribute uuid="_dZzak2SpEeG4Dsea31AM7A" name="bundleName"> <core:data xsi:type="xsd:string" uuid="_z79cPWSIEeG4Dsea31AM7A"> <strong>GoogleChrome</strong> </core:data> </core:extendedAttribute> <core:extendedAttribute uuid="_dZzalGSpEeG4Dsea31AM7A" name="bundleRepoId"> <core:data xsi:type="xsd:string" uuid="_z79cPmSIEeG4Dsea31AM7A"> <strong>ryo-asset://07356E0D-3868-1709-0F95-AD9FF0355FF4_1.0.0@ https://www-147.ibm.com/cloud/enterprise/ram.ws</strong> </core:data> </core:extendedAttribute> </core:capability>
- To use the REST API to retrieve the list of SwBundles attached to a captured image:
Listing 2. Retrieve list of SwBundles with the REST APIcurl -k -H 'Accept: application/json' -u <userid7gt;:<password> https://www-147.ibm.com/computecloud/enterprise/api/rest/20100331/ offerings/image/${imageId}/swbundle where imageId is 20045166 {"SwBundleImageDetails": [ {"SwBundleNum":1,"SwBundlePricingDetails": {"rate":0,"unitOfMeasure":"UHR","countryCode":"897","effectiveDate":1313107200000, "currencyCode":"USD","pricePerQuantity":1}, "RamUuid":"07356E0D-3868-1709-0F95-AD9FF0355FF4", "RamVersion":"1.0.0","name":"GoogleChrome","id":"2909","description": "Install Latest Google Chrome using yum"} ] }
To use the captured image to create an instance:
- Connect to the SmartCloud Portal. Select the image on the Image tab and click Create Instance.
Figure 22. Create instance in SmartCloud
Figure 23. Accept agreement
- Note the image name and software bundle displayed in the agreement page. Click Submit.
Figure 24. Submit instance request to SmartCloud
- When the instance is provisioned, you can verify that Google Chrome works much like
the temporary instance verified earlier. Note that you might need to delete /home/idcuser/.config/google-chrome/SingletonLock if you did not close the browser before capture.
Figure 25. Instance creation successful on SmartCloud
Final thoughts and considerations
Software specialists must ensure that the first line of the bash script specifies the location of the bash interpreter which is expressed as #!/bin/bash. The Virtual System Activation Engine (VSAE) that triggers the execution of configuration and reset scripts requires that the location of the interpreter be specified; otherwise, the scripts do not execute.
If software specialists choose to write scripts on Windows platforms, they must ensure that the dos2unix tool or a similar tool is run on the scripts before uploading them to ICCT.
A software bundle is downloaded and installed on an instance by ICCT during virtual image creation. The Composable Software Bundle RAM asset is not automatically copied to the instance by SmartCloud during provisioning; however, SmartCloud allows copying files from Template Topology (image) asset to the instance, therefore additional manual customization is possible by updating the Template Topology image RAM asset.
The Google Chrome image does not require any further customization. However, if you want to make minor changes to the instance during provisioning without using ICCT to recapture a new image, you can create a clone of this image and/or update the Template Topology asset of the captured image.
All activation scripts in Template Topology asset must be packaged in the activation_scripts folder of the asset in IBM Rational asset catalog. The folder must also contain a scripts.txt file that describes additional files required to constitute the instance and where to store them. The scripts.txt file defines name and value pairs for activation scripts. The name is the actual file name you are working with and the value is the full path and file name that you want it to be on the instance. The following example is the scripts.txt file for the Linux NFS server image:
run_once.txt=/etc/init.d/cloud-startup3.sh config.txt=/etc/cloud/nfs_config.pl |
Script files in the activation_scripts folder and referenced by scripts.txt will be copied to specified directories of the instance before the instance is started. If any of the script files already exist in the file system of your image, it will be overwritten by the one in the IBM Rational asset catalog.
In these two articles, you have learned how to create and maintain a software bundle using ICCT on IBM SmartCloud Enterprise by walking through a simple example; you also saw how to build an image with this software bundle using ICCT.
Learn
-
Some resources to expand the knowledge presented in this article:
- This whitepaper explains how ICCT helps users create virtual images for deployment in cloud solutions.
- WebSphere, cloud, and ICCT expert Dustin Amrhein details using software bundles in ICCT. He also explores how to establish a system to build custom virtual cloud images.
- Tony Barker explains what you need to understand about the Requirements tab of software bundles in ICCT.
- This blog entry gathers up some ICCT knowledge for you to explore.
- developerWorks contains lots of knowledge on using the ICCT; you can search for "icct" from our pages or try this pre-sliced view.
-
Get started with IBM
SmartCloud Application Services by watching a
demo.
-
Explore developerWorks Cloud
Computing, where you will find valuable community discussions and learn
about new technical resources related to the cloud.
-
Stay current with developerWorks
technical events focused on a variety of IBM products and IT
industry topics.
-
Attend a free developerWorks
Live! briefing to get up to speed quickly on IBM products and tools as well as
IT industry trends.
-
Follow developerWorks on Twitter.
-
Watch developerWorks
demos ranging from product installation and setup demos for beginners
to advanced functionality for experienced developers.
Get products and technologies
-
Evaluate IBM products in
the way that suits you best: Download a product trial, try a product online, use a
product in a cloud environment, or spend a few hours in the
SOA
Sandbox learning how to implement service-oriented architecture efficiently.
Discuss
-
Get involved in the My
developerWorks community. Connect with other developerWorks users while
exploring the developer-driven blogs, forums, groups, and wikis.
Alexei Karve is a senior software engineer in the IBM Thomas J Watson Research Center. He is a member of the SmartCloud Enterprise design team focussing on software bundles and VPN/VLAN for the cloud business support systems. Alexei's experience includes broad experience with operational support services, virtualization, and Tivoli Provisioning Manager. He has a long and varied past in the system management area since joining IBM in 1993.

Alex Amies is a senior software engineer in the IBM GTS Development Lab in the China development lab. He is currently an architect working on the design of the IBM SmartCloud Enterprise. Previously, he acted as an architect and a developer on cloud and security products in other groups within IBM.

Scott Peddle is an advisory software developer on the IBM SmartCloud Enterprise. Scott leads projects focusing on integration of Rational Asset Manager within a cloud environment. Scott's experience includes leading a project for integration of WebSphere BPM tools, such as WebSphere Business Modeler and WebSphere Integration Developer via Rational Asset Manager. Scott also was a release engineer for Rational design and construction products, such as Rational Software Architect and Rational Application Developer.
Shaikh is an IBM Master Inventor and technical lead of the Business Support Systems for IBM SmartCloud Enterprise and Enterprise+ offerings, based in the United States.
Qiang Guo Tong joined IBM in 2004. He is one of the IBM SmartCloud Enterprise development team leaders responsible for creation of new features. He is also the globalization enablement solution architect of SmartCloud. His technical expertise is both globalization and also JavaEE technologies. He has over 8 years web application development experience based on the JavaEE architecture and focusing on web 2.0 technologies such as Dojo, JSON-RPC.




