chef-solo って

Chocolatey の導入

必要なアプリをインストールします。

"Hello, Chef!"

  1. chef-repo 作り、hello のクックブックを作成する
    C:\Users\hoge> knife solo init chef-repo
    C:\Users\hoge> cd chef-repo
    C:\Users\hoge\chef-repo> knife cookbook create hello -o cookbooks
    ** Creating cookbook hello
    ** Creating README for cookbook: hello
    ** Creating CHANGELOG for cookbook: hello
    ** Creating metadata for cookbook: hello
  2. レシピを編集する(C:\Users\hoge\chef-repo\cookbooks\hello\recipes\default.rb)
    C:\Users\hoge\chef-repo> notepad cookbooks\hello\recipes\default.rb
    1. 内容を編集
      #
      # Cookbook Name:: hello
      # Recipe:: default
      #
      # Copyright 2013, YOUR_COMPANY_NAME
      #
      # All rights reserved - Do Not Redistribute
      #
      log "Hello, Chef!"
  3. chef-solo レシピを記述するjsonを用意する、\chef-repo の直下でいいらしい
    C:\Users\hoge\chef-repo> notepad localhost.json
    1. 内容を編集
      {
        "run_list" : [
            "recipe[hello]"
        ]
      }

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2020-03-12 (木) 09:59:19