<?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>Sysconfig&#039;s Blog &#187; uptime</title>
	<atom:link href="http://sysconfig.org.uk/tag/uptime/feed/" rel="self" type="application/rss+xml" />
	<link>http://sysconfig.org.uk</link>
	<description>FreeBSD, Linux, Virtualisation, Resilience, Scalability, Storage, and other (random) things</description>
	<lastBuildDate>Thu, 25 Aug 2011 10:41:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>EC2, Puppet, and some custom Development</title>
		<link>http://sysconfig.org.uk/2011/01/ec2-puppet-and-some-custom-development/</link>
		<comments>http://sysconfig.org.uk/2011/01/ec2-puppet-and-some-custom-development/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 01:37:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[availability]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[uptime]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://sysconfig.ossafe.org/?p=300</guid>
		<description><![CDATA[Hello, and a Happy New Year everyone! I have been quiet here for many months due to an incredible work load. Fortunately the festive season gave me some time to breath, and to look into things which I have been wanting to look into for months, namely Amazon&#8217;s EC2 cloud, which has become much more [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, and a Happy New Year everyone! I have been quiet here for many months due to an incredible work load. Fortunately the festive season gave me some time to breath, and to look into things which I have been wanting to look into for months, namely Amazon&#8217;s EC2 cloud, which has become much more interesting (from a business perspective) since they have achieved <a href="http://aws.amazon.com/security/pci-dss-level-1-compliance-faqs/" target="_blank">PCI DSS certification</a>, and Puppet, which is a brilliant tool to automate lots of server (or EC2 instance) management tasks.</p>
<p><span id="more-300"></span></p>
<p>Admittedly the learning curve for both is quiet steep, and everyone&#8217;s well-advised to spend some serious time evaluating them. When I started looking into EC2, I only had a rough idea of all the services they offer. I was quite overwhelmed, how many related services EC2 (or more precisely AWS) entails:</p>
<ul>
<li>EC2, the cloud, which runs your instances (also known as virtual machines, Xen based) in one out of four regions (US East/West, EU, APAC) and one out of two-four availability zones in each region</li>
<li>Elastic Load Balancing (ELB), giving you the opportunity to spread load across instances, obviously</li>
<li>Elastic IPs, allowing you to assign (and re-assign) static IPs to instances of your choice</li>
<li>Simple Storage (S3), which guarantees replication of your stored data in three different locations, enabling it to survive an outage of two entire data centres (or one data centre, if you opt-in for the &#8220;reduced redundancy&#8221; option, which is a little bit cheaper &#8212; you can choose that for every file stored individually)</li>
<li>EBS (Elastic Block Storage), enabling you to create RAID-backed volumes of any size and attach them to any of your EC2 instances; on top of that you can create snapshots (which are internally stored on S3) within seconds</li>
<li>RDS (Relational Database Service), basically a MySQL offering, in either single, single/hot-standby, master/slave, or master/multi-slave setups, with nodes spread across different availability zones</li>
<li>CloudWatch, which entails monitoring facilities for most of the services</li>
<li>CloudFront, a multi-region CDN-like service</li>
<li>SimpleDB, Map/Reduce</li>
<li>Route 53 DNS services (beta)</li>
<li>DevPay, Flexible Payments</li>
</ul>
<p>All these services have one thing in common: They can be managed entirely via different APIs and command line tools. There&#8217;s <em>nothing</em> which you can&#8217;t automate, if you spend some time and effort to actually understand how it all fits together! It&#8217;s certainly very overwhelming in the beginning, and Amazon clearly doesn&#8217;t target customers who might want to fire up one or two instances and that&#8217;s it. It&#8217;s way too complex for that. And it requires an entirely different approach, for example an instance and all its data is lost when you terminate it. And all resources are very dynamic &#8212; for most simple use-cases too dynamic (you don&#8217;t know which IP or hostname your instance will have; most provided OS images won&#8217;t suit your needs, so you&#8217;ll need to build your own). But if you are interested in creating environments for your applications, which come with both high availability and scalability, then EC2 is definitely worth a shot. Amazon gives you the bullet-proof and battle-proven infrastructure and tools &#8212; you need to decide and find a way how to use them for your requirements.</p>
<p>Amazon offer the AWS console for very basic management of your resources. Very basic. You&#8217;ll soon find out that it can&#8217;t offer things, which you really will need:</p>
<ul>
<li>creating a snapshot, which you can use to boot another instance from (or as a backup to start the same instance again, when it fails)</li>
<li>setting triggers for the CloudWatch monitoring (or alarms as they call it in their API)</li>
<li>bundling your instance (or parts of it) and backing up on S3</li>
<li>moving instances between availability zones</li>
<li>configuring the RDS MySQL server</li>
<li>and many more things</li>
</ul>
<p>All of these things can be done via API (in Java, PHP, and other languages, or via command line tools, which can all be downloaded from Amazon). Some of them are trivial, most are not. Flexibility takes its toll. Consequently, you should be prepared to spend some time tailoring your own toolset. There are some 3rd party offers out there (notably the best on is s3cmd, which allows rsync-style file transfers between instance and S3 buckets). They may or may not suit your needs.</p>
<p>I&#8217;ve spent the last two weeks creating my own toolset. With very simple commands I can now build fully bootable AMI images for different Linux setups both in 32bit or 64bit (EC2 instance types differ in terms of architecture!), create bootable snapshots from running instances, detect instance failure and restart from the most recent snapshot (including re-assigning the elastic IP), set tags and other information/attributes on all sorts of resource types, create volumes (empty or from snapshot) and attach them to instances, hook instances into a load balancer, read all relevant CloudWatch metrics and feed them into RRD graphs, clone instances on-the-fly, launch any number of clones, manage security groups and keypairs etc.  Basically everything the AWS console can plus a few necessary features on top of that &#8212; with a single shell command and no more than 2-3 parameters each. I&#8217;m not exactly a developer and started doing this merely as a proof of concept (but then went further than originally intended to). If I can do that, some of you bright-minded developers can do a lot better for sure <img src='http://sysconfig.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>This was AWS management covered. But how about managing the actual instances (their OS internals)? What if, for example, you want to deploy a web application on four identical, load-balanced nodes?  Should I create a dedicated image for that (not too difficult with my toolset)? Or would it be better to have a look into Puppet at last? I went for the latter. I&#8217;ve got customers on my own clusters outside of EC2 (mostly based on Citrix XenServer), and that environment is growing continuously. It&#8217;s about time that I simplified management there as well.</p>
<p>Consequently, I decided to take my EC2 proof of concept another step further. After getting acquainted to Puppet, I&#8217;ve deployed it on a playground-style bunch of EC2 instances and told it to install/configure various things. The language structure really gave me hard times in the beginning, but once you get used to it, you can almost write it down as you think.</p>
<p>The next thing I wanted to achieve was that puppet connects to the puppet master as soon as the instance is started. There were some obstacles in the way, though: AWS assigns hostnames dynamically, but your puppet master would need to know that hostname in order to sign the certificate used for communication between both. Catch 22 situation. Resolved by writing a tiny web service which allows the instance to figure out and set the hostname I assigned (and dynamically added to a DNS server as well) rather than using Amazon&#8217;s one. This happens during startup just after the network interface comes up, so that all running services use the correct hostname. Puppet then takes over at the end of the first startup of the instance and installs/configures as told by the puppet master. This way you can fire up a whole cluster, hook it into the load balancer, and are ready to go live in just under three minutes. Fully automated. And the monitoring mentioned earlier would pick up metrics via CloudWatch instantly.</p>
<p>I&#8217;ve heard it all in theory before. However, I wanted to see my own working proof of concept for a few things (and some others, which are still in progress). I&#8217;m pretty amazed actually, how much flexibility <em>and</em> reliability (often a contradiction in terms) AWS offers. You just have to embrace a slightly different model of implementing things (you&#8217;ll like the term &#8220;ephemeral&#8221;, which Amazon have chosen for a reason!).</p>
<p>So now the next question would be: How much does it cost. Is it really saving costs as many people state? Frankly, I don&#8217;t know yet. It may do. Surely, it reduces upfront costs, as Amazon won&#8217;t charge any setup or recurring fees, unless you opt-in for their &#8220;Reserved Instance&#8221; schemes, which are actually <em>significantly</em> cheaper in the long run. For example, a Micro instance (640 MB Ram, 1.7GHz Xeon; the smallest instance type) would usually be charged at US$ 0.025 per hour, which equals to US$ 219 per year if running full-time. If you commit to a year, paying US$ 54 one-off, your hourly rate is reduced to US$ 0.01, which together equals to yearly costs of US$ 117.60 or less than US$ 10 per month! That&#8217;s a smashing 50% discount almost. Higher discounts possible, if you can commit to 3 years.</p>
<p>However, the pricing is somewhat difficult to decipher and costs impossible to predict. I don&#8217;t actually know yet, how many IOPs (I/O operations) my EBS volumes and snapshots will generate. I can&#8217;t exactly tell how much S3 storage I will use. Also, I don&#8217;t know exactly what to expect on the inter-availability-zone traffic scale. Or the RDS (MySQL) read/write operations. Surely, previous monitoring gives me very rough estimates, but not good enough to make an educated guess as to what costs to expect on EC2. I will have to keep an eye on that over the next weeks and months, and also find some tools to get all these figures from the usage reports (CSV or XML files, downloadable from Amazon). At least you can see how your usage translates into actual costs for the current billing period, updated every few hours. So the costs wouldn&#8217;t hit you as a big surprise <img src='http://sysconfig.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>On the plus side, you never pay for any over-capacity, which you would need to account for, if you built everything in-house. When you build infrastructure like that on your own, there are different things, which scale more or less dynamically (if you&#8217;ve got 10 servers already, buying two more doesn&#8217;t do a harm). But you&#8217;ve also got devices where upfront costs are enormous, because you buy them from the point of view, of what you <em>might</em> need in the foreseeable future, not what you do need at this very moment. Storage devices are a good example. A chassis from NetApp with only a few drives cost you an arm and a leg; then you can scale it a bit for a reasonable price; and then you&#8217;ll need another one sooner or later. But you always end up paying for more than you actually use at any given point. Same for networking devices.</p>
<p>Clouds like EC2 take those massive entry-costs from you (and your customers), which saves painful budget discussions. They&#8217;ve got a brilliant, scalable infrastructure, and one would be bold to assume that you could build anything better at a reasonable price (also take availability in distinct and independent data centres into account!). Now that they&#8217;ve got their PCI DSS certification, one of the biggest remaining concerns (what about data security in a proprietary, shared environment?) for many customers is gone, too.</p>
<p>I&#8217;ll go through the other proofs of concept on my list, see how usage translates into actual costs over time, and may then be able to add some very interesting offers to my company&#8217;s portfolio. Stay tuned <img src='http://sysconfig.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Surely, the cloud is not the solution to all problems (although it&#8217;s commonly propagated as that), but with decent automation and tools it can improve or at least add value to a variety of services.</p>
]]></content:encoded>
			<wfw:commentRss>http://sysconfig.org.uk/2011/01/ec2-puppet-and-some-custom-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing Downtime with Virtualisation</title>
		<link>http://sysconfig.org.uk/2009/10/reducing-downtime-with-virtualisation/</link>
		<comments>http://sysconfig.org.uk/2009/10/reducing-downtime-with-virtualisation/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 16:15:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[downtime]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[upgrades]]></category>
		<category><![CDATA[uptime]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://sysconfig.ossafe.org/?p=209</guid>
		<description><![CDATA[I&#8217;m not going to explain in depth how virtualisation can reduce downtimes in general, or what you need to achieve that. But from todays practical experience, I&#8217;d like to give one example. Let&#8217;s say you are running FreeBSD on a server, and you need to do a major upgrade (that is from 6.x to 7.x). [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not going to explain in depth how virtualisation can reduce downtimes in general, or what you need to achieve that. But from todays practical experience, I&#8217;d like to give one example.</p>
<p>Let&#8217;s say you are running FreeBSD on a server, and you need to do a major upgrade (that is from 6.x to 7.x). This process can take ages, if your machine is not running the latest hardware, and/or you have a lot of 3rd party software installed (ports). I&#8217;m not talking about an impatient person&#8217;s definition of ages, or about the one of a customer, who claims hundreds of quid financial loss in 20 minutes downtime on Sunday morning 1:30 am. <img src='http://sysconfig.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;m talking about ages as in <em>many</em> hours.</p>
<p>Of course, a FreeBSD upgrade doesn&#8217;t require to be offline while it&#8217;s proceeding. But you will need to reboot. And as a rule of thumb, one can assume that dependencies in the ports will break. Usually only one or two of them, but it requires manual work, and can cause an unpredictable partial downtime, which is longer than it takes to reboot the machine.</p>
<p>So how can virtualisation help here? In a nutshell, it allows you to do the whole upgrade on another virtual machine. You can take a snapshot of the production machine, start it as a new VM, and do your work there, while the original VM stays online.</p>
<p>This also reduces stress enormously, because if you break something during the upgrade, there&#8217;s no time pressure to fix it. You can spend as much time as it takes to finish your work properly. Cool, isn&#8217;t it?</p>
<p>And when you&#8217;ve finished your work, you can inform your customer about an upcoming 1 or 2 minutes downtime for a major system upgrade (which you have already finished). <img src='http://sysconfig.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>All you need to do when the time has come, is to sync files which changed during run-time (for example mail folders), change the network settings in order to make your upgraded snapshot take over, and then you can safely decommission the old VM. It really is as easy as that.</p>
]]></content:encoded>
			<wfw:commentRss>http://sysconfig.org.uk/2009/10/reducing-downtime-with-virtualisation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 1/5 queries in 0.010 seconds using apc
Object Caching 310/587 objects using apc

Served from: sysconfig.org.uk @ 2012-02-05 20:17:55 -->
