<div dir="ltr"><div class="gmail_extra">We use the same puppet code on vagrant VMs and Rackspace/EC2 VMs.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The server periodically checks the puppet code out of the git repository and applies it, so that all servers keep themselves up to date.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">To conditionally apply puppet code that should/shouldn't be applied on vagrant VMs we set a global variable in Puppet like this;</div><div class="gmail_extra">
<br></div><div class="gmail_extra">    $vagrant_dev_vm = inline_template('<%= FileTest.exists?(\'/tmp/vagrant-puppet\') ? \'true\' : \'false\' %>')<br></div><div class="gmail_extra"><br>
</div><div class="gmail_extra" style>i.e. if the directory /tmp/vagrant-puppet exists, we're a Vagrant VM (so don't do whatever stuff should only happen in the staging/production environments).</div><div class="gmail_extra" style>
<br></div><div class="gmail_extra" style>We don't use Puppet for deployment though - just for keeping the servers in the correct state to be deployed to. Having said that, it would be pretty simple to tweak our Puppet code so that deployments happened automagically too. There's also a Puppet-based deployment tool called Puppi, that might be worth looking at.</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>To go from a clean hosted VM to a deployed server we use a bootstrap task that ssh's onto the box and sets up just enough stuff to get puppet to run, then puppet takes it from there. We also use the fog gem to automate the setup of the clean VM in the first place.</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>Hope this helps</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>David</div><div class="gmail_extra" style><br></div><div class="gmail_extra">
<br><div class="gmail_quote">On 22 April 2013 14:39, Paul Doerwald <span dir="ltr"><<a href="mailto:paul@liquidmedia.ca" target="_blank">paul@liquidmedia.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

                <div>Hola El Rug,
                </div><div><br></div><div>I noticed someone mention puppet in a recent message and it occurred to me that I could ask the LRUG list for advice. </div><div><br></div><div>I am new to Vagrant and Puppet. I have a brute force but effective script that can create a dev environment very nicely. I would like to use the same script (or more accurately, a variation of it, because right now the script is a bit stupid) to deploy the staging and production versions of the application on a Linode computer.</div>
<div><br></div><div>A bit more context on my problem:</div><div><br></div><div>• The application will never grow bigger than a single computer, so auto-deployment/build (basically the big win that Puppet and Chef bring you) are not important. Repeatability of deploy is the big value.</div>
<div>• I don't mind a manual process (i.e. running an executable on the deployment server whenever I update the Puppet script).</div><div>• Ordinarily this kind of investment for a single application isn't worthwhile, but most of my work (all client work) fits the same profile (more or less) and so I do intend to leverage this investment in making repeatable deploys for all my other clients, present and future.</div>
<div>• My Puppet config (and Vagrant, for that matter) is in a Github repo, separate from the application.</div><div><br></div><div>Does anyone have experience going from Vagrant/Puppet to Linode(or any VPS)/Puppet, particularly for a single-server environment?</div>
<div><br></div><div>If not, does anyone with Puppet experience have any advice for how I might tackle the Linode portion of the problem? </div>
                <div><div><br></div><div>I'm looking for a conceptual orientation to how I should solve the problem. I'm sure I can figure out the details. All the advice on the Internet is in the context of a multi-server setup, and it's never coming from a Vagrant perspective.</div>
<div><br></div><div>Thanks for your thoughts!</div><span class=""><font color="#888888"><div>Paul.</div><div><br></div><div><br></div><div>-- </div><div>Paul Doerwald</div><div>Chancellor, Liquid Media Inc.</div><div><a href="tel:902-412-2492" value="+19024122492" target="_blank">902-412-2492</a></div>
<div><br></div></font></span></div>
            <br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div></div>