Connecting to Amazon Virtual Private Cloud using Linux

August 10th, 2010 jeevanullas No comments

Hello internet,

I am trying to connect my Linux machine to Amazon VPC using end to end IPSec tunnel. I have set all the required VPC objects on Amazon side and now plan to set my Linux Laptop as a VPN gateway. But the only doubt I have is that my Laptop is behind NAT. Though I have opened and re-directed the necessary ports on my NAT device I am not sure if this thing is going to work.

Please let me know if this setup can work. I am trying to follow the following guide

http://openfoo.org/blog/amazon_vpc_with_linux.html

From what I understand so far in order to make this guide work for my setup I need to do some extra configuration. I have also found out that IPSec supports tunnels behind NAT devices but I am not sure if Amazon VPC will support such configuration.

Any help in this matter is highly appreciated.

Using Boxgrinder to build your own AMI for EC2

August 7th, 2010 jeevanullas 1 comment

In my last article I showed on how to create your own AMI for EC2. The article basically demonstrated the whole process been done manually by executing commands. In this article I would like to cover Boxgrinder which reduces the manual effort completely and helps you get your own AMI registered on EC2 and in few minutes.

First thing is that we need to run boxgrinder on CentOS if we would like to build a CentOS AMI and on Fedora if we would like to build a Fedora AMI. The good thing about boxgrinder is that it uses the latest pvgrub kernel images provided by Amazon which basically lets you boot into your own kernel. So gone are the days when we had to use Amazon EC2 kernel. Thanks to Marek Goldmann for making this possible in boxgrinder 0.5

Without wasting much time let’s get started. I am going to build a Fedora 13 AMI for EC2 in this article but you can do the same stuff using CentOS. First of all we will have to install some required packages which are basically the dependencies.

# yum -y install git parted wget rpmdevtools appliance-tools \
sudo libguestfs ruby  rubygems ruby-libguestfs guestfish \
 yum-utils e2fsprogs

Next we need to install the EC2 AMI tools

#  rpm -Uvh http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.noarch.rpm

Then we need to install couple of gems for boxgrinder which will let us build a AMI for EC2. The following are the gems

# gem install boxgrinder-build
# gem install boxgrinder-build-fedora-os-plugin
# gem install boxgrinder-build-ec2-platform-plugin
# gem install boxgrinder-build-s3-delivery-plugin

Now we need to create a appliance definition file which will be used to build our AMI. This file is basically written in YAML format. The following is the file which I used:

name: Fedora13EC2
summary: My Fedora on EC2
os:
 name: fedora
 version: 13
hardware:
 partitions:
   "/":
     size: 2
packages:
 includes:
   - bash
   - kernel-PAE
   - grub
   - e2fsprogs
   - passwd
   - policycoreutils
   - chkconfig
   - rootfiles
   - yum
   - vim-minimal
   - acpid
   - dhclient
   - iputils
   - openssh-server
   - openssh-clients
   - httpd
   - system-config-firewall-base

Save this file in a directory appliances/ with the name Fedora13EC2.appl. Now we need to create a file which will store our AWS credentials and other important paths to certificate and private key. These are required by boxgrinder to put the image in S3 and register it with EC2.

# vi $HOME/.boxgrinder/plugins/s3
access_key: yourawsaccesskey                        # required
secret_access_key: youawssecretkey             # required
bucket: myownfedora-box                               # required
account_number: youramazonaccountnumber  # required
path: /mnt/images                                 # default: /
cert_file: /root/.ec2/yourcertificate.pem   # required only for ami type
key_file: /root/.ec2/yourprivatekey.pem  # required only for ami type

We need to create the directory /mnt/images which will store the AMI.

# mkdir /mnt/images

Finally we can fire boxgrinder to build the AMI.

# boxgrinder-build appliances/Fedora13EC2.appl -p ec2 -d ami

It will run for few minutes and will end up with something like:

