Friday, February 22, 2013

Install oracle java 7 in ubuntu 12.04


Firstly, I don't take credit of this.
I was in need to install java on a new Ubuntu instance in Amazon Web Services.
I found these commands after a long searching and was unaware that Ubuntu needs a  special treatment to install Java.
To install Java you can use following commands:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

You can check the java version by searching java in dashboard.
Or
If you run:

file /etc/alternatives/java /etc/alternatives/javac
You will get output something like :
/etc/alternatives/java:  symbolic link to `/usr/lib/jvm/java-7-oracle/jre/bin/java'
/etc/alternatives/javac: symbolic link to `/usr/lib/jvm/java-7-oracle/bin/javac'
 Which obviously means you have Java version 7 installed.
This assumes the "alternatives" system is working properly, which might not be the case, depending on how Java has been "messed up" in the past. To check this, run:
file `which java javac`
 Which will show the path where Java is installed.

Wednesday, February 20, 2013

Transfer data from Amazon S3 to Glacier without using any third party tool


Amazon Web Services provide several options for cloud storage including AWS S3 and AWS Glacier. AWS Glacier is a cheaper archival and it takes 4-5 hours to make an archive available. In comparison to Amazon Glacier, archive service, AWS S3 enables faster retrieval of stored objects. AWS allow you to set the Glacier archive and retrieval policies for S3 objects.
This guide shows how you can set a policy to archive S3 objects on Glacier and to restore it back.
1. Login to your Amazon AWS account UI console. and enter S3 section tab.
Archive
2. Below is a listing of a sample bucket, named “copy-data-glacier”.







3. Select the bucket “Properties” and enter the tab “Lifecycle” in the properties box. Click “Add Rule” (to add a rule to archive data to Glacier).




4. In the prefix either specify the name of the file or the name of the folder which you want to archive. To enable the archival policy, click “Add Transition”. The “Add Expiration” button will set the rule for object expiration as explained here.
















5. For “Time Period Format”, select the option “Days from the creation date”. It requires to enter the number of days S3 should wait from object’s creation date before archiving an object to Glacier. Provide an integer number.


















6. If “Date” option is selected in “Time Period Format”, S3 will require a date on which the object will be archived to Glacier.


















7. If you want to archive object immediately, enter days as “0”. As shown below, for the folder “CFGuide” in the bucket we have set a rule for Amazon S3 to immediately transition all objects of the folder to the Glacier storage class.


















8. The above policy may not move the object immediately to Glacier but it will move them to the Glacier storage class when the Glacier process is executed, once a day.
9. The rules, once set for a bucket, will be available for modification under the “Lifecycle” tab of the bucket.








10. If you want to modify the rule, click “Modify” and edit the rule.
11. When the Glacier process will run it will archive the object of the folder specified into Glacier.
12. After archival, the Storage class of an object will change to Glacier.









13. The above object will not appear in any vault on the Glacier console and will be visible only from S3 console. They will be charged as per Glacier storage since their Storage class is Glacier.
Restore
14. To restore the archived object select one of the objects (archives) from the list shown in step #12 and right click. Click “Initiate Restore”.











15. On the pop up page, provide the number of days you want the archive to be available. Click “Ok” to start the restore process.









16. Once the restore process is started, and until the archive is available for restore it will show “Restoration in Progress” as marked below. Usually it takes 3-5 hours to complete the process.









17. Once the object is restored, the status under “Properties” will display the date until which that object will be available in RRS (Reduced Redundancy Storage).

http://gabale.blogspot.com/2013/02/transfer-data-from-amazon-s3-to-glacier.html

Sunday, February 17, 2013

Windows Azure


Windows Azure:

When you hear word windows you imagine an operating system which you can install on your machine wisely, of course a legal one.
We had already many versions of Windows, Windows 98, Windows 2000, Windows XP, Windows 7 and recent Windows 8.
All of these versions you are able to install on your system and start playing with it.
But, Windows Azure is something different. Yes, it is an operating system. But this operating system you cannot install on your standalone system.

So what is Windows Azure ?

From Microsoft you will find following definition for Azure.
The Azure is an internet-scale cloud services platform hosted in Microsoft data centers, which provides an operating system and a set of developer services that can be used individually or together.
They (Microsoft) call it as windows azure Fabric.
In simple words, Imagine Windows azure as an BOX where you can install many systems with say Windows server OS (It’s an absolute infrastructural view).
Now what Azure does is it internally manages all instances. You can imagine an Instance like similar to a standalone desktop system.
We already have a system which is running on a server OS, So why we need azure?
Well the answer is we need it to manage the all the instances. For example say you have simple web server. Now we can have maximum availability if we have more than 1 web server and incoming traffic is load balanced across instances. Here the activities such as load balancing, High Availability, Scalability etc. are controlled and governed by Azure internally.
So summarizing people in general call it as cloud OS.
Azure’s flexible and interoperable platform can be used to build new applications to run from the cloud or enhance existing applications with cloud-based capabilities.
Azure reduces the need for up-front technology purchases.
Azure simplifies maintaining and operating applications by providing on-demand compute and storage to host, scale, and manage web and connected applications. 
Azure provides support for the following protocols:
1.    HTTP
2.    REST
3.    SOAP
4.    XML
And many more internet protocols.

Azure provides 2 types of services:
1.       PAAS (Platform as a Service)
2.       IAAS (Infrastructure as a Service)

Coming soon more about Windows Azure..........Keep reading........


 http://gabale.blogspot.com/2013/02/windows-azure.html