Deploying & hosting application on Amazon-ec2 Unix environment.

Amazon ec2 presents a true virtual computing environment, allowing you to use web service interfaces to requisition machines for use, load them with your custom application environment, manage your network’s access permissions, and run your image using as many or few systems as you desire.

Pre-requisites :

1)Account for amazon S3 and ec2 .
2)Command-line tool (ec2-ami-tool).The AMI Tools are a set of command line utilities for creating,bundling and uploading AMIs to S3 storage where they can be used by ec2.

a). Download ec2-ami-tool from the below mentioned URL:

http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351

Select rpm for linux and zip for windows.

b). Installation : To install the AMI Tools unzip the installation file into a suitable installation directory
such as ‘/usr/local’:

unzip ec2-ami-tools-X.X-XXXX.zip -d
This will create the directory ‘/ec2-ami-tools-X.X-XXXX’
where X.X-XXXX represents the release and build numbers.
Before running the utilities the ec2_HOME environment variable needs to be set:

export ec2_HOME=/ec2-ami-tools-X.X-XXXX

Running and authorizing an instance :

1). Sign up for Amazon S3 & ec2 .
2). Create a work directory and there download and unzip Command-Line Tools(ec2-ami-tools.zip) .
3). Create a new X.509 Certificate to generate a PEM encoded signed X.509 certificate (cert-*.pem) and an unencrypted, PEM encoded RSA private key that corresponds to the X.509 certificate (pk-*.pem) and save the certificate and private key in the work directory.
4). Setup environment variables by creating a batch file with the following configuration :

set JAVA_HOME =
set EXTRACT_DIR =
set ec2_HOME = \
set PATH = \bin
set ec2_PRIVATE_KEY = \PRIVATE_KEY_NAME
set ec2_CERT = \CAERTIFICATE_KEY_NAME

copy this batch file onto your work directory and execute it.

5). Run the command > “ec2-describe-images” : it will return a list of available images.
(on a mac you must set JAVA_HOME by doing: export JAVA_HOME=/home/foobar/jdk1.6.0 )

Output will be something like this :
IMAGE ami-68ae4b01 ec2-public-images/fedora-core4-base.manifest 206029621532 available public
Description of the above said command :

Record Type Identifier – IMAGE
Image Identifier - ami-68ae4b01
Manifest Location - ec2-public-images/fedora-core4-base.manifest
User Identifier(Who has registered the image) - 206029621532
Image Status - available
Visibility - public

6). Create a Keypair : “ec2-add-keypair ”

In order to launch an AMI we need a named key pair. The name of the key pair is specified in the web service call that launches the instance and the private key is used by ssh to authenticate for the same.

Use this private key that is hence created, save it to a file called id_rsa-gsg-keypair.
Now set it’s permissions to be rw——- (chmod 600 id_rsa-gsg-keypair).And copy this keypair file onto your work directory

7). Create a group : “ec2-add-group group_name -d ‘description_of_group’ ”

Security is important for any machine hooked up to any network at any time .Amazon’s ec2 cloud has a built-in firewall capability that is easy to setup. It is based on the concept of security groups. A security group is simply a group of access rules that apply to any instance which is a member of that group.

8). Create and Authorize a Security group to HTTP :
Follow the below mentioned commands for opening specific ports for ssh & http respectively.
ec2-authorize default -p 22 (ssh)
ec2-authorize default -p 80 (and http)

9). Now we have done the basics, here is the final step to get an instance up and running on Cloud.
Create an instance of your machine : ec2-run-instances ami-xxxxxxxx -k gsg-keypair

Where ami-xxxxxxxxx is the id of the machine you used to as in step 5 with ec2-describe-images.If this step failed and reported creation of the instance something like this as seen below :

So output will something like this :

INSTANCE i-xxxxxxxx ami-xxxxxxxx gsg-keypair

Description of the o/p of the above command :

Output Type Identifier - INSTANCE
Instance ID - i-xxxxxxxx
AMI ID - ami-xxxxxxxx
Key name - gsg-keypair
Hence ,wait for it,

Using ec2-describe-instances you can check the status of your instance, it will display the desired details as mentioned below:

INSTANCE i-xxxxxxxx ami-xxxxxxxx domU-##-##-##-##-##-##.usma1.compute.amazonaws.com running gsg-keypair

Description of the o/p of the above command :

Output Type Identifier - INSTANCE
Instance ID - i-xxxxxxxx
AMI ID - ami-xxxxxxxx
Public DNS name - domU-##-##-##-##-##-##.usma1.compute.amazonaws.com
Instance state – running
Key name - gsg-keypair

10). Url to access your application installed on ec2 instance is : http://publicDNSname/appname

For example : http://domU-##-##-##-##-##-##.usma1.compute.amazonaws.com/mworks

You can ssh into the machine using the key you created in step 6

ssh -i id_rsa-gsg-keypair root@domU-##-##-##-##-##-##.usma1.compute.amazonaws.com

and user will view the o/p as seen below :

__| __|_ )
_| ( /
___|\___|___|

Welcome to an ec2 Public Image :-)

