[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#787298: providing base vagrant boxes that both minimal and featureful

On Tue, Jun 02, 2015 at 08:31:13AM +1000, Chris Fordham wrote:
> On 02/06/2015 7:12 AM, "Emmanuel Kasper" <emmanuel@libera.cc> wrote:
> >
> > > The other point is that including (either) provisioner takes us further
> > > from the standard Debian image.
> >
> > BTW, Was is actually a standard Debian image ?
> > To the best of my knowledge, I would define it as all the packages with
> > Priority: required and important.
> > According to the Debian Jessie installation guide [1], the *standard*
> > task is also recommended.
> >
> > In server/containers environments it makes sense to restrict the list
> > of packages installed.
> > However the main aim of the Vagrant Virtualbox base boxes,are shareable
> > development environments.
> > In this kind of setup, I would expect the usual comfort of the debian
> > experience, having for instance a mail server to send stuff,
> > bash-completion or patch installed, all packages with come with the
> > standard priority.

In my experience, having a minimal image helps you with figuring out
what are the actual dependencies of your application and making sure it
will work on whatever environment it is deployed to.

> > So I am in favor of installing this task, which will bring aptitude as a
> > side effect.
> >
> > Concerning the inclusion/removal of providers via specific boxes, why not.
> >
> > [1] https://www.debian.org/releases/jessie/i386/apbs04.html.en
> > Section: Package selection
> Base boxes should be both provisionerless as well as stock as possible.
> Vagrant plugins should be used to look after installing provisioners such
> as your an ansible, puppet etc.
> Chef is already doing this where the bento boxes are provisionerless and
> the vagrant-omnibus plugin installs the version of Chef to your liking.

I agree, but I also agree that any provisioning should work out of the
box with the base box you provide. That said, it is possible to automate
the installation of all provisioners mentioned in /vagrant/Vagrantfile
when you bring the box up.

For example I have the following i my ~/.vagrant.d/Vagrantfile (which is
applied by Vagrant to every box I bring up):

Vagrant.configure(2) do |config|
  config.vm.provision :shell do |shell|
    shell.path = '/home/terceiro/bin/vm-bootstrap'
    shell.keep_color = true

# vim: ft=ruby

that vm-bootstrap script sets up the box to use my local APT cache, and
installs vim, bash-completion and other goodies.

Last time I checked, every .box can also include a Vagrantfile which
will also be applied when it is brought up, before the
application-specific Vagrantfile. That could easily parse
/vagrant/Vagrantfile, figure out the provisioners used, and install them
with apt-get on the fly.

It could also install aptitude if that is needed for ansible (however
requiring aptitude when apt is already there is indeed odd IMO).

So I think we could have a base image that is both minimal and works out
of the box with whatever provisioner (provided it is available in the
archive, I guess).

Antonio Terceiro <terceiro@debian.org>

Attachment: signature.asc
Description: Digital signature

Reply to: