<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux System Admins Blog &#187; cloud computing</title>
	<atom:link href="http://linuxsysadminblog.com/category/cloud-computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxsysadminblog.com</link>
	<description>System admins of Promet - an e-commerce, high availability Open Source web shop - share their findings</description>
	<lastBuildDate>Sat, 10 Jul 2010 01:33:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google to offer free DNS service</title>
		<link>http://linuxsysadminblog.com/2009/12/google-to-offer-free-dns-service/</link>
		<comments>http://linuxsysadminblog.com/2009/12/google-to-offer-free-dns-service/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 02:55:05 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[cloud computing]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1024</guid>
		<description><![CDATA[Google will start pushing for a faster web next year, and there have been several rumors in the SEO and marketing world that google will add page speed to its SEO rankings algorithm.  Yesterday they have announced that  Google will offer a free DNS service.
First off, this is great.  It should improve the speed of [...]]]></description>
			<content:encoded><![CDATA[<p>Google will start pushing for a faster web next year, and there have been several rumors in the SEO and marketing world that google will add <a href="http://www.steverenner.com/ranking-web-site-speed">page speed to its SEO rankings algorithm</a>.  Yesterday they have <a title="google focuses on speed" href="http://googleblog.blogspot.com/2009/12/introducing-google-public-dns.html">announced </a>that  Google will offer a<a href="http://code.google.com/speed/public-dns/" target="_blank"> free DNS service</a>.</p>
<p>First off, this is great.  It should improve the speed of looking up the DNS info of many sites, and if the service takes off, it should take the load off your NS.</p>
<p>The focus on speed if very clear, the Google public DNS server lists this first as one of the advantages.  It also points to the speed problems caused by <a href="http://code.google.com/speed/public-dns/docs/performance.html">DNS latency</a>.</p>
<h3>Google Public DNS IP addresses</h3>
<p>The Google Public DNS IP addresses are as follows:</p>
<ul>
<li>8.8.8.8</li>
<li>8.8.4.4</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/12/google-to-offer-free-dns-service/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Task on Amazon EBS on CentOS AMI</title>
		<link>http://linuxsysadminblog.com/2009/07/task-on-amazon-ebs-on-centos-ami/</link>
		<comments>http://linuxsysadminblog.com/2009/07/task-on-amazon-ebs-on-centos-ami/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 08:43:51 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ebs]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=813</guid>
		<description><![CDATA[This is my second activity on using AWS &#8211; this time the use of EBS.
Objectives:

 Format a new EBS (10GB) and mount it on a running instance of private AMI (created on first activity &#8211; add link/ref to old post)
 Setup a MySQL server with the datastore on EBS partition
 Setup the partition(EBS) to start [...]]]></description>
			<content:encoded><![CDATA[<p>This is my second activity on using AWS &#8211; this time the use of <a href="http://aws.amazon.com/ebs/">EBS</a>.</p>
<p><strong>Objectives:</strong></p>
<ol>
<li> Format a new EBS (10GB) and mount it on a running instance of private AMI (created on first activity &#8211; add link/ref to old post)</li>
<li> Setup a MySQL server with the datastore on EBS partition</li>
<li> Setup the partition(EBS) to start at boot time of AMI</li>
</ol>
<p>Here, I will elaborate the steps (mostly commands) and some issues that I encountered along the way.  I also included the script (below) that i used for attaching the EBS to AMI at boot time. Reference <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1663">here</a>.  I will add an indicator on where i am running my commands, either on controling machine or on instance.  On variables or values i assumed that you already know how to get them, the ec2-describe-instances/volume..etc.  If the ec2 commands is not available on your system make sure you have the <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&amp;categoryID=88">ec2 api tools</a> or have your environment variables configured.<br />
<span id="more-813"></span><strong>Objective #1: Format EBS and mount on a running instance</strong></p>
<ul>
<li> Run instance of private ami and take note of the zone (default is us-east-1a &#8211; not sure <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )<br />
<code>controlling machine$:  ec2-run-instances -z us-east-1a --key YOURKEYPAIR ami-xxxxx</code></li>
<li>Create ebs volume with 10GB size.  Note the use of same zone so the volume can be attached to the instance above.  Check the EBS docs for more details on Zones.<br />
<code>controlling machine$:  ec2-create-volume -z us-east-1a -s 10</code></li>
<li>Attach the zone to your instance, ex: as /dev/sdh<br />
<code>controlling machine$:  ec2-attach-volume -d /dev/sdh -i i-IIII1111 vol-VVVV1111</code></li>
<li>Login to your instance and format your ebs drive on /dev/sdh. It&#8217;s your choice on what filesystem to use.  For my activity, i used xfs as i was advised that it is easier/faster to increase/shrink xfs filesystem compared to ext3 &#8211; and on the above reference xfs as used.<br />
controlling machine$:  ssh -i ssh_key root@ec2.xxxxx.amazonaws.com<br />
(host may not be on this format, just refer to the details on your instance)<br />
<code>instance$: yum install xfsprogs<br />
instance$: modprobe xfs<br />
instance$: mkfs.xfs /dev/sdh</code></li>
<li>Mount the ebs volume.<br />
instance$: mount -t xfs /dev/sdh /ebs</li>
</ul>
<p><strong>Objective #2: Setup a MySQL server with the datastore on EBS partition</strong></p>
<ul>
<li>Install mysql on your running instance, edit /etc/my.cnf and set the value for datadir to /ebs (my example), and start your MySQL.<br />
<code>instance$: yum install mysql-server<br />
instance$: vi /etc/my.cnf<br />
instance$: /etc/init.d/mysqld start</code></li>
<li>Create a sample database to test<br />
<code>instance$: mysql<br />
mysql&gt; create database ebstest;<br />
mysql&gt; quit<br />
instance$: ls /ebs/</code></li>
</ul>
<p><strong>Objective #3: Setup the partition(EBS) to start at boot time of AMI</strong></p>
<ul>
<li>I was advised here to create an init script that will attach the ebs volume to my running instance and i was given a sample script (for debian) that i modified to my need (for CentOS) and added some stuff.  I encountered several issues here as my init script failed to start correctly, like my environment variable is not available or incorrect paths etc.  And was able to bundle four or five times. <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   In short the script (below) does the automation, i only need to add this on my start up &#8211; so for the process, please check or continue reading the notes/comments on the script below.  Btw, I just added the section to start MySQL inside the init script, but of course you can separate them.</li>
<li>After creating a init script with the correct variables/filenames, bundle or create new AMI.  Commands below are summary from a video tutorial &#8211; i forgot the link <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Run help for each command to get details on the options used, ex: &#8216;ec2-bundle-vol -h&#8217;.<br />
<code>instance$: cd /mnt<br />
instance$: mkdir ami<br />
instance$: ec2-bundle-vol -d /mnt/ami -k /root/.ec2/pk.xxx.pem -c /root/.ec2/cert.xxx.pem -u xxxx-xxxx-xxxx<br />
instance$: ec2-upload-bundle -b bucket1 -m /mnt/ami/image.manifest.xml -a XXXXXX -s xxxXXXXx<br />
controlling machine$: ec2-register bucket1/image.manifest.xml</code></li>
<li>Test your new AMI &#8211; run new instance and check if your ebs volume is attached &#8211; goodluck!</li>
</ul>
<p><strong>Init Script Here: <a href="http://linuxsysadminblog.com/wp-content/uploads/2009/07/mountebs"> mountebs</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/07/task-on-amazon-ebs-on-centos-ami/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My First Amazon EC2 Setup (CentOS AMI)</title>
		<link>http://linuxsysadminblog.com/2009/06/my-first-amazon-ec2-setup-centos-ami/</link>
		<comments>http://linuxsysadminblog.com/2009/06/my-first-amazon-ec2-setup-centos-ami/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 12:52:12 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=761</guid>
		<description><![CDATA[Here&#8217;s my first try working with Amazon Web Services. Covered tasks are the following:
- getting familiar with AWS, specially EC2 and S3.
- working with EC2 instance using CentOS image &#8211; search, start/stop, and do some customization of an instance
- create AMIs (private) and start instance from it.
-  S3 buckets &#8211; upload files.
I based my [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s my first try working with Amazon Web Services. Covered tasks are the following:<br />
- getting familiar with AWS, specially EC2 and S3.<br />
- working with EC2 instance using CentOS image &#8211; search, start/stop, and do some customization of an instance<br />
- create AMIs (private) and start instance from it.<br />
-  S3 buckets &#8211; upload files.</p>
<p>I based my instructions on previous post on <a href="http://linuxsysadminblog.com/2009/06/howto-get-started-with-amazon-ec2-api-tools/"><strong>Howto Get Started With Amazon EC2 API Tools</strong></a>, so I won&#8217;t give details on some steps.  And this post will cover mainly the steps taken to complete my objectives above.<br />
<span id="more-761"></span><br />
To start, I signed up for an account and enabled EC2 and S3 services, and generate X509 certificate.  Next, I selected a test server running CentOS 5.3 with Cpanel and installed <em>java</em> (openjdk 1.6, using <em>yum</em>) as a requirement.  </p>
<p>Then, download <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&#038;categoryID=88">EC2 API Tools</a> and extract to my working directory at <em>/myhome/.ec2/</em> and upload your private key and x509 certificates. Don&#8217;t forget to follow the filename format of cert-xxx.pem and pk-xx.pem.</p>
<p>Export shell variables (posted on the previous post) and specify the correct private and x509 path.  Then run source /myhome/.bashrc or open new terminal to load new environment variables.</p>
<p>Setup EC2 keypair. At first i used the certificate from different account but i got the error below:<br />
<code>Client.AuthFailure: AWS was not able to validate the provided access credentials</code><br />
I searched for this error and one suggestion is to chmod your certificate and key files to 600 but it didn&#8217;t help me.  My problem is on our account because one of my teammates changed our account password and probably generated new keys.  Anyway, this is where i signed up for a new account and proceeded without issues.</p>
<p>Search for the AMIs to use.  Following the steps listed on the instructions, I tried several AMI&#8217;s (start/stop processes).  I observed some AMI&#8217;s took longer to start compare to others but i have no idea why <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .  Btw, you can also search for AMI&#8217;s, and start/stop them from Amazon Management Console (EC2 Dashboard).</p>
<p>My next task is to create my private AMIs and here&#8217;s a good video tutorial on <a href="http://s3.amazonaws.com/awsVideos/CustomizeAnExistingAMI/wmv/Customize an Existing AMI.wmv">Customizing an existing AMI and create your own AMI from it</a>.  From this part that I need to setup my S3 bucket or directory to store my AMI.  There&#8217;s a Firefox addon called <a href="https://addons.mozilla.org/en-US/firefox/addon/3247">S3Fox</a> that my friend suggested but unfortunately i can&#8217;t install it on my Firefox due to some errors.  I found and tried this <a href="http://www.bucketexplorer.com/">BucketExplorer</a> for creating my S3 Bucket.  Btw, this one is commercial and you can try it for 30 days.  I haven&#8217;t checked for other apps.  <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Back to creating my private AMI based on the above video, I ran into issue with ec2-bundle-vol command as it is not included on the AMI that i used, so i search for other AMIs that includes the EC2 Tools and found one from RightScale (CentOS5V1_10.img.manifest.xml).</p>
<p>After this i was able to complete my private AMI and start new instance from it using the above steps without any issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/06/my-first-amazon-ec2-setup-centos-ami/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Drupal / Civicrm Sites</title>
		<link>http://linuxsysadminblog.com/2009/06/moving-drupalcivicrm-sites/</link>
		<comments>http://linuxsysadminblog.com/2009/06/moving-drupalcivicrm-sites/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 10:39:10 +0000</pubDate>
		<dc:creator>gerold</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[civicrm]]></category>
		<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=743</guid>
		<description><![CDATA[In this guide i will provide the steps in moving Drupal sites with CiviCRM &#8211; with Drupal and CiviCRM in one or separate databases.  I will outline the steps and sample commands but won&#8217;t give much details, so feel free to ask if you need any clarifications.  Also, refer to my previous guide [...]]]></description>
			<content:encoded><![CDATA[<p>In this guide i will provide the steps in moving Drupal sites with CiviCRM &#8211; with Drupal and CiviCRM in one or separate databases.  I will outline the steps and sample commands but won&#8217;t give much details, so feel free to ask if you need any clarifications.  Also, refer to my previous guide on &#8220;<a href="http://linuxsysadminblog.com/2009/04/drupal-howto-duplicate-copy-drupal-site/">HowTo Duplicate or Copy Drupal Site</a>&#8221; for detailed instructions, commands, and sample shell scripts.</p>
<p><strong>Moving Files:</strong></p>
<ul>
<li>Copy Drupal file and preserve mode (ownerships, permissions, etc)<br />
Example: <code>cp -rp drupal_source drupal_destination</code><br />
Review your directory permissions on sites/default/files, sites/default/files/civicrm, and other directories.</li>
<p><span id="more-743"></span></p>
<li>Update references to Drupal url, path, and database details (name, user, pass, and host). Sample commands below using grep:<br />
<code>find /path/to/drupal -type f -exec perl -pi -e "s/example.com/example2.com/g" {} \;<br />
find /path/to/drupal -type f -exec perl -pi -e "s/public_html\/example/public_html\/example2/g" {} \;<br />
find /path/to/drupal -type f -exec perl -pi -e "s/db_name/db_name2/g" {} \;<br />
find /path/to/drupal -type f -exec perl -pi -e "s/db_user/db_user2/g" {} \;<br />
find /path/to/drupal -type f -exec perl -pi -e "s/db_pass/db_pass2/g" {} \;</code></li>
</ul>
<p><strong>Moving Database/s:</strong></p>
<p><strong>Case 1:  Combined CiviCRM and Drupal Database.</strong></p>
<ul>
<li>Create sql dump of source database.<br />
     Example: <code>mysqldump -Q -udb_user -pdbpass db_name &gt; db_name.sql</code></li>
<li>Import to destination database.<br />
    Example: <code>mysql -udb_user2 -pdbpass2 db_name2 &lt; db_name.sql</code></li>
<li>Update references to Drupal url, path, and database details (name, user, pass, and host) of non-CiviCRM tables.  You can use PhpMyAdmin to export this tables, then do the search/replace process on your local editor, and upload back the updates sql.  You can also dump the tables from using command line (but you&#8217;ll have a long list of tables) and do the grep (same as above) and re-import the updated sql file.</li>
<li>Update CiviCRM configurations from Drupal Admin section.  You need to update the &#8220;Resource URLs&#8221; and &#8220;Directories&#8221;.<br />
    <em>CiviCRM Admin Settings:  Administer Civicrm &gt; Global Settings &gt; Directories    (or use the direct url:  /civicrm/admin/setting/path?reset=1)<br />
    CiviCRM Admin Settings:  Administer Civicrm &gt; Global Settings &gt; Resource Urls  (or use the direct url:  /civicrm/admin/setting/url?reset=1)</em>
</li>
<li>Optional:  You can empty Sessions and Cache tables if you want.</li>
</ul>
<p><strong>Case 2:  Separate CiviCRM and Drupal Database </strong>(recommended install for CiviCRM).<br />
Process for this setup is almost the same as Case 1, the difference is on the import process for databases.  I&#8217;ll just provide the complete info below.</p>
<ul>
<li>Create sql dump of source databases.<br />
   Examples:<br />
<code>   mysqldump -Q -udb_user -pdbpass db_name_drupal &gt; db_name_drupal.sql<br />
   mysqldump -Q -udb_user -pdbpass db_name_civicrm &gt; db_name_civicrm.sql<br />
</code></li>
<li>Import directly the CiviCRM database.<br />
     Example: <code>mysql -udb_user2 -pdbpass2 db_name2_civicrm &lt; db_name_civicrm.sql</code></li>
<li>Update CiviCRM configurations from Drupal Admin section.  You need to update the &#8220;Resource URLs&#8221; and &#8220;Directories&#8221;.<br />
    <em>CiviCRM Admin Settings:  Administer Civicrm &gt; Global Settings &gt; Directories    (or use the direct url:  /civicrm/admin/setting/path?reset=1)<br />
    CiviCRM Admin Settings:  Administer Civicrm &gt; Global Settings &gt; Resource Urls  (or use the direct url:  /civicrm/admin/setting/url?reset=1)</em>
</li>
<li>Update references to Drupal url, path, and database details (name, user, pass, and host) of Drupal database dump.<br />
<code>perl -pi -e "s/example.com/example2.com/g"  db_name_drupal.sql<br />
perl -pi -e "s/public_html\/example/public_html\/example2/g"  db_name_drupal.sql</code></li>
<li>Import the Drupal database.<br />
    Example: <code>mysql -udb_user2 -pdbpass2 db_name2_drupal &lt; db_name_drupal.sql</code></li>
<li>Optional:  You can empty Sessions and Cache tables if you want.</li>
</ul>
<p>That&#8217;s All!</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/06/moving-drupalcivicrm-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Get started with Amazon EC2 api tools</title>
		<link>http://linuxsysadminblog.com/2009/06/howto-get-started-with-amazon-ec2-api-tools/</link>
		<comments>http://linuxsysadminblog.com/2009/06/howto-get-started-with-amazon-ec2-api-tools/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 14:57:46 +0000</pubDate>
		<dc:creator>marius</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=722</guid>
		<description><![CDATA[This article is meant to be a quick quide that will introduce the things needed to get you started with Amazon EC2. All this information can be found in the EC2 api docs, and this is not meant to be a replacement of the documentation, just trying to show the things needed in a clear [...]]]></description>
			<content:encoded><![CDATA[<p>This article is meant to be a quick quide that will introduce the things needed to <strong>get you started with Amazon EC2</strong>. All this information can be found in the EC2 api docs, and this is not meant to be a replacement of the documentation, just trying to show the things needed in a clear and short form.</p>
<h3>Getting Started</h3>
<p>First of all you will need one <a href="http://aws.amazon.com/" target="_blank"><strong>Amazon AWS</strong></a> <strong>account </strong>and enable the <strong>EC2 service</strong>; in case you don&#8217;t have this already now is the time to <a href="http://www.amazon.com/gp/aws/registration/registration-form.html" target="_blank">create</a> your account. Once you do that you can safely return to this doc <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Once you have your account working, while still on the aws site, go and create a new <strong>X.509 certificate</strong> (under the AWS Access Identifiers page, in the X.509 certificate section near the bottom, click Create New). Once this is done, you will want to <em>download locally the private key file and X.509 certificate</em>.</p>
<h3>EC2 API tools</h3>
<p>Next you will have to <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&amp;categoryID=88" target="_blank">download</a> and install the Amazon EC2 api tools on one system (controlling machine) that will be used to start your EC2 army of servers, and control their usage. You will want to use the latest version (2009-05-15 at this time) as it will support all the features Amazon is offering for the EC2 service.</p>
<p><span id="more-722"></span>The only real dependency of the EC2 API tools is <strong>java </strong>(at least version 1.5) so we will want to install that first. If you are running debian you can easily do this just by running (for lenny):<br />
<code>aptitude install sun-java6-jre</code><br />
while for etch you will have to use: <em>aptitude install sun-java5-jre</em><br />
For other distributions you can either use their internal packaging mechanism (in case they provide sun-java packages) or just download the binary from sun and install it manually.</p>
<p><strong>Extract </strong>the EC2 APi tools (it is a zip archive called <strong>ec2-api-tools.zip</strong>) and move it under a folder of your preferece. I like to use <strong>~/.ec2</strong> for this, but you can use any folder you prefer. Also copy the <strong>private key</strong> and <strong>X.509 certificate</strong> in the same directory. Those files will look like <em>cert-xxx.pem</em> and <em>pk-xxx.pem</em>.</p>
<p>Next we will have to <strong>export some shell variables</strong>. A good place to put this is in ~/.bashrc:<br />
<code>export EC2_HOME=~/.ec2<br />
export PATH=$PATH:$EC2_HOME/bin<br />
export EC2_PRIVATE_KEY=$EC2_HOME/pk-xxx.pem<br />
export EC2_CERT=$EC2_HOME/cert-xxx.pem<br />
#Java home for debian default install path:<br />
export JAVA_HOME=/usr<br />
#add ec2 tools to default path<br />
export PATH=~/.ec2/bin:$PATH</code></p>
<p>Finally source the file to have the changes active in your current shell session:<br />
<code>source ~/.bashrc</code><br />
or just open a new shell before starting to use the API tools.</p>
<h3>EC2 Keypair</h3>
<p>We will need to create one <strong>keypair </strong>that will be used to connect using <strong>ssh</strong> to the EC2 instances we will be using. We will use the <strong>ec2-add-keypair</strong> utility to create the key and register it with amazon:<br />
<code>ec2-add-keypair my-keypair</code><br />
This will print out the private key that we will have to save in a file:<br />
<code>cat &gt; ~/.ec2/id_rsa-my-keypair<br />
#paste the private key content<br />
sudo chmod 600 </code><code>~/.ec2/id_rsa-my-keypair</code></p>
<h3>Running your first EC2 instance</h3>
<p>Amazon EC2 uses the concept of <strong>AMIs </strong>= Amazon Machine Images. Any EC2 instance is started from one AMI. You can either use standard, public AMIs or create and customize your own private images. Creating or modifying existing AMIs is beyond the scope of this article, but just as a general information this is done using special AMI tools. Also before building your AMI you will want to ensure if you want to use a &#8217;small&#8217; type of image (i386 os) or a &#8216;large&#8217; type of instance (64bit os). These are described under<a href="http://aws.amazon.com/ec2/instance-types/" target="_blank"> http://aws.amazon.com/ec2/instance-types/</a></p>
<p>For the scope of our article we will find a standard public image and start one instance of it to see that all is working properly with the EC2 api tools. You can see all the public images using:<br />
<code>ec2-describe-images -a</code><br />
(over 2,300 images <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ). You should probably grep the result to get any useful information. There are many good public images to use, like for example the <a href="http://alestic.com/" target="_blank">alestic</a> ones (for debian and ubuntu)<br />
Having the AMI id of the image we want to use we are ready to start our fist EC2 instance:<br />
<code>ec2-run-instances ami-e348af8a -k my-keypair</code><br />
that will start a small instance with a 32bit debian lenny server instance from alestic.com.</p>
<p><code>ec2-describe-instances</code><br />
- this will describe the status of all the running instances, with their hostname, instance id, etc.</p>
<p><code>ec2-authorize default -p 22</code><br />
- in order to connect to your instance you will need to customize the &#8216;default&#8217; firewall rules for your account. The above rule will allow ssh on port 22 from anywhere. If you want to open http traffic you will have to add a rule like this:<br />
<code>ec2-authorize default -p 80</code></p>
<p>Finally we can ssh to the ec2 instance using:<br />
<code>ssh -i ~/.ec2/id_rsa-my-keypair root@ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com</code><br />
where ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com is the actual hostname of the instance as obtained from ec2-describe-instances.</p>
<p><span style="text-decoration: underline;"><em>Note</em></span>: don&#8217;t forget to <strong>stop your instance</strong> when you no longer need it. EC2 is a service paid as you use, hence if you forget your instance running you will be billed for it <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . You can do this by running <strong>shutdown </strong>inside the instance or by using:<br />
<code>ec2-terminate-instances i-yourinstance</code><br />
and verify with <strong>ec2-describe-instances</strong> that the instance is indeed stopped.</p>
<p>Next step is to create/customize your own EC2 AMI images based on your needs. This will be covered in a future article. Hopefully you found this article useful, and it will get you on track quickly with Amazon EC2 api tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/06/howto-get-started-with-amazon-ec2-api-tools/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The Great Cloud Shootout at MySQL conference</title>
		<link>http://linuxsysadminblog.com/2009/04/the-great-cloud-shootout-at-mysql-conference/</link>
		<comments>http://linuxsysadminblog.com/2009/04/the-great-cloud-shootout-at-mysql-conference/#comments</comments>
		<pubDate>Fri, 01 May 2009 02:29:38 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[cloud computing]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=579</guid>
		<description><![CDATA[
MySQL conference notes on cloud computing shoot out text summary atranscript
Lew Tucker, Cloud CTO, sun
Monty Taylor, MySQL Drissel Geek, Sun
Jeremy Zawodny, MySQL hacker, craigslist
Chander Kant, CEO, Zmanda
Thorsten von Ficon, CTO, Rightscale
Prashant Malik, Cassandra Dude, Facebook
Mike Culver, Evangerlist, Amazon Web Services
Some interesting subjects touched upon were:
elasticity &#8211; allowing even a small company to shoot for the [...]]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="390" data="http://blip.tv/play/AfymZYa8EA" type="application/x-shockwave-flash"><param name="src" value="http://blip.tv/play/AfymZYa8EA" /><param name="allowfullscreen" value="true" /></object></p>
<p>MySQL conference notes on cloud computing shoot out text summary atranscript</p>
<p>Lew Tucker, Cloud CTO, sun<br />
Monty Taylor, MySQL Drissel Geek, Sun<br />
Jeremy Zawodny, MySQL hacker, craigslist<br />
Chander Kant, CEO, Zmanda<br />
Thorsten von Ficon, CTO, Rightscale<br />
Prashant Malik, Cassandra Dude, Facebook<br />
Mike Culver, Evangerlist, Amazon Web Services</p>
<p>Some interesting subjects touched upon were:</p>
<p>elasticity &#8211; allowing even a small company to shoot for the moon without shooting itself in the foot<br />
like utilities, much like electricity &#8211; you dont think about the electricyt company running out of electricity<br />
new way of packaging the technology with a pay as you go model, way to provision your application</p>
<p>Different Types of Clouds<br />
Layers of Clouds<br />
Amazon like<br />
Google<br />
SaaS</p>
<p>Who is the cloud for?<br />
even ERP in the cloud?</p>
<p>How would an existing application benefit from the cloud?<br />
- scaling an application<br />
- leverage the collective scalability of the cloud<br />
- forklifting an application out of datacenter or in house colo<br />
- scalability testing?</p>
<p>Cloud adoption barriers<br />
- privacy<br />
- performance<br />
- network latency<br />
- trust and privacy<br />
- mindset on owning your own datacenter<br />
- competition (lack of)</p>
<p>What applications fit best into the cloud<br />
- own</p>
<p>Business Opportunities?<br />
- dev pay &#8211; the customer signs up for SaaS or Software as an annuity<br />
- learn how to do performance tuning and optimization and do that for cloud infrastructures (41:50)<br />
-</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/04/the-great-cloud-shootout-at-mysql-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rush to stake a claim in the cloud</title>
		<link>http://linuxsysadminblog.com/2009/03/rush-to-stake-a-claim-in-the-cloud/</link>
		<comments>http://linuxsysadminblog.com/2009/03/rush-to-stake-a-claim-in-the-cloud/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 05:08:30 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[cloud computing]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=474</guid>
		<description><![CDATA[Last week I was on a conference call with some potential client when one of the senior business people said: &#8220;And then we could use cloud computing or something, to get this application in the hands of everyone&#8221;.  
That&#8217;s when I thought &#8211; wow &#8211; this term really has penetrated into the mainstream.  Cloud Computing [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I was on a conference call with some potential client when one of the senior business people said: &#8220;And then we could use cloud computing or something, to get this application in the hands of everyone&#8221;.  </p>
<p>That&#8217;s when I thought &#8211; wow &#8211; this term really has penetrated into the mainstream.  Cloud Computing has crossed the chasm, except that it seems to be more of a catch phrase for the latest technical fad, except that no one seems to be talking about exactly the same thing.  </p>
<p>As if on cue the next morning the Wall Street Journal:  <a href="http://online.wsj.com/article/SB123802623665542725.html" target="_blank">The Internet Industry Is on a Cloud &#8212; Whatever That May Mean</a> by Geoffrey A. Fowler and Ben Worthen landed on my lap.  Ok, it landed on my porch, and then I read it.</p>
<p><img class="alignnone" title="cloud computing questionmark" src="http://s.wsj.net/public/resources/images/HC-GN554_Questi_BV_20090325171834.gif" alt="" width="124" height="195" /> I hope the Journal doesnt mind if I borrow their image of the cloud &#8211; very fitting for the article.  Basically its a tale of marketers trying to &#8211; or should I say &#8211; fighting for integration of the term into its product jargon.  </p>
<p>Some of my favorite quotes from the piece are bleow.  I recommended the quick article as a nice distraction, but don&#8217;t expect to come away being clear on the term &#8220;Cloud Computing&#8221;.  </p>
<blockquote><p>&#8220;I have no idea what anyone is talking about,&#8221; said <a class="companyRollover link11unvisited" href="http://online.wsj.com/public/quotes/main.html?type=djn&amp;symbol=orcl">Oracle</a> Corp. Chief Executive Larry Ellison, when talking about cloud computing at a financial analyst conference in September. &#8220;It&#8217;s really just complete gibberish. What is it?&#8221; He added: &#8220;When is this idiocy going to stop?&#8221;</p>
<p> </p>
<p>In the full fiscal year since Salesforce started using the term cloud computing, its revenue grew 44%. &#8220;I think it&#8217;s the most powerful term in the industry,&#8221; </p>
<p> </p>
<p><a class="companyRollover link11unvisited" href="http://online.wsj.com/public/quotes/main.html?type=djn&amp;symbol=dell">Dell</a> Inc. applied to trademark the term cloud computing last year. The U.S. Patent and Trademark Office initially approved the application. But it changed its mind in response to an outburst of criticism, including from bloggers incensed that the term could fall under one company&#8217;s control.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/03/rush-to-stake-a-claim-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free trial of cloud computing</title>
		<link>http://linuxsysadminblog.com/2009/03/free-trial-of-cloud-computing/</link>
		<comments>http://linuxsysadminblog.com/2009/03/free-trial-of-cloud-computing/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 13:55:17 +0000</pubDate>
		<dc:creator>Pim</dc:creator>
				<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[cloud]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=392</guid>
		<description><![CDATA[For those of you who have heard all the hype about cloud computing but haven&#8217;t dug your hands into it yet there is a company offering free trials of cloud servers: http://www.rightscale.com/products/free_edition.php. They offer 10 hours of playing around with cloud servers on Amazon EC2 which amounts to a whopping $1 value but the good [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who have heard all the hype about cloud computing but haven&#8217;t dug your hands into it yet there is a company offering free trials of cloud servers: <a href="http://www.rightscale.com/products/free_edition.php">http://www.rightscale.com/products/free_edition.php</a>. They offer 10 hours of playing around with cloud servers on Amazon EC2 which amounts to a whopping $1 value but the good news is that you only have to put in an e-mail address to register. The images they offer are quite extensive and using them it will give you a good insight into what the limitations of using cloud servers are. I found it very useful to see that are pending times before a server actually gets started and something similar when terminating a server. These times are usually several minutes and should definitely be taken into account when the server needs to get started in a hurry.</p>
<p>Additionally I have to say that the scripting abilities offered by RightScale seem quite extensive and very useful.The scripting allows for some very powerful ways of setting up servers. The prices associated with those services however seem a bit steep compared to the bare bones services offered by Amazon.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/03/free-trial-of-cloud-computing/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Even the clouds come down to earth &#8211; cloud services crash just like everyone else sometimes</title>
		<link>http://linuxsysadminblog.com/2009/02/even-the-clouds-come-down-to-earth-cloud-services-crash-just-like-everyone-else-sometimes/</link>
		<comments>http://linuxsysadminblog.com/2009/02/even-the-clouds-come-down-to-earth-cloud-services-crash-just-like-everyone-else-sometimes/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 17:39:50 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[cloud computing]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=388</guid>
		<description><![CDATA[During our weekly sysadmin call this morning several of our experienced sysadmins quickly pointed out that clients seeking very high up time should not necessarily look for it on the cloud.  I couldn&#8217;t believe it, but almost as an omen, this story came on my RSS feed from Webware:  Google apologizes for email outage
Outages pose [...]]]></description>
			<content:encoded><![CDATA[<p>During our weekly sysadmin call this morning several of our experienced sysadmins quickly pointed out that clients seeking very high up time should not necessarily look for it on the cloud.  I couldn&#8217;t believe it, but almost as an omen, this story came on my RSS feed from Webware:  <a href="http://news.cnet.com/8301-17939_109-10170636-2.html?part=rss&amp;tag=feed&amp;subj=Webware" target="_blank">Google apologizes for email outage</a></p>
<blockquote><p><a href="http://news.cnet.com/8301-1023_3-9989019-93.html">Outages pose problems for Google</a> as it tries to persuade companies to buy into its cloud-computing vision, in which applications are hosted on the Internet rather than on corporate computers. But Google argues its service availability is competitive with most organizations&#8217; abilities to run their own e-mail servers.</p></blockquote>
<p>Clearly the google cloud isn&#8217;t going to be the only one having an outage from time to time.  It seems to me that while still in the infancy, these services are vulnerable to unexpected problems, kind of like the famous first internet worm &#8211; <a href="http://en.wikipedia.org/wiki/Morris_worm" target="_blank">the Morris worm</a> -  that brought the internet to its knees back in the 1980s.</p>
<p>While cloud services offer a lot of promise, and overall should offer a better level of redundancy and up time, this shows that the cloud is also not immune to some down time.</p>
<p>Here is the link to the original <a href="http://googleblog.blogspot.com/2009/02/current-gmail-outage.html" target="_blank">Google cloud problem</a> blog post.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/02/even-the-clouds-come-down-to-earth-cloud-services-crash-just-like-everyone-else-sometimes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 “Karmic Koala” will use Eucalyptus for your own cloud computing solution</title>
		<link>http://linuxsysadminblog.com/2009/02/ubuntu-910-%e2%80%9ckarmic-koala%e2%80%9d-will-use-eucalyptus-for-your-own-cloud-computing-solution/</link>
		<comments>http://linuxsysadminblog.com/2009/02/ubuntu-910-%e2%80%9ckarmic-koala%e2%80%9d-will-use-eucalyptus-for-your-own-cloud-computing-solution/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 12:36:08 +0000</pubDate>
		<dc:creator>marius</dc:creator>
				<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[eucalyptus]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=381</guid>
		<description><![CDATA[Mark Shuttleworth announced last Friday that Ubuntu 9.10 will be named Karmic Koala, and also presented what we should expect from the future version of Ubuntu:

 the desktop version will have a new look (more beautiful)
on the server side as everybody these days Ubuntu&#8217;s future will be targeting the “cloud”. They will have official supported [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Mark Shuttleworth</strong> <a href="https://lists.ubuntu.com/archives/ubuntu-devel-announce/2009-February/000536.html" target="_blank">announced</a> last Friday that <strong>Ubuntu 9.10</strong> will be named <strong>Karmic Koala</strong>, and also presented what we should expect from the future version of Ubuntu:</p>
<ul>
<li> the <em>desktop </em>version will have a <em>new look</em> (more beautiful)</li>
<li>on the <em>server</em> side as everybody these days Ubuntu&#8217;s future will be targeting the “cloud”. They will have official supported <strong>Ubuntu Amazon EC2 AMIs</strong>, as ready-to-run appliances.  Also they will support the open source project <strong><a href="http://eucalyptus.cs.ucsb.edu/" target="_blank">Eucalyptus</a> </strong>that enables you to create an <em>EC2-style cloud using your own hardware</em>. Eucalyptus, will be included in ubuntu repos allowing users to build and manage private clouds more easily.</li>
</ul>
<p>For full details: <a href="https://lists.ubuntu.com/archives/ubuntu-devel-announce/2009-February/000536.html" target="_blank">https://lists.ubuntu.com/archives/ubuntu-devel-announce/2009-February/000536.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/02/ubuntu-910-%e2%80%9ckarmic-koala%e2%80%9d-will-use-eucalyptus-for-your-own-cloud-computing-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
