Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

Vagrant | Plugin | vagrant-omnibusで仮想環境に任意のバージョンのChef-Soloをインストール

概要

vagrant-omnibusで仮想環境に任意のバージョンのChef-Soloをインストール

詳細

vagrant-omnibusで仮想環境に任意のバージョンのChef-Soloをインストールします。

インストール
vagrant plugin install vagrant-omnibus

インストールの確認

$ vagrant plugin list | grep vagrant-omnibus
vagrant-omnibus (1.1.2)
試行
$ mkdir vagrant-omnibus # 作業用ディレクトリの作成
$ cd vagrant-omnibus
$ vagrant init # Vagrantfileのテンプレート生成
$ vi Vagrantfile # 後述
$ vagrant up
$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2
check-language-support  chef-client             chef-solo
chef-apply              chef-shell
vagrant@precise64:~$ chef-solo -v
Chef: 11.6.0
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "ubuntu-12.04-x64" # box url = http://files.vagrantup.com/precise64.box
  config.omnibus.chef_version = "11.6.0"
end