Creating and managing virtual images is a challenging
and complex task. Using traditional approaches, image creation is
a long and error-prone procedure that lacks standardization and does
not promote a high degree of reuse.
The IBM Image Construction and Composition Tool (ICCT) provides a means where we can address these issues. It's designed to make virtual image creation easier, and promotes a "building block" approach.
Content is added into ICCT based on expertise. OS specialists create base operating system virtual images. Software specialists create software bundles which install and configure software content. Finally, Image Builders, who have no need to understand the OS or software installation, bring these items together in a building block fashion to create a virtual image (virtual appliance).
Software bundles have a number of tabs to provide their functionality. Let's take a deeper look at the Requirements tab.
There are six tabs that make up the software bundle configuration. Tab 2 is the Requirements tab.
There are three sections here : Supported Operating Systems, Required Software and Required Bundles.
The whole tab can be thought of as a prerequisite checker. Just as other applications you have installed in the past check to determine patch or OS levels before installation, this tab gives us similar functionality.
Only when the correct conditions have been met will you be able to successfully add software bundles to a base image. That makes perfect sense, doesn't it!
Supported Operating Systems
Out of the three sections, this one is undoubtedly the easiest concept to grasp. If your software bundle has been created to run on selected operating systems then you specify them here.
In this example I have added SUSE Linux as a supported operating system. You can, if you wish, be more of less specific. For example, you could just specify Linux, or you could add an architecture and Linux version if you wish.
Always remember to SAVE your changes!!!
If I try to add this bundle to an existing base image, ICCT will check the version of the operating system present and the list of supported operating systems I have listed. If there is no match then the software bundle will not initially appear in the list of available bundles to add.
In this screenshot the tick box "Show only bundles compatible with the image" is checked so the bundle I created with a dependency on SUSE Linux only will NOT be shown. I would need to uncheck the box if I wanted ALL bundles to appear.
See here that my bundle called "DoubleDash" is now listed and available for selection.
Ok, I know that Required Bundles is not the next option on the screen, but logically it's the next thing to discuss. Let's say, for example, that you have created two software bundles. One bundle installs your middleware, and another installs your application. Logically speaking it makes no sense to install the application if we don't have the middleware. Therefore, we add the middleware as a Required Bundle. In other words, a bundle that MUST be in place before this bundle will install.
If I try and add this bundle to a base image WITHOUT the required bundle I get a Warning :
So, I need to add the required bundle. No surprises there, but it's important that I add the required bundle BEFORE my DoubleDash bundle.
If I simply ADD BUNDLE and add my required bundle, it will appear underneath. I will get an error.
ICCT installs the bundles from the top down. So, what I've done is add my DoubleDash bundle before the AddThisFirst bundle. Close, maybe, but that still won't work. Install the application before instaling the middleware??? That won't work at all!!
I need to ensure that the required bundle is first. If you hover over the bundles you'll see a set of icons towards the right. You can use the arrows to move bundles above and below one another - to set the correct order.
The previous two sections have been pretty straightforward. This one requires a little more thought, The reason for this is that it's important to understand about base images.
At the beginning of this blog entry I mentioned that the building block approach to creating virtual appliances started with a base image. Typically the base image includes an operating system and that's about it. However, if you have specific requirements to append to your operating system you can create a software bundle to do it, extend the original image and create a new base image. In that instance, your NEW base image is actually the first base image plus an already-installed software bundle.
We can see what software is in a base image by clicking on it and expanding the Products "twisty" :
In this example, you can see that I have RHEL 6 and MyApp at Version 2.0.0. The other entries are the activation engine that perform the "magic" at deploy time.
This base image was created by starting with a base image that contained just RHEL and then adding a bundle for MyApp V2.0.0.
The Required Software section in the software bundle refers to this : what software must be present to allow this bundle to be installed?
Click Add Required Software in the Requirements tab of the bundle and add any requirements as shown below.
If you try to add your software bundle to a base image that does not contain MyApp at the correct version the image will not synchronize and you'll get an error.
However, this is not the end....
If your base image does not have the required software already present, you can use a software bundle to install it. Remember, in the Required Bundle section above, that we discussed how order was important? What you can do is to ensure that the bundle that contains your "required software" is installed first.
In the picture below my DoubleDash bundle has a requirement for MyApp but it was not present in the base image.
So, by specifying it FIRST, I can be sure that the software will be in place before DoubleDash is installed.
The General tab of each bundle requires that you specify a Product Name and Version for the software you are installing. These Product Names get appended to the list of Products as shown below. Because I have added MyAppBundle and DoubleDash, I now have MyApp and DD in the product list.
The synchronize and capture will now work because I have satisfied the Required Software criteria by manually adding the right bundle.
The Requirements tab provides a very powerful pre-requisite checker to ensure that you do not waste time during virtual appliance creation.
Supported Operating Systems allows you to specify which operating systems support your bundle. Bundles that do not meet your chosen operating system criteria are not, by default, shown.
Required Bundles identifies dependencies. Your bundle may require that, for example, other software is installed beforehand. Ordering is important so that any required bundles are already installed before yours is executed. ICCT will tell you what is required.
Required Software allows you to define what software needs to be in place within the base image. The base image does not have to be purely an Operating System but may have additional software included. If the software is not present in the base image you can install the correct bundle BEFORE yours is required.