Category: Eucalyptus/Cloud


Am not gonna get into the detailed aspects, just a brief introduction. First you need an Amazon Account. Register for Amazon AWS. You need an instance to to have your Web Server running. You may bundle an AMI and upload it , I prefer the ready made Amazon AMI’s. You can choose between Amazon Linux (or) your favorite distribution. I used the default one provided by Amazon.

1. Install Apache

yum install httpd

2. Set up MYSQL, PHP and other developer packages.

yum install mysql-server mysql php php-devel php*

3. Now allow access for SSH, FTP (you need FTP for loading files to your website), HTTP (22,(21,20),(80,8080)) under Security Groups, you need to write Custom TCP rules for them. It’s very easy you must be able to figure it out, once your familiar with AWS Console.

4. Now create an elastic IP to access your instance on the World Wide Web.

5. Map the IP to your instance.

6. Configure your HTTP and restart your Apache service once your done with it.

7. Make sure you turn on mysql httpd ftp permanently.

chkconfig httpd on

Repeat the same for the other daemons as well.

8. Configure your DNS to map it to your domain. Edit /etc/hosts

10.x.x.x mysamplewebsite.com mysample     (Just an alias)

(The above is just an example provides the syntax of the /etc/hosts file ).

11. Configure your domain to point to this IP.

Your Website is now hosted on the cloud. Yaay !!

You can contact me for any further clarifications or details.

HTH

 

 

 

 

I found it really hard to login to Ubuntu every single time I wanted to configure my EC2 instance. Putty provided me with easy access to my instances using Windows 7.

1. Get PuttyGen and Putty fromthis website

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

I used the 32 bit version.

2. Open Putty Key Generator and select the private key you downloaded for accessing your EC2 instance. Transfer it from Ubuntu.

3. After loading select “Save Private Key”. Give some name (*.ppk)

4. Now open Putty , in the Host type the IP address of the instance . ( I used Elastic IP’s to access my EC2 instances, hence I have my own IP from Amazon ). It’s easy just create an Elastic IP and associate it with the instance.

5.  Under Connection select SSH -> Auth. Select the private key you created in step 3.

6. Now you must be able to login to your instance from Putty.

HTH

With the increase in the traffic, it gets difficult to get high speed access to resources like data, network bandwidth and other resources. Companies are striving to provide high speed access to its clients and customers at the same time, but the former proves to be hindrance to this. Content Delivery network provides a solution to this. By placing edge servers at various locations on the globe , companies now can provide high speed access by directing the users specific to a region to their corresponding servers.

A quote from Wiki :

The capacity sum of strategically placed servers can be higher than the network backbone capacity. This can result in an impressive increase in the number of concurrent users. For instance, when there is a 10 Gbit/s network backbone and 200 Gbit/s central server capacity, only 10 Gbit/s can be delivered. But when 10 servers are moved to 10 edge locations, total capacity can be 10×10 Gbit/s.

CDN’s are dynamic in nature and they service with the help of TCP and UDP. CDN technologies lay a lot of importance to delivering resources dynamically and this also plays a major role when a particular server fails. CDN now can provide high availability by using other edge servers and there is no lag in transmission of data.

Some of the popular CDN’s include Akamai , Amazon’s Cloud Front and CloudFlare.

It’s very handy to use Hybridfox for handling images in eucalyptus, this article demonstrates on how to manage instances on the cloud using the command line

A key pair needs to be created before logging into a virtual machine on the cloud

euca-add-keypair mykey > mykey.private

Start the VM n is the number of instances that you want to start and emi is the image that you want to run on the cloud

euca-run-instances -k mykey -n (number of instances) (emi)

To query the system regarding the number of images and status of these images use

euca-describe-instances

Eucalyptus Cloud Setup

1. Setup NTP on the front end node

– yum install -y ntp
– ntpdate pool.ntp.org

2. Setup the packages required for eucalyptus installation

– yum install -y java-1.6.0-openjdk ant ant-nodeps dhcp \
bridge-utils perl-Convert-ASN1.noarch \
scsi-target-utils httpd

3. Install Hypervisor (Xen recommended)

– yum install -y xen

4. Disable SELinux

– run system-config-securitylevel-tui
– select Security Level: Disabled
– select OK

5. Setup yum repository

– vi /etc/yum.repos.d/yum.repo

Paste the following lines

[euca]

name=Eucalyptus
baseurl=http://www.eucalyptussoftware.com/downloads/repo/eucalyptus/{{VERSION}}/yum/centos/{{BASEARCH}}
gpgcheck=0

6. Using yum install the packages

FRONT END

– yum install eucalyptus-cloud eucalyptus-cc eucalyptus-walrus \

eucalyptus-sc

NODE

yum install eucalyptus-nc

HybridFox

HybridFox is a wonderful tool to work with, you can manage instances and it serves handy in viewing the status of your cloud at any instant of time.It provides a user friendly interface as well as well as convenient interfaces.

You can get HybridFox from the following link

http://code.google.com/p/hybridfox/

One can manage Images,Instances,Security Groups,Elastic IPs,Volumes,Security Groups etc…

For HybridFox tutorial follow this link :

http://architects.dzone.com/news/hybridfox-elasticfox

I would prefer people using HybridFox plugin in Mozilla Firefox for managing instances and images in Eucalyptus.

You can get it from this link

http://code.google.com/p/hybridfox/

Jus open this file using Firefox in “Open with” option while you right click on the file (.xpi).

This is a simple tutorial which doesnt cover EBS.Get your credentials from your cloud admin or generate a new key pair from the Euca Web Interface.

SCP your key

Syntax: scp -i yourkey.private euca2-xxxxxxx-x509.zip root@xxx.xxx.xxx.xxx:/mnt

Get an instance of the existing image running on one of the Node controllers.

Install rsync from yum repo

yum install rsync unzip

Unzip your credentials to /mnt,or which ever file system that has enough disk space.

unzip euca2-admin-x509.zip -d euca/

Source your scripts

. /mnt/euca/eucarc

Install Euca2ools

http://open.eucalyptus.com/wiki/Euca2oolsCentosInstall_v1.1

Bundle your image

euca-bundle-vol -c ${EC2_CERT} -k ${EC2_PRIVATE_KEY} -u ${EC2_USER_ID} --ec2cert ${EUCALYPTUS_CERT} --no-inherit --kernel eki-KKKKKKKK --ramdisk eri-RRRRRRRR -d /mnt -r ARCH -p NEW_IMAGE_NAME -s SIZE_IN_MBs -e /mnt,/root/.ssh,OTHER_DIRS_TO_EXCLUDE

where

eki-KKKKKKKK -> same as with running instance
eri-RRRRRRRR -> same as with running instance

Upload the Bundle

euca-upload-bundle -b BUCKET_NAME -m /mnt/NEW_IMAGE_NAME.manifest.xml

Synchronize your time (if error occurs )

yum install -y ntp
ntpdate pool.ntp.org

Register the bundle

euca-register BUCKET_NAME/NEW_IMAGE_NAME.manifest.xml