9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrant+Chef Soloを爆速で開始する(だけ)

Last updated at Posted at 2014-10-09

Install

$ curl -L http://www.opscode.com/chef/install.sh | sudo bash
$ sudo /opt/chef/embedded/bin/gem i knife-solo

Ready...

$ vagrant plugin install vagrant-omnibus
$ cd vm/directory
$ vagrant init
$ knife solo init .
$ knife cookbook create hoge -o site-cookbooks

最後のコマンドは任意の名前で作成する。

Vagrantfile

  config.omnibus.chef_version = :latest
  config.vm.provision "chef_solo" do |chef|
    chef.cookbooks_path = "./site-cookbooks"
    chef.run_list = ["hoge"]
    chef.custom_config_path = "guest_chef.conf"
  end 

SSLのWarningを消すための設定ファイル: guest_chef.conf (ファイル名は任意)

Chef::Config.ssl_verify_mode = :verify_peer

Recipe

$ vi site-cookbooks/hoge/recipes/default.rb

Go

$ vagrant up --provision
$ vagrant provision

Chef Solo+Vagrantの記事が長々したものしかなく困っていたのでまとめてみました。(Chef Zero?気にしない。)

レシピの書き方はここにはないです。

参考記事

9
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?