Monday, April 22, 2013

AWS shared disk options


Here the four options most often discussed when considering NAS/shared disk/storage on AWS:
  1. S3 : Sometimes NAS isn't the right solution to the problem; it's just something that's relatively easy to implement.
  2. GlusterFS, Lustre, openAFS : implementation of a distributed filesystem (GlusterFS, Lustre, openAFS, etc).  Write performance can be below writing to EBS.
  3. S3-back 'filesystem' : Use a S3-backed "filesystem" (such as s3fs or Danilo's yas3fs), which is definitely easier to implement. However, write performance could become an issue.
  4. NFS : You could just run NFS on another EC2 instances. However, this will not provide the fault tolerance and scalability that is built into a solution such as GlusterFS, or a solution such a Zadara. With Zadara you can have a central repository/shared file system in a NFS mount that will be accesible from EC2 machines.  You can mount Zadara from EC2 via NFS or iSCSI.
  5. Of course, when you are running an Oracle database you will probably not use one of these options.  This would be like putting your on premise Oracle database storage on NFS. 

Oracle Data Guard on EC2


Oracle Data Guard can be used to set up one or several slave databases which will be the foundation of a highly available environment. It maintains the standby databases as transaction- consistent copies of the primary database.  These instances can be placed in several availability zones.Then, if the production database becomes unavailable because of a planned or an unplanned outage of this instance or of the full availability zone, Data Guard can switch any standby database to the production role, minimizing the downtime associated with the outage.   The Active Data Guard module enables read-only access to the standby databases, thereby allowing customers to run read queries and reports on the standby instances, and to perform the backups from a standby instance.
You can have zero data loss by using the appropriate data protection mode:http://docs.oracle.com/cd/B28359_01/server.111/b28294/protection.htm#CHDEDGIF

Wednesday, April 17, 2013

Oracle on AWS costs of Oracle on AWS and licensing management


Here are two common questions in regards to Oracle pricing and licensing on AWS:

1. How can they determine the pricing for an instance launched from an Oracle AMI e.g. https://aws.amazon.com/amis/oracle-database-11g-release-2-11-2-0-1-enterprise-edition-64-bit?
The bottom line: The pricing are the standard EC2, data out traffic, and storage + cost of Oracle licenses (or no cost of Oracle licenses if they have their own)

2. How do they manage BYOL or using unused licenses in practical terms? (afaik they have to BYOL for Oracle on EC2)
The bottom line : It is up to the customer to make sure they are not violating Oracle licensing policies.

Tuesday, April 16, 2013

ELB HTML file health check file

If you are running Apache, you will need to place the help check file for ELB in /var/www/html.  You can use the default web page (index.html). However, I normally use another file incase the index.html file gets removed for some reason.  Also, another file like ping.html indicates to a DevOps person that this is for the ELB health check.

EC2 Apache HTML file locations

My last blog discussed using user data and to install the Apache serve on your EC2 instance.  The next thing to do is place your web pages in the web server directory. The directory location is:  /var/www/html/.  You need to make sure you are the root user to add or modify files in this directory.  You can do this by using sudo su.

User data to install Apache and PHP


One of the most basic components on an EC2 instance is Apache and PHP.  Installing Apache and PHP is made easy with a short shell script, yum, and user data.  Here is all that needs to be placed in the user data section of the EC2 instance:

#!/bin/sh
yum -y install httpd php
chkconfig httpd on
/etc/init.d/httpd start

Monday, April 15, 2013

CloudFormation access denied error message


In the event you get this message when a CloudFormation script:
AccessDenied. User doesn't have permission to call ec2:RunInstances, this could mean that the AMI is not available or you don't have access to it.  The error is not intuitive.  Check to make sure the AMI exists or if you have access to it.