<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br><div><div>On 22-Apr-2013, at 9:09 PM, MG Lim <<a href="mailto:mglim@mirageglobe.com">mglim@mirageglobe.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi there,<div><br></div><div>I wonder if there any good lightweight management methods/or guidelines that tend to work best for running multiple small vms for small sinatra apps (something I am trying at the moment.and shifting from heroku to get more control)?</div>
<div><br></div><div>This question might be quite wide but I am looking for any good suggestions for managing the spinup and backup of small vms that runs 1~2 web apps per instance in AWS.</div><div><br></div><div style="">I see quite some discussions of using Fog / Puppet / Capistano / or hybrid and getting a bit confused on any proven best (or goodish) practises? I havent yet tried passenger; so any suggestions on that route is also welcome.</div>
<div style=""><br></div><div style="">Ideally to summarise:</div><div style=""><br></div><div style="">1) running php along side thin on the same instance with Nginx. (good or not)?</div><div style="">2) running a small mongodb in each vm. so that each solution is contained in 1 instance.</div>
<div style="">3) replicating it for balancing.</div><div style=""><br></div><div style="">many thanks! :D</div></div></blockquote><br></div><div>For small number of VMS I recommend using following combination:</div><div><br></div><div>1. Use Chef-Solo for Provisioning: Chef Solo is *really* easy to start with. Using Chef you can manage dependencies that your VMs require, manage configuration for Nginx, Unicorn, Mongo etc and it is dead easy to use (<a href="http://railscasts.com/episodes/339-chef-solo-basics">http://railscasts.com/episodes/339-chef-solo-basics</a>).</div><div><br></div><div>2. For deployment - Use Capistrano, again you should be able to pretty much deploy everything using Capistrano. But use it for your Rails & Rack apps.</div><div><br></div><div>3. Use Upstart (And foreman) - A fresh Ubuntu install already comes with a monitoring system built-in. You can define your services in a Procfile (<a href="https://github.com/ddollar/foreman">https://github.com/ddollar/foreman</a>) and Ubuntu will ensure that they are running and they start on reboot etc. Granted, it won't do run away memory management (or CPU), but in 70% of the cases I have found Upstart to be adequate. However if you want more, you can look into god/bluepill/monit.</div><div><br></div><div>I find puppet still slightly complicated and Fog is just a ruby library for managing cloud. It is a low level library that powers many high level libraries. </div><div><br></div><div><br></div><div>---</div><div>Cheers</div><div>Hemant</div><div>Co Founder, <a href="http://www.codemancers.com">http://www.codemancers.com</a></div><div><br></div><div><br></div><div><br></div><br></div></body></html>