chef-soloの復習(メモ)

とりあえず vagrant の設定など

バージョンがちょっと古いですのでご注意ください。

Vagrant version 1.0.7

[bash]

# vagrant の初期化

$ vagrant init

# Vagrantfileを編集する

$ vim Vagrantfile

~

config.vm.box = "base"

config.vm.network :hostonly, "192.168.38.10"

~

# box2サーバーの ssh-config を表示する

$ vagrant ssh-config --host box2

# box2 サーバーを立ち上げる

$ vagrant up

# box2サーバーに sahara のインストール

$ vagrant gem install sahara

# box2サーバーに chef-soloインストール

$ knife solo prepare box2

[/bash]

chef solo 環境を生成する

[bash]

$ knife solo init chef-repo

$ ls

$ cd chef-repo

$ git init

$ git add .

$ git commit -m 'first commit'

[/bash]

sahara がうまくインストールできなかったので vagrant の最新版を公式からインストールして sahara を github からインストール

[bash]

$ git clone https://github.com/ryuzee/sahara.git

$ cd sahara

$ bundle install

$ bundle exec rake build

$ vagrant plugin install pkg/sahara-0.0.14.gem

$ vagrant plugin list

[/bash]

参考:

http://konboi.hatenablog.com/entry/2013/05/16/212630

ちょっとメモっぽい