I, [2010-08-07T06:21:58.693095 #17381] INFO — : Image successfully registered under id: ami-

That’s it. So simple right? Now you run this AMI and enjoy !

I would like to encourage people to look into this project. This is really awesome. For more information you can go through the following links
http://community.jboss.org/wiki/BoxGrinderBuildPluginsDeliveryS3
http://community.jboss.org/wiki/BoxGrinderApplianceDefinitionFiles
http://community.jboss.org/docs/DOC-14384
http://cloudpress.org/2010/07/21/boxgrinder-build-0-5-0-release-with-fedora-13-on-ec2-support-and-stormfolio-update/
http://cloudpress.org/2010/06/24/judcon-2010-boston-slides/

In my next post I will cover my experience with passing user data scripts to EC2 AMI while starting the instance and much more to come. Happy hacking :-)

Creating your own AMI for Amazon EC2

August 1st, 2010 jeevanullas No comments

It’s been long since I posted on this blog. This time I have come up with this new post which takes you through on how to go about creating your own Amazon Machine Image (AMI) for Amazon EC2. Note that there are several publicly available AMI’s on Amazon which one can use for various purposes but sometimes we require to have a AMI of our own which has all the require software / configuration to meet our daily requirements. That is time we need to know how to create our own AMI.

I would like to thank Phil Chen for his excellent post here http://www.philchen.com/2009/02/14/how-to-create-an-amazon-elastic-compute-cloud-ec2-machine-image-ami which I followed and have mentioned below with some extra addition and some modification.

The steps I mention in this article are part of the manual process. The next part to this article will discuss a great tool call boxgrinder which can let you automate this process in a very easy way. I personally use boxgrinder on my machine to deploy brand new AMIs on Amazon EC2.

The first step of course to this tutorial is to have a account on Amazon EC2. It’s pretty easy to get one if you have a credit card :) . Luckily I was provided a already existing account by my Manager. After you have the account on Amazon EC2 you need to login to the EC2 web console and get few things for yourself like:

  • S3 ACCESS KEY
  • S3 SECRET KEY
  • AWS ACCOUNT NUMBER
  • EC2 PRIVATE KEY
  • EC2 CERTIFICATE

In order to get these click on Account weblink inside the Amazon web console and then on Security Credentials. Once you have get the required data we need to install two packages provided by Amazon on our local system. The tools can work on Mac OSX and Linux, I am not sure about Windows.

I do have a local Linux machine but if I create the AMI on my local machine it will take lot of time to upload it to Amazon (due to slow internet connection). So instead of that I started a instance on EC2 for developing AMI. The major advantage is that it takes only few minutes to upload from their as the download/upload speed provided by Amazon is fantastic.

To start a instance you can use the web console provided by Amazon. I wanted to build a AMI for Centos 5 so I started the 32bit image for Centos 5.4 provided by RightScale free of cost available on EBS (Elastic Block Storage).

The instance will startup in few seconds and you will get a public DNS name for it. You can use one of your security keypair you associated when creating the instance to login as root to the instance.

Once you have logged in you need to set this instance as the development bed for creating AMIs. Download these 2 files:

Extract these 2 zip files inside your home directory for e.g /root or wherever you would like to extract them. Next you need to copy your private key and certificate for the EC2 account inside this running instance. I created a directory ~/.ec2/ and copied them there.

Next we need to setup the environment for our configuration. The following is what I wrote inside my ~/.bashrc

export PATH=$PATH:/root/ec2amitools/bin/:/root/ec2apitools/bin/
export EC2_HOME=/root/ec2apitools/
export EC2_AMITOOL_HOME=/root/ec2amitools/
export EC2_PRIVATE_KEY=~/.ec2/pk-yourprivatekey.pem
export EC2_CERT=~/.ec2/cert-yourcertificate.pem

Note that I extracted the AMI tools inside /root/ec2amitools and API tools inside /root/ec2apitools/ hence those paths in EC2_HOME and PATH.

In order to reflect the changes you need to source the bash profile.

source ~/.bashrc

Now it’s time to create a image file inside the running instance which will basically hold our operating system for the new AMI.

dd if=/dev/zero of=/mnt/ami-centos5.5-32bit-base.img bs=1M count=10240

Next we need to create a filesystem on this image.

/sbin/mke2fs -F -j /mnt/ami-centos5.5-32bit-base.img

We need to now mount this image on some directory. I created a directory /mnt/centos and mounted this image as loopback.

Next we need to create some basic directories inside /mnt/centos/ which are required.

mkdir /mnt/centos/proc
mkdir /mnt/centos/etc
mkdir /mnt/centos/dev
mkdir /mnt/centos/var
mkdir /mnt/centos/var/cache
mkdir /mnt/centos/var/log
mkdir /mnt/centos/var/lock
mkdir /mnt/centos/var/lock/rpm

Also we need to create 3 basic devices inside /mnt/centos/dev

/sbin/MAKEDEV -d /mnt/centos/dev -x console
/sbin/MAKEDEV -d /mnt/centos/dev -x null
/sbin/MAKEDEV -d /mnt/centos/dev -x zero

We also need to create /mnt/etc/fstab file for our image and populate it with the following information which is required for a 32bit image

/dev/sda1	/		ext3		defaults	1	1
none		/dev/pts	devpts	        gid=5,mode=620	0	0
none		/dev/shm	tmpfs	        defaults	0	0
none		/proc		proc		defaults	0	0
none		/sys		sysfs		defaults	0	0
/dev/sda2	/mnt		ext3		defaults	0	0
/dev/sda3	swap		swap		defaults	0	0

Now we need to mount the proc filesystem for our new image.

mount -t proc none /mnt/centos/proc

We will be required to install the base operating system inside this image file. Yum configuration should be created and saved in a file. I saved it in /mnt/yum-ami.conf

