Permalink
Browse files

Merge VM bootstrap over to mdn branch

  • Loading branch information...
1 parent f818da5 commit aba82e1a56b7050a4466e7b30e341bdb6c276dde @lmorchard lmorchard committed Mar 24, 2011
View
@@ -1,5 +1,7 @@
*.pyc
*.pyo
+*.sw?
+.vagrant
settings_local.py
pip-log.txt
.coverage
@@ -10,6 +12,4 @@ build.py
**-all.js
**-min.js
media/uploads
-vendor
-tmp
locale
View
@@ -0,0 +1,55 @@
+# Kuma under Vagrant on Mac OS X
+
+This is an attempt to describe the bootstrap process to get Kuma running in a
+Vagrant-managed virtual machine on a plain-vanilla Mac OS X machine.
+
+This could possibly be made to work under Linux and Windows, but I haven't
+tried. The main barrier to Windows is probably that this Vagrantfile
+[uses NFS to share the current working directory][nfs] for performance reasons.
+
+[nfs]: http://vagrantup.com/docs/nfs.html
+
+ # Install VirtualBox 4 from http://www.virtualbox.org/
+
+ # Open a terminal window.
+
+ # Install vagrant, see vagrantup.com
+ gem install vagrant
+
+ # Clone a Kuma repo, switch to my vagrant branch (for now)
+ git clone git://github.com/lmorchard/kuma.git
+ cd kuma
+ git checkout vagrant
+
+ # Fire up the VM and install everything, go take a bike ride (approx. 15 min)
+ vagrant up
+
+ # Add dev-kuma.developer.mozilla.org to /etc/hosts
+ sudo su
+ echo '192.168.10.50 dev-kuma.developer.mozilla.org' >> /etc/hosts
+ exit
+ # (or, you know, sudo vi /etc/hosts and do it by hand)
+
+ # Everything should be working now.
+ curl 'http://dev-kuma.developer.mozilla.org'
+
+ # Edit files as usual on your host machine; the current directory is
+ # mounted via NFS at /vagrant within the VM.
+
+ # Useful vagrant sub-commands:
+
+ vagrant ssh # Connect to the VM via ssh
+ vagrant suspend # Sleep the VM, saving state
+ vagrant halt # Shutdown the VM
+ vagrant up # Boot up the VM
+ vagrant destroy # Destroy the VM
+
+ # Occasionally run this within the VM to sync the environment up
+ # with an updated Puppet manifest, or to recover from failures
+ # during the initial VM spin-up. It should be safe to run repeatedly,
+ # since Puppet works to establish state, not run scripts per se.
+
+ sudo puppet apply /vagrant/puppet/manifests/mozilla_kuma.pp
+
+ # caveat: Do not run this while /vagrant is the current working directory.
+ # The puppet/ directory there seems to cause issues. (FIXME)
View
@@ -0,0 +1,27 @@
+Vagrant::Config.run do |config|
+
+ # uncomment to enable VM GUI console
+ # config.vm.boot_mode = :gui
+
+ # Need to use an NFS mount; virtualbox shared folders are super-slow
+ # see also: http://vagrantup.com/docs/nfs.html
+ config.vm.share_folder("v-root", "/vagrant", ".", :nfs => true)
+
+ # To rebuild from mostly scratch, use:
+ config.vm.box = "puppet-centos-55-64"
+ config.vm.box_url = "http://puppetlabs.s3.amazonaws.com/pub/centos5_64.box"
+ config.vm.share_folder("v-root", "/vagrant", ".") # No NFS in base box.
+
+ # THE FUTURE!!!1!!!!1!1one
+ # config.vm.box = "puppet-rhel-6-64"
+ # config.vm.box_url = "http://puppetlabs.s3.amazonaws.com/pub/rhel60_64.box"
+
+ # Add to /etc/hosts: 192.168.10.50 dev-kuma.developer.mozilla.org
+ config.vm.network("192.168.10.50")
+
+ config.vm.provision :puppet do |puppet|
+ puppet.manifests_path = "puppet/manifests"
+ puppet.manifest_file = "mozilla_kuma.pp"
+ end
+
+end
Oops, something went wrong.

0 comments on commit aba82e1

Please sign in to comment.