<div dir="ltr">Hello all,<div><br></div><div>With so many apps dependent on each other, we've been long searching for a way to easily provision new development environments. The amazing Pomax built webmaker-suite and I then took this onto a vagrant box.</div>
<div><br></div><div>This is a first draft, so I would really appreciate folks trying it out and giving feedback. The instructions are below, and the Vagrantfile you need is here: <a href="https://github.com/mozilla/webmaker-suite/blob/master/vagrant/Vagrantfile">https://github.com/mozilla/webmaker-suite/blob/master/vagrant/Vagrantfile</a></div>
<div><br></div><div><h1 style="font-size:2.5em;margin-right:0px;margin-bottom:15px;margin-left:0px;line-height:1.7;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(221,221,221);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;margin-top:0px!important">
Webmaker Suite Vagrant Setup Guide</h1><h2 style="margin:1em 0px 15px;line-height:1.7;font-size:2em;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="specifications" class="" href="https://github.com/mozilla/webmaker-suite/tree/master/vagrant#specifications" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Specifications</h2>
<ul style="padding:0px 0px 0px 30px;margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><li style>This is running ubuntu 12.04 precise 64bit, so you will need a 64bit computer to use this image.</li>
<li style>This is using 10gen-mongo, and elasticsearch 0.95.0.</li><li style><p style="margin:15px 0px">App files are stored in /home/vagrant/webmaker-suite</p></li><li style><p style="margin:15px 0px">NOTE: This is in alpha, please be patient and submit bugs in bugzilla to webmaker :: devops or by email to <a href="mailto:jp@mozillafoundation.org" style="color:rgb(65,131,196);text-decoration:none">jp@mozillafoundation.org</a></p>
</li></ul><h2 style="margin:1em 0px 15px;line-height:1.7;font-size:2em;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="preflight" class="" href="https://github.com/mozilla/webmaker-suite/tree/master/vagrant#preflight" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Preflight</h2>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px">Make sure you have the following prerequisites installed:</p><ul style="padding:0px 0px 0px 30px;margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px">
<li style>vagrant (<a href="http://www.vagrantup.com/downloads.html" style="color:rgb(65,131,196);text-decoration:none">http://www.vagrantup.com/downloads.html</a>)</li></ul><h2 style="margin:1em 0px 15px;line-height:1.7;font-size:2em;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="steps-after-preflight" class="" href="https://github.com/mozilla/webmaker-suite/tree/master/vagrant#steps-after-preflight" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Steps after preflight</h2>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><strong style>Step 1</strong>: Place this Vagrantfile in a directory you want to run your webmaker-suite dev server from. (for example, /Users/myusername/vagrant/webmaker-suite on MacOSX)</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><strong style>Step 2</strong>: In your terminal.app or cmd.exe window, cd to the directory you placed the Vagrantfile in (/Users/myusername/vagrant/webmaker-suite on MacOSX in the example above) and run the command vagrant up (Note: this may download a file ~1.7gb, so this may take some time.)</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><strong style>Step 3</strong>: After the vagrant instance has completed importing and starting, issue the command vagrant ssh into your terminal.app or cmd.exe window</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><strong style>Step 4</strong>: (Slightly optional) Use the webmaker-suite/add-remote.js to point the github remote repo to a fork in your account and AWS secrets. To update webmaker-suite (lengthy process) use the update-webmaker.js script</p>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><strong style>Step 5</strong>: Issue the command ./webmaker-suite.sh from within the running vagrant instance you have ssh'd into This will start all relevant processes. You will be able to access them via the following urls:</p>
<ul style="padding:0px 0px 0px 30px;margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><li style><a href="http://localhost:3000">http://localhost:3000</a> - <a href="http://login.webmaker.org">login.webmaker.org</a></li>
<li style><a href="http://localhost:3500">http://localhost:3500</a> - <a href="http://thimble.webmaker.org">thimble.webmaker.org</a></li><li style><a href="http://localhost:5000">http://localhost:5000</a> - makeapi</li><li style>
<a href="http://localhost:5050">http://localhost:5050</a> - <a href="http://htmlsanitizer.org">htmlsanitizer.org</a></li><li style><a href="http://localhost:7777">http://localhost:7777</a> - <a href="http://webmaker.org">webmaker.org</a></li>
<li style><a href="http://localhost:8888">http://localhost:8888</a> - <a href="http://popcorn.webmaker.org">popcorn.webmaker.org</a></li><li style><a href="http://localhost:12416">http://localhost:12416</a> - <a href="http://goggles.webmaker.org">goggles.webmaker.org</a></li>
</ul><h2 style="margin:1em 0px 15px;line-height:1.7;font-size:2em;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="updating-the-suite" class="" href="https://github.com/mozilla/webmaker-suite/tree/master/vagrant#updating-the-suite" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Updating the suite</h2>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">node update-webmaker</code> will update all repositories to their current <code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">master</code> branch. It effectively runs the following commands for each repository:</p>
<ol style="padding:0px 0px 0px 30px;margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">git fetch mozilla</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">git checkout -B master mozilla/master</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">git submodule sync</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">git submodule update --init --recursive</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">rm -rf node_modules</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">npm install</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">npm cache clean</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">npm update</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">bower install</code></li>
<li style><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">bower update</code></li>
</ol><h2 style="margin:1em 0px 15px;line-height:1.7;font-size:2em;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="resetting-the-suite-to-master" class="" href="https://github.com/mozilla/webmaker-suite/tree/master/vagrant#resetting-the-suite-to-master" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Resetting the suite to <code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:inherit;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">master</code></h2>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">node reset-webmaker</code> will reset all repos to the <code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">master</code> branch indicated by the <code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">mozilla</code> remote. This will undo any changes you may have locally made. Note that this does not first <code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">git fetch mozill</code> to ensure an up to date head, since you may not want this in the slightest. If you wish to forward to the most recent master, use the <code style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">node update-webmaker</code> command instead.</p>
<h2 style="margin:1em 0px 15px;line-height:1.7;font-size:2em;padding:0px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif">
<a name="browser-locations" class="" href="https://github.com/mozilla/webmaker-suite/tree/master/vagrant#browser-locations" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Browser locations</h2>
<p style="margin:15px 0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px">When running the suite, the following locations are available:</p><ul style="padding:0px 0px 0px 30px;margin-top:15px;margin-right:0px;margin-left:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px;margin-bottom:0px!important">
<li style><a href="http://localhost:3000">http://localhost:3000</a> - <a href="http://login.webmaker.org">login.webmaker.org</a></li><li style><a href="http://localhost:3500">http://localhost:3500</a> - <a href="http://thimble.webmaker.org">thimble.webmaker.org</a></li>
<li style><a href="http://localhost:5000">http://localhost:5000</a> - makeapi</li><li style><a href="http://localhost:5050">http://localhost:5050</a> - <a href="http://htmlsanitizer.org">htmlsanitizer.org</a></li><li style>
<a href="http://localhost:7777">http://localhost:7777</a> - <a href="http://webmaker.org">webmaker.org</a></li><li style><a href="http://localhost:8888">http://localhost:8888</a> - <a href="http://popcorn.webmaker.org">popcorn.webmaker.org</a></li>
<li style><a href="http://localhost:12416">http://localhost:12416</a> - <a href="http://goggles.webmaker.org">goggles.webmaker.org</a></li></ul></div></div>