hashbangcode / vlad

Vlad - Vagrant LAMP Ansible Drupal
173 stars 53 forks source link

Unify base boxes? #308

Closed zxaos closed 8 years ago

zxaos commented 8 years ago

Now that opscode is publishing their "bento" baseboxes on Atlas, it would be possible to update vlad to use the same base box for every provider:

All of these options have virtual box, vmware, and parallels providers.

So the consequences specifically would be:

Any thoughts about this?

philipnorton42 commented 8 years ago

Some really good changes here @zxaos :) I think changing over to a single provider is a good idea, makes everything more streamlined. The simplification of the Vagranfile is also an awesome change. We'll need to run some tests, but if everything else is ok with the changes then I think we'll run with it :)

zxaos commented 8 years ago

Ok, looks like there's going to need to be at least some fixes.

The drupal_console task fails on centos:

TASK: [drupal_console | Download the latest version of Drupal console] ********
changed: [192.168.100.183]

TASK: [drupal_console | Create Drupal console symlink] ************************
failed: [192.168.100.183] => {"failed": true, "path": "/usr/local/bin/drupal", "src": "/home/vagrant/console.phar", "state": "absent"}
msg: src file does not exist, use "force=yes" if you really want to create the link: /home/vagrant/console.phar

FATAL: all hosts have already failed -- aborting

Weirdly though, when I tried running the download by hand with the same command the task uses, it worked fine. (i.e., I think it's the first command that's reporting "changed" that's actually failing - console.phar is indeed absent).

zxaos commented 8 years ago

Closing the original PR for this for a moment since (a) I needed to move it onto a different branch and (b) it's not ready for merge anyway until the centos stuff is fixed. The commits are still over at my fork for now

dixhuit commented 8 years ago

I'm liking this concept more and more. Just wasted a fair bit of time debugging what was actually just a difference in base boxes between VirtualBox & VMware - this kind of consolidation would have helped minimise that.

dixhuit commented 8 years ago

Drupal Console is disabled in dev for now: https://github.com/hashbangcode/vlad/commit/8989a05c9802735f99f263ae2df3309ad7e559fc

zxaos commented 8 years ago

@danbohea If we're ignoring the Drupal Console for now, I can open a new PR for this code since I believe that was the major blocker.

Edit: I'll go rebase it against dev now and open the PR so it's available if you decide you want to go forward with it.

zxaos commented 8 years ago

Hmm. Centos 6.7 provisions fine, but fails if you try to run vagrant provision a second time. I do wonder how many users actually are on centos for this, since #315 seems like it might have been broken for a while...

jmolivas commented 8 years ago

Which version of DC is causing this issue?. We fixed Drupal-VM, issues on latest release and must be working now.

dixhuit commented 8 years ago

@jmolivas See #314.

wizonesolutions commented 8 years ago

+1 on this from me. I just had issues with parallels/ubuntu-14.04 and Bento worked fine. We will still need to have provider-specific configuration, but the box selection code would be much simpler (we can just let people override the base box if they want to use another one).

Tagging https://github.com/hashbangcode/vlad/issues/323

dixhuit commented 8 years ago

Sounds like we're all fairly keen to get this in then. Can I suggest we merge this into dev and begin testing from there?

@philipnorton42 I'm particularly looking for sign off from you here :)

philipnorton42 commented 8 years ago

I'm happy with this. The only caveat is that we need to announce this change before it gets released :)

dixhuit commented 8 years ago

The only caveat is that we need to announce this change before it gets released :)

Absolutely.

zxaos commented 8 years ago

Great! Now we just need to finish #253 :shipit: and 1.17 is totally ready immediately right? :sunglasses:

(Want me to close this or do you need to keep it open for release notes?)

wizonesolutions commented 8 years ago

@zxaos So what is the actual way to use old boxes after this change? I tried setting vlad_custom_base_box_name, but Vagrant says it can't find my VM anymore after I pull dev up to where this was merged. I see in the PR that you recommend just destroying and recreating. Is that basically the way to go?

zxaos commented 8 years ago

@wizonesolutions If you're using a custom base box, you should be ok. What you're running into is not this, it's actually #312 . The trick will be that you need to move your .vagrant folder. It will previously had been beside the Vagrantfile inside vlad's structure, but now vlad will be looking for that folder in the same place as your settings file, wherever that is.

(The indicator on this one is you should be seeing a message saying "Adjusting Vagrant environment and re-initializing" - that's vlad re-targetting the location of the VM folder).