bmschmidt / medicalHeritageVM

A DH box for Miriam Posner and Ben Schmidt's 2016 workshops in Bethesda
6 stars 4 forks source link

vagrant up fails with older version of Vagrant #7

Open mwidner opened 8 years ago

mwidner commented 8 years ago

This is on a Mac running OS X 10.10 (Yosemite) with Vagrant 1.6.3 and VirtualBox 4.3.12.. After downloading the repo and running 'vagrant up', I get this oupute:

==> default: Successfully added box 'ubuntu/wily64' (v20160325.0.0) for 'virtualbox'!

There are errors in the configuration of this machine. Please fix the following errors and try again:

puppet provisioner:

  • The configured Puppet manifest is missing. Please specify a path to an existing manifest:

/

Looking at VirtualBox confirms that the machine was never created. I have listed only my usual virtual machine there. The things that were supposed to show up at step 9 do not. Looks like the problem is line 69 in the Vagrantfile: puppet.manifest_file = "/"

bmschmidt commented 8 years ago

Hmm. This is desired behavior on the version of puppet I have; it should be navigating to puppet.manifests_path = "puppet/manifests" and then using puppet.manifest_file = "/" to parse every *.pp file in that folder. Your Vagrant and VirtualBox are both a version behind mine (1.7.x and 5.0.x, respectively)—are you using some copies you already had sitting around on your computer, or was this a fresh install? (This is bad behavior, obviously: but I'm hoping it isn't something that will recur for complete newbies).


From the puppet docs. This may be new behavior. I don't know how to test puppet version.

the main manifest is a directory, Puppet parses every .pp file in the directory in alphabetical order and evaluate the combined manifest. It descends into all subdirectories of the manifest directory and loads files in depth-first order. (For example, if the manifest directory contains a directory named 01 and a file named 02.pp, it will parse all the files in 01 before 02.)

miriamposner commented 8 years ago

Oh, @mwidner is, I happen to know! He mentioned it on Twitter. That's probably what it is, and I'm sure you're right; the workshop participants shouldn't have other versions of Vagrant already installed.

mwidner commented 8 years ago

Ok. I upgrade Vagrant and it works. Maybe add a note about minimum version requirements?

bmschmidt commented 8 years ago

Might as well leave this one open. The right way to handle this would be to have a single master puppet file that imports, as needed, a bunch of different classes from a subsidiary folder; I assume this would work on older puppets, too.

I don't want to do it now, because it might break things.

But if anyone wants to use this for another workshop, something like this would make sense:

puppet/manifests
-- machine.pp
-- DH_manifests/
   | -- Rstudio.pp
   | -- Bookworm.pp
   | --  opencv.pp
   | -- omeka.pp

A workshop organizer or course instructor could just comment on or off the individual bits of the machine they wanted to load. If there's some use for this as a general workshop setup, it would probably look like this. One of my problems with DH in a box is that there isn't really a single installation to rule them all.