<?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>Shaping Clouds &#187; How To Articles About Web Application Deployment</title>
	<atom:link href="http://shapingclouds.com/category/how-to/how-to-articles-on-web-application-deployment/feed/" rel="self" type="application/rss+xml" />
	<link>http://shapingclouds.com</link>
	<description>A blog on developing, deploying and maintaining web applications at Firmhouse</description>
	<lastBuildDate>Tue, 18 May 2010 18:20:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Why your first deploy should be on Heroku</title>
		<link>http://shapingclouds.com/2010/03/29/why-your-first-deploy-should-be-on-heroku/</link>
		<comments>http://shapingclouds.com/2010/03/29/why-your-first-deploy-should-be-on-heroku/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 19:04:10 +0000</pubDate>
		<dc:creator>Michiel</dc:creator>
				<category><![CDATA[How To Articles About Web Application Deployment]]></category>

		<guid isPermaLink="false">http://shapingclouds.com/?p=507</guid>
		<description><![CDATA[I started using Heroku three weeks ago since @_micho from teambox.com recommended it to me. He told me they had a free app tier with some basic functionality and you can upgrade if you need more power or other functionality. I&#8217;ve been testing it for deploying several development and staging apps the last two weeks and [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://shapingclouds.com/2010/03/29/why-your-first-deploy-should-be-on-heroku/" title="Permanent link to Why your first deploy should be on Heroku"><img class="post_image aligncenter" src="http://shapingclouds.com/wp-content/uploads/Schermafbeelding-2010-04-16-om-00.37.07.png" width="600" height="178" alt="Post image for Why your first deploy should be on Heroku" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fshapingclouds.com%2F2010%2F03%2F29%2Fwhy-your-first-deploy-should-be-on-heroku%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fshapingclouds.com%2F2010%2F03%2F29%2Fwhy-your-first-deploy-should-be-on-heroku%2F&amp;source=shapingclouds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I started using <a href="http://heroku.com">Heroku</a> three weeks ago since @<a href="http://twitter.com/_micho">_micho</a> from <a href="http://teambox.com">teambox.com</a> recommended it to me. He told me they had a free app tier with some basic functionality and you can upgrade if you need more power or other functionality.</p>
<p>I&#8217;ve been testing it for deploying several development and staging apps the last two weeks and <a title="Everyday Feed - a better way of reading feeds" href="http://everydayfeed.net">Everyday Feed</a> already runs on it in a production-kind-of way. I&#8217;ve come to a conclusion: <strong>always deploy your first deployment on Heroku</strong>.</p>
<p>So, why is this?</p>
<ol>
<li>Because Heroku is an app-based deployment service instead of an instance or server-based deployment service you can<strong> focus on the application and making it work, without having to worry about server installations</strong>, best deployment settings, software etc. You deploy your app on Heroku so you can fix your app, and not waste time on fixing your server.</li>
<li>Heroku is totally Git-based so it will <strong>force you have a good Git-workflow right away</strong>, from the start of your first deploy. One of the advantages of using Git is of course that your code is in version management and you can easily manage various feature sets and rollback to previous deployments, but it&#8217;ll also help you right away when you get more team members.</li>
<li>Heroku forces you to c<strong>onfigure all your things that run around your app, like cronjobs, sending email, doing queuing and caching</strong>. Because Heroku forces you to work in a very automated and modular way you&#8217;ll never mess up your app&#8217;s code with external things. This make sure you configure everything nicely in external files or in the Heroku admin panel so you never hardcode things in your code.</li>
<li><strong>Heroku is free</strong>. Well at least the first database package they have (up to 5MB). I like this from a business point-of-view because you can also scope what you spend on Heroku with your income of the app. I have a simpel rule with <a href="http://everydayfeed.net">Everyday Feed</a>: I will not upgrade Heroku until the application has some users or advertisers that are paying. This way I make sure people want to pay for the core functionality and add extra features from there, when I can buy more power at Heroku.</li>
</ol>
<p><span id="more-507"></span></p>
<p>When you have your application up-and-running on Heroku, it is probably a very clean application with all configuration outside the application logic. This means you should easily be able to migrate to another server or your own <a href="http://engineyard.com">EngineYard Cloud</a> or <a href="http://aws.amazon.com/ec2">EC2</a> load-balanced cloud environment because your app is not tied to a hardcoded server configuration.</p>
<p>When you move away, you can even keep using Heroku&#8217;s add-ons because they have a lot of partnerships with external services like <a href="http://newrelic.com/">New Relic</a> and <a href="http://sendgrid.com/">SendGrid</a> when you move away.</p>
<p>Of course, you can also<strong> just stick with </strong><a href="http://heroku.com"><strong>Heroku</strong></a> because from what I&#8217;ve heard they provide excellent application hosting for all your needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://shapingclouds.com/2010/03/29/why-your-first-deploy-should-be-on-heroku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrum in Firmhouse walktrough</title>
		<link>http://shapingclouds.com/2010/02/06/scrum-in-firmhouse-walktrough/</link>
		<comments>http://shapingclouds.com/2010/02/06/scrum-in-firmhouse-walktrough/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 23:38:32 +0000</pubDate>
		<dc:creator>Michiel</dc:creator>
				<category><![CDATA[How To Articles About Web Application Deployment]]></category>

		<guid isPermaLink="false">http://shapingclouds.com/?p=467</guid>
		<description><![CDATA[I just wanted to share with you this presentation I created yesterday to communicate to other people and ourselves on how we use Scrum in Firmhouse. This is a first set of tools I&#8217;m creating for ourselves to get going with Scrum to create our products. But it can be a good piece of information [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fshapingclouds.com%2F2010%2F02%2F06%2Fscrum-in-firmhouse-walktrough%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fshapingclouds.com%2F2010%2F02%2F06%2Fscrum-in-firmhouse-walktrough%2F&amp;source=shapingclouds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I just wanted to share with you this presentation I created yesterday to communicate to other people and ourselves on how we use Scrum in Firmhouse. This is a first set of tools I&#8217;m creating for ourselves to get going with Scrum to create our products. But it can be a good piece of information for you too. The slides are great to keep as a reference on what kind of meetings you are going to have and what you need to discuss in them.</p>
<p>Expect more detailed Scrum and Agile Development stuff in the near future. We&#8217;re getting to an awesome workflow here. In the mean time, read 37signals <a href="http://37signals.com/svn/posts/2099-2010-the-year-of-the-products-a-new-way-of-working">excellent post about how they are going to approach development</a> of new features in their products.</p>
<p>Here are the slides via SlideShare embed:</p>
<div style="width:425px;text-align:left" id="__ss_3083946"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/msikkes/scrum-at-firmhouse" title="Scrum At Firmhouse">Scrum At Firmhouse</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=scrumatfirmhouse-100205172349-phpapp01&#038;rel=0&#038;stripped_title=scrum-at-firmhouse" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=scrumatfirmhouse-100205172349-phpapp01&#038;rel=0&#038;stripped_title=scrum-at-firmhouse" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/msikkes">Michiel Sikkes</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://shapingclouds.com/2010/02/06/scrum-in-firmhouse-walktrough/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Some Security with a Self-Signed SSL Certificate to Your Rails App Served by Nginx</title>
		<link>http://shapingclouds.com/2010/01/02/how-to-add-some-security-with-a-self-signed-ssl-certificate-to-your-rails-app-running-on-nginx/</link>
		<comments>http://shapingclouds.com/2010/01/02/how-to-add-some-security-with-a-self-signed-ssl-certificate-to-your-rails-app-running-on-nginx/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 20:59:16 +0000</pubDate>
		<dc:creator>Michiel</dc:creator>
				<category><![CDATA[How To Articles]]></category>
		<category><![CDATA[How To Articles About Web Application Deployment]]></category>

		<guid isPermaLink="false">http://shapingclouds.com/?p=399</guid>
		<description><![CDATA[At Firmhouse, we are working on a new web service and we&#8217;re releasing an in-development demo to everyone who is interested. Normally, in demo apps security is less the case and there is always some disclaimer that says you shouldn&#8217;t use real production data like passwords and API keys. In my opinion, this sucks because [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fshapingclouds.com%2F2010%2F01%2F02%2Fhow-to-add-some-security-with-a-self-signed-ssl-certificate-to-your-rails-app-running-on-nginx%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fshapingclouds.com%2F2010%2F01%2F02%2Fhow-to-add-some-security-with-a-self-signed-ssl-certificate-to-your-rails-app-running-on-nginx%2F&amp;source=shapingclouds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>At <a href="http://firmhouse.com">Firmhouse</a>, we are working on a new web service and we&#8217;re releasing an in-development demo to everyone who is interested. Normally, in demo apps security is less the case and there is always some disclaimer that says you shouldn&#8217;t use real production data like passwords and API keys. In my opinion, this sucks because you allways want to use your real-life data to test a demo and see if it&#8217;s useful for you specifically. That&#8217;s why, the best way to have some security in your demo app is by using a self-signed SSL certificate to secure passwords and other sensitive account information your demo users will be adding.</p>
<p>For our web app, we use <a href="http://rubyonrails.org">Ruby on Rails</a> running on <a href="http://modrails.com">Phusion Passenger</a>, served by <a href="http://nginx.net">Nginx</a>.</p>
<p>This blog post will guide you trough the process of adding a self-signed SSL certificate to your Rails app, running on Phusion Passenger and Nginx by following these steps:</p>
<ol>
<li>Generating the required SSL key and certificate files for use with nginx.</li>
<li>Recompiling the nginx server through the <strong>passenger-install-nginx-module </strong>command.</li>
<li>Configuring your web app in nginx to redirect non-secure connections to the secure address of the app with https:// and make sure www. will get redirected on both versions as well.</li>
</ol>
<ul></ul>
<p>I use a few other blog posts in this article, so I would like to thank the authors for providing the information publicly and freely.</p>
<p>Ok, now let&#8217;s start:</p>
<p><span id="more-399"></span></p>
<h2>1. Generating the required SSL key and certificate files</h2>
<p>This step is largely taken from the Slicehost Articles: <a href="http://articles.slicehost.com/2007/12/19/ubuntu-gutsy-self-signed-ssl-certificates-and-nginx">http://articles.slicehost.com/2007/12/19/ubuntu-gutsy-self-signed-ssl-certificates-and-nginx</a>.</p>
<p>First of all, generate an SSL private key to sign your certificate with:</p>
<pre><code>openssl genrsa -des3 -out myssl.key 1024</code></pre>
<p>And enter a passphrase for the key which we will remove later on.</p>
<p>Now, we need to generate a Certificate Signing Request:</p>
<pre><code>openssl req -new -key myssl.key -out myssl.csr</code></pre>
<p>This command will ask you various questions. Fill them as you see fit. You can skip the extra attributes by just pressing enter when asked.</p>
<p>Now, we are going to remove the passphrase from your key by making a copy and then generating it back to the original file without entering a passphrase. You can do this with the following commands:</p>
<pre><code>cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
rm myssl.key.org</code></pre>
<p>We now have a key file, and a csr file. We can use these to generate the actual SSL certificate with the following command:</p>
<pre><code>openssl x509 -req -days 365 -in myssl.csr -signkey myssl.key -out myssl.crt</code></pre>
<p>We should now move these files to the SSL configuration directory on your host. On Ubuntu, this is /etc/ssl/certs and /etc/ssl/private. Do this with the following commands (assuming you use sudo):</p>
<pre><code>sudo cp myssl.crt /etc/ssl/certs/
sudo cp myssl.key /etc/ssl/private/</code></pre>
<p>All required SSL key and certificate files are in place so we can continue with the next section: preparing nginx to be SSL-enabled with the <strong>passenger-install-nginx-module</strong> command.</p>
<h2>2. Recompiling the nginx server with the passenger-install-nginx-module command</h2>
<p>By default, the passenger-install-nginx-module command does not enable the SSL compile option in the default installation steps. Here&#8217;s how to use the custom build step to configure nginx with SSL.</p>
<p>First of all, be sure you already have nginx installed with the passenger-install-nginx-module command because this will have downloaded the nginx source code in /tmp, which you will need to enter in the custom build steps. If you haven&#8217;t already done this, run:</p>
<pre><code>sudo passenger-install-nginx-module</code></pre>
<p>Press enter after you&#8217;ve read the introduction message and choose step one &#8220;Yes: download, compile and install Nginx for me&#8221; by pressing `1&#8242;. (recommended) when the installer asks for the install options.</p>
<p>After nginx has been compiled and installed you can now run the</p>
<pre><code>sudo passenger-install-nginx-module</code></pre>
<p>command again. Press enter after you&#8217;ve read the introduction message and choose step two &#8220;No: I want to customize my Nginx installation. (for advanced users)&#8221; by pressing `2&#8242;.</p>
<p>You are now asked for the directory of the Nginx source code. The recommended installer step should have downloaded and extracted the source code in /tmp/nginx-x.x.xx. At the time of writing, this was <code>/tmp/nginx-0.7.64</code>. So enter:</p>
<pre><code>Where is your Nginx source code located?

Please specify the directory: /tmp/nginx-0.7.64</code></pre>
<p>And press `Enter&#8217;.</p>
<p>The next question will ask you where you want to install Nginx to. The default is /opt/nginx. To leave it this way (I recommend this), just press `Enter&#8217; again.</p>
<p>Now the installer will ask your for extra Nginx configure options as shown in the following screenshot.</p>
<p><a href="http://shapingclouds.com/wp-content/uploads/Schermafbeelding-2010-01-02-om-21.24.02.png"><img class="aligncenter size-full wp-image-404" title="Nginx configuration script to configure extra compile options" src="http://shapingclouds.com/wp-content/uploads/Schermafbeelding-2010-01-02-om-21.24.02.png" alt="Terminal screenshot of Nginx configuration script" width="521" height="181" /></a></p>
<p>Here you should add the <code>--with-http_ssl_module</code> argument which will make sure the configure script will enable the Nginx HTTP SSL module for compilation.</p>
<pre><code>Extra arguments to pass to configure script: --with-http_ssl_module</code></pre>
<p>The script will ask you for a confirmation if you really would like to modify the configure arguments. And yes, you would like to so press `Enter&#8217; to confirm.</p>
<p>The script will now start to configure, compile and install Nginx in /opt/nginx.</p>
<p>Wait a few seconds or minutes for it to finish and continue to the next section: configuring Nginx to use the SSL certificate and create a secure connection for your Rails application.</p>
<h2>3. Configure your Nginx to use the SSL certificate to secure the connection to your application</h2>
<p>First of all, we will need to add a server block to the Nginx configuration so your application will listen on port 443 and use Phusion Passenger for serving your app. Open <code>/opt/nginx/conf/nginx.conf</code> and add the following block below everything else:</p>
<pre><code>server {
    listen 443;
    ssl on;
    ssl_certificate /etc/ssl/certs/myssl.crt;
    ssl_certificate_key /etc/ssl/private/myssl.key;
    ssl_session_timeout 5m;
    ssl_protocols SSLv2 SSLv3 TLSv1;
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

    server_name yourdomain.com;
    root /srv/apps/qloudwatch/current/public;

    passenger_enabled on;
    passenger_use_global_queue on;
}</code></pre>
<p>Make sure you use yourdomain.com or www.yourdomain.com here (not both) for nice HTTP redirection to the correct domain name.</p>
<p>Now we need to configure that all non-secure request are redirected to the secure address of the web app. For example: all requests to http://yourdomain.com/ and http://www.yourdomain.com/ should be redirected to https://yourdomain.com.</p>
<p>To do this, add the following before the server section we just added:</p>
<pre><code>server {
    listen 80;
    server_name www.yourdomain.com yourdomain.com;
    rewrite ^(.*) https://yourdomain.com$ permanent;
}</code></pre>
<p>Now, restart your Nginx server by calling `sudo killall nginx -HUP&#8217;. Wait a few moments for Nginx to launch and try http://yourdomain.com/ to see if everything works.</p>
<p>And that&#8217;s all! You have just generated a self-signed SSL certificate, installed Nginx with the SSL-module enabled and configured the domain with your web application to be reached trough SSL.</p>
<p>I understand this can be quite something to take in if you&#8217;re new to SSL and Nginx so if you have any questions, any questions at all about this or other web app deployment strategies please post a comment, contact me on Twitter (<a href="http://twitter.com/michiels">@michiels</a> is my account) or send me an e-mail.</p>
]]></content:encoded>
			<wfw:commentRss>http://shapingclouds.com/2010/01/02/how-to-add-some-security-with-a-self-signed-ssl-certificate-to-your-rails-app-running-on-nginx/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Installing Beanstalkd queing daemon on Mac OS X</title>
		<link>http://shapingclouds.com/2009/08/28/installing-beanstalkd-queing-daemon-on-mac-os-x/</link>
		<comments>http://shapingclouds.com/2009/08/28/installing-beanstalkd-queing-daemon-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 10:20:38 +0000</pubDate>
		<dc:creator>Michiel</dc:creator>
				<category><![CDATA[How To Articles About Web Application Deployment]]></category>
		<category><![CDATA[beanstalkd]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://shapingclouds.com/?p=282</guid>
		<description><![CDATA[Beanstalkd is a queueing deamon that let&#8217;s you queue messages from one client and let them be processed by another client. It has features like burrying messages for later usage if the command at the first time can&#8217;t be executed and more stuff like that. We use it for queuing things in Ruby on Rails [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fshapingclouds.com%2F2009%2F08%2F28%2Finstalling-beanstalkd-queing-daemon-on-mac-os-x%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fshapingclouds.com%2F2009%2F08%2F28%2Finstalling-beanstalkd-queing-daemon-on-mac-os-x%2F&amp;source=shapingclouds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://xph.us/software/beanstalkd/">Beanstalkd</a> is a queueing deamon that let&#8217;s you queue messages from one client and let them be processed by another client. It has features like burrying messages for later usage if the command at the first time can&#8217;t be executed and more stuff like that.</p>
<p>We use it for queuing things in <a href="http://rubyonrails.com">Ruby on Rails</a> applications which are time-intensive. For example, executing an install command on a remote server can take some time and you don&#8217;t want your web application to block or queue op other requests in this case.</p>
<p>Beanstalkd has excellent Ruby bindings which you can use in  your Rails app. There&#8217;s even a gem for it:</p>
<pre lang="shell">gem install beanstalk-client</pre>
<p>Using it is as easy as:</p>
<pre lang="ruby">beanstalk = Beanstalk::Pool.new(['10.0.1.5:11300'])
beanstalk.put('hello')

beanstalk = Beanstalk::Pool.new(['10.0.1.5:11300'])
loop do
  job = beanstalk.reserve
  puts job.body # prints "hello"
  job.delete
end</pre>
<h2>Installing on Mac OS X</h2>
<p>Beanstalkd depends on <a href="http://monkey.org/~provos/libevent/">libEvent</a>, so you&#8217;ll need to install that first:</p>
<pre lang="shell">
wget http://monkey.org/~provos/libevent-1.4.12-stable.tar.gz
tar zxvf libevent-1.4.12-stable.tar.gz
cd libevent-1.4.12-stable
./configure
make
sudo make install
</pre>
<p>And then you can install Beanstalkd:</p>
<pre lang="shell">
wget http://xph.us/dist/beanstalkd/beanstalkd-1.3.tar.gz
tar zxvf beanstalkd-1.3.tar.gz
cd beanstalkd-1.3.tar.gz
./configure
make
sudo make install
</pre>
]]></content:encoded>
			<wfw:commentRss>http://shapingclouds.com/2009/08/28/installing-beanstalkd-queing-daemon-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
