Showing posts with label Elastic Cloud Compute (EC2). Show all posts
Showing posts with label Elastic Cloud Compute (EC2). Show all posts

Friday 14 September 2012

Amazon EC2 Reserved Instance Marketplace

Superbly detailed blog Post by Jeff on Amazon EC2 Reserved Instance Marketplace

No more words need to be added....


EC2 Options
I often tell people that cloud computing is equal parts technology and business model. Amazon EC2 is a good example of this; you have three options to choose from:
  • You can use On-Demand Instances, where you pay for compute capacity by the hour, with no upfront fees or long-term commitments. On-Demand instances are recommended for situations where you don't know how much (if any) compute capacity you will need at a given time.
  • If you know that you will need a certain amount of capacity, you can buy an EC2 Reserved Instance. You make a low, one-time upfront payment, reserve it for a one or three year term, and pay a significantly lower hourly rate. You can choose between Light Utilization, Medium Utilization, and Heavy Utilization Reserved Instances to further align your costs with your usage.
  • You can also bid for unused EC2 capacity on the Spot Market with a maximum hourly price you are willing to pay for a particular instance type in the Region and Availability Zone of your choice. When the current Spot Price for the desired instance type is at or below the price you set, your application will run.
Reserved Instance Marketplace
Today we are increasing the flexibility of the EC2 Reserved Instance model even more with the introduction of the Reserved Instance Marketplace. If you have excess capacity, you can list it on the marketplace and sell it to someone who needs additional capacity. If you need additional capacity, you can compare the upfront prices and durations of Reserved Instances on the marketplace to the upfront prices of one and three year Reserved Instances available directly from AWS. The Reserved Instances in the Marketplace are functionally identical to other Reserved Instances and have the then-current hourly rates, they will just have less than a full term and a different upfront price.


Monday 10 September 2012

Building Highly Available, Scalable Web Properties with AWS

From the AWS Webinar Series: Building Highly Available, Scalable Web Properties with AWS 

A very nicely compiled webinar for understand various AWS Services and design principles.

This webinar recording focuses on basic properities for Building Highly Available, Scalable Web Applications on AWS Cloud.

These properties are:

  • Elasticity
  • Design for Failure
  • Loose Coupling
  • Security
  • Performance
 


Wednesday 5 September 2012

AWS Management Console Improvements to EC2 Tab

AWS recently made some improvements to the EC2 tab of the AWS Management Console. It is now easier to access the AWS Marketplace and to configure attached storage (EBS volumes and ephemeral storage) for EC2 instances.

Read on a good post by Jeff.

Marketplace Access

This one is really simple, but definitely worth covering. You can now access the AWS Marketplace from the Launch Instances Wizard:


AWS Marketplace

After you enter your search terms and click the Go button, the Marketplace results page will open in a new tab. Here's what happens when I search for wordpress:

Monday 27 August 2012

Getting Started with IAM Roles for EC2 Instances



AWS Identity and Access Management (IAM) helps you securely control access to Amazon Web Services and your account resources. IAM can also keep your account credentials private. With IAM, you can create multiple IAM users under the umbrella of your AWS account or enable temporary access through identity federation with your corporate directory. In some cases, you can also enable access to resources across AWS accounts.

Without IAM, however, you must either create multiple AWS accounts—each with its own billing and subscriptions to AWS products—or your employees must share the security credentials of a single AWS account. In addition, without IAM, you cannot control the tasks a particular user or system can do and what AWS resources they might use.


 
 
AWS has recently launched IAM Roles for EC2 Instances. A role is an entity that has a set of permissions that can be assumed by another entity. Use roles to enable applications running on your Amazon EC2 instances to securely access your AWS resources.You grant a specific set of permissions to a role, use the role to launch an EC2 instance, and let EC2 automatically handle AWS credential management for your applications that run on Amazon EC2. Use AWS Identity and Access Management (IAM) to create a role and to grant permissions to the role.
 
 
IAM roles for Amazon EC2 provide:
  
  • AWS access keys for applications running on Amazon EC2 instances
  • Automatic rotation of the AWS access keys on the Amazon EC2 instance
  • Granular permissions for applications running on Amazon EC2 instances that make requests to your AWS services
  
The below video demonstrates basic workflow of:


Create new role AWS IAM Workflow


 

 
 