[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800

[base]
name=CentOS-5 - Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
#baseurl=http://mirror.centos.org/centos/5/os/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-5 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates
#baseurl=http://mirror.centos.org/centos/5/updates/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons
#baseurl=http://mirror.centos.org/centos/5/addons/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras
#baseurl=http://mirror.centos.org/centos/5/extras/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=centosplus
#baseurl=http://mirror.centos.org/centos/5/centosplus/i386/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=contrib
#baseurl=http://mirror.centos.org/centos/5/contrib/i386/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Now it’s time to install the base:

yum -c /mnt/yum-ami.conf --installroot=/mnt/centos -y groupinstall Base

This will install around 333 packages. After this is done we will install openssh packages inside the image because using openssh server only we will accessing the instance remotely

yum -c /mnt/yum-ami.conf --installroot=/mnt/centos/ -y install *openssh*

Make sure you put sshd on chkconfig so that it starts automatically when the instance runs:

/usr/sbin/chroot /mnt/centos/ /sbin/chkconfig sshd --add
/usr/sbin/chroot /mnt/centos/ /sbin/chkconfig --level 12345 sshd on

After this is done we need to configure our image for Amazon. First thing is to put kernel modules for Amazon inside the image. This is required in order to make this image run on EC2.

cp -r /lib/modules/2.6.21.7-2.fc8xen/ /mnt/centos/lib/modules/
/usr/sbin/chroot /mnt/centos/ /sbin/depmod -ae 2.6.21.7-2.fc8xen

One of the service which is set on in a default base install is kudzu (the hardware detecting service). We need not start it at all on EC2

/usr/sbin/chroot /mnt/centos /sbin/chkconfig --del kudzu

Next we need to configure openssh server configuration for EC2

vi /mnt/centos/etc/ssh/sshd_config

The two lines which we should make changes are:

UseDNS no
PermitRootLogin without-password

Next we need to setup networking inside this image. The following needs to be done for the same:

vi /mnt/centos/etc/sysconfig/network

NETWORKING=yes
HOSTNAME=localhost.localdomain

vi /mnt/centos/etc/sysconfig/network-scripts/ifcfg-eth0

ONBOOT=yes
DEVICE=eth0
BOOTPROTO=dhcp

When a instance boots in EC2 it needs to get your SSH keys in order to allow sshkey based authentication. We will create a init script for the same in /mnt/centos/etc/init.d/ with the name getssh

#!/bin/bash
# chkconfig: 2345 95 20
# description: getssh
# processname: getssh
#
export PATH=:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network

# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 1

start() {
  if [ ! -d /root/.ssh ] ; then
          mkdir -p /root/.ssh
          chmod 700 /root/.ssh
  fi
  # Fetch public key using HTTP
/usr/bin/curl -f \
 http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key \
  > /tmp/my-key
  if [ $? -eq 0 ] ; then
          cat /tmp/my-key >> /root/.ssh/authorized_keys
          chmod 600 /root/.ssh/authorized_keys
          rm /tmp/my-key
  fi
  # or fetch public key using the file in the ephemeral store:
  if [ -e /mnt/openssh_id.pub ] ; then
          cat /mnt/openssh_id.pub >> /root/.ssh/authorized_keys
          chmod 600 /root/.ssh/authorized_keys
  fi
}

stop() {
  echo "Nothing to do here"
}

restart() {
  stop
  start
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    restart
    ;;
  *)
    echo $"Usage: $0 {start|stop}"
    exit 1
esac

exit $?
###END OF SCRIPT

We will add this script to chkconfig and make sure it is executed everytime our instance starts

/bin/chmod +x /mnt/centos/etc/init.d/getssh
/usr/sbin/chroot /mnt/centos/ /sbin/chkconfig --level 34 getssh on

This makes our image ready for EC2. We need to do cleanup now so the image size is reduced:

yum -c /mnt/yum-ami.conf --installroot=/mnt/centos clean all
sync
umount /mnt/centos/proc
umount /mnt/centos

Now its time to bundle the image for EC2.

ec2-bundle-image --image /mnt/ami-centos5.5-32bit-base.img --prefix \
 ami-centos5.5-32bit-base --cert ~/.ec2/cert-yourcertificate.pem \
 --privatekey ~/.ec2/pk-yourprivatekey.pem \
 --user youraccountnumber --destination /mnt/centos/ --arch i386

After the bundle is over we need to upload it to S3 using the following command:

ec2-upload-bundle --manifest /mnt/centos/ami-centos5.5-32bit-base.manifest.xml \
 --bucket centos55-cpr-base  \
--access-key youraccesskey \
 --secret-key yoursecretkey \
 --location US

Finally we register this image with EC2 so we can use it to boot a instance

ec2-register -n centos55cpr  \
 centos55-cpr-base/ami-centos5.5-32bit-base.manifest.xml

Our image is ready to boot. We can now run the instance using this image via following command:

ec2-run-instances youramid \
-k yoursshkey  \
--kernel aki-a71cf9ce \
--ramdisk ari-a51cf9cc \
--instance-type m1.small \
--region us-east-1

It takes sometime for the instance to startup (as the image is in S3). To find what public DNS name this instance got we can issue the following command

ec2-describe-instances

After the instance has booted we will login into it using the sshkey we specified while starting the instance. Note that this instance we will be stored in S3 and will act as base for other images which we might plan to create in future. For e.g we have a requirement to have a Apache webserver image based on Centos 5.5 32bit we can utilize this base image and create a EBS volume for the new Apache image. Let’s see how to do that after the base image has booted.

We need to create a EBS volume of size at least 10GB.

ec2-create-volume -s 12 -z us-east-1d

Now we need to wait for few minutes till the volume is created. As soon as the volume creation is finished we attach it to our already running instance (image is in S3).

ec2-attach-volume vol-ea92ef83 -i i-b6dd60dc -d /dev/sdb

The volume id vol-ea92ef83 you can find out from ec2-describe-volumes and the instance id i-b6dd60dc you can find out from ec2-describe-instances.

Now we need to login to our instance and copy the whole root filesystem which is in /dev/sda1 to /dev/sdb using dd command.

dd bs=65536 if=/dev/sda1 of=/dev/sdb

Filesystem check on the EBS volume should be done now:

fsck /dev/sdb

Now we can mount the EBS volume and make any necessary changes we would like to make. For e.g we would like to make a HTTPD server EBS volume we simply follow these steps:

mkdir /mnt/ebs
mount /dev/sdb /mnt/ebs
mount -t proc none /mnt/ebs/proc
yum -c /mnt/yum-ami.conf --installroot=/mnt/ebs -y install httpd
/usr/sbin/chroot /mnt/ebs chkconfig httpd --add
/usr/sbin/chroot /mnt/ebs chkconfig --level 234 httpd on
umount /mnt/ebs/proc
umount /mnt/ebs

Finally we will have to create a snapshot of the EBS volume:

ec2-create-snapshot -d centos55-apache vol-ea92ef83

Now we can build a AMI out of this snapshot which will be stored on EBS volume using the following command

ec2-register -n centos5.5-32bit-httpd \
 --architecture i386 \
 --block-device-mapping /dev/sda1=snap-a06dbfcb:12:false

You can find out the snapshot id snap-a06dbfcb from ec2-describe-snapshots. The command above will finally generate the AMI id which we can use later to boot our instance out of EBS volume.

ec2-run-instances -k yoursshkeypair \
 ami-936289fa \
 --region us-east-1 \
--instance-type m1.small

I hope this article will help all the EC2 users out there who plans to roll their own base AMI and then custom software stack specific EBS volumes. In the next article I plan to cover boxgrinder a great tool which helps you do the whole process mentioned above in 1 single command. So stay tuned!

Fedora 13 release party in Bangalore

June 12th, 2010 jeevanullas No comments

I am a little late on writing about the release party we had last week on Saturday, was occupied with $work.  Well it all started with the mail of Rangeen to FSUG mailing list. That time I have just come to Bangalore and thought it will be great to meet all the Fedora folks in Bangalore during such party. Venue was a big issue initially as almost all the colleges in Bangalore were having exams. But I knew my friend Saket who has been pretty active in FSMK Bangalore. I contacted him and asked him if we can organize this release party at FSMK Bangalore office. I got a positive reply and after confirmation from the FSMK folks we finalized to have it at FSMK Bangalore office on June 5th.

I personally never expected many folks to turn up because of two reasons. One been that many colleges in Bangalore were having end semester exams plus we don’t have much Fedora folks here in Bangalore. Initially we (Me, Ankur, Hiemanshu , Dipjyoti and Rangeen) had a hard time finding out the office. Point to remember GPS in India will not be accurate enough with all these narrow lanes everywhere.

Finally we found the place and till then FSMK folks also started turning up. I would like to specially mention Vignesh, Prabodh and Naveen from FSMK core team who turned up for the party and assisted with the logistics. We had few other people some friends of Rangeen , students of Prabodh’s previous college CMRIT and other FSMK members.

We started with the discussion about why people should use Linux and not Windows. I never expected to start with such discussion in a Fedora release party but I love to be part of such discussion. It was great. Many questions were thrown on us. Why Linux? Linux? Is it user friendly enough? Why would a normal user plan to switch to Linux? People there who were using Fedora for past 4 years had such questions. I respect all the points given by them.

We started answering one by one. Inputs were given by Naveen on how the current scenario is changing and government bodies across India are encouraging FOSS in schools and engineering colleges. The current projects by Knowledge Commons and MHRD were been discussed with all the participants.

Me and Rangeen told the participants about how things (hardware) works out of the box these days with Fedora. How easily if you plug a mobile broadband card you can be sure that it will work without any hassle (all thanks to the great NetworkManager). We discussed why latest hardware sometime doesn’t work on most of the Linux distributions and how things are now changing. Times have changed and we should look towards improving things instead of blaming about them (my personal opinion).

Naveen introduced us to the FSMK activities currently going on. I personally got to know lot from that and looking forward to contribute to the cause FSMK is supporting.

While the hot discussion on various topics related to Linux/Windows was going on we ordered pizza’s for all of us. I would like to mention here how happy was the pizza girl over phone that she told me to not pick her phone after few minutes. She loved my Kannada ring tone :)