S3(Simple storage service) steps & configuration :

How to take the backup of your hosted instance(s) as an Private Image for storing it on Amazon S3(Simple Storage Service)

Taking backup of instance means storing the complete instance as an image in S3(Simple Storage Service),for this first we need to create a folder called ec2 on your instance with the following details:

1) ec2-api-tools-1.2-13740
2) keypair_name.ppk
3) keypair_file
4) setup.sh(batch file for setting the Environment variables)
5) certificate
6) private key

one more batch file Setup.sh is required(For bundling up the instance as an image and upload onto S3 in a Bucket) .
Setup.sh should contain following details:
#!bin/sh

export JAVA_HOME = java_home_location
export EXTRACT_DIR = location_of_ec2_folder
export ec2_HOME = EXTRACT_DIR/ec2-api-tools-1.2-13740
export PATH = ec2_HOME/bin
export ec2_PRIVATE_KEY = EXTRACT_DIR/private-key
export ec2_CERT = EXTRACT_DIR/certificate

After setting up the environment variables , provide all permissions using this command – chmod +x setup.sh .And then execute this .sh file as mentioned below:
> ./setup.sh.

If it doesn’t execute properly then it may be possible that it is not in proper unix format, hence execute the below mentioned command:
> dos2unix setup.sh setup.sh

the above said command formats your .sh file in proper unix format.Now we can execute all ec2-api commands hereafter on the hosted instance.

We need one more called jSh3ll(The jSh3ll is a Java based command shell for managing your Amazon S3 objects) on the hosted instance. And one more batch_file.sh will contain following details:

#!/bin/sh
echo “Starting to script”
current_date=`date ‘+%Y-%m-%d-%H-%M-’`
export JAVA_HOME = jdk location
export EXTRACT_DIR = location_of_ec2_folder
export ec2_HOM = EXTRACT_DIR/ec2-api-tools-1.2-13740
export PATH = ec2_HOME/bin/JAVA_HOME/bin
export ec2_PRIVATE_KEY= EXTRACT_DIR/private_key
export ec2_CERT = EXTRACT_DIR/certificate

export jShellDir=/usr/ami/jSh3ll/(location of jSh3ll)
s3Dir=$jShellDir$current_date
s3inputCommands=$s3Dir”s3commands.txt”
s3output=$s3Dir”s3output.txt”

echo “bucket “$current_date”myappS(bucket_name)” > $s3inputCommands
echo “createbucket private” >> $s3inputCommands
echo “quit” >> $s3inputCommands

cat $s3inputCommands

$JAVA_HOME/bin/java -jar $jShellDir/dist/jSh3ll.jar -h s3.amazonaws.com -u AWS_ACCESS_KEY -p AWS_SECRET ACCESS KEY -i $s3inputCommands -o
$s3Dir”s3output.txt”
echo “create bucket output”
cat $s3Dir”s3output.txt”
echo “after creating bucket: “‘date’

currentDir=/usr/ami/
amiDir=/mnt/backup/
#mkdir “/usr/ami/backups/”$current_date
dbDir=”/usr/ami/backups/”$current_date”/mysql”
#mkdir $dbDir

mkdir “/mnt/backup/”$current_date

/usr/local/bin/ec2-bundle-vol -r i386 -d “/mnt/backup/”$current_date -c /usr/ami/ec2/CERITIFICATE_NAME -k /usr/ami/ec2/PRIVATE_KEY_NAME -u ec2
_USERID -a -p $current_date”myapp(BUCKET_NAME)”

echo “after bundling: “`date`

/usr/local/bin/ec2-upload-bundle -b $current_date”myapp” -m “/mnt/backup/”$current_date”/”$current_date”myapp.manifest.xml” -a AWS_ACCESS_KEY -s
AWS_SECRET ACCESS KEY

