February 23, 2012 | Written by: David Kwock
Share this post:
When leveraging a public cloud environment, one of the largest challenges is ensuring the service catalog has images and software bundles that meet your business needs. The ability to create your own custom image templates and load them into a public cloud environment is a huge value. IBM SmartCloud Enterprise provides several methods for customizing images. These methods include creating an image without customization, customizing the image binary, customizing the image asset, and customizing an image with IBM Image Construction and Composition Tool. The following figure shows a high level process overview of image customization.
In addition, to the native tools and processes that are provided by IBM, Cohesive Flexible Technologies (http://www.cohesiveft.com/) provides a Smart Elastic Server (http://smart.elasticserver.com/) solution that customers can use to build custom images and software packages with a simple user interface. Although the Smart Elastic Server solution is designed for easy customization of Red Hat and SUSE Linux images, a wide variety of images can be customized and uploaded to the IBM SmartCloud Enterprise environment. In the following example, we customize a Ubuntu image and upload it to our IBM SmartCloud Enterprise private catalog for use.
The first step of image creation is to ensure our base source virtual machine image meets several prerequisites:
- First partition /boot, second partition /
- No Logical Volume Manager (LVM) volumes
- Third extended (ext3) filesystem
- Root partition smaller than 60 Gb
The second step is to customize the base operating system so that it has some basic configuration to work in the IBM SmartCloud Enterprise environment:
- Create the idcuser and add it to the sudoers file.
- Create the .ssh folder and the file authorized_keys:
- Install SSH.
- Modify the .ssh configuration file, commenting all lines starting by “Hostkey…”:
- Change the run-level to 3.
Because IBM SmartCloud Enterprise is designed to run Red Hat and SUSE Linux images, some scripting is needed to get networking to work properly:
- Create the template file.
- Add the script to the initialization scripts.
- Create the original network file from Red Hat.
The next step after image creation and customization is to set up the XML files, which are the files that the system uses for running the image.
The final step is to import the image to your private catalog for use.