Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitchen-vagrant doesn't work with unknown Bento boxes #165

Closed
juliandunn opened this issue May 1, 2015 · 1 comment
Closed

kitchen-vagrant doesn't work with unknown Bento boxes #165

juliandunn opened this issue May 1, 2015 · 1 comment

Comments

@juliandunn
Copy link

kitchen-vagrant only seems to work with known Bento boxes as specified in this array.

If you try to use a Bento box that it doesn't know about (example: centos-7.1) then the Vagrantfile it creates is invalid and doesn't point to a box URL that can be downloaded by Vagrant, because it doesn't supply a box URL and centos-7.1 is not a known box on Atlas.

Incorrect:

Vagrant.configure("2") do |c|
  c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
  c.vm.box = "centos-7.1"
  c.vm.hostname = "default-centos-71"
  c.vm.synced_folder ".", "/vagrant", disabled: true
  c.vm.provider :virtualbox do |p|
  end
end

Expected:

Vagrant.configure("2") do |c|
  c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
  c.vm.box = "opscode-centos-7.1"
  c.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.1_chef-provisionerless.box"
  c.vm.hostname = "default-centos-71"
  c.vm.synced_folder ".", "/vagrant", disabled: true
  c.vm.provider :virtualbox do |p|
  end
end

I narrowed it down to this commit.

fnichol added a commit that referenced this issue May 7, 2015
This update attempts to improve on
a2ef401 which remains a workaround
until the work of continuously publishing Bento boxes to Atlas is
completed.

The rationale and rules in the above mentioned commit remain, but now
only the platform name is checked. In other words, if the platform name
begins with one of the following (case-sensitive):

* `centos`
* `debian`
* `fedora`
* `freebsd`
* `opensuse`
* `ubuntu`

then the platform is assumed to have a Bento box, hosted in the
pre-determined S3 bucket.

References #165
References test-kitchen/test-kitchen#707
References test-kitchen/test-kitchen#663
References chef-boneyard/chef-dk#382
References chef-boneyard/chef-dk#378
@fnichol
Copy link
Contributor

fnichol commented May 7, 2015

I think this is mostly mitigated with #166 but the issue around determining "platform name to known Bento boxes" remains for now.

If I've totally missed the point here, please do reopen. Thanks!

@fnichol fnichol closed this as completed May 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants