berkshelfおためし
はじめに
Windows7で Vagrant と knife-solo を利用できる環境は整いました。
今日は berkshelfでCookbookをダウンロードしてみます。
Chef実践入門 ~コードによるインフラ構成の自動化 (WEB+DB PRESS plus)
- 作者: 吉羽龍太郎,安藤祐介,伊藤直也,菅井祐太朗,並河祐貴
- 出版社/メーカー: 技術評論社
- 発売日: 2014/05/22
- メディア: 単行本(ソフトカバー)
- この商品を含むブログ (5件) を見る
環境
Windows7
Virtualbox 4.3.12 インストール済み
Vagrant_1.3.5 インストール済み
knife-solo 0.4.2 インストール済み
リポジトリを準備
c:\fluentd>knife solo init . WARNING: No knife configuration file found Creating kitchen... Creating knife.rb in kitchen... Creating cupboards...
berkshelfインストール
c:\fluentdに下記Gemfileを作成
source 'https://rubygems.org' gem 'berkshelf'
c:\fluentd>bundle install
Cookboook取得
c:\fluentdに下記Berksfileを作成
site :opscode cookbook 'td_agent', git: 'https://github.com/treasure-data/chef-td-agent.git'
c:\fluentd>berks DEPRECATED: Your Berksfile contains a site location pointing to the Opscode Comm unity Site (site :opscode). Site locations have been replaced by the source loca tion. Change this to: 'source "https://api.berkshelf.com"' to remove this warnin g. For more information visit https://github.com/berkshelf/berkshelf/wiki/deprec ated-locations Resolving cookbook dependencies... Fetching 'td_agent' from https://github.com/treasure-data/chef-td-agent.git (at master) In your Berksfile, you have: cookbook 'td_agent' But that cookbook is actually named 'td-agent' This can cause potentially unwanted side-effects in the future. NOTE: If you do not explicitly set the 'name' attribute in the metadata, the nam e of the directory will be used instead. This is often a cause of confusion for dependency solving.
Berksfileを修正
site :opscode cookbook 'td-agent', git: 'https://github.com/treasure-data/chef-td-agent.git'
c:\fluentd>berks DEPRECATED: Your Berksfile contains a site location pointing to the Opscode Comm unity Site (site :opscode). Site locations have been replaced by the source loca tion. Change this to: 'source "https://api.berkshelf.com"' to remove this warnin g. For more information visit https://github.com/berkshelf/berkshelf/wiki/deprec ated-locations Resolving cookbook dependencies... Fetching 'td-agent' from https://github.com/treasure-data/chef-td-agent.git (at master) Fetching cookbook index from https://api.berkshelf.com... C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:800:in `connect': SSL_connec t returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify f ailed (Faraday::SSLError)
まとめ
時間切れです。証明書をダウンロードして…はまた次回。