<?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>ipHouse Blog &#187; ipHouse Products</title> <atom:link href="http://blogs.iphouse.net/category/iphouse-products/feed/" rel="self" type="application/rss+xml" /><link>http://blogs.iphouse.net</link> <description>A friendly, local ISP with a view.</description> <lastBuildDate>Sat, 04 Feb 2012 04:14:51 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Debugging IPSec VPNs in FortiGate</title><link>http://blogs.iphouse.net/2012/01/20/debugging-ipsec-vpns-in-fortigate/</link> <comments>http://blogs.iphouse.net/2012/01/20/debugging-ipsec-vpns-in-fortigate/#comments</comments> <pubDate>Fri, 20 Jan 2012 23:09:55 +0000</pubDate> <dc:creator>Doug McIntyre</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[Online Security]]></category> <category><![CDATA[Support]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[technology]]></category> <category><![CDATA[vmForge]]></category> <category><![CDATA[VPN]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=2211</guid> <description><![CDATA[Debugging IPSec VPNs in FortiGate Debugging what is going wrong with a VPN setup is difficult. The IKE protocol is &#8220;chatty&#8221;, and negotiates back and forth between the two ends for several rounds. The GUI offers not much help, it is either  UP or Down. Most of the real debugging happens inside the CLI. One <a href="http://blogs.iphouse.net/2012/01/20/debugging-ipsec-vpns-in-fortigate/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<p><strong><span style="font-size: large;">Debugging IPSec VPNs in FortiGate</span></strong></p><p>Debugging what is going wrong with a VPN setup is difficult. The IKE protocol is &#8220;chatty&#8221;, and negotiates back and forth between the two ends for several rounds. The GUI offers not much help, it is either  UP or Down. Most of the real debugging happens inside the CLI.</p><p>One problem in particular that has always bugged me is that you need access to the end machines involved to initiate traffic across the link. The network admin typically doesn&#8217;t have direct access on the computers on either side of the VPN in order to initiate that traffic. I&#8217;ll show you a method that can be used to initiate traffic from that network as well.<br /> <span id="more-2211"></span><br /> Here are some basic steps to troubleshoot VPNs for FortiGate.</p><p>In IKE/IPSec, there are two phases to establish the tunnel. Phase1 is the basic setup and getting the two ends talking. Then IKE takes  over in Phase2 to negotiate the shared key with periodic key rotation as well as dealing with NAT-T (NAT tunnelling), and all the other &#8220;higher-end&#8221; parameters.</p><p>The first trouble shooting step is to verify your parameters are all correct and matching.</p><p>For Phase1, is the end gateway dynamic or static? Fortigate to Fortigate can use both Main and Aggressive modes for dynamic connections, but many other brands can not. In general, if you are supporting a dynamic IP client end, you will have to use Aggressive mode Phase1, so make sure that mode is set for dynamic clients. If this a static config, you should use Main mode for Phase1, which is a bit more secure on the initial handshake.</p><p>For Phase2, are both sides setup to use PFS? Replay Detection? Dead-peer detection? While most VPN setups include a set of encryption and hash algorithms, you only need one that are the same. The reason for the set is to offer many choices. In practice, just pick one that your base client supports and go from there. Now-a-days, AES256/SHA1 is probably supported across the board, and that is all I ever use. You don&#8217;t have to match the set of them exactly, each side just needs a common one to talk.</p><p>After that all checks out, we need to see what IKE is doing that is failing.</p><p>So SSH or console into the CLI.</p><p>If this is debugging a VDOM<br /> (like in this case), you may have to switch into the root VDOM if you<br /> are the system admin of the firewall as opposed to a VDOM admin.</p><pre>fgt300C-fw # config vdom
fgt300C-fw # edit root
current vf=root:0

fgt300C-fw (root) #</pre><p>as the diag commands are only available in the individual VDOMs or from the root VDOM for the system admin.</p><p>To enable debug logging on the console (should be default) do</p><pre>fgt300C-fw (root) # diagnose debug console</pre><p>To enable debugging output</p><pre>fgt300C-fw (root) # diagnose debug enable</pre><p>Phase1 debugging isn&#8217;t too useful. IKE/Phase2 debugging is where the problem almost always is. Lets turn on full debugging logs there.</p><pre>fgt300C-fw (root) # diagnose debug application ike -1</pre><p>Now, the problem I&#8217;ve always run up against is getting the tunnel to trigger to open up with traffic running on the link. You either have to conference in somebody with access to help you, or use this nifty trick&#8230;</p><p>Open another SSH connection to the FW CLI.  (If this is a VDOM, you&#8217;ll have to &#8216;conf vdom; edit &#8220;vdom3&#8243; to get into<br /> the VDOM context where the network is you want to troubleshoot).</p><p>Set the ping source IP address to be in the inside network of the host you are trying to troubleshoot..</p><pre>fgt300C-fw (vdom3) # execute ping-options source 172.30.3.254</pre><p>And now, ping away from the CLI in order to bring up the tunnel interface</p><pre>fgt300C-fw (vdom3) # execute ping 192.168.0.1</pre><p>(assuming 192.168.0.1 is an existing host only reachable via the VPN tunnel, and the ping service is allowed through the tunnel).</p><pre>fgt300C-fw (vdom3) # execute ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=46.9 ms
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=47.3 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=45.5 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=66.3 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=45.7 ms

