Upgrade to Pro — share decks privately, control downloads, hide ads and more …

初めてのChefの教室 (v1.2 Chef11対応版)

Yusuke Ando
July 20, 2013
12k

初めてのChefの教室 (v1.2 Chef11対応版)

Yusuke Ando

July 20, 2013
Tweet

Transcript

  1. *OTUBMM $ curl -L https://www.opscode.com/chef/ install.sh | sudo bash $

    chef-solo -v Chef: 11.4.0 PQUʹඞཁͳ3VCZͳͲΛશͯΠϯετʔϧ HFNͰΠϯετʔϧ͸ݹ͍ํ๏
  2. OPEFKTPO { "resolver": { "nameservers": [ "10.0.0.1" ], "search":"int.example.com" },

    "run_list": [ "recipe[resolver]" ] } { "run_list": [ "recipe[resolver]" ] } ࣮ߦ͍ͨ͠Ϩγϐ
  3. σΟϨΫτϦߏ੒ CHANGELOG.md attributes/ files/ metadata.rb recipes/ templates/ README.md definitions/ libraries/

    providers/ resources/ ϨγϐΛஔ͘ QMBUGPSNຖʹ΋ग़དྷΔ ઃఆϑΝΠϧͷͻͳܗ ϨγϐͰར༻͍ͨ͠ม਺ͳͲ
  4. SFDJQJFTEFGBVMUSC log "Hello Chef" package "apache2" do action :install end

    service "apache2" do action :start end ֤؀ڥͷύοέʔδ؅ཧΛ࣮ߦ
  5. UFNQMBUFTEFGBVMUUFTUUYUFSC This is Sample File.<br/> <%= node[:platform] %><br/> <%= node[:platform_version]

    %> SFDJQFTEFGBVMUSC ଓ template "/var/www/test.txt" do source "test.txt.erb" mode 0644 end
  6. 

  7. Node Node GitHub engineyard.com Node &OHJOF:BSEͷ৔߹ DIFGTPMP Cookbook BQQMZ &OHJOF:BSE͕࣮૷ͨ͠Ϩγϐ

    Λ8FCͷૢ࡞Ͱඞཁͳ࣌Ϋϥ΢υʹ൓ө ΧελϜϨγϐ Amazon Web Service Windows Azure Verizon/Terremark