For more help, refer the AWS documentation for IAM here.
 
For other AWS Documentations, please refer to the quick links provided in the Blogger's right-side panel.
 
 

Thursday 7 June 2012

Behind the Scenes of the Amazon Appstore Test Drive

The beta launch of Test Drive last week on select Android devices has many developers wondering, how does it work?

Jeff Bar, Amazon Web Services Technical Evangelist, has taken the time to walk through the technology behind Test Drive on the AWS blog. Test Drive is hosted on Amazon Elastic Cloud Compute (EC2). The Amazon Appstore team can therefore easily add additional capacity whenever needed and where it makes the most sense with respect to the incoming traffic.

Check out Jeff’s full post on the Amazon Web Services blog.



SOURCE

Thursday 31 May 2012

AWS - Migrate Linux AMI (EBS) using CloudyScripts


In a typical Amazon Web Services(AWS) Environment, Amazon Machine Images (AMIs) are strictly available in a certain region only. These AMIs cannot be moved from one region to another. Though the AMIs are shared within different Availability Zones of the same region.

For this purpose, you can use a third party tool called as CloudyScripts.

CloudyScripts is a collection of tools to help you programming Infrastructure Clouds.

The web-based tool is self explanatory and regularly updated. In case you find any bug, do not hesitate to email the owners right away.


Goto the CloudyScripts Copy AMI to different region tool
































Wednesday 30 May 2012

AWS EBS-Backed Instance Backup &Restore

Starting with the 2009-10-31 API, Amazon Web Services (AWS) has a new type of Amazon Machine Image(AMI) that stores its root device as an Amazon Elastic Block Store(EBS) volume. They refer to these AMIs as Amazon EBS-backed. When an instance of this type of AMI launches, an Amazon EBS volume is created from the associated snapshot, and that volume becomes the root device. You can create an AMI that uses an Amazon EBS volume as its root device with Windows or Linux/UNIX operating systems.

These instances can be easily backed-up. You can modify the original instance to suit your particular needs and then save it as an EBS-backed AMI. Hence, if in future you need the the modified version of instance, you can simply launch multiple new instances from the backed-up AMI and are ready to-go.

Following are the steps to be performed for backup/restoring of AWS EBS instance into/from an AWS AMI. Also brief steps for deletion of AMI backup are noted for reference


EBS-instance to EBS-backed AMI

  • Go to AWS Management Console and in the My Instances Pane, select the instance which has to be backed up.
  • Right click the instance and select option Create Image (EBS AMI).

  • In the Create Image dialog box, give proper AMI Name and Description. Click on Create This Image button.
 

  • The image creation will be in progress. This will take sometime depending upon the number & size of volumes attached to the instance. Click on View pending image link. It will take you to the AMIs pane.

  • The AMI will be in pending state. It is important to note that this AMI is private to the account and not available for AWS public use.
 
  • If you select Snapshots from the Navigation Pane, then you can see that EBS volumes attached to the instance will be backed up as too.

  • Once the backup is done, the AMI will be in available state.
 


Restore from backup AMI into instance


In case, the running instance needs to be restored, use the latest backup AMI. To launch an instance from this AMI, right-click the AMI and select Launch Instance option. The Launch Instance Wizard will be displayed, perform the usual configurations and a new instance will be created containing all the data & configurations done before backup.


Delete AMI & Snapshots:

  • To delete any AMI, Right-click it and select De-register AMI.

  • Remember, deleting AMI doesn’t delete the EBS volume snapshots. Click on Snapshots from Navigation pane, search & select the snapshot(s) to be deleted. Right-click on the snapshot(s) and select delete snapshot option.
 


References:


 

Friday 25 May 2012

Microsoft SharePoint on the AWS Cloud

Amazon Web Services (AWS) provides services & tools for deploying Microsoft® SharePoint® workloads on its cloud infrastructure platform. This white paper discusses general concepts regarding how to use these services and provides detailed technical guidance on how to configure, deploy, and run a SharePoint Server farm on AWS.

Deploy SharePoint quickly at lower total cost on AWS Cloud. Learn how

Thursday 24 May 2012

Install and Configure MySQL on CentOS

MySQL is the world's most popular open source database.

MySQL Community Edition is freely downloadable version.

