百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
V

vagrant-omnibus

> 编程语言
开源

一个 Vagrant 插件,可通过特定平台的 Omnibus 包确保安装了所需的 Chef 版本。

543 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

一个 Vagrant 插件,可通过特定平台的 Omnibus 包确保安装了所需的 Chef 版本。

vagrant-omnibus

Deprecation Warning

This is no longer an actively maintained Chef project. We believe that Test Kitchen offers a far superior development and testing experience as it allows fine grained control of versions, better platform support, and and overall better experience. If this project works for you that's great, but we'd highly suggest using https://kitchen.ci/ instead.


A Vagrant plugin that ensures the desired version of Chef is installed via the platform-specific Omnibus packages. This proves very useful when using Vagrant with provisioner-less baseboxes OR cloud images.

The plugin should work correctly with most all providers that hook into Vagrant::Action::Builtin::Provision for provisioning and is known to work with the following Vagrant providers:

  • VirtualBox (part of core)
  • AWS (ships in vagrant-aws plugin)
  • Rackspace (ships in vagrant-rackspace plugin)
  • VMWare Fusion (can be purchased from Hashicorp)
  • LXC (ships in vagrant-lxc)
  • OpenStack (ships in vagrant-openstack-plugin)
  • DigitalOcean (ships in vagrant-digitalocean)
  • Parallels Desktop (ships in vagrant-parallels)
  • Linode (ships in vagrant-linode)

Installation

Ensure you have downloaded and installed Vagrant 1.1 or newer from the Vagrant downloads page. If you require Windows support then Vagrant 1.6.1 or newer is needed.

Installation is performed in the prescribed manner for Vagrant 1.1 plugins.

$ vagrant plugin install vagrant-omnibus

Usage

The Omnibus Vagrant plugin automatically hooks into the Vagrant provisioning middleware. You specify the version of the Chef Omnibus package you want installed using the omnibus.chef_version config key. The version string should be a valid Chef release version or :latest.

Install the latest version of Chef:

ruby
Vagrant.configure("2") do |config|

  config.omnibus.chef_version = :latest

  ...

end

Install a specific version of Chef:

ruby
Vagrant.configure("2") do |config|

  config.omnibus.chef_version = "14.2.0"

  ...

end

Specify a custom install script:

ruby
Vagrant.configure("2") do |config|

  config.omnibus.install_url = 'http://acme.com/install.sh'
  # config.omnibus.install_url = 'http://acme.com/install.msi'
  # config.omnibus.install_url = '/some/path/on/the/host'

  ...

end

If vagrant-cachier is present and config.cache.auto_detect enabled the downloaded omnibus packages will be cached by vagrant-cachier. In case you want to turn caching off:

ruby
Vagrant.configure("2") do |config|

  config.omnibus.cache_packages = false

  ...

end

This plugin is also multi-vm aware so it would possible to say install a different version of Chef on each VM:

ruby
Vagrant.configure("2") do |config|

  config.vm.define :new_chef do |new_chef_config|

    ...

    new_chef_config.omnibus.chef_version = :latest

    ...

  end

  config.vm.define :old_chef do |old_chef_config|

    ...

    old_chef_config.omnibus.chef_version = "13.9.1"

    ...

  end
end

Tests

Unit

The unit tests can be run with:

rake test:unit

The test are also executed by Travis CI every time code is pushed to GitHub.

Acceptance

Currently this repo ships with a set of basic acceptance tests that will:

  • Provision a Vagrant instance.
  • Attempt to install Chef using this plugin.
  • Perform a very basic chef-solo run to ensure Chef is in fact installed.

The acceptance tests can be run against a subset of the Vagrant providers listed above. The acceptance tests can be run with:

rake test:acceptance:PROVIDER_NAME

And as expected, all acceptance tests only uses provisioner-less baseboxes and cloud images!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Seth Chisamore ([email protected])

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言