Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

IBM SmartCloud Enterprise management, Part 2: Use and maintain software bundles with ICCT

Alexei Karve, Senior Software Engineer, IBM
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, Senior Software Engineer, IBM
Alex Amies photo
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, Advisory Software Developer, IBM
Photo of Scott Peddle
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.
Hidayatullah Shaikh, Senior Technical Staff Member, IBM
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.
Qiangguo Tong, Advisory Software Engineer, IBM
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.
Pan Xia Zou, Staff Software Engineer, IBM
Pan Xia Zou is staff software engineer at IBM and works as a build and deployment automation architect for IBM SmartCloud Enterprise.

Summary:  A software bundle is a collection of software installation files, configuration files, and metadata that can be deployed on a virtual machine instance. In Part 2, the authors show how to create a custom image with the software bundle you created in Part 1. The IBM® Image Construction and Composition Tool (ICCT) performs bookkeeping tasks and provides a step-by-step process and a graphical UI to conveniently create software bundles, customize virtual machine instances, and capture images. This series shows how to use ICCT to create a software bundle, then register and maintain it on IBM SmartCloud Enterprise.

View more content in this series

Date:  20 Jul 2012
Level:  Introductory PDF:  A4 and Letter (1550 KB | 28 pages)Get Adobe® Reader®
Also available in:   Chinese  Russian  Japanese  Vietnamese  Portuguese

Activity:  12622 views
Comments:  

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.

Create a custom image

  1. 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
    Building images in ICCT

  2. Click Import from Cloud Provider.
  3. 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
    Import RedHat Enterprise Linux 6 64-bit image

  4. 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
    Details of RedHat Enterprise Linux 6 64-bit

  5. 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
    Extend image

  6. 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
    Expand Software Bundles

  7. 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
    Add Google Chrome software bundle to image

  8. Select Google Chrome and click Add.

    Figure 7. GoogleChrome added to image design
    GoogleChrome added to image design

  9. 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
    Synchronize image

  10. 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
    Provisioning instance in SmartCloud after synchronization

  11. When the temporary instance is created, it's status becomes Active in the SmartCloud portal.

    Figure 10. Instance provisioned in SmartCloud after synchronization
    Instance provisioned in SmartCloud after synchronization

  12. 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
    Refresh image status in Image Construction and Composition Tool



    Figure 12. Synchronization failed in ICCT
    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
    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:

  1. 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
    

  2. 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
    

  3. Run vncviewer ${SmartCloud_VM}:1 and start /opt/google/chrome/google-chrome to 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
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.


Capture an image

Now that the temporary instance is working as expected, capture this as an image to avoid reinstalling Google Chrome during later deployments.

  1. 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
    Using Capture to create image in ICCT

  2. 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
    Image save notification

    This starts the capture of a new private image with Google Chrome pre-installed.

  3. On the Image tab in the SmartCloud Portal, the new private RHEL6WithGoogleChrome image is in the capturing state.

    Figure 17. Capturing image in SmartCloud
    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.

  4. 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
    Image available in SmartCloud

    The image with Google Chrome pre-installed is now available to create new instances.

  5. When you click the Refresh icon in ICCT, you should see the image status as Capture Complete.

    Figure 19. Capture complete in ICCT
    Capture complete in ICCT

  6. 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
    General details of the Template Topology asset in RAM

  7. 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
    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>
    

  8. 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 API
    
    curl -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"}
     ]
    }
    


Create an instance

To use the captured image to create an instance:

  1. Connect to the SmartCloud Portal. Select the image on the Image tab and click Create Instance.

    Figure 22. Create instance in SmartCloud
    Create instance in SmartCloud



    Figure 23. Accept agreement
    Accept agreement

  2. Note the image name and software bundle displayed in the agreement page. Click Submit.

    Figure 24. Submit instance request to SmartCloud
    Submit instance request to SmartCloud

  3. 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
    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 conclusion

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.


Resources

Learn

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.

About the authors

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 photo

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.

Photo of Scott Peddle

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.

Pan Xia Zou is staff software engineer at IBM and works as a build and deployment automation architect for IBM SmartCloud Enterprise.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Cloud computing, Rational
ArticleID=826749
ArticleTitle=IBM SmartCloud Enterprise management, Part 2: Use and maintain software bundles with ICCT
publish-date=07202012