Welcome!

Apache Authors: Pat Romanski, Liz McMillan, Elizabeth White, Christopher Harrold, Janakiram MSV

Blog Feed Post

UEC: Bundling Linux Image

Creating a new disk Image

This will be the main HDD in the virtual image, so make sure to give it as much space as youll need. Since were building a kvm image, we can use a qcow2 format for disk images. Qcow2 is an expandable image format, so itll only take as much storage space as its actually used within the image.

$ kvm-img create -f qcow2 image.img 5G

OS Installation

Download the iso file of the Linux distribution you want installed in the image.

$ wget http://releases.ubuntu.com/karmic/ubuntu-9.04-server-amd64.iso

And start the installation process:

$ sudo kvm -m 256 -cdrom ubuntu-9.04-server-amd64.iso -drive file=image.img,if=scsi,index=0 \
-boot d -net nic,vlan=0,model=e1000,macaddr= 00:16:3e:de:ad:01 -net tap -nographic -vnc :0

If your installation process requires more than 256MB of RAM change the -m option, and if you need more processors available, you can use the -c option.

The command above will boot a new KVM instance, with the disk image youve created as the primary HDD and the iso as the first bootable device. Also the -nographic option will not display any graphical output. You can connect to the instance through VNC (use display number :0 ) and finish the installation.

For Ex: vncviewer A.B.C.D :0, where A.B.C.D is the IP address of the CC.

After finishing the installation, relaunch the VM by executing the following command.

$ sudo kvm -m 256 -drive file=image.img,if=scsi,index=0,boot=on -boot c \
-net nic,vlan=0,model=e1000,macaddr=00:16:e3:de:ad:01 -net tap -nographic -vnc :0

At this point you can add all the packages you want to have installed, update the installation, add users and any settings that need to be present in your new UEC instances.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install mediawiki

Integrating with UEC

The new image needs to know what IP it has when started in UEC and also, it needs to have the public key of the user allowed to do a passwordless access through SSH. The way its done in UEC is via a restful interface provided by the cloud. The interface is available under this URL: http://169.254.169.254/latest/meta-data.

First install curl on the VM.

$ sudo apt-get install curl

And add the following lines to /etc/rc.local of the image.

depmod -a
modprobe acpiphp

# simple attempt to get the user ssh key using the meta-data service
# assuming user is the username of an account that has been created
mkdir -p /home/user/.ssh
echo >> /home/user/.ssh/authorized_keys
curl -m 10 -s http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key | grep 'ssh-rsa' >>  /home/user/.ssh/authorized_keys
echo "AUTHORIZED_KEYS:"
echo "************************"
cat /home/user/.ssh/authorized_keys
echo "************************"

Add the above lines before the exit 0 in /etc/rc.local.

Also remove persistent udev rules from /etc/udev/rules.d. This is needed because the interface name will change whenever the instance reboots and Eucalyptus expects the interface to be as eth0.

$ sudo rm -rf /etc/udev/rules.d/70-persistent-*

Registering with UEC

The last step would be to upload the images to UEC. The files that need to be uploaded are:

  • vmlinuz-2.6.28-11-server
  • initrd.img-2.6.28-11-server
  • image.img

Copy the kernel and the initrd image from the VM image to some place outside. They will be used later for creating and uploading a complete virtual image to UEC.

 $ scp /boot/initrd.img-2.6.28-11-server user@A.B.C.D:
 $ scp /boot/vmlinuz-2.6.28-11-server user@A.B.C.D:

Before starting the upload process shut down the VM.

Registering kernel image

Execute the following commands to bundle and register the kernel image (vmlinuz-2.6.28-11-server)

$ euca-bundle-image -i vmlinuz-2.6.28-11-server --kernel true
 $ euca-upload-bundle -b mybucket -m /tmp/vmlinuz-2.6.28-11-server.manifest.xml
 $ euca-register mybucket/vmlinuz-2.6.28-11-server.manifest.xml

Save the output produced by the last command above (eki-XXXXXXXX), which will be needed while registering the disk image.

Registering ramdisk image

Execute the following commands to bundle and register the ramdisk image (initrd.img-2.6.28-11-server)

$ euca-bundle-image -i  initrd.img-2.6.28-11-server
 $ euca-upload-bundle -b mybucket -m /tmp/initrd.img-2.6.28-11-server.manifest.xml
 $ euca-register mybucket/initrd.img-2.6.28-11-server.manifest.xml

Save the output produced by the last command above (eri-XXXXXXXX), which will be needed while registering the disk image.

Registering disk image

Execute the following commands to bundle and register the ramdisk image (image.img)

$ euca-bundle-image -i image.img --kernel eki-XXXXXXXX --ramdisk eri-XXXXXXXX
 $ euca-upload-bundle -b mybucket -m /tmp/image.img.manifest.xml
 $ euca-register mybucket/image.img.manifest.xml

Replace eki-XXXXXXXX and eri-XXXXXXXX with the exact values as noted down earlier.

Image Listing

The new images that have been uploaded can be seen by using euca-describe-images command.

$ euca-describe-images
 IMAGE   emi-70B70EC0    mybucket/image.img.manifest.xml admin   available   public   x86_64  machine
 IMAGE   eri-A2BE13EC    mybucket/initrd.img-2.6.28-11-server.manifest.xml   admin    available       public  x86_64  ramdisk
 IMAGE   eki-685F1306    mybucket/vmlinuz-2.6.28-11-server.manifest.xml  adminavailable       public  x86_64  kernel

Running instance of custom image

To launch a new instance of the custom image, execute euca-run-instances command.

$ euca-run-instances  emi-70B70EC0 -k mykey -t c1.xlarge
Credits: This post draws inspiration from Sam for all his endeavors on “Technology from Up there to Down here”

Filed under: Cloud Computing, euca-bundle-images, Eucalyptus, Eucalyptus Bundling, UEC

Read the original blog entry...

More Stories By Kiran Murari

Kiran Murari works at CSS Corp. Earlier, he was into the domain of Embedded Networking and has worked on developing software for ARM and MIPS based routers, porting Linux kernel and Linux applications to various hardware platforms like Intel IXP4xx, Xscale and OMAP3. As a part of developing software for routers, he was involved in developing the firewall and IDS/IPS modules. His current interests include Virtualization, Cloud Computing and Embedded devices.

@ThingsExpo Stories
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework. It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. Tha...
SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
Organizations do not need a Big Data strategy; they need a business strategy that incorporates Big Data. Most organizations lack a road map for using Big Data to optimize key business processes, deliver a differentiated customer experience, or uncover new business opportunities. They do not understand what’s possible with respect to integrating Big Data into the business model.
SYS-CON Events announced today that Datera will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datera offers a radically new approach to data management, where innovative software makes data infrastructure invisible, elastic and able to perform at the highest level. It eliminates hardware lock-in and gives IT organizations the choice to source x86 server nodes, with business model option...
SYS-CON Events announced today that Ryobi Systems will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ryobi Systems Co., Ltd., as an information service company, specialized in business support for local governments and medical industry. We are challenging to achive the precision farming with AI. For more information, visit http:...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...
SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
SYS-CON Events announced today that CAST Software will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CAST was founded more than 25 years ago to make the invisible visible. Built around the idea that even the best analytics on the market still leave blind spots for technical teams looking to deliver better software and prevent outages, CAST provides the software intelligence that matter ...
SYS-CON Events announced today that SourceForge has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SourceForge is the largest, most trusted destination for Open Source Software development, collaboration, discovery and download on the web serving over 32 million viewers, 150 million downloads and over 460,000 active development projects each and every month.
SYS-CON Events announced today that SkyScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SkyScale is a world-class provider of cloud-based, ultra-fast multi-GPU hardware platforms for lease to customers desiring the fastest performance available as a service anywhere in the world. SkyScale builds, configures, and manages dedicated systems strategically located in maximum-security...
SYS-CON Events announced today that Golden Gate University will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Since 1901, non-profit Golden Gate University (GGU) has been helping adults achieve their professional goals by providing high quality, practice-based undergraduate and graduate educational programs in law, taxation, business and related professions. Many of its courses are taug...
SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
SYS-CON Events announced today that Suzuki Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Suzuki Inc. is a semiconductor-related business, including sales of consuming parts, parts repair, and maintenance for semiconductor manufacturing machines, etc. It is also a health care business providing experimental research for...
SYS-CON Events announced today that mruby Forum will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. mruby is the lightweight implementation of the Ruby language. We introduce mruby and the mruby IoT framework that enhances development productivity. For more information, visit http://forum.mruby.org/.
Digital innovation is the next big wave of business transformation based on digital technologies of which IoT and Big Data are key components, For example: Business boundary innovation is a challenge to excavate third-party business value using IoT and BigData, like Nest Business structure innovation may propose re-building business structure from scratch, as Uber does in the taxicab industry The social model innovation is also a big challenge to the new social architecture with the design fr...
High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, will discuss how given the magnitude of today's applicati...