This article provides an overview of the IBM Image Construction and Composition Tool (ICCT) and demonstrates how to create and maintain software bundles on IBM SmartCloud Enterprise. Using an example, it describes the steps for creating a software bundle for Google Chrome, including defining metadata for the Chrome software bundle, adding installation scripts, and registering it on SmartCloud Enterprise. You should have basic familiarity with cloud concepts. To try the steps in this article, you need a user account on IBM SmartCloud Enterprise.
The ICCT on SmartCloud is a web application that simplifies and automates virtual machine image creation. ICCT is provided as an image that can be provisioned on SmartCloud.
ICCT on SmartCloud categorizes the tasks performed in the virtual image life cycle by role:
- Operating system specialist role: Creates base images for operating systems that the image builder role uses as a starting point. The base images represent an enterprise's standard OS configuration, license agreements, and security policies.
- Software specialist role: Creates software bundles, reusable assets that contain software products or components.
- Image builder role: Assembles base images and one or more software bundles to create virtual image templates.
- Image deployer role: Specifies instance-specific parameters and provisions an instance in SmartCloud.
ICCT supports software bundle creation, the create and deploy phases of the virtual image life cycle.
Now let's explore software bundle creation, virtual image creation, and virtual image deployment.
The software specialist has great flexibility in defining bundles and choosing the granularity of a software bundle. Bundles encapsulate the installation and configuration tasks of one or more products into a simple container. ICCT assists a user in setting the dependencies, prerequisites, firewall rules, and collecting scripts and binaries together into a software bundle.
The software specialist must decide where to package the installation media. All files associated with a bundle's operations are uploaded and stored in a composable software bundle asset in Rational® Asset Manager (RAM). The directory structure of the bundle asset ensures that all files associated with an operation are stored in the same subdirectory. This structure prevents conflicts when files associated with different operations have the same name.
Packaging the product installation media in the software bundle often means the transfer of large bundle sizes during synchronization. The product installation media can be located on an external web server and retrieved using
wget or it can be NFS mounted.
Use the Install and Configuration tabs in ICCT to handle bundle installation and configuration for the products:
- Install tab: The software specialist can define scripts that execute at virtual image build time. This can include traditional product installation scripts and binaries.
- Configuration tab: The software specialist can define configuration scripts that are copied to the virtual image at build time but do not execute until the virtual image is deployed. These configuration scripts can include traditional configuration scripts or scripts to reconfigure a default configuration that has been already applied during the install operation.
- Reset tab: Resides a script to clean up logs or temporary files created during synchronization. This script is run by ICCT during the capture process.
- Firewall tab: Resides many software packages that provide services to remote clients; for example, IBM HTTP Server provides a web server. To successfully access such services, the product installation and configuration might need to enable network access. The software specialist must specify the set of inbound service ports to open and allow the services to be accessed. For example, a software bundle for the IBM HTTP Server might require that the administration port (8008) and service ports (80, 443) be opened.
A key task that a software specialist must perform is writing the install, configuration, and reset scripts that are executed during virtual image creation and deployment. ICCT relies on scripts to:
- Carry out the installation and configuration of software and software components in the bundle.
- Allow the bundle to consume deployment parameters to customize its software during deployment.
- Clean up any state that is created during bundle installation and configuration before capturing a virtual image on which the bundle has been installed.
ICCT relies on feedback from scripts to determine whether an operation was successfully executed. A software specialist must be aware that ICCT treats an exit code of 0 as a success; any other exit code is treated as a failure.
The create phase of the virtual image life cycle occurs when a virtual image is composed, synchronized, and captured. The following steps are involved:
- Composition: During this step of the create phase, a recipe called image design is concocted as the virtual image is created with a new name and version. A base image and one or more bundles are selected to add to the recipe to make it custom.
- Synchronization: The image design is transformed into a temporary virtual machine instance. The virtual machine is created and the software bundles are installed. Each software bundle's install script is executed to silently install the bundled software on the temporary virtual machine. The configuration and reset scripts are copied to the virtual machine for execution later in the process.
- Capture: This is the process when the image with the software bundles pre-installed on the temporary instance is captured as a private image. ICCT runs the reset script for each bundle in the virtual image and resets the operating system and allows SmartCloud to complete the capture. Finally, after SmartCloud has completed the capture, ICCT updates the semantic topology file in RAM.
The deploy phase of the virtual image life cycle is when an image deployer provisions a virtual machine instance from a private image created during the create phase. The following steps are included:
- Configuration: The image deployer specifies instance-specific parameters for the virtual image being deployed. Image deployment parameters associated with bundled software such as user ID, password, or port (that can be configured on per-instance basis) are also collected.
- Provision: SmartCloud provisions the instance and the virtual machine in active mode. When the operating system first boots, the bundled software begins the activation phase.
- Activation: The Activation Engine receives the deployment values and calls the appropriate configuration scripts. The bundled software and its components use the values that the image deployer provided for self-reconfiguration. The Activation Engine is an ICCT component that is installed into a base image during the base image extension process. ICCT extends every virtual image to contain an enablement bundle. If not already present, ICCT adds an enablement bundle when the virtual image design is first composed.
Figure 1 demonstrates the overview of the virtual image life cycle with tasks performed by each roles.
Figure 1. Virtual image life cycle supported by ICCT
Now let's look at creating and setting up ICCT on SmartCloud.
Using a simple example, installing Google Chrome, we'll walk through the phases described above.
- Login to SmartCloud and create an ICCT instance by selecting the IBM Image Construction and Composition Tool image. After it is provisioned, connect to https://<ICCT IP Address>/ and login with the userid and password provided during deployment of ICCT instance.
Note: If you already have an ICCT virtual machine instance but the ICCT URL does not respond, you may have to login to your virtual machine instance as idcuser and run the following to restart ICCT application:
Figure 2 shows the first panel in the new Cloud Provider Wizard.
Figure 2. First panel in the new Cloud Provider Wizard
- Click Next, enter the user name and password that you use to login to SmartCloud.
Figure 3. Panel for entering cloud credentials
- Click Next. Enter the name and description for the data center that
you use for private images. You can later create additional cloud providers for
different data centers and keys. Select IBM SmartCloud Enterprise as
the cloud provider type. This example uses the Ehningen data center.
Figure 4. Panel for cloud provider information
- Click Next. This gets the public keys and data centers from
SmartCloud using the credentials provided earlier. Select the public key name, browse
for the local private key to upload, and select the data center location.
Figure 5. Panel for SSH key information
- Click Next, then review the information. ICCT encrypts and saves the users credentials and the private key on the ICCT instance under the Cloud Provider Name. The cloud provider is used to retrieve the image and software bundle meta information from SmartCloud. The private key is used to install software bundles on temporary instance on users behalf before image capture.
Figure 6. Panel for credentials summary
- Click Done. The ICCT welcome page appears.
Figure 7. Welcome page
To create the software bundle:
- Click Build and Manage Software Bundles. The panel of Bundles appears
on the left. The default local enablement bundles are pre-populated.
Figure 8. First panel for software bundle management
- Click the + icon on the top to start creating a new software bundle.
A new dialog box appears. Enter a name, universal ID, version, and description for the
software bundle. Select the cloud provider you created earlier for the Storage
Location, and keep the default for Primary Enterprise Community.
Figure 9. Panel for new software bundle
- Click the Create button. The bundle added to the list of bundles is
displayed in the left pane with a pencil icon. The right pane shows the information you entered with an empty product list at the bottom.
Figure 10. Panel for software bundles basic information
- Click the + next to Products in the bundle table and add the Google Chrome browser. You have to double-click the edit box under the Product Name, Version, and Vendor to edit the information.
Figure 11. Panel for software bundles basic information
- Click the Requirements tab, add Linux® as supported a operating system. In general the following attributes need to be specified:
- Type: Operation system type, such as Linux, Windows®
- Distribution: OS-specific distribution such as RHEL, SLES
- Architecture: Describes the supported kernel architecture
- Version: Describes the OS architecture. A number of wildcards can be used
- 5.x — The x represents a placeholder for a specific digit
- 10.1+ — The + represent version 10 or anything higher
Select only the
Type=Linuxand leave the rest of the attributes empty.
Figure 12. Panel for software bundles requirements information
- Since this bundle does not have any dependencies, the Required Software and Required
Bundles fields are empty.
The following install script sets up the repository to download 64-bit Chrome and installs it. Save it locally as installgooglechrome.sh:
sudo echo "[google-chrome]" > /tmp/google.repo sudo echo "name=google-chrome - 64-bit" >> /tmp/google.repo sudo echo "baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64" >> /tmp/google.repo sudo echo "enabled=1" >> /tmp/google.repo sudo echo "gpgcheck=1" >> /tmp/google.repo sudo echo "gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub" >> /tmp/google.repo sudo mv /tmp/google.repo /etc/yum.repos.d/google.repo sudo yum install -y google-chrome-unstable
- Click the Install tab. The Installation section specifies what should run during a one-time installation of the software.
- Click the + icon and add the installgooglechrome.sh, check mark
it as executable, and select it as the run command. This runs as root. This script does not take any arguments, therefore Arguments is left empty.
Figure 13. Panel for software bundles install information
- Next is the Configuration section. Google Chrome does not have any scripts that need to be executed during deployment of virtual machine instance, so keep this empty. When an image is instantiated with arguments that should be configured on per-instance basis, this section is used.
- The Firewall section is for ports that need to be opened. Reset the section to clean up logs from one-time installation. Google Chrome does not use the Configuration or the Firewall tabs.
- Update the install script to allow both 32- and 64-bit:
uname -a | grep x86_64 if [ $? -eq 0 ]; then # Use 64 bit repository else # Use 32 bit repository Fi
- Click Save and then the Publish buttons.
Figure 14. Status changes to Published
Two major tasks for maintaining your bundles include retrieval and updating.
There are several methods for retrieving software bundle information. To use the REST API, try the following request to retrieve software bundles:
Figure 15. REST API request to retrieve SwBundles
Or this code:
curl -k -H 'Accept: application/json' -u <userid>:<password> https://www-147.ibm.com/computecloud/enterprise/api/rest/20100331/offerings/swbundle
The following response is received for the GoogleChrome SwBundle that was just created.
Figure 16. Response of retrieving SwBundles
Another method is to go to the SmartCloud Portal, click Control Panel > View Asset Catalog > My Dashboard. You can see the GoogleChrome asset in RAM.
Figure 17. GoogleChrome asset in RAM
Figure 18 shows general details of the GoogleChrome asset.
Figure 18. General details of GoogleChrome asset in RAM
Note the RAM Unique ID: 07356E0D-3868-1709-0F95-AD9FF0355FF4 and Version: 1.0.0. This is used in Part 2 as an example to show you how to capture a new image.
Figure 19. Content of GoogleChrome asset in RAM
Click Content to edit and change the scripts, such as installgooglechrome.sh, directly in RAM.
Figure 20. installgooglechrome.sh script in Asset
If you do, make sure you login to the ICCT virtual machine, search for the same cached scripts, and make corresponding changes in the ICCT virtual machine.
For example, if you were to change the installgooglechrome.sh directly in RAM, find it on the ICCT virtual machine:
idcuser@vhost4244:/> cd /drouter idcuser@vhost4244:/drouter> find . -name installgooglechrome* ./ramdisk2/mnt/raid-volume/raid0/local/images/789d525e-ad75-4cc1-a25b-360534713d8c /artifacts/com.google.chrome_1.0.0/imageBuild/newstep/installgooglechrome.sh ./ramdisk2/mnt/raid-volume/raid0/uploads/be7aa215-f0ab-4d98-8acc-7dc427ee4877 /installgooglechrome.sh
Edit the file and make the same changes that you made in RAM.
In this article, you learned how to create and maintain software bundles using ICCT on IBM SmartCloud Enterprise by walking through a simple example. In Part 2, we show you how to build an image with the same software bundle using ICCT.
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
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
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.
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
Sandbox learning how to implement service-oriented architecture efficiently.
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.
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.