echo “after uploading: “`date
ec2-register $current_date”myapp”/$current_date”myapp.manifest.xml”//This command register whole data as an image(private)

This script will bundle the instance as an image and upload it in S3 in a BUCKET with unique name.

One great thing about Amazon S3 is that all uploaded files are available as URLs from a web browser (or any application that can read a URL). The format of the URL is as follows:

http://.s3.amazonaws.com/

Recovering data from S3 :
For this we should go to jetS3t directory there we will see configs/synchronize.properties.Provide AWS
ACCESS KEY ,JAVA_HOME and AWS SECRET ACCESS KEY,something like this in it.

####################################
# Synchronize application properties
#
# This file must be available on the
# classpath when Synchronize is run
####################################

# AWS Access Key (required)

accesskey=01G4VJZ4VPV73ZXV10G2

# AWS Secret Key (required)
secretkey=5hl8jETZD7wvAsS5VDuQgfiTyuafExGgKbbGFRE4

export JAVA_HOME=/usr/jdk/jdk1.6.0_04

# Access Control List setting to apply to uploads, must be one of: PRIVATE, PUBLIC_READ,
PUBLIC_READ_WRITE
# The ACL setting defaults to PRIVATE if this setting is missing.
acl=PRIVATE

# Password used when encrypting/decrypting files. Only required when the –crypto setting is used.
# password=

Create a folder in which you want to store the data,after this go to jetS3t/bin directory and execute the below command.
> ./synchronize.sh –keepfiles DOWN bucketname foldername.

Now the data is being stored in the desired folder.When you will execute ec2-describe-images then will return back with the private image which user has created and using the desired image we can easily launch/host a new instance.

Useful Link:http://jets3t.s3.amazonaws.com/applications/synchronize.html

New age Banking is all about being Social and Cloud enabled

Enterprise relationship Management is very important for the success of Banking industry.

Offering loans to SME’s/SMB’s and individuals most often depends upon the relationship of the customer with the bank. This relationship is always in the hands of Employees of the bank. But the bank employees keep moving from place to place. The enterprise relationship can be tracked by having a Social collaboration tool that will have all the information and communication had with the client.

It is more powerful when this kind of a Social collaboration is integrated with CRM system. The CRM system tracks the relationship with the client more in business related manner, the Social collaboration will actually go further to track the social interaction with the customer.

Let us take a use case. Richard is an entrepreneur who was banking for his small business and individual needs with a Bank X and Bank Y for 10 years. He has plans to start a new business enterprise. But there was nobody he knew in the bank X as some got layed off, others moved to other branched. He hardly knew anyone in the bank. The only way he can estimated with his previous transactions. It was the similar situation with Bank Y. But there are so many soft factors, which cannot be tracked. Richard’s new business is actually a transformation of his old business with new technology to cater the emerging market. He has been heavily successful in turning up his previous business a success. Richard is also funded by a well known venture capitalist fund, which adds to the confidentiality of the business Richard is going to start.

Bank Y uses a Social collaboration tool, which is integrated with the CRM system of the bank. All the social interaction is communicated and entered into the Collaboration tool. This was any new person can understand customer relationship and measure it to the benefit of the bank. Richard approached Bank X and Bank Y for a loan.

Bank Y employees know the previous history of Richard and they were aggressive in perceiving a deal with Richard. Richard also felt very comfortable with Bank Y, as they treated him with all the information they had. Bank X couldn’t be so aggressive and has to take traditional route and losses the opportunity.

Bank Y gets this Social Collaboration tool from very successful cloud computing concepts for Social networking portals. They start using a cloud service, which is available anywhere with a login and password and makes quick communication with client to be easier. In fact they have mobile client with on there blackberry’s to communicate with the customers and internal communication with collaboration. This enhances there speed of operation with good information to carry with employees about the customers in chaos ridden banking industry, where they need to have first hand information to offer proper deals to the eligible customers. Bank Y also got this tool on a pay per use basis, which added up to to be a cost advantage and they were not facing those maintenance hurdles for the software.

We at Imaginea have always been at the forefront of applying cutting edge technologies to better serve our customers. If you are looking to apply and use cloud computing, social colloboration tools, web2.0 technologies and SaaS engineering for your new age Banking Solutions, get in touch with us.

(With inputs from Sivaram.S)

Integrate Your Site with Linkedin APIs using Java

How to Integreate your site with Linked in Apis using Java ?

In a few simple steps, you can start building LinkedIn into your site:

1. Request an API Key . You need to add your application by login into https://www.linkedin.com/secure/developer

Application details preview looking like this:


2.Understand the OAuth Flow daigram:


Fore more details about how to request,authorize,access the token look at documentation @ http://developer.linkedin.com/docs/DOC-1008

3. Download the Beta OAuth Signpost code: click here to download

4.After extracting above zip file,Edit LinkedInAuthentication.java and modify Your LINKEDIN_API_KEY,LINKEDIN_SECRET_KEY generated at first step.

5.Compile above sources by keeping commons-codec-1.3.jar,signpost-core-1.1-SNAPSHOT.jar in classpath.

6.Setup JEE web structure and deploy it on J2EE Web/App Server

7.Open browser and send request to url: http://localhost:8080/YOUR_DOC_ROOT/logon/

8.Above url will call LogonServlet servlet,it will ask you to Grant your application access to your Linkedin account by signing in:

9. If your username | password valid,then it allows you to show XML responses ,you can further use these details to your application.


If you need extra information like,Company,industry,educaiton,no-of-recommands,current status etc., you need to pass it to your url eg:

i. http://localhost:8080/linkedin/api/v1/people/~:(id,first-name,last-name,industry)

ii. http://localhost:8080/linkedin/api/v1/people/~:(id,first-name,last-name,headline,picture-url,industry,location,num-recommenders,current-status,educations,site-standard-profile-request)

iii. http://localhost:8080/linkedin/api/v1/url=public-profile-url


Check it here for more profile fields: http://developer.linkedin.com/docs/DOC-1061

SAS70- Helps you choose the right on demand ISV

As an IT strategist if you are stuck in choosing the right on demand application that fits your bill, Applying SAS70 compliance as a filter criteria  will make your life better. Otherwise ever growing list of on demand software solutions to choose from for every business makes your life really difficult..

We all know that Software as a service model helps and supports ISV’s achieve the following:,

These factors have made budgetary allocations for SaaS based apps with priority on IT budgets. However there is a strong possibility that you might end up buying a SaaS app which is not of the standards that are required to be met and lesser than satisfactory SLA’s. Some time back, the concerns in choosing a SaaS app were mostly security and how they fare against on-premise solutions, but the  market now has matured as there are a many on-demand solutions for every vertical or horizontal aspect of applications. So how does an IT professional distinguish between the good and better solutions? How can he/she judge whether the SaaS provider will stand up to its SLAs, whether the data is secured and operational procedures exist and are followed?

SAS70 – Advantages and Disadvantages

Statement on Auditing Standards No.70 (SAS 70) is an internationally recognized auditing standard developed by the American Institute of Certified Public Accountants (AICPA) in 1992. It is used to report on the “processing of transactions by service organizations”, which can be done by completing either a Type I or a Type II audit. A SAS 70 Type I is known as “reporting on controls placed in operation”, while a SAS 70 Type II is known as “reporting on controls placed in operation” and “tests of operating effectiveness” (http://www.sas70.us.com/what-is/definition-of-sas70.php). This is the only authorized certification thats available right now to really ratify a on-demand software.

Most importantly just like any other compliance SAS70 allows and mandates companies to follow a set of standard operating procedures (SOPs) . Secondly the fact that you are choosing a SAS70 certified app makes you distinguish yourself from the pack and the crowd.

However the shortcoming from the SAS70 side of thing is it was defined way back from when the ASP’s ruled the world and SaaS was not even there. So companies have still ways to avoid the critical documentation and get away with it.

Way forward

SAS70 certainly puts the building blocks required to have a tighter compliance regime around the way on demand software apps are built, procured, used and deployed. However it can be further improved to ensure it covers operational, security and longevity of the software service provider so that choosing the right on demand ISV apps becomes a streamlined practice.

What does it mean for ISVs and SaaS engineering service providers

ISV apps that are providing on demand versions on top of their hosted and on premise solutions might want to make sure they satisfy the SAS70 regulations to help them better serve the customers. Technology Vendors specializing in providing engineering services for SaaS enabling current ISV products need to appropriately understand the nuances of compliance and regulatory software building. Vendors who position themselves to do this are bound to be successful be it from an ISV angle or from a offshore engineering service provider angle. We at Imaginea recognize this as a compelling proposition going forward.

Cloud-based Medical Services Offer Relief

Use cases of cloud computing’s impact on health care is very compelling for a IT strategist at a health care institution to have a look at. In continuation to the blog post on education, With contributions from Sivaram, i have tried to represent what it means to Healthcare. Whether its Google or Microsoft people now have choices to make, offerings to take advantage of.

Let us take a practical case of two people’s lives getting impacted with the technology and in particular cloud computing.

Chris and Rob are friends. They are in their mid-40s. Chris and Rob are both employed and had taken health insurance. This case describes the challenges that Chris and Rob faced when they underwent treatment and how the new Cloud-based medical services helped improve the complete process and relieved them of numerous problems that they faced earlier.

Both Chris and Rob suffer from chronic health disorders. Chris suffers from chronic auto-immune disorder. He has to visit doctors frequently, make trips to pharmacies to get his medication and then struggle with Insurance companies to get his prescription approved. His doctor has been trying to change and improve the medication frequently, as the current medicines were not helping Chris and his situation was deteriorating.

Chris also had to get frequent clinical tests of his blood samples done, for the medication he was using required regular monitoring of his blood. The test results had to be sent to the doctor so that he could monitor the effect of the medicines. Chris needed a solution to all these difficulties —his numerous visits to the doctors, the pharmacy, to various clinics for tests and then to the insurance company for approval. Chris had to coordinate the process and ensure that all these entities were in touch with each other as he was being treated.

Chris was informed about a new Cloud-based medical service that could be the answer to his problems. Chris logged into Google Health. He uploaded his profile from his insurance company BlueCross. His complete data was imported to his Google Health profile. Chris used the iHealth service integrated with Google Health to share his profile with his doctor. His doctor can now view his profile whenever he needs to, and when he makes a prescription, Chris’ profile is updated. Chris can login to Google Health, order the prescribed drug from CVS Pharma, which is an integrated solution that works with Google Health. The pharmacist notes the prescription and delivers the drugs to Chris.

Chris also needs to frequently undergo clinical tests and report the results to the doctor. Chris can place an order for those tests on Blue Print for Wellness, which is integrated with Google Health. Once the tests are complete, Blue Print posts the test results on Google Health. These results are shared with the doctor, who can then refer to those tests periodically and assess his patient’s condition.

Rob is suffering from Diabetes and Cardiomyopathy and he has been using Insulin to control his blood sugar levels. He frequently visits doctors to keep it under control. He too has go to through the hassles faced by Chris. Rob has to frequently report his blood sugar levels, blood pressure and weight to the doctor, which he does from home. Rob logs into Microsoft HealthVault instead of Google Health. He uses the same process to update his HER (Electronic Health Record) on Microsoft HealthVault and communicates the same to his doctor. He uses the A & D Weighing Device, Bayer’s Blood Sugar Testing Equipment and Homedic’s Blood Pressure Monitoring Equipment at home. Rob has installed the relevant software on these devices and so when he monitors his health profile, this data is uploaded on to his personal computer, which is integrated with Microsoft Health Vault. Thus Rob’s profile is available on HealthVault to the people helping with his treatment.

Using Eucalyptus for developing private & public Cloud

I’ve been doing some work with Eucalyptus Cloud setup lately and I thought I could speak about my experience with it. I was interested in the possibility of using other popular open source available in cloud domain and I thought Eucalyptus could be a good candidate for developing Private & Public clouds.

Many instructions said below refer to a single-cluster installation, in which all components except NC(Node Controller) are co-located on one machine, which we refer to as front-end. All other machines, running only NCs, will be referred to as nodes. In more advanced configurations, such as those with multiple CCs or with Walrus deployed separately, the front-end will refer to just the machine running the CLC.

Steps for installation :
All packages can be found on the Eucalyptus Web site: http://open.eucalyptus.com/downloads
Unpack the Eucalyptus source using the below mentioned command:

tar zvxf eucalyptus-1.6.1-src.tar.gz
cd eucalyptus-1.6.1

Installing the eucalyptus-cloud,eucalyptus-cc packages on the front-end machine .

sudo apt-get install eucalyptus-cloud eucalyptus-cc

Next, installing the eucalyptus-nc package on each node.(mynode / 0.0.0.0)

sudo apt-get install eucalyptus-nc

- Finally, on the node, bring down the eucalyptus-nc service and modify the file /etc/eucalyptus/eucalyptus.conf with the name of the bridge that we set up as the node’s primary interface.

Hence after successfully adding a node to the cluster we have to register the eucalyptus components.

Registering Eucalyptus Components :

Eucalyptus assumes that each node in the system belongs to a cluster and that each cluster belongs to a cloud. Each node (there is only one node in this example) which runs a copy of eucalyptus-nc. Similarly, each cluster (again, there is only one cluster in this example) must run a copy of eucalytpus-cc. For simplicity, the eucalyptus-cc in this example runs on the same machine as the cloud controller (eucalyptus-clc).

sudo euca_conf -addcluster <mycluster> localhost

where <mycluster> is the name that we would like this cluster to appear as to your users. Note that this name is logical and local only to Eucalyptus. It will correspond to an availability zone in the output of the client tools. Next, register our node with the cluster(mycluster) by running the following command on the front-end:

sudo euca_conf -addnode <node_hostname>

We can add more nodes by repeating the above command for each node running a copy of eucalyptus-nc.

Most likely, on the front-end you would run :

$EUCALYPTUS/etc/init.d/eucalyptus-cloud start EUCALYPTUS/etc/init.d/eucalyptus-cc start

And on each of the compute nodes you would run: $EUCALYPTUS/etc/init.d/eucalyptus-nc start

 

 

NOTE: If you later decide to make changes to$EUCALYPTUS/etc/eucalyptus/

eucalyptus.conf that will effect the cluster-controller, make sure to use the ‘cleanstart’,

‘cleanstop’, and/or ‘cleanrestart’ directives to the init scripts (as opposed to start/stop/restart).

This will both remove all existing CC state, and will cause it to re-read the configuration file.

Initial Login setup :

The first time Eucalyptus boots, we are required to go through some configuration steps that set up the administrative environment for the cloud. From our web browser (either remotely or on your server) access the following URL:

https://<front-end-ip-address>:8443/ (https://0.0.0.0:8443)

Use username ‘admin’ and password ‘admin’ for the first time login (you will be prompted to change your password) therafter.

* When you finish the first time configuration process, click the ‘credentials’ tab located in the top-left portion of the screen. Click the ‘Download Certificate’ button to get your credentials.

Next installed Euca2ools for launching the instances .

Now you will need to setup EC2/Euca2 API and AMI tools on your server using X.509 certificates. Unzip the downloaded zipfile into a safe location (~/.euca), and source the included “eucarc” file to set up your Eucalyptus environment.

Eucalyptus treats this set of credentials as ‘administrator’ credentials that allow the holder global privileges across the cloud.A admin user can further add another user(s) for monitoring purpose.

In addition to modifying the configuration, euca_conf attempts to synchronize x509 credentials across the nodes of a Eucalyptus installation by relying on rsync and scp. We highly recommend setting up password-less SSH access for the root user across all nodes of your Eucalyptus installation (otherwise, euca_conf will prompt you for remote system passwords).

Bundling and registering the image :

Next, we will need to bundle, upload and register a kernel, ramdisk and finally our image. Using the Euca API tools, perform the following steps:

# bundle and upload the systems kernel

$ mkdir kernel

$ euca-bundle-image –image /boot/vmlinuz-$(uname -r) \

–destination ./kernel –kernel true

$ euca-upload-bundle –bucket kernel \

–manifest ./kernel/vmlinuz-$(uname -r).manifest.xml

$ EKI=`euca-register kernel/vmlinuz-$(uname -r).manifest.xml | awk ‘{print $2}’`

$ echo $EKI

# create a ramdisk with acpiphp, bundle and upload

$ mkdir ramdisk

$ sudo sh -c ‘grep -q acpiphp /etc/initramfs-tools/modules ||

printf “#acpiphp needed for ebs\nacpiphp\n” > /etc/initramfs-tools/modules’

$ sudo mkinitramfs -o ./ramdisk/initrd.img-$(uname -r)

$ euca-bundle-image –image ./ramdisk/initrd.img-$(uname -r) \

–destination ./ramdisk –ramdisk true

$ euca-upload-bundle –bucket ramdisk \

–manifest ramdisk/initrd.img-$(uname -r).manifest.xml

$ ERI=`euca-register ramdisk/initrd.img-$(uname -r).manifest.xml | awk ‘{print $2}’`

$ echo $ERI

After successfully creating the buckets ,copy the manifest file hence builded and stored them under the unique(mybucket) bucket name.

Running an Instance:

A user may choose a specific kernel/ramdisk at instance run time as an option to ‘euca-run-instances’

euca-run-instances –kernel <eki-XXXXXXXX> –ramdisk <eri-XXXXXXXX> <emi-XXXXXXXX>

Before running an instance of our image,we should first create a keypair (ssh key) that you can use to log into our instance as root, once it boots.The key will be stored in your m/c, so you will only have to do this once.

The first time we run an instance, the system will be setting up caches for the image from which it will be created. This can often take some time the first time an instance is run given that VM images are usually quite large.

$ euca-describe-instances

The above command will give the essential details about the instance status as active,shutting down or terminated.

Deleting the image :

In order to delete an image, you must first de-register the image:

euca-deregister <emi-XXXXXXXX>

Then, you can remove the files stored in your bucket. Assuming you have sourced your ‘eucarc’ to set up EC2 client tools:

euca-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY –url $S3_URL -b <bucket> -p <file prefix>

If you would like to remove the image and the bucket, add the ‘–clear’ option:

euca-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY –url $S3_URL -b <bucket> -p <file prefix> –clear

Despite the issues faced, I think that this has been a good experience as I have got to know better Eucalyptus and I’ve had the chance to dig into Cloud domain via an open source and understood it more how it works under the hood .

I’m no expert in Eucalyptus though, so if I’m missing something, don’t hesitate to say it, I’ll appreciate it!

 

Revival of Java EE

It has been a long awaited metamorphosis closely watched by millions of java ee enthusiasts!  Finally Java EE survived in the era of osgi-driven virtualized server space. Thanks to a stiff competition offered by the VMWare-SpringSource conglomeration.

Java Gurus did tremendous soul searching to figure out what went wrong over the years !  The result is a simplistic view of a complex world !

Select your Pizza

In its latest incarnation, the most striking change is – rightsizing the platform ! It makes lot of sense to be able to select desired platform profile. That is a company specialized in web-based products can choose a ‘web profile’.
GlassFish v3 Web Profile starts small, then one can add features like RESTful admin as needed.
You can limit the footprint of the web-container by choosing only what you need (servlet 3 or ejb 3.1 or both).
A close contest with spring-source indeed!

Healing Touch

To make life simpler, java ee 6 offers the perfect healing touch by just pruning jax-rpc, ejb 2.x entity beans, jaxr .. (no need to mention how painful they were !)

More good news ! The platform is truly extensible now with goal of zero-configuration.

Zero-Configuration – emergence of Java Contexts

Core container can simply be bootstrapped. Then container-initializers, servlets, servlet-filters, fwk-context-listensers can be discovered and registered during runtime through the JSR-299: Java Contexts and Dependency Injection. (Java Contexts – a best of breed of seam and spring beans).  This specification enhances the EJB component model with contextual lifecycle management.

Web Fragments

Just like bundles in osgi, developers can now create modular ‘plugin library jars’ using the concept of ‘web fragments’.

Actually, Glassfish has embraced open-source library ‘HK2’ to implement osgi-like module architecture.

If we can drag-n-drop web frameworks , wouldn’t that make web.xml obsolete ?  Of course, yes !  just annotate the servlet to deploy servlet … @WebServlet (name urlpattern)

No need to mention in web.xml.
Obviously one can use the descriptor to override the url pattern. You don’t need to recompile the whole application.  With modularity and flexible pluggability comes ‘simplified packaging’ !

That means ejbs can be directly added to web app. No need for classic ejb.jar !  Finally, EJB mandates one source file per bean.

Inject whatever whenever

Custom fwks can directly be plugged into container. That is ‘JRuby on Rails’ can run natively inside GlassFish v3.

 Actually It is now possible to inject Java EE resources, remote EJB references, web service references, persistence contexts and persistence units using typesafe 299-style injection. For example, we can inject a persistence context like this:
@UserDatabase EntityManager entityManager;
Where @UserDatabase is a binding type.

Any session bean instance obtained via the dependency injection service is a contextual instance. It is bound to a lifecycle context and is available to other objects that execute in that context. The container automatically creates the instance when it is needed by a client.

<h:inputText id=”username” value=”#{credentials.username}”/>

The Credentials bean has a lifecycle that is bound to the JSF request:

@Model
public class Credentials {
private String username;

<h:commandButton value=”Login” action=”#{login.login}”

The Login bean has a lifecycle that is bound to the HTTP session:
@SessionScoped @Model
public class Login {
@Current Credentials credentials;
@Users EntityManager userDatabase;

Support for activities

It’s now possible for a third-party framework, especially an orchestration engine, to register beans that apply only within the scope of a certain activity, for example, a workflow task, business process or web interaction.
This feature has tremendous impact as all verticals merging fast into a single server space. That is a BPM Process published as a service in an app server can talk to the SCA Process deplyed as another service and also requiring prediction support from a Rule Engine service.

Now JEE 6 will help realize such complex golas of technology integration.

Asynchronity and amzing annotations

Event observers may now receive event notifications asynchronously

 Make a process aynchronous — @WebServlet (asyncSupport=true)
 then call AyncContext ctx = ServletRequest.startAsync(..)
 finally  ctx.dispatch(..)

As per Gavin King –

“JSR-299 The spec now features by far the most sophisticated annotation and XML based metadata reuse and overriding scheme ever devised”

@Singleton – enables sharing state amongst all beans

@ConcurrencyManagement – container managed security

@Asynch – Lightwt asynchronicity for businessmethods

@Schedule(dayOfWeek=”Mon/Wed – for timer sevice    … and so on.

There is a metadata-complete flag in the descriptors that turns annotation processing off.

Conversation Scope

Both JSR 311 for Restful Service and JSR 299 for Conversation Scope now part of Servlet Spec. The conversation context is provided by a built-in context object for the built-in passivating scope type
@ConversationScoped. The conversation scope is active:
• during all standard lifecycle phases of any JSF faces or non-faces request.
The conversation context provides access to state associated with a particular conversation. Every JSF request has an associated conversation. This association is managed automatically by the container according to the following rules:
• Any JSF request has exactly one associated conversation.
• The conversation associated with a JSF request is determined at the beginning of the restore view phase and does not change during the request.
Any conversation is in one of two states: transient or long-running.
• By default, a conversation is transient
• A transient conversation may be marked long-running by calling Conversation.begin()

One should read the whole spec to learn the interesting flow of COnversation Scope.

 In a nutshell, Sun’s JEE Survival mantra :

“The whole GlassFish v3 EJB 3.1 container is smaller than one megabyte, can be dynamically installed and uninstalled, and is surprisingly “elastic.” You can develop and deploy an application with only a few annotations.”

References :

http://in.relation.to/Bloggers/RevisedPublicDraftOfJSR299JavaContextsAndDependencyInjection

http://www.java.net/blogs/robc/

http://www.javabeat.net/articles/99-new-features-in-java-ee-60-3.html

http://www.infoq.com/news/2009/01/java-ee6-draft

http://blogs.sun.com/carolmcdonald/entry/jpa_performance_don_t_ignore

 
 

Dreamforce 2009:Key Items, Updates and Our thoughts

To understand the next logical steps around sf.com application development and integration services there was no better source than Dreamforce 2009. Even though i could not attend, I was carefully going over a lot of updates, videos and webinars, blogs related to Dreamforce 2009 and here are some key updates i had jotted. It gives a clear, concise and precise view of where things are moving and what could be the one’s that will be of interest to the development community in general.

Service Cloud 2

Sales Cloud 2

Custom Cloud 2
Collaboration Cloud

Our thoughts

Salesforce to Salesforce content access and analytics could mean a lot when more than one organization, more than one team colloborate to work, access and use each other’s information.I personally think the salesforce to salesforce connection finder is a really amazing thing that can open multiple possibilities. This would allow seamless integration, connect leads, deals and bring in more colloborative business flow.

I also think cloud scheduler is very HOT considering the fact that it can ntegrate SFDC, Google, LotusNotes, and Outlook calendars.  Its proposed ability to  overlay calendars will be a really huge thing considering diverse set of people trying to colloborate across the spectrum in an organization. All this logically leads to one more interesting conclusion that e2.0 market space is bound to be really happening.

Salesforce chatter could all the way pump up enterprise2.0 market space considering the fact that it has huge impact on the way people look at using social tools to colloborate. Solutions who have already built salesforce.com integrated versions with their enterprise2.0 products are bound to gain more traction, usage and adoption in general.

We have been investing in competencies around this space much before which has placed us uniquely to help you take advantage of the exciting possibilities unleashed after dreamforce’09. We at Imaginea have been providing interesting services, solutions around force.com platform. Companies are already able to launch their appexchange enabled applications leveraging our expertise and have seen the value of partnering with us. Some of the best ranked app exchange applications have been developed by us.

We don’t see any reason why can’t be doing more of this and be a part of this exciting phase of time.

Healthcare2.0 – Technologies and Trends

Healthcare2.0 is all about adoption of technologies that provide best possible healthcare solutions at affordable cost without compromising the security, privacy, reliability and availability of patient-care information. Going forward, we think two key technologies and modern-day IT paradigms will greatly influence the way healthcare shapes up –Cloud computing and SaaS.

This interesting case study from Harvard, whose link is provided here –[http://aws.amazon.com/solutions/case-studies/harvard/ ] highlights the importance and application of cloud computing infrastructure and modern day technologies in preventive medicine and genetics.

5 important areas and use cases that  we think will constitute healthcare 2.0.

Health care 2.0 – New Age Customer Expectations (Patients 2.0)

Modern day consumers want information at their finger tips− be it health care related or about any other area. These  customers will start pushing the limits of how, where and when the information is shared, accessed and consumed. New generation patients of a Healthcare2.0 world can be called Patients 2.0. They will demand full control over the data, which could be a highly personalized XML data export model to begin with. Health care mashups, iPhone applications, personalized digitization solutions, metering, health care statistics and parameters are some of the newage applications that customers are demanding.

What are the ISV’s doing

Most health care ISVs are also looking to build analytics for mature SaaS Applications and view this as a key growth area. Based on a multi-tenant architecture, ISVs want customers to take advantage of common hardware, software and staffing resources to achieve superior reliability, faster implementations and lower total cost of ownership.

Health care services and service-providing ISVs are now launching applications on leading cloud computing platforms like Salesforce.com.Force.com integrated applications for health care applications are providing more power to electronic medical records than ever before.

Many ISVs are now leveraging the capacity of private clouds by being in proximity with one of the bigger private cloud technology providers. They have significantly bolstered their capability to offer on-demand, ready-to-ramp-up or down solutions on the health care side.

@Imaginea

We strongly believe Healthcare2.0 is thus the way forward and and we  are already a part of that journey. We are ensuring our technical expertise and problem solving capabilities are available for ensuring a healthy world. With expertise in areas like Cloud Computing, SaaS and applying principles of Distributed computing using technologies like Hadoop, Hbase, Hive, PIG etc we are creating some innovative solutions that are of immense benefit to healthcare organizations across the segment. We are also working with some of the best and bright minds in leading engineering institutions to get the ball rolling.

Stay tuned to this section for some of the interesting work that are being done by us to be showcased here.

Uncategorized

Cloud Computing Use cases- Education

To do a lot of work and claim mastery over Cloud Computing and SaaS engineering to solve problems that end users face, it is imperative we understand the benefits that they can actually subscribe to. We at Imaginea, have always put this as our prime objective so that we keep the end user at the forefront and help our customers serve them better.

With inputs from sivarams@pramati.com, I plan to put together some blog posts here regarding the way we understand how interesting companies are solving larger than life problems and making life better for a lot many.

Let us take a use case for a student who is pursuing for a Grad school education and looking for school which is of his/her choice. Let’s name him Bob and he is searching for all the information to showcase himself and also look for scholarships. He tried to communicate with his friends and family to identify crucial information to decide a Grad school suitable for him and also where he can find funding and scholarships. Bob found a Cloud service for education http://www.zinch.com/ , where he found that he can create a profile for himself and make him searchable with his skills and knowledge to the Professors and universities looking for students of particular interests and skills. This way there will be a bridge between professors and students to interact socially over web before being a student of the university. And this will provide a way for the professors to get in touch with the students of there choice by searching for them.

After that Bob was curious about the kind of classes offered and he really wanted a glimpse of the classes he might want to attend. Then he looks for some videos on iTunes U and You Tube education channels which belongs to the universities he is trying to attend. He started picking some of he classes, with choice of his program and with a scholarship.

Then he started attending classes, there he found a tool called moodle used by the university Grad School. Moodle is an Open source course-management system, where students of particulat class (course) collaborate and upload there assignments , research paper and other course related materials.

The professors can also make there announcements, lecture notes, communication with students and grading information for assignments etc.

The other important issue Bob was working from various places and he wants to get his files to be available from anywhere and also wants to access them from his iPhone. Bob started using http://www.soonr.com/ . This way Bob once proved to his professor that he finished his assignment but couldn’t bring it to class by browsing it from his phone.

When Bob joined the university there was a recession, and the university was trying to cut it costs desperately wanted to save money. Bob was almost about to loose his funding, when the university official an alternate way of cost cutting by cutting costs by using he cloud computing services for email and other services of the university. Which significantly cut down the cost of procuring the software, hardware, maintaining the servers and cost of manpower to manage them and also they started charging users a minimal cost in their tuition fee.

This way the university could cut costs. And the university also stopped offering some classes and Bob needed one of those classes to keep his funding. The university had an alternate plan to offer it as online course with all Cloud services available. Then he opted for this course.

Solving end user problems with a meaningful impact to their everyday life gives a Software engineer more pride than anything. We have been doing that for years now by adding ideas to life in every spectrum of work that we do. Our esteemed customers have always said this and are continuing to do so.

Stay tuned for some more.