Commercial customers have the flexibility of choosing from multiple editions to meet specific business and technical requirements. For more details please refer to the MySQL official website.

INSTALL :


On any CentOS server with open internet, run the below command to install MySQL Community Edition:

yum install mysql-server mysql php-mysql

OR

Download the server and client rpm files from the MySQL Website depending upon the platform(OS) and architecture(32/64bit).

Install both rpm files using below command:

rpm -ivh <<rpm_filenames>>

Example:

rpm -ivh mysql-server-version.rpm mysqlclient9-version.rpm


CONFIGURE :


Once installed, run the below commands to configure MySQL Server:

1.Set the MySQL service to start on boot

chkconfig --levels 235 mysqld on

2. Start the MySQL service

service mysqld start

3. By default the root user will have no password, so to log into MySQL use command:

mysql -u root

4. To exit Mysql Console, enter below command

exit;

SET PASSWORD FOR ROOT :


To set the root user password for all local domains, login and run below commands

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('<<new-password>>');

SET PASSWORD FOR 'root'@'localhost.localdomain' = PASSWORD('<<new-password>>');

SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('<<new-password>>');

(Replace <<new-password>> with actual password)

OR

run below command at linux shell:

mysqladmin -u root password '<<new-password>>'

(Replace <<new-password>> with actual password)

Once password is set, to login to Mysql use below command:

mysql -u root -p

Once you enter the above command, you will be prompted for the root password.

ADD NEW USER :




To add a new user for MySQL login, use the below SQL query. Remember this query must be run from the MySQL prompt.

for localhost:

INSERT INTO user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv, Trigger_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions, max_updates, max_connections, max_user_connections) VALUES ('localhost', '<<USERNAME>>', password('<<PASSWORD>>'), 'Y','Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', '', '', '', '', 0, 0, 0, 0);

for anyhostname:

INSERT INTO user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv, Trigger_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions, max_updates, max_connections, max_user_connections) VALUES ('%', '<<USERNAME>>', password('<<PASSWORD>>'), 'Y','Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', '', '', '', '', 0, 0, 0, 0);

Replace <<USERNAME>> and <<PASSWORD>> with actual username and password respectively.

Note they must be enclosed in single quotes.


DROP ANY USER :


In case, you want to drop any user use below command:

DROP '<<username>>''@'localhost';

DROP '<<username>>''@'localhost.localdomain';

(Replace <<username>> with actual username)




For more help and commands, refer --> http://www.yolinux.com/TUTORIALS/LinuxTutorialMySQL.html

Friday 18 May 2012

Install JAVA on Linux using rpm files

Steps for installing JAVA (JDK 6) on linux using rpm files:

1. Log into the linux shell and become root user by running the command

su –i

2. Change directory.

cd /opt

3. Please search at http://www.oracle.com/technetwork/java/javase/downloads/index.html for newer versions to download.

You can download to any directory you choose; it does not have to be the directory where you want to install the JDK. Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.

To download use one of the below commands, depending on the server's architecture (32/64 bit) :
64 bit:
wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64-rpm.bin

32 bit:
wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586-rpm.bin



4. Make sure that execute permissions are set in the self-extracting binary.
Enter ls –la to see the permissions for the file.


5. Run below command to grant execute permission to the file:

chmod a+x <<name-of-rpm-file-downloaded-earlier>>
 
For e.g.:
chmod +x jdk-6u25-linux-x64-rpm.bin\?e\=1306317438\&h\=294de0d36f54e28dd65fc8370e3c406d

6. Change directory to the location where you would like the files to be installed. The next step installs the JDK into the current directory.

7. Execute the downloaded file, prepended by the path to it.
For example, if the file is in the current directory, prepend it with "./"  :
./<<name-of-rpm-file-downloaded-earlier>>
For e.g.:

./jdk-6u25-linux-x64-rpm.bin\?e\=1306317438\&h\=294de0d36f54e28dd65fc8370e3c406d



8. The binary code license is displayed, and you are prompted to agree to its terms.



9. Check if java is installed using command

java -version



The java version must be displayed correctly. You may also want to run commands like java or javac to check if installation is proper.

10. Execute below command to test if the JAVA_HOME environment variable is set.

echo $JAVA_HOME

It must display the location where java is installed.

11.  Delete the bin and rpm files if you want to save disk space.

rm -rf sun*