<?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"
	>

<channel>
	<title>A System Administrator's Diary</title>
	<atom:link href="http://blog.the-ally.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.the-ally.co.uk</link>
	<description>focused on: Linux, BSD, Mac OS --- by Carsten Heesch</description>
	<pubDate>Thu, 25 Sep 2008 23:05:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Waking up from hibernation</title>
		<link>http://blog.the-ally.co.uk/2008/09/waking-up-from-hibernation/</link>
		<comments>http://blog.the-ally.co.uk/2008/09/waking-up-from-hibernation/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 23:01:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.the-ally.co.uk/?p=26</guid>
		<description><![CDATA[After years of Systems Administration I have completely forgotten how much I used to like developing in Java. My current employer gave me that opportunity recently. So I took ownership and responsibility to de-hibernate myself (my Java knowledge became a bit rusty) and to start working on a project which separates the website&#8217;s business logic [...]]]></description>
			<content:encoded><![CDATA[<p>After years of Systems Administration I have completely forgotten how much I used to like developing in Java. My current employer gave me that opportunity recently. So I took ownership and responsibility to de-hibernate myself (my Java knowledge became a bit rusty) and to start working on a project which separates the website&#8217;s business logic layer from the database layer. That becomes necessary as we want to re-design our infrastructure in a way that enables us to be as platform independent and as scalable as possible.  </p>
<p>On the one hand, we are not even entirely sure if we&#8217;ll stick to MySQL or switch to any other DB server type, hence we must not use SQL dialect specific code within the application. On the other hand, we want to provide a SOAP endpoint internally, which allows us to access data from all sorts of applications and clearly separates the business logic of all sorts of clients from our actual data store.</p>
<p>In addition, caching of object structures which are mapped against data structures (or tables) would be very neat. Consequently, I suggested and started using Java with Hibernate and JAX-WS on a Glassfish Java Application Server. We might integrate an additional caching layer later. Terracotta is one of the candidates, which integrates seamlessly and can increase speed by factor 2 to 10. </p>
<p>After one week of researching, developing proofs of concept and presenting a first prototype, I am sooo excited about all that. <img src='http://blog.the-ally.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I always loved Java, and again I remember why.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/09/waking-up-from-hibernation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PowerDNS w/ MySQL &#8212; should have tried earlier</title>
		<link>http://blog.the-ally.co.uk/2008/09/powerdns-w-mysql-should-have-tried-earlier/</link>
		<comments>http://blog.the-ally.co.uk/2008/09/powerdns-w-mysql-should-have-tried-earlier/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 21:23:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.the-ally.co.uk/?p=22</guid>
		<description><![CDATA[I was quite fed up with BIND (zonefile editing, serial number increasing, master/slave setups), so I was searching for alternatives to run Master/Slave DNS services. More or less randomly, I again came across PowerDNS. Again, because I have heard a couple of times that big providers quite often use it. So I decided to give [...]]]></description>
			<content:encoded><![CDATA[<p>I was quite fed up with BIND (zonefile editing, serial number increasing, master/slave setups), so I was searching for alternatives to run Master/Slave DNS services. More or less randomly, I again came across PowerDNS. Again, because I have heard a couple of times that big providers quite often use it. So I decided to give it a go. On FreeBSD it&#8217;s quite easy. You just install it together with its MySQL modules, activate the modules in the configuration files, import the database schemata, and fill it with content. A script to import BIND zone files directly to the DB is also included. Couldn&#8217;t be easier. </p>
<p>Once you&#8217;ve set it up and got it running, you of course need a slave server as well. So all you got to do is either to install another PowerDNS/MySQL instance on another machine and connect it to the same database (you wouldn&#8217;t really want to do that), or connect it to a second MySQL server, which ideally is a replication slave of the first one. Then you have a fully redundant setup and don&#8217;t need to worry about failures of either of those. All DNS record changes go directly to the master DB server, which will be picked up by the slave in almost real time. Plus, you don&#8217;t need to worry about serial numbers. Change a record in the DB and this change will be published instantly. </p>
<p>If you fancy web interfaces, you can either go for an open source one, or you can write one on your own. As the DB structure of PowerDNS is kept very simple, it&#8217;s easy to add/modify records via script also. Do whatever you want and don&#8217;t worry about the stupid restrictions and configuration hurdles you used to run into when going for a BIND server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/09/powerdns-w-mysql-should-have-tried-earlier/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Distributed Data Centre in-a-box</title>
		<link>http://blog.the-ally.co.uk/2008/08/distributed-data-centre-in-a-box/</link>
		<comments>http://blog.the-ally.co.uk/2008/08/distributed-data-centre-in-a-box/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 00:02:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Experimental Projects]]></category>

		<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://blog.admin-at-once.co.uk/?p=15</guid>
		<description><![CDATA[Weird title, right? Well, it&#8217;s also a weird project, which I am doing just for fun and as a kind of proof-of-concept. The idea is to build a &#8220;micro data centre&#8221; on a single VMware ESXi based machine and to fully replicate all parts of it onto another single ESXi based machine, which is located [...]]]></description>
			<content:encoded><![CDATA[<p>Weird title, right? Well, it&#8217;s also a weird project, which I am doing just for fun and as a kind of proof-of-concept. The idea is to build a &#8220;micro data centre&#8221; on a single VMware ESXi based machine and to fully replicate all parts of it onto another single ESXi based machine, which is located in another real data centre. That sounds easy, right? But hold on a second.</p>
<p><span id="more-15"></span>Here&#8217;s a list of features I want to implement:</p>
<ul>
<li>full failover</li>
<li>high security</li>
<li>scalability</li>
<li>load balancing</li>
<li>prioritisation based on the distance to the micro data centres</li>
<li>clustered filesystem across micro data centres</li>
</ul>
<p>The idea is to put a couple of virtual machines on both of the &#8220;micro data centre boxes:&#8221;</p>
<ul>
<li>pfSense firewall</li>
<li>Pound load-balancer</li>
<li>MySQL-Cluster nodes (NDB Cluster)</li>
<li>GlusterFS cluster storage nodes</li>
<li>PowerDNS with geo plugin (to deliver IP resolutions depending on the source of a query)</li>
<li>Apache instance(s) accessing the GlusterFS storage and the MySQL cluster</li>
</ul>
<p>The only VM which has a public IP is the pfSense firewall. It deals with the requests and does the inter-box traffic shaping to ensure stability for the cluster filesystem (which replicates itself between the &#8220;micro data centres&#8221; in real-time) and the MySQL cluster, which is also spread over both physical boxes. The PowerDNS server resolves domain queries depending on the source of the requests. One server resides in the US, one is located in the UK (for now); so European customers will always be redirected to the UK server, whereas American customers will always see the US based server first.</p>
<p>The reason, why everything lives in its own VM is that choosing this approach, it is possible to easily move a VM onto a more powerful machine if necessary. The whole &#8220;micro data centre&#8221; can grow as required. But from the beginning &#8212; that is the key interest of this experiment &#8212; everything is fully redundant and it does not matter, if a single VM or one of the two boxes entirely fails. That&#8217;s much closer to 100% uptime than any single-data-centre approach (which you will most commonly find).</p>
<p>Actually, I have never had a look behind the curtains of a Content Delivery Network (aka CDN). But I am pretty sure that the idea is similar, although they certainly do not use VMs or only two servers. So the implementation will differ. Anyway, I&#8217;d like to see how my approach works. It&#8217;s an experiment using free software only (which includes ESXi since it was released with a new license end of July).</p>
<p>I started this, because I like VMware ESXi and want to stress-test it a bit. Also I like the pfSense firewall (which is FreeBSD based). And I do have good experience with GlusterFS (also not yet in an inter-continental setup). MySQL NDB is new to me. So is location-based domain resolution based on PowerDNS.</p>
<p>I&#8217;m pretty sure that VMware Infrastructure with the HA-AddOn would be much easier (and way more expensive!), but this is about learning new things and combining them with existing knowledge&#8230; Yes, call me a freak. <img src='http://blog.the-ally.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So, you now know the idea. In the next articles of this series, I will go into detail about all the things I do and how I am getting on with the project. Stay tuned.</p>
<p> </p>
<p>[Added August 17th] Here&#8217;s a small diagram how I thing it could look like:</p>
<p><a href="http://blog.the-ally.co.uk/wp-content/uploads/2008/08/data-centre-in-a-box.png"><img class="alignnone size-full wp-image-16" title="data-centre-in-a-box" src="http://blog.the-ally.co.uk/wp-content/uploads/2008/08/data-centre-in-a-box.png" alt="" width="500" height="353" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/08/distributed-data-centre-in-a-box/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why should you bother to use virtualisation?</title>
		<link>http://blog.the-ally.co.uk/2008/08/why-should-you-bother-to-use-virtualisation/</link>
		<comments>http://blog.the-ally.co.uk/2008/08/why-should-you-bother-to-use-virtualisation/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 10:35:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://blog.admin-at-once.co.uk/?p=14</guid>
		<description><![CDATA[Be honest: You are running at least one dedicated server, and you certainly have asked yourself whether you should use virtualisation. You might have found &#8220;no&#8221; to be the answer, as you have one server for each purpose and do not plan to migrate to other hardware machines or to &#8220;sub let&#8221; your system. That&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Be honest: You are running at least one dedicated server, and you certainly have asked yourself whether you should use virtualisation. You might have found &#8220;no&#8221; to be the answer, as you have one server for each purpose and do not plan to migrate to other hardware machines or to &#8220;sub let&#8221; your system. That&#8217;s ok. But on the other hand, everybody likes to reduce hardware costs, or make more of the hardware they have.</p>
<p>It&#8217;s a prejudice that virtualisation is only interesting for so-called Virtual Private Server providers or for big companies who need to run loads of tests for their software releases on different platforms and configurations. Also, you do not need a bunch of servers or a blade-center to take an advantage on virtualisation. In this article I&#8217;d like to give an example of what can be achieved with virtualisation apart from those typical and well-known scenarios.</p>
<p><span id="more-14"></span></p>
<p>Firstly, have a look at the load average of your own server(s). If it stays below 1 (per CPU/core) most of the time, you are actually not making use of all the power your machine has to offer. Hence, you are actually wasting money! You might say: &#8220;I am not yet making use of it, but my business is supposed to grow and some day I will need all of the idle resources.&#8221;</p>
<p>That&#8217;s absolutely fine, and 90% of all small companies will agree with your approach. However, I would like to outline what virtualisation can do for everybody who owns (or rents) a dedicated server. I&#8217;d like to show how</p>
<ul>
<li>you can improve access to your system for maintenance tasks</li>
<li>you can use idle resources and free them when they are needed for other purposes</li>
<li>virtualisation can increase stability and security of your server</li>
</ul>
<p>First things first, virtualisation is not as complicated to set up as commonly expected. My favourite implementations are VMware Server and VMware ESXi (free since 28/07/2008), because they enable you to run any operating system within virtual machines without any changes to their kernels whatsoever. Moreover, WMware products have a long history and have proven that they are rock-solid. However, if you are sure that you will not run anything but Linux, you might also want to have a look at XEN, OpenVZ, Linux vserver or other implementations. See the previous article for an overview of available products.</p>
<p>The easiest installation is offered by VMware ESXi Installable. All you have to do is to insert its bootable CD (if you have a SuperMicro KVM-over-IP, a Raritan eRIC G4 card or similar, you can do that remotely as well). It will install itself onto the server, ask you some questions, and that&#8217;s it. ESXi is a hypervisor which does not require any host operating system to run on. You are ready to install any piece of operating system you want as a virtual machine through the VMware Infrastructure Client (Windows application, for free, part of ESXi).</p>
<p>If you don&#8217;t have KVM-over-IP or local physical access to the server, you could also ask your server provider to do that for you. It takes less than half an hour and is very easy to do.</p>
<p>Anyway, the subject of this article is not how to set up virtualisation. I just wanted to give an example. The topic here is, why you may want to consider using virtualisation.</p>
<p><strong>How to improve access to your system for maintenance tasks</strong></p>
<p>Does you server have KVM-over-IP or do you have physical access to the server? Then this might not apply to you. All others regularly generate costs when they want to do simple things as an ReiserFS or ext3 filesystem check, or when they want to compile a new kernel and it does not work out as expected: They have to ask their server providers to grant access to their servers via KVM-over-IP (if possible). With some hosts that can be kind of a nightmare!</p>
<p>So how does virtualisation help here? In case you are using VMware, each virtual machine can be accessed via a remote console. You can change BIOS settings, monitor the boot process and access your machine even if it does not have a SSH daemon running, as if you were sitting in front of it. The filesystem is corrupted? Just insert an ISO image of your favourite rescue CD into the virtual CDROM drive and boot from it. Do your filesystem maintenance or fix the problems with the custom kernel, eject the CD image, and boot again. There you go: Within minutes your problems can be solved &#8212; anytime you want and without any additional costs.</p>
<p>As for VMware you could also have a tftp server running in another virtual machine and boot VMs via PXE! That&#8217;s quite advanced but very helpful, should you ever need it.</p>
<p><strong>How to use idle resources</strong></p>
<p>Would be a shame to waste resources (and money!) on a machine, wouldn&#8217;t it? So why not running the main VM with most of the resources assigned, while still keeping spare resources available to install completely different things on the same machine?</p>
<p>Of course you can usually do that on a non-virtualised server as well. But how do you control resources of less important services and tasks? And would you really want to mix experimental stuff with your production servers? What about security in that case? Maybe you may want to test other Linux distributions? That&#8217;s all easily possible with a virtualised server.</p>
<p>Just tell the hypervisor to prioritize your most important VM(s) or hard-limit resources of your additional VMs. Then you will not see any impact of your experimental stuff on the production services at all! You do not need to worry about security, stability, clean un-installs of failed experiments. You will not experience a single second of downtime of your production VM while you are doing the most sophisticated experiments on another VM!</p>
<p>You also might to do more than just experiments on the same server. For example, you are starting with your business and want to keep costs at a minimum in the beginning. However, you expect your business to grow quickly. What you could do is to start with a single virtualised dedicated server and split it into logical units, each of them running on a separate virtual machine. As soon as you realise that the server may reach its performance limits, you simply migrate one or more of the virtual machines onto another physical virtualised server. The interesting thing here is, that you do not need to worry about the hardware it is running on. All VMs can have the same set of virtual hardware components. To the guest operating system, they all look the same, no matter what network cards or RAID controllers physically exist in a server. That makes migration quite easy, even if you do not use VMware or its migration tools.</p>
<p><strong>Virtualisation can increase stability and security of your server</strong></p>
<p>Okay, this one is a bit more complicated to explain. So when does a server usually become unstable?</p>
<ul>
<li>when it runs out of memory and swap space, so that the kernel randomly has to kill tasks/services</li>
<li>when the load gets too high (often in conjunction with heavy swapping due to lack of memory)</li>
<li>when it is being attacked from outside (DDoS)</li>
</ul>
<p>The problem with these reasons is that the results are unpredictable and may lead to data loss or data inconsistency. Sometimes a hardware reset is necessary, as no remote access is possible any more (SSH daemon might have crashed already or takes ages to establish the SSH session).</p>
<p>As long as it&#8217;s not a DDoS attack which causes the problems, virtualisation together with it&#8217;s resource limitations for VMs and a remote console (as in VMware) can help to log onto your VM and fix the issues. In the worst case you might have to shut it down, but that&#8217;s not a hard-reset via remote power bar control (which is the worst thing you can do to a server). You just have to restart the VM, which is so much faster than restarting a physical server!</p>
<p>And even in case of a DDoS attack, you might be better of with virtualisation, if you have two NICs connected one of which is on a local/maintenance network. Then you still could have full access from there and could use the remote console to block ports or source IPs. That works even better, if you run a firewall within one of the VMs and have a virtual local network infrastructure set up within the virtualisation.</p>
<p>Now that sounds a bit complicated, doesn&#8217;t it? You might want to read about my example setup, which is not very complicated but very effective.</p>
<p><strong>My example setup</strong></p>
<p>To start playing with the free VMware ESXi, I ordered a nice machine from <a href="http://www.softlayer.com/" target="_blank">SoftLayer</a> which comes with KVM-over-IP (and allows remote CD image mounts). So I literally do have full control over the server. But you could also choose any other host and do not need a KVM at all, if the host agrees to install VMware ESXi for you (which is easy and does not take more than half an hour).</p>
<p>After successful installation, I used the Virtual Infrastructure Client to set up a couple of virtual switches:</p>
<ul>
<li>vSwitch 0 is connected to the public interface card</li>
<li>vSwitch 1 is a host-only switch for local networking between the VMs (not accessible from outside)</li>
<li>vSwitch 2 is connected to the interface card on the management network (SoftLayer provides access to this special infrastructure via VPN &#8212; very nice!)</li>
</ul>
<p>My first VM was meant to become the firewall. Now, you may ask: &#8220;Why the hell do you put the firewall onto a VM? You could use iptables, pf, ipfw within the VM.&#8221; Sure, I could. But why should I want to maintain firewalls for each single VM when I can do that centrally? Moreover, why should I reinvent the wheel? There are plenty of good firewall solutions out there, which come with so many extra features out of the box.</p>
<p>I went for <a href="http://www.pfsense.org/" target="_blank">pfSense</a>. It comes with literally everything you might want to implement:</p>
<ul>
<li>stateful firewall</li>
<li>NAT port-forwarding and 1:1 NAT (interesting if your dedicated machine has multiple IPs)</li>
<li>web interface</li>
<li>different VPN services (PPTP, IPSec, OpenVPN)</li>
<li>traffic shaping (queues, prioritisation etc.)</li>
<li>bandwith monitoring</li>
<li>netflow hooks</li>
<li>SNMP</li>
<li>DHCP/DNS</li>
<li>and a bunch of other packages which can easily be added to the configuration</li>
</ul>
<p>The pfSense VM connects exclusively to vSwitch0 (public network) and to vSwitch1 (host-only local network). That means, all traffic to the other VMs goes through this firewall. There&#8217;s no way to circumvent that &#8212; neither for public sources nor for the VMs, which are only connected to vSwitch1 locally and listening on private IP ranges (192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12). The VMs get their local IPs assigned by  pfSense&#8217;s DHCP (nice for quick experimental VM setups) and have to use pfSense also as gateway and DNS.</p>
<p>Currently I am experimenting with TFTP to boot VMs via the network/PXE, which is possible with VMware ESXi and VMware Server. That will allow extremely quick and slim VM installations.</p>
<p>Thanks to the many features of VMware ESXi, you can literally set up a virtual data centre in a box. Ok, a small one. <img src='http://blog.the-ally.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> And you gain full control about everything which happens in your small data centre.</p>
<p>So, to cut a long story short: Virtualisation helps to</p>
<ul>
<li>increase control over and maintainability of your services</li>
<li>centralise certain tasks (like the firewall or bandwith control)</li>
<li>make use of spare resources and reduce costs</li>
<li>ease migration in case the hardware is no longer sufficient (you don&#8217;t need to worry about the hardware platform the VMs are running on)</li>
<li>speed up development/experiments as a VM is deployed much quicker than a dedicated box</li>
</ul>
<p>I hope, this article helped at least a bit to make you curious about virtualisation. Personally, I think that virtualisation does not only target big companies or VPS hosts. It is interesting for everybody who owns/rents dedicated boxes. And it is certainly worth the effort to give it a go!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/08/why-should-you-bother-to-use-virtualisation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free Virtualisation at its best!</title>
		<link>http://blog.the-ally.co.uk/2008/08/free-virtualisation-at-its-best/</link>
		<comments>http://blog.the-ally.co.uk/2008/08/free-virtualisation-at-its-best/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 22:47:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://blog.admin-at-once.co.uk/?p=13</guid>
		<description><![CDATA[Did you realise that VMware released ESXi for nothing recently? If not, get it and try it! All you need is a server with full KVM access (either over IP or locally) including the opportunity to install CD images (remotely). In my case, I went for a neat SuperMicro machine from SoftLayer, which offers full [...]]]></description>
			<content:encoded><![CDATA[<p>Did you realise that VMware released ESXi for nothing recently? If not, get it and try it! All you need is a server with full KVM access (either over IP or locally) including the opportunity to install CD images (remotely). In my case, I went for a neat SuperMicro machine from <a href="http://www.softlayer.com/" target="_blank">SoftLayer</a>, which offers full KVM-over-IP with remote CD mounts (ISO images on network storages or on the client computer). But that&#8217;s not important here, although they actually offer Double-RAM/Double-Drive deals, so that I am paying only US$ 311 for a Quad-Core Xeon, 6GB of RAM and 2&#215;146 GB SAS at an Adaptec RAID controller. It&#8217;s an awesome offer, especially because they have an incredible user interface and are extremely flexible when it comes to updates/changes. Okay, okay. Enough advertising <img src='http://blog.the-ally.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>This article is about virtualisation. Caution: Long article!</p>
<p><span id="more-13"></span>As I am professionally dealing with all sorts of Linux flavours (Debian/Ubuntu, RedHat, CentOS, Fedora) and BSD/Unix derivates (Solaris, FreeBSD, OpenBSD), I have always been keen on a <em>real</em> virtualisation solution. I have come across many different (para-)virtualisation solutions in desktop and server environments over the last couple of years. Just to give an outline, I will now list all of them (without any particular order). I&#8217;d like to give an overview of the main differences later. So here&#8217;s the list for virtualisation approaches:</p>
<ul>
<li>VMware <a href="http://www.vmware.com/products/esxi/" target="_blank">ESXi</a> / VMware <a href="http://www.vmware.com/products/server/" target="_blank">Server</a></li>
<li><a href="http://www.xen.org/" target="_blank">XEN</a></li>
<li><a href="http://wiki.openvz.org/Main_Page">OpenVZ</a> (Virtuozzo open source fork)</li>
<li><a href="http://www.sun.com/software/products/virtualbox/features.jsp" target="_blank">Sun xVM</a> (for some reason, many people do not see this one)</li>
<li><a href="http://bellard.org/qemu/">QEMU</a> (honestly, who of you knows that one? <img src='http://blog.the-ally.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )</li>
<li>FreeBSD <a href="http://www.freebsd.org/doc/en/books/handbook/jails-intro.html">jails</a></li>
<li><a href="http://linux-vserver.org/Welcome_to_Linux-VServer.org" target="_blank">Linux vserver</a></li>
<li>VMware <a href="http://www.vmware.com/products/fusion/" target="_blank">Fusion for Mac</a></li>
<li><a href="http://www.parallels.com/en/desktop/" target="_blank">Parallels Desktop for Mac</a></li>
<li><a href="http://www.linuxvirtualserver.org/" target="_blank">Linux Virtual Server (LVS)</a></li>
</ul>
<p>Okay, here we have a bunch of different things in one big pot&#8230; First, we have a couple of <strong>desktop based products</strong> (Parallels Desktop, VMware Fusion). I am not going to go into details about them. Personally I think that for professional testing/dev environments, VMware Fusion is slightly better than Parallels Desktop, because its networking components are more sophisticated and also allow to boot via PXE/tftp from within a virtual machine! On the other hand Parallels Desktop is said to be slightly ahead regarding graphics performance. I did not see much difference. Apart from that, both do pretty much the same and allow to run a variety of operating systems on top of the MacOS platform. I am using both heavily and have never had any real problems (tested with Windows XP, FreeBSD, Solaris and a bunch of Linuxes as guests). Okay, enough about Desktop virtualisation, especially as neither VMware Fusion nor Parallels Desktop are for free. Well, they are almost and definitely worth the money. Should you ever need to run different OS on your Mac, I can recommend both.</p>
<p><strong>Sun&#8217;s xVM</strong> sits somewhere in between desktop and server virtualisation. The Mac implementation is not yet very mature, so it is out of question for me. But on Linux it is known to run quite well. Certainly better than the Wine patchwork thingy. <img src='http://blog.the-ally.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>And here we go. Finally, eh? <img src='http://blog.the-ally.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> How to virtualise your server for developement, testing, or production use&#8230;</p>
<p>The rising star and increasingly popular is certainly <strong>XEN</strong>. I used to work with it way back in the past (early 2.x, if I remember correctly). That time, it was hardly more than an experimental virtualisation. It was great to use for running a couple of Linux instances on one machine. But you could not expect much more from it. Quite annoying was the fact that you had to patch the host and guest kernels. Also, it was anything but well documented. As it is becoming more and more popular, I would expect that it has become more mature over time. For sure I can tell that it performed quite well. When it comes to more than &#8220;just&#8221; Linux guests, XEN does not have much to offer. Support for Windows seems to become better, but FreeBSD or Solaris are still out of question.</p>
<p>If I needed to go for a para-virtualisation which allows to run Linux guests only, I would go for <strong>OpenVZ</strong>. It is documented very well and offers loads of opportunities to assign ressources to its guests. As an Open Source fork of Virtuozzo, it moreover has proven reliability very well. It comes with pre-compiled Linux kernels and a couple of tools. All of them are easy to install and work right out of the box. As from my experience, the performance is awesome.</p>
<p>Neither XEN nor OpenVZ do have their own graphical interface. That&#8217;s where a tool named <a href="http://en.wikipedia.org/wiki/HyperVM" target="_blank">HyperVM</a> kicks in. It&#8217;s not for free but claims to be the only graphical front-end for both XEN and OpenVZ. I&#8217;ve never tried it, but people who fancy graphical tools rather than command line tweaking, might want to give it a go.</p>
<p>Other Linux-only virtualisation approaches are <strong>Linux Virtual Server</strong> and <strong>Linux vServer</strong>. I&#8217;ve tested both in an early stage, but they really did not convince me. None of them was capable of assigning resources to guests (resources in terms of at least RAM and CPU soft and hard limits). OpenVZ does that much better, as it enables you to limit almost everything. However, Linux vServer at least runs very stable (we used that on Ubuntu Server production machines in the last company I worked for).</p>
<p>A bit of a special role takes <strong>QEMU</strong>. Unlike the other mentioned virtualisation approaches, it does not need any kernel manipulation or sophisticated configuration. It&#8217;s merely a userland program which provides an environment for a single virtual computer. This is great if you quickly want to test something on another platform. &#8220;Quickly&#8221; in terms of easy to set up, not in terms of performance. Compared to kernel-level virtualisations it performs rather poorly. Where that isn&#8217;t important, it however is a great tool.<br />
I used it to prepare FreeBSD images for a server which I did not have KVM access to. After preparing the images on my local client, I uploaded them to the rescue system on the server (booted via PXE) and then wrote the image directly to disk. Those days, there was no other way for me to do it; and it worked unexpectedly great!</p>
<p>Another special approach can be found on <strong>FreeBSD</strong>: so-called <strong>jails</strong>. It is pretty similar to Linux-only virtualisation on Linux systems, although it&#8217;s obviously for FreeBSD only. You get fully separated guests (jails), which have to get an IP address assigned (kind of bridged mode) and operate completely independently from the host system. Together with layered file-systems, read-only and null mounts, you can set up very slim but secure guests. Also, it is possible to run guests on higher secure-levels (a FreeBSD thing), and make them extraordinary safe. They perform incredibly well.</p>
<p>And here we go: <strong>VMware Server and ESXi Installable</strong>. It&#8217;s not a secret that I like them more than any other virtualisation approach, because they allow to run any imaginable operating system as guests. Moreover they offer extremely good tools to create and manage guests and to overlook the health and performance. With the VMware Converter, it is possible to transfer guests between different dedicated servers. All of this for free!</p>
<p>When ESXi 3.5 was released for free on Monday, July 28th, I decided to install it immediately on a private server, because I wanted to find out in which way it differs from VMware Server (which has been for free since its first release).<br />
First of all, it does not depend on the host operating system, because it is just a hypervisor which then allows to install any operating systems as guests. So basically, we do not have a host operating system at all here, which certainly improves stability, performance and maybe also security. Secondly, it allows to set up a virtual network infrastructure as well. Virtual switches, VLANs,&#8230; Basically it means, that ESXi allows you to run a small data centre virtually. This of course offers great opportunities for a variety of testing scenarios.</p>
<p>Apart from that, it does not really differ from VMware Server. Both ESXi and Server can be maintained either through Perl scripts (remotely) or through the VMware Infrastructure Client (also free, but requires Windows to run). It&#8217;s needless to say that VMware products are rock-solid and reliable due to the fact that they are widely spread and have been available for many years. Only the EULA of VMware ESXi and Server is still a bit mistakebly. I started a <a href="http://communities.vmware.com/thread/159899?tstart=0" target="_blank">discussion thread</a> in the VMware community forum to get that clarified.</p>
<p>In another blog entry, I&#8217;d like to explain why virtualisation is much more interesting for many people than they might think. And I&#8217;ll also give an example with my own private server setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/08/free-virtualisation-at-its-best/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ZFS on FreeBSD 7 &#8212; experimental for a reason!</title>
		<link>http://blog.the-ally.co.uk/2008/05/zfs-on-freebsd-7-experimental-for-a-reason/</link>
		<comments>http://blog.the-ally.co.uk/2008/05/zfs-on-freebsd-7-experimental-for-a-reason/#comments</comments>
		<pubDate>Wed, 28 May 2008 18:04:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[BSD]]></category>

		<category><![CDATA[Storage]]></category>

		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.admin-at-once.co.uk/?p=12</guid>
		<description><![CDATA[Yes, it has a reason that ZFS is not yet marked stable on FreeBSD! I had to learn the hard lesson today.
Under very high load and many concurrent read requests (I set up the company&#8217;s mail server with ZFS and root from ZFS), the two disks in the Raid array repeatedly lost sync, forcing an [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, it has a reason that ZFS is not yet marked stable on FreeBSD! I had to learn the hard lesson today.</p>
<p>Under very high load and many concurrent read requests (I set up the company&#8217;s mail server with ZFS and root from ZFS), the two disks in the Raid array repeatedly lost sync, forcing an automatic re-silvering (auto healing) process to be started, which blocked the system as everything (except /boot) was running from that ZFS arrray. As far as I figured out, the system halted entirely as there was another inconsistency occuring while the re-silvering was still in progress.</p>
<p>I would have investigated further, if it wasn&#8217;t a crucial production machine. And that kind of traffic is very difficult to simulate under laboratory situations (maybe I can do that when I have more time). So I had to revert back to UFS as the downtime had to be minimized. It&#8217;s a shame, really, because I love the features ZFS offers. On my private server it runs very smoothly, but traffic, load and I/O are not comparable to the mail server in question.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/05/zfs-on-freebsd-7-experimental-for-a-reason/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SPF &#8212; Sender Policy Framework</title>
		<link>http://blog.the-ally.co.uk/2008/05/spf-sender-policy-framework/</link>
		<comments>http://blog.the-ally.co.uk/2008/05/spf-sender-policy-framework/#comments</comments>
		<pubDate>Sun, 25 May 2008 15:31:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://blog.admin-at-once.co.uk/?p=11</guid>
		<description><![CDATA[Did you ever receive spam mails which seem to originate from your own mail address? Or did anybody else complain about you sending those emails? Then you should take a look at SPF. In a nutshell, it plugs the holes in the SMTP protocoll, which does not allow to verify if a sender (or anybody [...]]]></description>
			<content:encoded><![CDATA[<p>Did you ever receive spam mails which seem to originate from your own mail address? Or did anybody else complain about you sending those emails? Then you should take a look at <a href="http://www.openspf.org/" target="_blank">SPF</a>. In a nutshell, it plugs the holes in the SMTP protocoll, which does not allow to verify if a sender (or anybody who pretends to be that sender) really may use a particular mail server to transmit their mails. Unfortunately, SPF is not yet very wide-spread. Almost everybody (including me) has come across this abbreviation and/or heard that it might protect misuse of mail addresses. But most people (including me) cannot be bothered to implement it.</p>
<p><span id="more-11"></span>But as I took a closer view at it recently, it turned out to be a pretty simple task. Only people with loads of domain names and/or restricted nameserver control might run into problems.</p>
<p>In a nutshell, you only need to do this in order to get SPF running on your own server and to tell other mail servers how to deal with your domain name:</p>
<ul>
<li>add a <a href="http://www.openspf.org/Software" target="_blank">policy daemon</a> to your MTA (e.g. postfix-policyd-spf) &#8212; pretty easy, really!</li>
<li>add SPF/TXT records to your zonefiles as described <a href="http://www.openspf.org/SPF_Record_Syntax" target="_blank">here</a></li>
</ul>
<p>That&#8217;s it, honestly. Assuming, you have successfully finished the two tasks, your mail server will block all mails that originate from domains, which have SPF records set and been delivered through other than the allowed hosts. And your domains will be protected from being misused on all other mail servers which use SPF as well.</p>
<p>Example:</p>
<pre>example.com.       IN MX 10  mail
mail.example.com.  IN TXT "v=spf1 mx -all
mail.example.com.  IN A 1.2.3.4</pre>
<p>Now, mails from johndoe@example.com must be delivered through the mailserver mail.example.com. All mailservers which implement SPF will refuse to accept mails from other than that server. Especially the big players like Googlemail do make use of SPF. Although some don&#8217;t block mails, they at least add a telling header which makes spam-filtering easier:</p>
<pre>Received-SPF: fail (google.com: domain of mail@***.co.uk does not designate
85.***.***.*** as permitted sender) client-ip=85.***.***.***
Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of
mail@***.co.uk does not designate 85.***.***.*** as permitted sender)
smtp.mail=mail@***.co.uk</pre>
<p>So what are you waiting for? The more people make SPF mandatory on their servers, the better is its protection against SPAM.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/05/spf-sender-policy-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Two neat storage machines</title>
		<link>http://blog.the-ally.co.uk/2008/05/two-neat-storage-machines/</link>
		<comments>http://blog.the-ally.co.uk/2008/05/two-neat-storage-machines/#comments</comments>
		<pubDate>Sat, 10 May 2008 13:44:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[BSD]]></category>

		<category><![CDATA[Storage]]></category>

		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.admin-at-once.co.uk/?p=10</guid>
		<description><![CDATA[Yesterday I set up one of our new storage machines for testing: Dell 2950, Quad Xeon, 8GB, 6&#215;750 GB HDD. I installed FreeBSD 7 with ZFS (following up this article). Firstly it seemed to be a bit tricky, because the PERC/6i controller configuration is &#8212; sorry &#8212; crap from the usuability point of view. It [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I set up one of our new storage machines for testing: Dell 2950, Quad Xeon, 8GB, 6&#215;750 GB HDD. I installed FreeBSD 7 with ZFS (following up <a href="http://blog.admin-at-once.co.uk/2008/04/zfs-on-freebsd/" target="_self">this article</a>). Firstly it seemed to be a bit tricky, because the PERC/6i controller configuration is &#8212; sorry &#8212; crap from the usuability point of view. It seemed not to support non-RAID configurations, but taking a closer look it turned out to be a wrong assumption. Six RAID-0 Arrays with only one drive each is in fact the same as no RAID at all. (The reason why RAID does not make sense is, that ZFS will do this job, and its auto-healing is much better than any hardware controller&#8217;s auto-healing)</p>
<p>After having set up the minimal FreeBSD and doing some tuning (such as creating the ZFS volumes), I ran some tests. You won&#8217;t believe me, but writing a 10GB file (/dev/random to the ZFS volume) resulted in a transfer rate at about 160MB/sec and reading (cp testfile /dev/null) was done at a speed of more than 270MB/sec!!</p>
<p>To be continued&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/05/two-neat-storage-machines/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Solaris&#8217; ZFS on FreeBSD 7.0</title>
		<link>http://blog.the-ally.co.uk/2008/04/zfs-on-freebsd/</link>
		<comments>http://blog.the-ally.co.uk/2008/04/zfs-on-freebsd/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 13:21:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[BSD]]></category>

		<guid isPermaLink="false">http://blog.admin-at-once.co.uk/?p=8</guid>
		<description><![CDATA[Wasn&#8217;t it annoying that FreeBSD never had a volume manager which allowed to resize volumes including the contained filesystem on the fly? Well, it was possible to use gvinum in conjunction with UFS&#8217; growfs tool to make filesystems bigger at least. But that&#8217;s not as flexible as Solaris&#8217; ZFS. Moreover, UFS does not support snapshots [...]]]></description>
			<content:encoded><![CDATA[<p>Wasn&#8217;t it annoying that FreeBSD never had a volume manager which allowed to resize volumes including the contained filesystem on the fly? Well, it was possible to use gvinum in conjunction with UFS&#8217; growfs tool to make filesystems bigger at least. But that&#8217;s not as flexible as Solaris&#8217; ZFS. Moreover, UFS does not support snapshots as well as ZFS does. But finally we have a solution: Since FreeBSD 7.0, ZFS is part of the OS! Although it is still considered experimental and lacks some of the original&#8217;s features, it works quite well. Also, it is possible to use ZFS as a boot partition! See <a href="http://www.ish.com.au/solutions/articles/freebsdzfs" target="_blank">this great article</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/04/zfs-on-freebsd/feed/</wfw:commentRss>
		</item>
		<item>
		<title>(C&#124;G)lustered Storage</title>
		<link>http://blog.the-ally.co.uk/2008/04/clustered-storage/</link>
		<comments>http://blog.the-ally.co.uk/2008/04/clustered-storage/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 14:12:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[BSD]]></category>

		<category><![CDATA[Storage]]></category>

		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.admin-at-once.co.uk/?p=7</guid>
		<description><![CDATA[As the company I work with has to store many media files, backups, rapidly changing documents and so on, they used to run a NetworkAppliance FAS2020 storage machine, which is quite neat. Unfortunately, the current setup does not allow to scale the volumes any more. So we needed to find an alternative.

Consequently we asked for [...]]]></description>
			<content:encoded><![CDATA[<p>As the company I work with has to store many media files, backups, rapidly changing documents and so on, they used to run a NetworkAppliance FAS2020 storage machine, which is quite neat. Unfortunately, the current setup does not allow to scale the volumes any more. So we needed to find an alternative.</p>
<p><span id="more-7"></span></p>
<p>Consequently we asked for quotes on bigger NetApp devices. Unfortunately, they cost more than a good car. The investigation on other solutions began&#8230; <img src='http://blog.the-ally.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>After doing some research and testing as well performance as failure behaviour, the decision was made: I will setup a storage cluster based on i386 hardware and <a href="http://www.gluster.org/glusterfs.php" target="_blank">GlusterFS</a>. Its speed was quite impressive. And also the fact that mirroring (for data security) and striping (for performance) can be combined, is very convincing.</p>
<p>We will start with two huge servers which run partly in mirrored and partly in striped mode. The only thing which needs to be tested before hand is, if FreeBSD&#8217;s UFS in combination with its snapshot feature makes sense here (this could be a bit tricky). If it works, this solution will be as good as the proprietary offer. But it costs less than 1/5!</p>
<p>I will keep you posted.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.the-ally.co.uk/2008/04/clustered-storage/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