Once the dust of doubts and questions settled down Ankur started giving the Fedora 13 DVD/Live CD media to all the members. We also copied ISO for others who brought USB stick. I personally got DVD 32bit ISO from Ankur. Thanks a lot Ankur because I am writing this blog post from a Fedora 13 loaded laptop  :)

After that we briefly discussed the new features in Fedora 13 among the participants and touched few special points from the release notes handouts given to them by Ankur and Rangeen

Pizzas had arrived by that time and we ate them all!! It was great having pizza and garlic bread-sticks with jalapeño. Finally we all exchanged our phone numbers and promised to stay in touch :)

Overall turn out was around 10 + we four Fedora folks (Me, Rangeen, Hiemanshu and Ankur). That was a good figure. We have now aligned ourself with the FSMK and we plan to conduct some good workshops as soon as the college re-opens in Bangalore. Fedora is going to spread everywhere in the air of Bangalore I am sure. We are looking for contributors and FSMK is also planning their strategy on the same grounds. I hope to see some good action coming in next few weeks.

Oh yes, I don’t want to miss this part. After the release party ended me and Hiemanshu planned to end up in pub (purple haze in Kormangla). Ankur and Rangeen didn’t supported us so we went there alone. Hiemanshu had I believe 2 different cocktails and me 1 pitcher of Foster’s :)

