<?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>deprec</title>
	<atom:link href="http://deprec.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://deprec.org</link>
	<description>deployment recipes for Capistrano</description>
	<lastBuildDate>Thu, 28 Jul 2011 07:31:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Rake</title>
		<link>http://deprec.org/recipes/rake/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rake</link>
		<comments>http://deprec.org/recipes/rake/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 15:25:59 +0000</pubDate>
		<dc:creator>Mike Bailey</dc:creator>
				<category><![CDATA[Announce]]></category>

		<guid isPermaLink="false">http://deprec.org/?p=457</guid>
		<description><![CDATA[I woke up this morning with a great idea. What if deprec could include rake tasks as well as cap tasks? This would be handy when working on your dev box as you could run tasks the same tasks locally (with Rake) that you can run on remote servers with Capistrano. It would also allow [...]]]></description>
			<content:encoded><![CDATA[<p>I woke up this morning with a great idea. What if deprec could include rake tasks as well as cap tasks?</p>
<p>This would be handy when working on your dev box as you could run tasks the same tasks locally (with Rake) that you can run on remote servers with Capistrano.</p>
<p>It would also allow us to simplify many cap tasks. They would simply call rake tasks with the same name.</p>
<p>I actually <a href="http://mike.bailey.net.au/2007/10/capistrano-and-rake/" target="_blank">envisaged this almost four years ago </a>but the sticking point was how to distribute and maintain the rake tasks on remote servers. </p>
<p>Bundler is the final piece that makes it all incredibly simple.</p>
<p>Check this out!</p>
<pre><code># Gemfile

gem 'deprec', '>=3.1.0.rc13'</code></pre>
<p>Simply run &#8216;bundle&#8217; and that&#8217;s all you need to have deprec&#8217;s rake tasks available to you.</p>
<pre><code>$ rake -T deprec:db

rake deprec:db:backup # Backup the database to a file.

rake deprec:db:restore # Restore database [pending]</code></pre>
<p>The same task is also available as a cap task! &#8216;cap deprec:db:backup&#8217;</p>
<pre><code>$ cap -T deprec:db

cap deprec:db:activate   # Enable startup script for db server
cap deprec:db:backup     # Backup data for db server
cap deprec:db:config     # Deploy configuration files(s) for db server
cap deprec:db:config_gen # Generate config file(s) for db server
cap deprec:db:deactivate # Disable startup script for db server
cap deprec:db:install    # Install Db server
cap deprec:db:restart    # Stop db server
cap deprec:db:restore    # Restore data for db server from backup
cap deprec:db:start      # Start db server
cap deprec:db:stop       # Stop db server</code></pre>
<p>Thanks to Craig Ambrose for the database backup task.</p>
<p>Expect to see more tasks becoming available on http://deprec.org</p>
]]></content:encoded>
			<wfw:commentRss>http://deprec.org/recipes/rake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails Stack</title>
		<link>http://deprec.org/recipes/ruby-on-rails-stack/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ruby-on-rails-stack</link>
		<comments>http://deprec.org/recipes/ruby-on-rails-stack/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 10:27:55 +0000</pubDate>
		<dc:creator>Mike Bailey</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://deprec.org/?p=417</guid>
		<description><![CDATA[While deprec was originally created for this purpose, installing a Ruby On Rails stack has become a helluva lot easier since Phusion Passenger came on the scene. I still find it convenient to use a couple of standard deprec tasks to install a Ruby on Rails stack though. $ cap deprec:rack:install_stack $ cap deprec:db:install If you [...]]]></description>
			<content:encoded><![CDATA[<p>While deprec was originally created for this purpose, installing a Ruby On Rails stack has become a helluva lot easier since <a href="http://www.modrails.com/">Phusion Passenger</a> came on the scene. I still find it convenient to use a couple of standard deprec tasks to install a Ruby on Rails stack though.</p>
<pre><code>$ cap deprec:rack:install_stack
$ cap deprec:db:install</code></pre>
<p>If you get the error <em>&#8220;the task `deprec:rack:install_stack&#8217; does not exist&#8221;</em> it&#8217;s probably because you have required &#8216;deprec_minus_rails&#8217; instead of &#8216;deprec&#8217;.</p>
<blockquote><p><em><strong>deprec:rack namespace</strong></em><br />
deprec&#8217;s rails recipes are in the process of being simplified. To preserve backward compatibility for existing deprec users and acknowledging the awesomeness that is <a href="http://rack.rubyforge.org/" target="_blank">Rack</a> I&#8217;m doing all the new stuff in the new <strong>deprec:rack</strong> namespace. deprec:rails:install_stack now points at the task in deprec:rack</p></blockquote>
<p><strong>deprec:rails:install_stack</strong> calls the following tasks defined in recipes/rails.rb</p>
<p><script src="https://gist.github.com/1047508.js?file=gistfile1.rb"></script> deprec sets default for the ruby interpreter, webserver, app server and database. You can override them by setting them again in your deploy.rb (or elsewhere). <script src="https://gist.github.com/1047509.js?file=gistfile1.rb"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://deprec.org/recipes/ruby-on-rails-stack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby</title>
		<link>http://deprec.org/recipes/ruby/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ruby</link>
		<comments>http://deprec.org/recipes/ruby/#comments</comments>
		<pubDate>Wed, 25 May 2011 13:59:07 +0000</pubDate>
		<dc:creator>Mike Bailey</dc:creator>
				<category><![CDATA[languages]]></category>

		<guid isPermaLink="false">http://deprec.org/?p=287</guid>
		<description><![CDATA[Use deprec to install your choice or Ruby Enterprise Edition or MRI (version 1.8.x or 1.9.x) along with Rubygems.]]></description>
			<content:encoded><![CDATA[<p>While Ubuntu ships with Ruby, it&#8217;s such a fast moving target that the packages date quickly. Installing an <a href="http://www.rubyenterpriseedition.com/" target="_blank">REE</a> deb package with deprec is the quickest way to get more up to date. It&#8217;s the default version installed when you call the generic command:</p>
<pre><code>cap deprec:ruby:install HOSTS=lucid</code></pre>
<h3>Install Ruby Enterprise Edition</h3>
<p>My current preferred option is to install Phusion&#8217;s deb package. It&#8217;s Ruby 1.8.7 with some improvements to get better memory usage.</p>
<pre><code>$ cap deprec:ree:install HOSTS=lucid
    triggering load callbacks
  * executing `deprec:connect_canonical_tasks'
  * executing `deprec:ree:install'
1. ree_lucid32
2. ree_src
3. ree_lucid
?  3</code></pre>
<blockquote><p><em><strong>Advanced Tip</strong></em></p>
<p>You can avoid being prompted by setting :ree_src_package to one of the listed values.</p>
<pre><code>set :ree_src_package, 'ree_lucid'</code></pre>
</blockquote>
<h3>Install MRI Ruby</h3>
<p>If you&#8217;re after Ruby 1.9.x or just like waiting for things to compile then install the &#8220;official&#8221; version.</p>
<pre><code>$ cap deprec:mri:install HOSTS=lucid
    triggering load callbacks
  * executing `deprec:connect_canonical_tasks'
  * executing `deprec:mri:install'
1. mri_1_8_7
2. mri_1_9_2
?  2</code></pre>
<blockquote><p><em><strong>Advanced Tip</strong></em></p>
<p>You can avoid bring prompted by setting :mri_src_package to one of the listed values.</p>
<pre><code>set :mri_src_package, 'mri_1_9_2'</code></pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://deprec.org/recipes/ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Network</title>
		<link>http://deprec.org/recipes/network/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=network</link>
		<comments>http://deprec.org/recipes/network/#comments</comments>
		<pubDate>Wed, 25 May 2011 13:50:51 +0000</pubDate>
		<dc:creator>Mike Bailey</dc:creator>
				<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://deprec.org/?p=282</guid>
		<description><![CDATA[These recipes makes updating the hostname and networking details of a newly spun up virtual machine a breeze.]]></description>
			<content:encoded><![CDATA[<p>When I spin up <a href="http://mike.bailey.net.au/2011/05/hosthome-choose-a-virtualization-platform/" target="_blank">new virtual machines</a> in the lab they come into the world with the same IP (.69) and the hostname of &#8216;template&#8217;. The following recipe makes updating the hostname and networking details a breeze. If the my workstation can resolve the new hostname to an IP (DNS or /etc/hosts) deprec will make sensible suggestions for network addresses.</p>
<pre><code>$ cap deprec:network:config HOSTS=lucid
    triggering load callbacks
  * executing `deprec:connect_canonical_tasks'
  * executing `deprec:network:config'
  * executing `deprec:network:hostname'
Enter the hostname for the server
lucid2
&lt;...lines removed for clarity...&gt;
Number of network interfaces  |1|

address  |192.168.56.105|

netmask  |255.255.255.0|

broadcast  |192.168.56.255|

default gateway  |192.168.56.1|

&lt;...lines removed for clarity...&gt;

About to restart networking on lucid
Are you 'down with that'?  |y|
y
  * executing "sudo -p 'sudo password: ' /etc/init.d/networking restart"
    servers: ["lucid"]
    [lucid] executing command
 ** [out :: lucid] * Reconfiguring network interfaces...
 ** [out :: lucid]</code></pre>
<blockquote><p><em><strong>Advanced Tip</strong></em><br />
I set the following in ~/.caprc so I don&#8217;t get prompted for DNS servers and search path.</p>
<pre><code>set :network_dns_nameservers, '192.231.203.132 192.231.203.3'
set :network_dns_search_path, 'failmode.com'</code></pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://deprec.org/recipes/network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH</title>
		<link>http://deprec.org/recipes/ssh/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ssh</link>
		<comments>http://deprec.org/recipes/ssh/#comments</comments>
		<pubDate>Wed, 25 May 2011 13:38:05 +0000</pubDate>
		<dc:creator>Mike Bailey</dc:creator>
				<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://deprec.org/?p=278</guid>
		<description><![CDATA[You want to disable password based access to servers so you need a painless way to manage users ssh pubkeys. These recipes help you do both.]]></description>
			<content:encoded><![CDATA[<p>You want to disable password based access to servers so you need a painless way to manage users ssh pubkeys. These recipes help you do both.</p>
<h3>Setup a user&#8217;s SSH public keys</h3>
<p>If you&#8217;re setting up keys for yourself  you can just hit enter. deprec looks in your homedir for your public key.</p>
<p>If you&#8217;re pushing out keys for another user, deprec looks for their key and alerts you if it can&#8217;t be found.</p>
<pre><code>$ cap deprec:ssh:setup_keys HOSTS=lucid
    triggering load callbacks
  * executing `deprec:connect_canonical_tasks'
  * executing `deprec:ssh:setup_keys'
Setup keys for which user?  |mbailey|
fred

          Could not find ssh public key(s) for user fred

          Please create file containing ssh public keys in:

          config/ssh/authorized_keys/fred</code></pre>
<h3>Push out some smarter SSH configs</h3>
<p>While you *could* just push out my version of <em>sshd_config</em> without reading through it that would be placing blind faith in me and rubygems.org. We&#8217;re going to generate the configs locally and then push them out instead</p>
<h3>Generate a copy of SSH configs to keep under source control</h3>
<pre><code>$ cap deprec:ssh:config_gen
    triggering load callbacks
  * executing `deprec:connect_canonical_tasks'
  * executing `deprec:ssh:config_gen'

File exists (config/ssh/etc/ssh/sshd_config).
    Overwrite? ([y]es, [n]o, [d]iff)  |n|
y
[done] config/ssh/etc/ssh/sshd_config written
[skip] Identical file exists (config/ssh/etc/ssh/ssh_config).</code></pre>
<h3>Finally push out some smarter SSH configs</h3>
<p>deprec&#8217;s :config tasks always push out local copies of config files in preference to generating them.</p>
<pre><code>cap deprec:ssh:config HOSTS=lucid</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://deprec.org/recipes/ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Users</title>
		<link>http://deprec.org/recipes/users/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=users</link>
		<comments>http://deprec.org/recipes/users/#comments</comments>
		<pubDate>Wed, 25 May 2011 13:34:25 +0000</pubDate>
		<dc:creator>Mike Bailey</dc:creator>
				<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://deprec.org/?p=274</guid>
		<description><![CDATA[Create user accounts on remote servers complete with public key access and sudo access if desired. ]]></description>
			<content:encoded><![CDATA[<p>Create user accounts on remote servers complete with public key access and sudo access if desired. This is handy when you&#8217;re given the root account of a new VPS and want to create an account for yourself. It&#8217;s also great for adding a new user to multiple accounts in parallel.</p>
<h3>Change root password</h3>
<p>I run this when I&#8217;m given the root account of a new VPS.</p>
<pre><code>$ cap deprec:users:passwd HOSTS=lucid1 USER=root
triggering load callbacks
* executing `deprec:connect_canonical_tasks'
* executing `deprec:users:passwd'
Enter userid |root|
Enter new password for root ********</code></pre>
<h3>Create a new user account</h3>
<pre><code>$ cap deprec:users:add HOSTS=lucid
triggering load callbacks
* executing `deprec:connect_canonical_tasks'
* executing `deprec:users:add'
Enter userid |mbailey|
Should this be an admin account? |no|
yes
Enter new password for mbailey ********
Re-enter new password for mbailey ********</code></pre>
<h3>Change other user&#8217;s password</h3>
<p>This can be a lot quicker than SSH&#8217;ing into a number of hosts to change a user&#8217;s password.</p>
<pre><code>$ cap deprec:users:passwd HOSTS=lucid1,lucid2,lucid3,lucid4
triggering load callbacks
* executing `deprec:connect_canonical_tasks'
* executing `deprec:users:passwd'
Enter userid |mbailey|
Enter new password for mbailey ********</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://deprec.org/recipes/users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios</title>
		<link>http://deprec.org/recipes/nagios/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nagios</link>
		<comments>http://deprec.org/recipes/nagios/#comments</comments>
		<pubDate>Wed, 25 May 2011 13:12:55 +0000</pubDate>
		<dc:creator>Mike Bailey</dc:creator>
				<category><![CDATA[monitoring]]></category>

		<guid isPermaLink="false">http://deprec.org/?p=260</guid>
		<description><![CDATA[Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.
]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.</strong></p>
<p><a href="http://www.nagios.org/about/history/">First launched</a> in 1999, Nagios has grown to include <a href="http://www.nagios.org/projects/">thousands of projects</a> developed by the <a href="http://www.nagios.org/about/community/">worldwide Nagios community</a>. Nagios is officially sponsored by <a href="http://www.nagios.com/">Nagios Enterprises</a>, which <a href="http://www.nagios.com/about/community/">supports the community</a> in a number of different ways through sales of its commercial <a href="http://www.nagios.com/products/">products</a> and <a href="http://www.nagios.com/services/">services</a>.</p>
<p><a href="http://www.nagios.org/about">http://www.nagios.org/about</a></p></blockquote>
<p>&nbsp;</p>
<p><em>For each command, append HOSTS=target.host.name</em></p>
<h3><code>Install Nagios server</code></h3>
<pre><code>cap deprec:nagios:install
cap deprec:nagios:gen_host # One way to add hosts to monitor
cap deprec:nagios:config</code></pre>
<h3><span style="font-family: monospace;">Configure clients to accept requests</span></h3>
<pre><code>cap deprec:nrpe:install
cap deprec:nrpe:test_local  # does nrpe query from local host
cap deprec:nrpe:test_remote # does nrpe query from nagios server</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://deprec.org/recipes/nagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