--- 192.168.0.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 45.5/50.3/66.3 ms</pre><p>The trick here is that you are source as the network you are setting up, which should trigger the tunnel to come up if it isn&#8217;t up already, and you can see real live traffic. I don&#8217;t know how many times I&#8217;ve been stuck on a conference call waiting for whoever had access to do something to get around to doing the test I asked of them.</p><p>Back in the first debug window, you should see a whole bunch of IPSec and IKE messages fly past on the screen.</p><p>You have to learn to pick out the lines that are important, and zone in on them as everything is flying by. Learn to pause the display (or do a quick &#8216;diag debug dis&#8217; to stop the output). Scrolling back and zeroing in on the one error out of 100 lines is going to be your key skill here.</p><p>If all is well, you should get something about the SA being established with the SPI value (not important).</p><pre>ike 3:MyVPN_GW:18690:MyVPN:49143: added IPsec SA: SPIs=939fc892/b54d030</pre><p>and of course, if it is configured for SNMP, something like</p><pre>ike 3:MyVPN_GW:18690:MyVPN:49143: sending SNMP tunnel UP trap</pre><p>is a nice confirmation that all is well with the VPN.</p><p>If you are seeing a lot of errors repeating with Phase1, and you see messages like</p><pre>ike 3:MyVPN_GW:18698: sent IKE msg (P1_RETRANSMIT): ....</pre><p>Most likely the problem is a mismatch preshare key for the VPN tunnel, as it isn&#8217;t passing out of P1 (which doesn&#8217;t have much to negotiate).</p><p>Also check again if this is dynamic client (generally requiring Aggressive mode) or a static connection that probably should be set to Main mode, but could be using Aggressive Mode.</p><p>If you don&#8217;t have a common encryption alg/hash, you should see some errors like..</p><pre>ike 3:MyVPN_GW:18707: no SA proposal chosen</pre><p>As it can&#8217;t find a matching SA between the two ends using the same encryption algorithm/hash combo to encrypt the tunnel. Fixup the encryption alg/hash and everything should go better.</p><p>The hardest problems to detect are different keylength timers (you&#8217;ll just have to review them on both sides to make sure your P1 and P2 keylife timers are identical on both sides). Problems that you encounter with different timers show up as a VPN that works for a while, but then stops work, and won&#8217;t come up unless you bounce both sides. With valid timers the same on both sides, the VPN should keep up and key rollovers happen automatically.</p><p>Also, DPD may not always negotiate. One side may have it on and let a VPN connection stay up for a certain time until the timer kicks off and closes the connection for the lack of keep-alive packets. Make sure both sides have it on, or both sides have it off.</p><p>There are a few other error conditions that may come up, but these are the more common errors.</p><p>The most important thing with the low level debugging like this is to learn to pick out the important error lines from all the rest of the junk flying by. It just takes practice. You may want to deliberately break an existing setup just to see what happens. But once you can zero in on that one error line out of a 100 that is important, it will be a lot easier to troubleshoot what problems may come at you.</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2012/01/20/debugging-ipsec-vpns-in-fortigate/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Clone-tastic!</title><link>http://blogs.iphouse.net/2012/01/20/clone-tastic/</link> <comments>http://blogs.iphouse.net/2012/01/20/clone-tastic/#comments</comments> <pubDate>Fri, 20 Jan 2012 21:51:17 +0000</pubDate> <dc:creator>Nick Gasper</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[Opinion]]></category> <category><![CDATA[System Administrators]]></category> <category><![CDATA[Virtual Machines]]></category> <category><![CDATA[Hosting]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[vmForge]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=2174</guid> <description><![CDATA[There are many things about virtualization is the ability to clone virtual machines. It&#8217;s really cool! Unfortunately, after you work with virtualization for a while you start to take it for granted. I can&#8217;t tell you how many times I roll out a new physical machine and sigh because I can&#8217;t simply clone it. Well, <a href="http://blogs.iphouse.net/2012/01/20/clone-tastic/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<p>There are many things about virtualization is the ability to clone virtual machines. It&#8217;s really cool! Unfortunately, after you work with virtualization for a while you start to take it for granted. I can&#8217;t tell you how many times I roll out a new physical machine and sigh because I can&#8217;t simply clone it. Well, I can but that&#8217;s a discussion for another day.<br /> <span id="more-2174"></span> Virtual machines are a set of files that are interpreted by a hypervisor.  Since they are just files they can then be copied and/or edited. That&#8217;s all cloning is, the system is just copying the VMDKs (the &#8220;hard drive&#8221; files) and editing the VMX file (the config file to change things like the MAC address of a NIC and the virtual machine&#8217;s name).</p><p>You can even do it by hand if you have access to the backend storage. Mike once one-upped me by piping the VMX through sed. That&#8217;s cheating but all&#8217;s fair I guess. Cheater.</p><p>The vmForge VDC allows you to clone vApps and the individual machines contained therein. It automatically edits the config, can handle numbering the machine, and makes everything nice and easy. This is a killer feature in my book.</p><p>A lot of cloud providers are instance based. You select the operating system, push it out, and rely on automated services to configure them for you. Most of the time, you don&#8217;t get persistent storage. If you do, it&#8217;s usually a volume you attach to the instance and has nothing to do with its operating system. By using a vmForge VDC you can do the opposite. You can create a machine, configure it how you like, and then clone it. Configure once, and be done. Then you can keep a copy of it in your catalog for later deployments. Each clone is exactly that: a complete copy of your original system.</p><p>You may think that&#8217;s really cool! But wait, there&#8217;s more! (sorry, couldn&#8217;t resist)</p><p>When you build virtual machines in your VDC you are building them in vApps. A vApp is a logical container that holds virtual machines, internal networks, and can do things like set boot/shutdown order and power-down semantics.</p><p>When creating a vApp you also have the option to &#8220;fence&#8221; it. Fencing isolates the layer-2 networks within the vApp from any outside network. This means you can have internally consistent ip addressing inside the vApp. You can then &#8220;template&#8221; the vApp by moving it to your catalog and deploy it over and over and over again. That means that your preconfigured, multi-server application can be redeployed with a few mouse clicks!</p><p>Ultimately, cloning is about saving time. You get to use conventional tools to set up and multiple machines quickly and easily. You don&#8217;t have to learn any arcane scripting language, nor trust and maintain a complicated configuration service like Chef or Puppet. You just set up servers, push them out, and start to use them.</p><p>So, clone away!</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2012/01/20/clone-tastic/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>What does a VDC get you out of?</title><link>http://blogs.iphouse.net/2012/01/20/what-does-a-vdc-get-you-out-of/</link> <comments>http://blogs.iphouse.net/2012/01/20/what-does-a-vdc-get-you-out-of/#comments</comments> <pubDate>Fri, 20 Jan 2012 18:38:45 +0000</pubDate> <dc:creator>Doug Rau</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[System Administrators]]></category> <category><![CDATA[Virtual Machines]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[vmForge]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=2178</guid> <description><![CDATA[A vmForge virtual data center gets you into a private pool of computing resources which you can custom configure to your needs. It gets you into a lean, efficient, reliable, and elastic platform for your business, which can easily grow as you do. But it&#8217;s also worth looking at what it gets you out of. <a href="http://blogs.iphouse.net/2012/01/20/what-does-a-vdc-get-you-out-of/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<p>A <a title="ipHouse vmForge Virtual Data Center" href="http://www.iphouse.com/vmforge/vdc.html">vmForge virtual data center</a> gets you into a private pool of computing resources which you can custom configure to your needs. It gets you into a lean, efficient, reliable, and elastic platform for your business, which can easily grow as you do. But it&#8217;s also worth looking at what it gets you out of.</p><p><span id="more-2178"></span>It gets you out of hardware. Out of substantial up-front costs, management and repair, depreciation, and end-of-life planning.</p><p><a style="padding: 2em;" href="http://blogs.iphouse.net/2012/01/20/what-does-a-vdc-get-you-out-of/hardware/" rel="attachment wp-att-2179"><img class="aligncenter size-full wp-image-2179" title="hardware" src="http://blogs.iphouse.net/wp-content/uploads/2012/01/hardware.jpg" alt="" width="352" height="454" /></a></p><p>It gets you out of data centering. Out of power, cooling, and cabling overhead and management.</p><p><a style="padding: 2em;" href="http://blogs.iphouse.net/2012/01/20/what-does-a-vdc-get-you-out-of/cables/" rel="attachment wp-att-2180"><img class="aligncenter size-full wp-image-2180" title="cables" src="http://blogs.iphouse.net/wp-content/uploads/2012/01/cables.jpg" alt="" width="352" height="469" /></a></p><p>It might even get you out of this. With a virtualized infrastructure, you can get access to and administer your servers and network from almost anywhere. From your office, your home, the beach&#8230;</p><p><a style="padding: 2em;" href="http://blogs.iphouse.net/2012/01/20/what-does-a-vdc-get-you-out-of/815-2/" rel="attachment wp-att-2182"><img class="aligncenter size-full wp-image-2182" title="815" src="http://blogs.iphouse.net/wp-content/uploads/2012/01/8151.jpg" alt="" width="352" height="240" /></a></p><p>What else could you be getting out of with a virtual data center?</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2012/01/20/what-does-a-vdc-get-you-out-of/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Monitoring, a journey</title><link>http://blogs.iphouse.net/2012/01/09/monitoring-a-journey/</link> <comments>http://blogs.iphouse.net/2012/01/09/monitoring-a-journey/#comments</comments> <pubDate>Mon, 09 Jan 2012 16:55:38 +0000</pubDate> <dc:creator>Nick Gasper</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[Opinion]]></category> <category><![CDATA[Virtual Machines]]></category> <category><![CDATA[IPv6]]></category> <category><![CDATA[Monitoring]]></category> <category><![CDATA[technology]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[vmForge]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=2080</guid> <description><![CDATA[Or &#8220;How I Stopped Worrying and Learned to Love SaaS&#8221; I touched on monitoring in an earlier post but I thought that I would expand on my thoughts. Let me just get this out there: LogicMonitor (company site) is awesome. It&#8217;s not perfect (what is?), but it&#8217;s amazing, simple, straightforward, and it works. It combines effective monitoring with graphing <a href="http://blogs.iphouse.net/2012/01/09/monitoring-a-journey/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<p>Or &#8220;How I Stopped Worrying and Learned to Love SaaS&#8221;</p><p>I touched on monitoring in an earlier <a title="Infrastructure and Other Games, Part 4" href="http://blogs.iphouse.net/2011/12/08/infrastructure-and-other-games-part-4/">post</a> but I thought that I would expand on my thoughts.</p><p>Let me just get this out there: <a title="ipHouse monitoring service powered by LogicMonitor" href="http://www.iphouse.com/monitoring.html">LogicMonitor</a> (<a title="LogicMonitor - ipHouse likes it!" href="http://www.logicmonitor.com/">company site</a>) is awesome. It&#8217;s not perfect (what is?), but it&#8217;s amazing, simple, straightforward, and it works. It combines effective monitoring with graphing (metrics); it&#8217;s easy to understand and customize and it works.</p><p>Repeat: It works.<br /> <span id="more-2080"></span><br /> I&#8217;ve done some work with other monitoring and graphing/measurment solutions; mostly <a title="Zabbix agent-based monitoring" href="http://www.zabbix.com/">Zabbix</a>, <a title="Nagios, commercial and open source monitoring tools" href="http://www.nagios.org/">Nagios</a>, and <a title="Cacti - open source measurement tool" href="http://www.cacti.net/">Cacti</a>. They all have their strengths and weaknesses. LogicMonitor also has it&#8217;s plusses and minuses but all in all it works amazingly well with the number of minuses to be very small.</p><p>Nagios has, in my opinion, the best monitoring engine. The automatic back off and flap detection combined with per-host customization that can happen in Nagios has not been matched yet. However, configuring Nagios is a nightmare. I got really good at it and I don&#8217;t want to ever do it again. Looking at a blank Nagios setup makes me cringe. Tools like <a title="NagioSQL is an open source web based editor for Nagios configuration" href="http://www.nagiosql.org/">NagioSQL</a> help but it&#8217;s still ridiculous. Using Nagios as a customer facing solution would take up too much time and my time is precious to me and our business.</p><p>Cacti is not a monitoring system but it is a great graphing solution, unless your <a title="RRDtool is a data storage type used by many open source tools" href="http://oss.oetiker.ch/rrdtool/">RRD</a> data gets corrupted or lost. Now, that doesn&#8217;t happen much, but when it does, it&#8217;s annoying.</p><p>Zabbix is a great all in one system with a horrible interface. I hate to quibble, I still use Zabbix but I get headaches everytime I try to do something. The top down task selection with a history at the bottom is counterintuitive. Getting Zabbix to send out alerts is a chore. And requires per-host agents for different operating systems while the SNMP interface works well only if the device you are monitoring fits within the very small pre-configured templates that come with the package. Yes, I can build new templates, repeatedly but LogicMonitor does this without requiring extra time.</p><p>With our recently launched <a title="ipHouse vmForge virtualization services for virtual data centers and individual virtual machines" href="http://www.iphouse.com/vmforge/">vmForge</a> service offering, we wanted to add an excellent and easy to implement monitoring solution. It was something that we wanted to be able to set up for customers easily while also offering something that they could set up and manage themselves.</p><p><a title="Mike Horwath's articles on blogs.iphouse.net" href="http://blogs.iphouse.net/author/mike/">Mike</a> did quite a bit of digging but didn&#8217;t find anything that fit the bill entirely. Until he stumbled on LogicMonitor.</p><p>It initialy attracted our attention because it was network agent based. This allows us to put agents behind firewalls and NAT configurations without worrying about all of the details. The agent just requires outbound connectivity over HTTPS.</p><p>We decided to give it a try and we were instantly impressed! It automatically detects available datasources and adds threshold points and instrumentation graphing of operations in a single view. We can add rules and chains for alerting the engineering staff. It has a lot of features laid out in an easy to understand way. It uses SNMP, vendor APIs, and WMI depending on the target host.</p><p>It makes sense so we  fired up an evaluation and not long after signed up for services for our own use.</p><p>The developers of LogicMonitor have been great to work with. They have been open to feedback, excited to test things that they haven&#8217;t come across before. We receive queries on how a specific type of device should be measured and bug reports are handled professionally and efficiently.</p><p>The only thing that I don&#8217;t like is that the agent requires Java but that&#8217;s the cost of convienence.</p><p>The only things missing right now are support for IPv6 (which can&#8217;t come too soon) and a back off ability with flap detection. (spouses are happier when not woken up to dropped detection events)</p><p>Oh well, it&#8217;s still better than editing Nagios files!</p><p>I&#8217;m looking forward to working with LogicMonitor further and I highly recommend them.</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2012/01/09/monitoring-a-journey/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Setting up a LogicMonitor Agent</title><link>http://blogs.iphouse.net/2011/12/30/setting-up-a-logicmonitor-agent/</link> <comments>http://blogs.iphouse.net/2011/12/30/setting-up-a-logicmonitor-agent/#comments</comments> <pubDate>Fri, 30 Dec 2011 19:38:21 +0000</pubDate> <dc:creator>Doug Rau</dc:creator> <category><![CDATA[Data Center]]></category> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[System Administrators]]></category> <category><![CDATA[Hosting]]></category> <category><![CDATA[IPv6]]></category> <category><![CDATA[Monitoring]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=1966</guid> <description><![CDATA[LogicMonitor is a really cool server and network monitoring and measurement system which we&#8217;ve been working with. It uses a lightweight monitoring agent installed on your local network which collects data from your systems and passes it over SSL to an external aggregator. It&#8217;s capable of auto-discovery and is mostly self-configuring though you can adjust <a href="http://blogs.iphouse.net/2011/12/30/setting-up-a-logicmonitor-agent/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<p>LogicMonitor is a really cool server and network monitoring and measurement system which we&#8217;ve been working with. It uses a lightweight monitoring agent installed on your local network which collects data from your systems and passes it over SSL to an external aggregator. It&#8217;s capable of auto-discovery and is mostly self-configuring though you can adjust many of the metrics. After many years of working with patchwork monitoring and alert systems we&#8217;re pretty excited about it. Call us if you&#8217;re interested.</p><p>Setting up a monitoring agent on your local network is easy. The server hosting the agent just needs a JRE (Java Runtime Environment) installed using version 1.6 or greater and must be able to make an outgoing SSL connection. To monitor Windows systems, you&#8217;ll need to install the agent on a Windows server.</p><p><span id="more-1966"></span></p><p>Login to the LogicMonitor website, click on the &#8220;Settings&#8221; tab, then on &#8220;Agents&#8221; in the left navigation, then on the &#8220;Add&#8221; button. Click past the introduction, and indicate whether you&#8217;ll be installing the LogicMonitor agent on a Windows or Linux server. Download the agent installer, or copy the link and use wget to download the installer directly to your Linux system. Run the installer to install the agent on your server then return to your web browser and click &#8220;Next&#8221; to verify that its been installed correctly and is able to communicate with the LogicMonitor system.</p><p><a href="http://blogs.iphouse.net/2011/12/30/setting-up-a-logicmonitor-agent/downlaod-agent/" rel="attachment wp-att-1967"><img class="aligncenter size-full wp-image-1967" title="downlaod agent" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/downlaod-agent.png" alt="" width="883" height="382" /></a></p><p>To begin monitoring a host on your network, click on the &#8220;Hosts&#8221; tab, then on the &#8220;Add Hosts&#8221; button and select &#8220;New Host (wizard)&#8221;. Enter the host name or IP address. Note that if your monitoring agent and host are on a private internal network then this should be the IP address visible to your agent. Select your monitoring agent (if you have more than 1), and LogicMonitor will go ahead and verify that its able to gather information about the host.</p><p>NOTE: at this time, LogicMonitor does not support IPv6</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2011/12/30/setting-up-a-logicmonitor-agent/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Logic Monitor through screen shots</title><link>http://blogs.iphouse.net/2011/12/12/logic-monitor-through-screen-shots/</link> <comments>http://blogs.iphouse.net/2011/12/12/logic-monitor-through-screen-shots/#comments</comments> <pubDate>Mon, 12 Dec 2011 17:40:53 +0000</pubDate> <dc:creator>Genevieve Ruebel</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[System Administrators]]></category> <category><![CDATA[Hosting]]></category> <category><![CDATA[Monitoring]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[vmForge]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=1781</guid> <description><![CDATA[This is the part where I talk about LogicMonitor as a part of our ipHouse internal learning enrichment task. I am going to do this through screen shots because it works for me and I hope you learn a little along the way. I was in great need of Nick&#8217;s help because at first I <a href="http://blogs.iphouse.net/2011/12/12/logic-monitor-through-screen-shots/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<p>This is the part where I talk about <a title="ipHouse offers LogicMonitor for your network and server monitoring needs." href="http://www.iphouse.com/monitoring.html">LogicMonitor</a> as a part of our <a title="ipHouse - my home" href="http://www.iphouse.com/">ipHouse</a> internal learning enrichment task. I am going to do this through screen shots because it works for me and I hope you learn a little along the way.</p><p>I was in great need of <a title="Nick Gasper - engineer" href="http://blogs.iphouse.net/author/nick/">Nick&#8217;s</a> help because at first I thought I could create just any host name. So of course I chose the name barf. Well you can&#8217;t do that. You need to use a machine name that already exists. Nick said I should choose smtpgrey-2.iphouse.net or smtpgrey-1.iphouse.net (inbound SMTP border servers in use on our <a title="ipHouse - superior connectivity for your servers" href="http://www.iphouse.com/our-network.html">network</a>).</p><p>Once I figured that out it was all smooth sailing!</p><p><span id="more-1781"></span>Below is the Logic Monitor interface.<br /> <a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.57.07-AM.png"><img class="size-full wp-image-1783 alignnone" title="Screen Shot 2011-12-07 at 11.57.07 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.57.07-AM.png" alt="" width="374" height="208" /></a></p><p>&nbsp;</p><p>If you look to the left, my name is Gen.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.48.58-AM.png"><img class="size-full wp-image-1782 alignnone" title="Screen Shot 2011-12-07 at 11.48.58 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.48.58-AM.png" alt="" width="375" height="254" /></a></p><p style="text-align: left;">So you say you would like to add a host. Click on the &#8216;add a host&#8217; button on the left side. Then this screen pops up.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.49.41-AM.png"><img class="size-full wp-image-1784 alignnone" title="Screen Shot 2011-12-07 at 11.49.41 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.49.41-AM.png" alt="" width="316" height="236" /></a></p><p style="text-align: left;">You have to pick a host name that already exists. Now you select an monitoring agent. I chose worldgen. You do need to choose one that will Windows based if it is a Windows machine so you can use WMI if your firewall allows such. Remember that.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.49.56-AM.png"><img class="size-full wp-image-1785 alignnone" title="Screen Shot 2011-12-07 at 11.49.56 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.49.56-AM.png" alt="" width="317" height="238" /></a></p><p style="text-align: left;">Once you pick your agent, the wizard will check to see if every choice you made works out. Apparently, I did things correctly.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.50.12-AM.png"><img class="size-full wp-image-1786 alignnone" title="Screen Shot 2011-12-07 at 11.50.12 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.50.12-AM.png" alt="" width="316" height="236" /></a></p><p style="text-align: left;">I decided that I do not want to add another host. I think I am good for now.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.50.36-AM.png"><img class="size-full wp-image-1787 alignnone" title="Screen Shot 2011-12-07 at 11.50.36 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.50.36-AM.png" alt="" width="316" height="236" /></a></p><p style="text-align: left;">Okay, okay&#8230;I am sure I want to exit.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.50.46-AM.png"><img class="size-full wp-image-1788 alignnone" title="Screen Shot 2011-12-07 at 11.50.46 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.50.46-AM.png" alt="" width="298" height="184" /></a></p><p style="text-align: left;">So now, this is what Logic Monitor really does. It monitors.</p><p style="text-align: left;">You can toggle around and see what has gone on with your CPU usage and gather load averages plus a whole slew of other statistics.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.51.05-AM.png"><img class="size-full wp-image-1789 alignnone" title="Screen Shot 2011-12-07 at 11.51.05 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.51.05-AM.png" alt="" width="300" height="202" /></a></p><p style="text-align: left;">Now it is monitoring Disk. Watch it monitor.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.51.24-AM.png"><img class="size-full wp-image-1790 alignnone" title="Screen Shot 2011-12-07 at 11.51.24 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.51.24-AM.png" alt="" width="301" height="205" /></a></p><p style="text-align: left;">DNS status seems to be neutral.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.51.46-AM.png"><img class="size-full wp-image-1791 alignnone" title="Screen Shot 2011-12-07 at 11.51.46 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.51.46-AM.png" alt="" width="350" height="55" /></a></p><p style="text-align: left;">Okay this is the part that I think is the most interesting about Logic Monitor, the alerts. I know that no one wants to see a critical message. It sure is fun when you are testing new software though. I did not have any alerts so I moved on to show you someone elses alerts.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.52.19-AM.png"><img class="size-full wp-image-1792 alignnone" title="Screen Shot 2011-12-07 at 11.52.19 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.52.19-AM.png" alt="" width="300" height="83" /></a></p><p style="text-align: left;">Here we go, this is critical as you can see from the bright orange and yellow colors.</p><p style="text-align: left;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.52.36-AM.png"><img class="size-full wp-image-1793 alignnone" title="Screen Shot 2011-12-07 at 11.52.36 AM" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-07-at-11.52.36-AM.png" alt="" width="302" height="114" /></a></p><p style="text-align: left;">There is a section under notes that you can click on and add in a note on what is going on or how you are going to fix it or if you did.</p><p style="text-align: left;">After all of this, I think Logic Monitor seems quite useful. It is nice that when an alert happens (because they do) a page can be sent to your cell phone.</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2011/12/12/logic-monitor-through-screen-shots/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SysAdmin Golf: Use dd and netcat to clone a Linux machine</title><link>http://blogs.iphouse.net/2011/12/09/sysadmin-golf-use-dd-and-netcat-to-clone-a-linux-machine/</link> <comments>http://blogs.iphouse.net/2011/12/09/sysadmin-golf-use-dd-and-netcat-to-clone-a-linux-machine/#comments</comments> <pubDate>Fri, 09 Dec 2011 20:52:42 +0000</pubDate> <dc:creator>Nick Gasper</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[Opinion]]></category> <category><![CDATA[System Administrators]]></category> <category><![CDATA[Virtual Machines]]></category> <category><![CDATA[SysAdmin Golf]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[vmForge]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=1811</guid> <description><![CDATA[So, we&#8217;ve been working real hard here at ipHouse figure out ways to help customers move machines into our vmForge VDC product. VMware Converter works for Windows machines, (allegedly, I&#8217;m going test it soon) but isn&#8217;t so helpful with Linux machines. After wracking my brain, I thought about the various tools used to clone Linux <a href="http://blogs.iphouse.net/2011/12/09/sysadmin-golf-use-dd-and-netcat-to-clone-a-linux-machine/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<p>So, we&#8217;ve been working real hard here at ipHouse figure out ways to help customers move machines into our <a href="http://www.iphouse.com/vmforge/vdc.html">vmForge VDC</a> product. <a href="http://www.vmware.com/products/converter/">VMware Converter</a> works for <a href="http://windows.microsoft.com/en-US/windows/home">Windows</a> machines, (allegedly, I&#8217;m going test it soon) but isn&#8217;t so helpful with Linux machines. After wracking my brain, I thought about the various tools used to clone Linux boxes. I&#8217;m familiar with dd, a block level disk copying tool, and tried to find a way to use dd to create a VMDK, that I could then convert into a OVF and upload. <span id="more-1811"></span></p><p>Then I stumbled on this link (<a href="http://conshell.net/wiki/index.php/Linux_P2V">conshell.net</a>) which explains how to use dd and netcat to copy a disk over a network.</p><p>It was so simple, it verged on genius! But did it work?</p><p>The steps are easy:</p><p>1) Create a virtual machine with  a disk about the same size or larger than your source (not smaller)</p><p>Pick an arbitrary port, (9001 in this example) and set up your firewall or VSE to allow that port to the target machine.</p><p>2) Boot that new VM into a rescue environment or use a <a href="http://en.wikipedia.org/wiki/Live_CD">live cd</a>.</p><p>3) Use the following commands:</p><p>On the VM: <code>nc -l -p 9001 | dd of=/dev/sda</code></p><p>On your source machine: <code> dd if=/dev/sda | nc  9001</code></p><p>4) Wait a long time&#8230; I averaged around 15Mbps from my test machine to my new VM, it ranged from 30Mbps down to 7Mbps. I&#8217;m sure that had more to do with my network than anything. Still, this can take a while.</p><p>5) Once the dd has completed (dd will dump summary information) reboot the machine back into the live-cd environment, check the partitions with <code>e2fsck</code> the partitions and re-size them. (I cheated and used <code>gparted</code>)</p><p>6) At this point you can either mount the filesystem and remove the udev rules (in /etc/udev/rules.d/) or boot into your VM and remove them via the console. Either way, you have to reboot after the udev rule are removed.</p><p>7) Reboot, and voilà!</p><p>The live cd I used was <a href="http://www.cdlinux.info/wiki/doku.php/">CDLinux</a>. It&#8217;s a small Linux distribution that runs <a href="http://www.xfce.org/">XFCE</a>, and fits in an 80MB ISO. It also includes an SSH server, so you can set up an ssh tunnel, and use netcat against that rather than use an arbitrary port. It also has the VMware paravirtual scsi drivers.</p><p>Anyways, this worked. Wow did it work. I didn&#8217;t bother to zero out the remaining space on the disk, it took me about 2.5 hours to move 8GB worth of data but I was greeted with a familiar prompt in a new place as soon as I booted it up.</p><p>Now a couple of caveats. I did this on a running system, with no prep work. I would recommend trimming unnecessary data and shutting down as many services as you can. It&#8217;s best to do this when the machine is &#8220;down,&#8221; not doing anything beyond facilitating the copy. However, it does work on a live system. Still, if I were moving a production system, I would follow the advice in the linked article above.</p><p>But, it was my system, in a test environment, so I didn&#8217;t really care.</p><p>Still, isn&#8217;t it amazing what a couple of UNIX pipes can do?</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2011/12/09/sysadmin-golf-use-dd-and-netcat-to-clone-a-linux-machine/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SysAdmin Golf: The Hard Way</title><link>http://blogs.iphouse.net/2011/12/09/sysadmin-golf-the-hard-way/</link> <comments>http://blogs.iphouse.net/2011/12/09/sysadmin-golf-the-hard-way/#comments</comments> <pubDate>Fri, 09 Dec 2011 19:04:01 +0000</pubDate> <dc:creator>Doug Rau</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[System Administrators]]></category> <category><![CDATA[Virtual Machines]]></category> <category><![CDATA[Hosting]]></category> <category><![CDATA[SysAdmin Golf]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[vmForge]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=1824</guid> <description><![CDATA[This is the hard way to p2v a Linux server into a vmForge VDC. You&#8217;ll need the VMware Converter bootable CD, and somewhere to store your disk image. If you have a Windows server and shared disk on your local network, that may be faster than a USB hard drive, which is what I used. <a href="http://blogs.iphouse.net/2011/12/09/sysadmin-golf-the-hard-way/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<p>This is the hard way to p2v a Linux server into a vmForge VDC. You&#8217;ll need the VMware Converter bootable CD, and somewhere to store your disk image. If you have a Windows server and shared disk on your local network, that may be faster than a USB hard drive, which is what I used. This is a cold clone procedure, which means that your server is down while its being copied. And it may be down for a while, depending on how much disk your server has, how quickly it can be cloned to local storage, and finally how quickly it can be uploaded to your VDC.</p><p><span id="more-1824"></span></p><p>Reboot your server from the VMware Converter CD. Once VMware Converter is running, click on &#8220;Import Machine&#8221;. Click through the first couple of panels. On the &#8220;Source Data&#8221; panel, select &#8220;Import all disks and maintain size&#8221;. On the &#8220;Destination Type&#8221; panel, set the destination type to &#8220;Other VMware Virtual Machine&#8221;. On the next panel, set the VM Name and the Location where you&#8217;re storing your disk image. Since Converter doesn&#8217;t support direct OVF export here, you&#8217;ll have to set the type of virtual machine to Workstation 6.x and change it later. Click through the rest of the panels, and Finish. VMware Converter will now export your server to a .vmx description file and .vmdk disk image(s). This may take a while.</p><p style="text-align: center;"><a href="http://blogs.iphouse.net/wp-content/uploads/2011/12/clone-progress.png"><img class="aligncenter size-full wp-image-1826" title="clone progress" src="http://blogs.iphouse.net/wp-content/uploads/2011/12/clone-progress.png" alt="" width="578" height="110" /></a></p><p>After VMware Converter is done, you&#8217;ll need to use VMware&#8217;s OVF Tool to convert the .vmx file to a .ovf file.</p><blockquote><p><code>ovftool.exe name.vmx name</code></p></blockquote><p>Next, the tricky bit. You&#8217;ll need to edit the .ovf file, which is in XML format, and find and update the VirtualSystemType field to vmx-07, a reasonably current version. Once you&#8217;ve edited the .ovf file, you&#8217;ll also need to generate its SHA1 hash and update the .mf manifest file. Now, you should have something which can be imported into your vmForge VDC.</p><p>Login to your vmForge VDC (or any VMware vCloud Director system), and create a new catalog if you don&#8217;t already have one. In your catalog, click on the Upload button. Select your .ovf file, give it a name and description, and click on the Upload button. Again, this may take a while. Once its done, you&#8217;ll be able to use the template from your catalog to create a new virtual machine, a clone of your old physical server. The last step will be to power on the virtual server, login via the virtual console, and reconfigure networking.</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2011/12/09/sysadmin-golf-the-hard-way/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Infrastructure and Other Games, Part 4</title><link>http://blogs.iphouse.net/2011/12/08/infrastructure-and-other-games-part-4/</link> <comments>http://blogs.iphouse.net/2011/12/08/infrastructure-and-other-games-part-4/#comments</comments> <pubDate>Thu, 08 Dec 2011 20:22:40 +0000</pubDate> <dc:creator>Nick Gasper</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[Opinion]]></category> <category><![CDATA[System Administrators]]></category> <category><![CDATA[DNS]]></category> <category><![CDATA[Monitoring]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[vmForge]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=1747</guid> <description><![CDATA[Part 4: The Other Stuff Thanks for reading my series on moving from my single all-in-one server and my small ESXi server to ipHouse&#8217;s vmForge VDC product. I previously discussed moving my websites to a virtual webcluster, and moving email to a virtual mailcluster. Now I just had to move three small servers, and install <a href="http://blogs.iphouse.net/2011/12/08/infrastructure-and-other-games-part-4/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<h3>Part 4: The Other Stuff</h3><p>Thanks for reading my series on moving from my single all-in-one server and my small ESXi server to ipHouse&#8217;s <a title="vmForge Virtual Data Center" href="http://www.iphouse.com/vmforge/">vmForge VDC</a> product. I previously discussed moving my websites to a virtual webcluster, and moving email to a virtual mailcluster. Now I just had to move three small servers, and install a third.</p><p>The first server I moved was a small experimental VM used for testing various network, web and other items. I like to have dedicated testing environment for every operating system that I professionally run. This server was responsible for my personal <a href="http://en.wikipedia.org/wiki/Teredo_tunneling">Teredo</a> tunneling, and was the one I put my CGI testing on from awhile a go. I could have easily moved it, but I wanted see how the export/import from ESXi to vmForge worked. I stopped the machine on my ESXi server, downloaded it as a OVF and uploaded it, via my Windows machine, to my catalog. It imported it as a template. I then deployed the template and deleted the server. It worked flawlessly! All I had to do renumber the machine and I was done.<span id="more-1747"></span></p><p>The next server was a little more complicated. It was originally a CounterStrike:Source server that I had converted into a Apache Tomcat JSP host. Because it already had a working Java setup, I added an <a href="http://www.igniterealtime.org/projects/openfire/">OpenFire</a> Jabber server, and a <a href="http://www.logicmonitor.com/">LogicMonitor</a> agent to it. This gave me the ability to monitor my internal network from LogicMonitor, a monitoring solution that we&#8217;re looking into. The triple Java duties of this machine, unfortunately, put a big crunch on its RAM, so that took a lot of tweaking on the application level to get them to play nicer with each other.</p><p>The next server was a monitoring server that I had set up running <a href="http://www.zabbix.com/">Zabbix</a>. I had previously gotten Nagios working on it, but it was too burdensome for me to maintain. I also liked having graphing and service level alerting as well as agent based checks, both active and passive. The biggest problem with Zabbix was getting it initially set up to send alerts, so it was nice to be able to import this machine, that had a working base, than to start from scratch. LogicMonitors does pretty much everything that Zabbix does, and better, but why not have two monitoring solutions? I also set up that machine to be a centralized logging server if I ever want to install a log analyzer like <a href="http://www.splunk.com/">Splunk</a>. I set it to copy the logs to a MySQL database, and to run php-logcon, but that didn&#8217;t scale past a few thousand entries.</p><p>Next was installing a FreeBSD server to act as a centralized tool, mail environment, and storage space for myself and my friends. I love FreeBSD, the only reason I set up my other servers as Linux boxes was pure laziness on my part, which I&#8217;ll pay for later in administration time. Also, they are mostly single purpose appliances, and it&#8217;s nice to have some of the Debian style scripting for web built-in. I try to stay fairly OS agnostic, but I do have preferences.</p><p>Since my shell server would have the most exposure to the internet, so I wanted a relatively secure system. Also, I would be spending most of my time in that server, so I decided to go with the OS I love. That would also bring things full circle, as my pfSense box and Shell server are both FreeBSD.</p><p>I decided on installing FreeBSD 8.2 stable. I sliced my disks like this:</p><pre>/           512MB
swap        1GB (1x Memory)
/usr        5GB
/var        10GB (Modest space for DB and info)
/home       140GB (An egregious space for storing files)</pre><p>I installed the OS and ports, and I switched from <code>cvsup</code> to <code>csup</code> awhile ago, and updated my ports-supfile and stable-supfiles to point to a local(ish) mirror, and checked out /usr/src and /usr/ports. I then updated my kernel config (Tip: compile without debugging if you want it to fit in 512MB ) reinstalled, and rebooted. Voila! A new FreeBSD system. I&#8217;ll probably go into doing a comprehensive FreeBSD install in a later post.</p><p>I installed Postfix and Dovecot2 for local mail, Apache 2 for user directories, and migrated my users information, passwords, and home directories from my old server. Everything went surprisingly smooth. I installed Mutt for myself, Alpine for one of my users, and a few other pieces of software, and I had a fully running shell server. I was going to run <a href="http://www.powerdns.com/content/home-powerdns.html">PowerDNS</a> and PowerAdmin on one of my Linux boxes, but I decided to stick with BIND on the FreeBSD server, as it was more efficient for me to edit text files than use a web interface. Weird, I know. Now that my shell server was done, and everything was migrated, I could turn off my old FreeBSD box. I admit that I did feel a little bad as I typed <code>halt</code> into its shell for the last time. It served me well over the last four years.</p><p>Now my infrastructure migration was complete, running fully virtualized, lowering my power consumption, gaining redundancy, and boosting performance for the fraction of the cost of having physical infrastructure.</p><p>I Win!</p><p>Game Over.</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2011/12/08/infrastructure-and-other-games-part-4/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Infrastructure and Other Games, Part 2</title><link>http://blogs.iphouse.net/2011/11/21/infrastructure-and-other-games-part-2/</link> <comments>http://blogs.iphouse.net/2011/11/21/infrastructure-and-other-games-part-2/#comments</comments> <pubDate>Mon, 21 Nov 2011 19:25:43 +0000</pubDate> <dc:creator>Nick Gasper</dc:creator> <category><![CDATA[ipHouse Products]]></category> <category><![CDATA[System Administrators]]></category> <category><![CDATA[Virtual Machines]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[DNS]]></category> <category><![CDATA[Hosting]]></category> <category><![CDATA[IPv6]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[vmForge]]></category><guid isPermaLink="false">http://blogs.iphouse.net/?p=1556</guid> <description><![CDATA[Part 2: The Webcluster Last week I discussed moving my personal infrastructure into an vmForge Virtual Data Center. I discussed setting up a pfSense firewall, and getting things ready for my various projects. The first one that I wanted to tackle was setting up a load balanced webcluster. Backing up a bit, three years ago, <a href="http://blogs.iphouse.net/2011/11/21/infrastructure-and-other-games-part-2/" class="more-link">More &#62;</a>]]></description> <content:encoded><![CDATA[<h3>Part 2: The Webcluster</h3><p>Last week I discussed moving my personal infrastructure into an <a title="vmForge VDC - colocation is so 1990s" href="http://www.iphouse.com/vmforge/">vmForge Virtual Data Center</a>. I discussed setting up a <a title="Free software firewall with many features" href="http://www.pfsense.org/" target="_blank">pfSense</a> firewall, and getting things ready for my various projects. The first one that I wanted to tackle was setting up a load balanced webcluster.</p><p><span id="more-1556"></span>Backing up a bit, three years ago, I was a support tech, looking for ways to grow my knowledge base and expand my abilities. After a bit of haranguing from my boss, he suggested setting up both a web and mail cluster with the various bits of hardware lying around. The project was laid out very simply, with two machines acting as frontends, my old server acting as the share storage point, and another acting as a database server. Load balancing would be done via round-robin DNS resolution (ie multiple A records with the same name and different IPs) I mapped it out, and diagrammed, but I was not ready to implement it at the time. I wanted to know more about how Apache worked on a single server before tackling it on a cluster.</p><p>Fast forward a year and a half, and I decided to revisit the project, partly due to wanting to progress out of my support position, and partly due to the fact that I now understood <a title="Apache - the one HTTP server" href="http://www.apache.org/" target="_blank">Apache</a> and <a title="Free high performance database engine" href="http://www.mysql.com/" target="_blank">MySQL</a> a lot better. I had a <a title="VMware ESXi bare metal hypervisor - this is a link to the 'free' edition" href="http://www.vmware.com/support/product-support/vsphere-hypervisor.html" target="_blank">VMware ESXi</a> system, and had tried a few times to create a cluster with various amounts of success.</p><p>At the same time, I decided to try redoing how I set up PHP. I switched to a FCGID based Apache setup. Qualitatively, it felt faster in my testing, and it allowed me to tweak individual sites for various levels of support and resource utilization.</p><p>The final piece was the <a title="vmForge VDC - flexible and expandable virtual data center!" href="http://www.iphouse.com/vmforge/" target="_blank">VDC</a> itself. With a large NAS behind it, lots of spinning disks, and logical vApp networking, I could lay things out simply and easily the way I wanted infrastructure wise, without relying on public IP space, errant patch cables, or a stubborn old server.</p><p>The first thing I had to decide was what my layout would look like, and how big the VMs would be. I settled on two frontend machines running minimal disk for the operating system and potential disk based content caching, and a single backend machine that would be both the shared filesystem and database host. I considered installing MySQL slaves on the frontend, with the NFS/database server as the master, but none of my sites justified that amount of complexity.</p><p>The frontend machines were configured with 500 MiB of RAM and 8 GiB of disk space per. The NFS/database server was configured with 2 GiB of RAM and 128 GiB of storage.</p><p>After figuring out the layout, I had to pick what operating system to use. After some hemming and hawing, I decided on <a title="The Linux distribution that sucks less" href="http://www.ubuntu.com/" target="_blank">Ubuntu</a> 10.04 LTS instead of my beloved FreeBSD. There were a couple of reasons for this. One, I like the Debian style Apache tools. They make scripting site management much much easier. Two, there were potentially a lot of Perl and Pear packages that would need to be installed, and I prefer to handle that via apt/dpkg rather than ports. Third, and formost, I had already created an auto installing ISO, and it made installing exactly what I wanted multiple times very easy.</p><p>After installing the NFS/database server, I added MySQL and the newest nfs-kernel-server for NFS4. Why NFS4? Why not?</p><p>I laid out my filesystem to export under /var (with sensible names like /var/apache-site-config /var/www, etc) and mounted them over to /export (with accessible names like www, conf.d, sites-available)</p><p>I then installed NIS and created the various users for SUEXEC and FTP. I had some trouble with idmapd, but I figured it out (RTFM, and a couple known issues about it not starting sometimes)</p><p>After getting the NFS/database server squared away, I set up Apache on the frontend machines, mounted the NFS directories in their spots, and fired it up. It worked! I then moved my personal blog over, and decided to do some tests. Like, serious load tests.</p><p>It was abysmal.</p><p>My blog made extensive use of memory caching (via mem_cache, not memcached) The combination of memory caching, FCGID and 500 MiB of RAM was too much for the frontends. I upped them to 1 GiB per, and things were perfect. Just a little more RAM made a huge difference! I did add memcached a little later, as the WordPress plugin &#8220;W3 Supercache&#8221;, and Drupal can use it, as well as other CMS/web applications.</p><p>Now, with a working model, I went back to pfSense, and set up my load balancer. pfSense uses something called &#8220;relayd&#8221; to load balance, and that&#8217;s basically all it does, it relays the TCP connection from a virtual server, to any number of actually IPs. There&#8217;s a setting elsewhere in pfSense to have it monitor states, and send any new requests from a source with an open state to the same IP, give you some persistence (or &#8220;stickiness&#8221; as they call it); a step above round robin DNS. Unfortunately, the virtual servers only answer for one port, so I had to added two: one for 80(HTTP) and one for 443(HTTPs) and they cannot cross IP protocols, so I had to add one for IPV4 and one for IPV6. So four total virtual servers, each with a separate pool of servers. This was verbose. The other major caveat is that the virtual servers only listen on the WAN interface. After some trial and error, the easiest thing to do was to set frontend 1 to also have the same IP on the LAN interface. That way, internally, machines have access to sites on the webcluster.</p><div class="wp-caption alignright" style="width: 178px"><a href="http://blog.chronophage.net/images/chronophage_webcluster.png"><img class="  " src="http://blog.chronophage.net/images/chronophage_webcluster.png" alt="Made with LucidChart, Hooray free SaaS!" width="168" height="218" /></a><p class="wp-caption-text">A representation of my Virtual Webcluster The dotted lines represent the RFC 1918 IP addresses. (click to enlarge)</p></div><p>After getting that setup, I did some more load testing, to see how the load balancing worked.</p><p>It was abysmal.</p><p>I didn&#8217;t have enough frontends for the amount of load that I wanted to support. However, I didn&#8217;t have enough addresses to add more machines.</p><p>I did some experimentation, and discovered that relayd would relay connections to a RFC1918 address as well as a world routable one. So, I cloned my second frontend and made two more, with 172.16.0.0 addresses. It worked flawlessly, go go virtualization. IPV6 addresses, of course, were not a problem.</p><p>After adding the two frontends, things performed better, but still, the load metrics were spiky and performance was not quite where I wanted it.</p><p>I looked into things, and discovered that my FCGID threads spawned by Apache were then forking when they got too busy. After a certain amount of spontaneous forks, the frontend tapped out until other threads died. This brought the performance of the cluster way down.</p><p>Remembering Mike&#8217;s mantra fork/exec is expensive, and bad, and should be avoided, I did some digging, and I found out that the default Apache in Ubuntu, MPM-Prefork, was designed to contain all spawned processes in order to sandbox non-threadsafe modules. This allows for extra stability and security at the expense of performance. So I switched the cluster to Apache-MPM-Worker and, voila! Smooth, predictable performance. It was much, much better.</p><p>I then started porting my users&#8217; sites over, along with their databases. This involved quite a bit of config file parsing, and database dumping. mysqldump &#8211;database(s) came in handy here, as did setting up preview aliases via wildcard A records. It took about a week to move everything.</p><p>I then set up some scripts, sudo, and ssh private keys so that I could run scripts on the NFS/database server that would propagate commands to the frontends, and set up a couple of cron jobs for basic maintenance. I set up vsftpd for my users to upload and manage their content as well, and changed DNS for each of their sites.</p><p>Now I had a reasonably fast webcluster running. It seems to work well&#8230; I&#8217;m sure our webmaster will make fun of me, err, have something to say about my design and implementation choices though.</p><p>Now it was time to tackle one of my least favorite things. Email. Finicky, finicky, email.</p><p>Next week: The Mail Cluster.</p> ]]></content:encoded> <wfw:commentRss>http://blogs.iphouse.net/2011/11/21/infrastructure-and-other-games-part-2/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/

Minified using memcached
Page Caching using memcached
Database Caching 1/21 queries in 0.021 seconds using memcached
Object Caching 723/757 objects using memcached

Served from: blogs.iphouse.net @ 2012-02-07 06:49:23 -->