Drink beer use Fedora our motto!! Few pictures were shot by Me, Rangeen, Dipjyoti and Ankur. You can find them here:

http://picasaweb.google.com/dipjyoti.ghosh/Fedora13ReleaseParty#

http://picasaweb.google.com/sherry151/

http://picasaweb.google.com/sanjay.ankur/Fedora13ReleaseParty

Categories: Fedora, Linux Tags: ,

Hackers dom in Hyderabad

April 17th, 2010 jeevanullas 5 comments

Well we hackers can’t live without our machines and that’s so true. Recently I have been playing with EBS volumes in Eucalyptus but was not able to make it work on Centos 5.4 with XEN more information can be found here. Then I thought to give it a try on our KVM + Fedora 12. But wait a minute we need more than 1 machine to try EBS volume. Hmm, just gave it a thought and remembered that I have another laptop with me at home. My brother’s new DELL laptop which is only having Windows 7 and nothing else. He doesn’t like anyone else to install any other OS on it so I thought of putting Fedora 12 inside VMware and finally after doing that I started my hacking experiment.

I have been running my Eucalyptus private cloud on a single laptop till now and knew that I can’t use brother’s laptop as node because it has windows 7 and fedora 12 was running inside VM. So I started installing eucalyptus 1.6.2 on that VM via source and finished eucalyptus as well euca2ools installation. Created that VM as the head running Cloud controller, cluster controller, storage controller and walrus. Next I switched to my laptop from scratch installed eucalyptus and configured it to run as node. My laptop is super cool. It’s been 4 years I have had this machine but the good thing it has the special processor flags which gives VT support so that I can run fully virtualized VM in KVM (kvm_intel).

The next thing which started bothering me was I didn’t had much space on my laptop left to store the instance copies when it boots up and later runs. But I have a 500 GB hard drive which I can use for this purpose. Created a directory on one of the partitions in my external hard drive and inside my node’s eucalyptus.conf

INSTANCE_PATH="/media/f5a889e3-9300-4565-9cb3-9d14b79ad124/images/"

The other thing I changed in my eucalyptus.conf was the VNET_BRIDGE interface which by default is xenbr0. This works good for XEN but not for KVM. Changed it to following:

VNET_BRIDGE="virbr0"

Then I remember that console thing didn’t worked for me when I first tried eucalyptus on KVM+Fedora 12 sometime back and for that to work I was suggested a patch at the forums. Applied that patch on my /opt/eucalyptus/usr/share/eucalyptus/partition2disk and all was set.

The next big thing to work out was my networking. The two laptops could have been connected to each other via a ad-hoc network but I prefer a cable connection as it makes the image transfer faster. I have a cross cable with me so I used it to connect both the laptops. The cross cable connection was available inside my VMware VM via bridged connection. The only thing I did different was the gateway IP inside my head (brother’s laptop fedora 12 VM running inside VMware) I gave my laptop’s eth0 IP. This was done because my instance will get a IP on the subnet 192.168.122.0/255.255.255.0 and my network was on 192.168.1.0/255.255.255.0. Once I did that I started the instance and later when it booted was able to ssh to it with my private key (password less login).

The other problem I had was sharing internet connection at the same time. I use a reliance usb device for internet connectivity. I attached that to my laptop started the connection created a simple squid proxy configuration which allows 192.168.1.0/255.255.255.0 and configured the same proxy on the fedora 12 VM in my brother’s laptop. This made internet as well as yum (had to made a proxy entry in /etc/yum.conf) working on the VM which was required to install some RPMS from the repos.

Sounds cool, eh? Let’s see a picture of this setup.

In the picture above you can see my laptop on the left hand side connected to my external 500 GB maxtor hard drive, reliance USB device and my brother laptop on the right via cross cable wire.

