<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Sam's Blog [doesn't have a clever name]</title>
  <id>tag:sampohlenz.com,2008:mephisto/blog</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://sampohlenz.com/feed/blog/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://sampohlenz.com/blog" rel="alternate" type="text/html"/>
  <updated>2008-05-16T20:27:37Z</updated>
  <entry xml:base="http://sampohlenz.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:sampohlenz.com,2008-05-15:8</id>
    <published>2008-05-15T21:21:00Z</published>
    <updated>2008-05-16T20:27:37Z</updated>
    <category term="Blog"/>
    <link href="http://sampohlenz.com/2008/5/15/rails-deployment-checklist" rel="alternate" type="text/html"/>
    <title>Rails deployment checklist</title>
<summary type="html">&lt;p&gt;At Good Dog Design, we manage a number of servers for our clients, and are frequently adding new ones. Whilst this process should really be scripted, until we do, this checklist should help cut a lot of the time that goes into setting up a new server.&lt;/p&gt;


	&lt;p&gt;These checklists are somewhat debian specific as we mainly run debian and ubuntu servers (on &lt;a href=&quot;http://slicehost.com&quot;&gt;Slicehost&lt;/a&gt; if you&#8217;re curious), but many of the points can easily be adapted for your distro of choice.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;At Good Dog Design, we manage a number of servers for our clients, and are frequently adding new ones. Whilst this process should really be scripted, until we do, this checklist should help cut a lot of the time that goes into setting up a new server.&lt;/p&gt;


	&lt;p&gt;These checklists are somewhat debian specific as we mainly run debian and ubuntu servers (on &lt;a href=&quot;http://slicehost.com&quot;&gt;Slicehost&lt;/a&gt; if you&#8217;re curious), but many of the points can easily be adapted for your distro of choice.&lt;/p&gt;
&lt;p&gt;At Good Dog Design, we manage a number of servers for our clients, and are frequently adding new ones. Whilst this process should really be scripted, until we do, this checklist should help cut a lot of the time that goes into setting up a new server.&lt;/p&gt;


	&lt;p&gt;These checklists are somewhat debian specific as we mainly run debian and ubuntu servers (on &lt;a href=&quot;http://slicehost.com&quot;&gt;Slicehost&lt;/a&gt; if you&#8217;re curious), but many of the points can easily be adapted for your distro of choice.&lt;/p&gt;


	&lt;h3&gt;Core server setup&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Reset root password&lt;/li&gt;
		&lt;li&gt;Add a normal privilege (non-root) user &lt;code&gt;sudo adduser {username}&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Add this user to sudoers &lt;code&gt;visudo&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Login with this user&lt;/li&gt;
		&lt;li&gt;Ensure all relevant security/update repositories are present in &lt;code&gt;/etc/apt/sources.list&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Ensure all packages are up to date &lt;code&gt;sudo apt-get update; sudo apt-get upgrade&lt;/code&gt;. If any packages are kept back, install them individually &lt;code&gt;sudo apt-get install {package-names}&lt;/code&gt;.&lt;/li&gt;
		&lt;li&gt;Install and configure a firewall &lt;code&gt;sudo apt-get install shorewall&lt;/code&gt; (see configuration at &lt;a href=&quot;http://blog.matid.net/2007/2/1/securing-your-ubuntu-server&quot;&gt;http://blog.matid.net/2007/2/1/securing-your-ubuntu-server&lt;/a&gt; [default config is located at &lt;code&gt;/usr/share/doc/shorewall-common/default-config/&lt;/code&gt;]&lt;/li&gt;
		&lt;li&gt;Install essential build tools &lt;code&gt;sudo apt-get install build-essential&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Services setup&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Install git &lt;code&gt;sudo apt-get install git-core&lt;/code&gt; or subversion &lt;code&gt;sudo apt-get install subversion&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install ruby &lt;code&gt;sudo apt-get install ruby irb ri rdoc ruby1.8-dev libopenssl-ruby&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install rubygems from &lt;a href=&quot;http://rubyforge.org/frs/?group_id=126&quot;&gt;http://rubyforge.org/frs/?group_id=126&lt;/a&gt; (don&#8217;t use apt-get)&lt;/li&gt;
		&lt;li&gt;Link gem to gem1.8 &lt;code&gt;sudo ln -s /usr/bin/gem1.8 /usr/bin/gem&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install relevant gems &lt;code&gt;sudo gem install rails mongrel mongrel_cluster&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install postfix &lt;code&gt;sudo apt-get install postfix&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install mysql &lt;code&gt;sudo apt-get install mysql-server mysql-client libmysql-ruby1.8&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Create a production database and user&lt;/li&gt;
		&lt;li&gt;Install memcache &lt;code&gt;sudo apt-get install memcached; sudo gem install memcache-client&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install apache &lt;code&gt;sudo apt-get install apache2 apache2.2-common apache2-mpm-prefork apache2-utils ssl-cert&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Enable apache modules &lt;code&gt;sudo a2enmod proxy_balancer; sudo a2enmod proxy_http; sudo a2enmod rewrite; sudo a2enmod deflate&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Create an apache host config file in &lt;code&gt;/etc/apache2/sites-available&lt;/code&gt; and enable it &lt;code&gt;sudo a2ensite {sitename}&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Create a deploy group &lt;code&gt;sudo groupadd deploy&lt;/code&gt; and add any users to this group (&lt;code&gt;sudo adduser {user} deploy&lt;/code&gt;)&lt;/li&gt;
		&lt;li&gt;Create a folder for the project &lt;code&gt;sudo mkdir /var/www/project-url.com; sudo chown {me}:deploy /var/www/project-url.com&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Create a mongrel user and group &lt;code&gt;sudo useradd mongrel&lt;/code&gt; (don&#8217;t set a password for this user)&lt;/li&gt;
		&lt;li&gt;Install and configure monit &lt;code&gt;sudo apt-get install monit&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Rails setup&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Capify rails project &lt;code&gt;capify .&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install and configure the ExceptionNotifier plugin&lt;/li&gt;
		&lt;li&gt;Install any app-specific gems&lt;/li&gt;
		&lt;li&gt;Setup capistrano folder structure &lt;code&gt;cap deploy:setup&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Cold deploy &lt;code&gt;cap deploy:cold&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Ensure mongrels are running and site is accessible&lt;/li&gt;
		&lt;li&gt;Test regular deploys &lt;code&gt;cap deploy&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Setup any necessary cronjobs (I generally put them into an individual project file in &lt;code&gt;/etc/cron.d/&lt;/code&gt;)&lt;/li&gt;
		&lt;li&gt;Set up log rotation&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://sampohlenz.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:sampohlenz.com,2008-04-29:7</id>
    <published>2008-04-29T19:23:00Z</published>
    <updated>2008-04-29T19:28:07Z</updated>
    <category term="Blog"/>
    <link href="http://sampohlenz.com/2008/4/29/that-new-blog-smell" rel="alternate" type="text/html"/>
    <title>That new blog smell</title>
<content type="html">
            &lt;p&gt;After a long time away from the keyboard (so to speak), its about time I started blogging again!&lt;/p&gt;


	&lt;p&gt;Since I last blogged, I&#8217;ve completed my honours degree in Computer Science at the University of Adelaide and am now working for &lt;a href=&quot;http://www.gooddogdesign.com/&quot;&gt;Good Dog Design&lt;/a&gt; in Mill Valley (about 15-20 minutes drive north of San Francisco).&lt;/p&gt;


	&lt;p&gt;This site is under development at the moment but it should be up and running very soon. My intentions are to blog about web dev related topics (Ruby, Javascript, etc.) and whatever else takes my fancy.&lt;/p&gt;


	&lt;p&gt;Enjoy.&lt;/p&gt;
          </content>  </entry>
</feed>