Though the setup worked and I was able to boot instance and login to them I was not able to see my EBS volume inside the VM. I have updated my forum entry for the same and you can find more information about it here. Let me know if you have any suggestions for me.

Please note that this is a small private cloud facility running out of my home and its scalable so if you got a laptop or a machine which you would like to add to this cloud do let me know.

Signing off for now but the love for machines still not ends up going to office to play more with those.

Cloud Computing is the future

April 14th, 2010 jeevanullas No comments

Well for those who don’t know, since Jan 2010 I have been working on eucalyptus a open source software to setup private cloud inside organization premises.

I have seen lot of people blogging about eucalyptus specifically on Ubuntu Server edition. Well to be frank eucalyptus is a great software and it works with almost al latest linux distributions. Though I haven’t found time to test all the available linux distribution as I am stuck with work and Fedora but I have tested it on centos 5.4 and Fedora 12. Works great!

Few problems I have always faced but the IRC channel for eucalyptus on freenode as well as the online forums have been really helpful in solving my doubts.

I plan to write my experiences with eucalyptus on this blog in times to come. Besides eucalyptus creating virtual appliances in a automated way is also one of the areas I have worked on paste few weeks. This is all specific to fedora right now using boxgrinder. It is a alternative to vm-builder which ubuntu folks have got.

I am a strong support of the fedora project and love the way how the fedora community is structured and functions. Have been associated with it since the beginning (Fedora core 1).

In the end, for now, I would just like to say, cloud computing is the future and open source is the best medium we have all got to implement it.

Random musings from city of nizams

February 27th, 2010 jeevanullas 3 comments

These days I am living in hyderabad which is famous for briyani and haleem. The city is very lively with crowd everywhere I go. Few things I would like to talk about this great city which I have found out.

1. If you are a hardcore non-vegetarian this is the place to be. This city has to offer variety of chicken and mutton and it is not costly either.

2. Briyani lovers, please go to paradise hotel. It’s like the makka madena of briyani. I have been there only once with my friends but would love to go again.

3. The place where I live is close to the famous hi-tech city. This hi-tech city is the area where you will see huge buildings some of them having nice arch. too. It is full of dynamic youth which are not at all driven by passion or enthusiasm but auto rickshaw drivers who run their auto’s in sharing mode. Even I am a regular customer of these sharing autos where you have to sit in front with the driver if there are ladies.

4. Description of this city will be in-complete without discussing my work place. The best place to be. It’s even better from my room because I don’t get power cuts there. It has a green landscape with small water falls, awesome food courts, big and nice buildings. We have in the employee care center everything. We got bank, gym, more store, indigo nation showroom, table tennis, carrum, snooker, dance class, tennis court, basketball ground, cricket ground, laundrament, apollo clinic and most important of all these if you would like to take rest or sleep we have got dormitory, separate for men and women. The dormitory is special cause it has got clean bed with air conditioned dark room where one can sleep for hours. Other things in the employee care center are strand book stall which has got some of the nice books for me to read at a discounted price.

What else? I am still exploring this city though not that much but as and when I get time. The places I have visited so far are near to my living place. I plan to go to the old city sometime and visit the original places where as I have heard there are still some nizams or at-least their property.

Right now I would like to advice you not to go to the old city just like that due to the telengana issue. It’s a big issue and sometimes results in curfew in the whole city. At that time it’s hard to find good food and easy way to commute. I have seen bike number plates having TG(telengana) instead of AP(Andhra pradesh)

I was able to write this post because of my E72 and pretty good airtel GPRS connection. Laptop battery died few minutes ago and still we don’t have lights here. What a life in the city they call as cyberabad.

Categories: random Tags:

Hello Internet

February 25th, 2010 jeevanullas 1 comment

Dear Internet,

I am glad to be part of you. Here I am, back, finally with my own space. I hope this journey is long and becomes learning experience for both of us. Looking forward to have a great time with you.

Thanks

~jeevanullas

Categories: random Tags:

End of a long silence

June 17th, 2009 jeevanullas No comments

Hey all , I am back :)

Well at least I will try to be regular now on this blog and write few things which I have been engaged with these days.

So stay tune!

Categories: random Tags:

I voted

December 7th, 2008 jeevanullas No comments
Categories: Fedora, Linux Tags: