Agile and DevOps with Ruby

Cf7b553387b247d737c60cfceabb2cea?s=47 Naoto Takai
November 04, 2016

Agile and DevOps with Ruby

『Rubyによるアジャイルとデブオプスを実現するチームづくり——みんなのウェディングの経験から』

RubyWorld Conference 2016発表資料

Cf7b553387b247d737c60cfceabb2cea?s=128

Naoto Takai

November 04, 2016
Tweet

Transcript

  1. 3VCZח״׷،آٍ؎ٕהرـؔفأ׾ 㹋植ׅ׷ث٦يבֻ׶ Ղ׫׿זךؐؑر؍ؚٝך穗꿀ַ׵

  2. ׫׿זךؐؑر؍ؚٝ ˖ 穠㭴䒭㜥稱➜〡؝ى؟٦ؽأ ˖ 剢꟦ِص٦ؙـٓؐؠ侧խ秈♰ ˖ 穠㭴䒭㜥鼅ןדך➂ָ⿫罋ח
 ـٓ؎تٕ欵噟倜耀锃ץ

  3. 㡰♳넝䱿獳         䎃

    䎃 䎃 䎃 䎃 ʢ୯Ґɿඦສԁʣ 䎃剢 %F/"ך倜鋉✲噟ה׃גꟚ㨣 䎃剢 ⠓爡鏣甧 䎃剢 匌❨鏾ⵙ《䒷䨽وؠ٦ؤ♳㜥 䎃剢 ؙحؙػحسה项劤噟⹡䲿䵿 屟ꬠ 吳䒭⠓爡׫׿זךؐؑر؍ؚٝ 䨽㖈㖑 匌❨鿪⚥㣛⼒眠㖑
  ꋒ䏟匟畾أؙؒ،ꥡ 项劤ꆃ  涰♰ⰼ䎃剢劣植㖈
  4. չؙحؙػحسպַ׵չ׫׿זךؐؑر؍ؚٝպפ

  5. 1FSM͸3VCZͷܑ͓͞Μ PS͓࢞͞Μ  ŠŠ·ͭ΋ͱΏ͖ͻΖ

  6. .PCB4J'הכ ˖ %F/"ח״׏גꟚ涪ׁ׸׋չؖٓ؛٦պぢֽؿٖ٦يٙ٦ؙ ˖ 'BTU$(*ד⹛⡲׃ծ"QBDIF)5514FSWFS׾⵸䲿ה׃גְ׷ ˖ ؔ٦فٝا٦أ晛כծ䎃剢ח剑䖓ךٔٔ٦أ

  7. sub pageDiaryView { my $func = shift; my $rhData =

    Common::cloneHash($_::F, '^[a-z]'); my $dbh = DA::getHandle($_::DB_DIARY_R); my $sth = $dbh->prepare(<<'SQL'); select diary_id, user_id, post_date, subject, content, comment_num, access_num, last_user from diary_data where diary_id=? SQL $sth->execute($rhData->{d}); if (!$sth->rows) { MException::throw({ CHG_FUNC => '.404' }); } Common::mergeHash($rhData, $sth->fetchrow_hashref()); my $html = HTMLTemplate::insert("diary/dia_view", $rhData); Response::output(\$html); }
  8. def show @diary = Diary.find(prams[:id]) end

  9. ׫׿זךؐؑر؍ؚٝꟚ涪⡤ⵖ䔲儗 ˖ ؒٝآص،˘せ ˖ 㹀纏ׁ׸׋Ꟛ涪فٗإأװفٗآؙؑز盖椚䩛岀ָזְ ˖ ؒٝآص،כؽآطأ⩎ַ׵ך銲実דչ،؟؎ٝպׁ׸׷ ˖ 荈⹛ذأزָזְ ˖

    㢌刿ח״׏גءأذيָ㠨׸ג׮ⴓַ׵זְ
  10. ׫׿זךؐؑر؍ؚٝꟚ涪橆㞮䔲儗 ˖ Ⱏ欽ךꟚ涪欽؟٦غ٦ָ〴 ˖ ا٦أ؝٦سر؍ؙٖزٔ׾TBNCBדⰟ剣 ˖ 4VCWFSTJPOדغ٦آّٝ盖椚 ˖ ➭ךꟚ涪罏ך㢌刿ָ幉ׂ׵זְ״ֲחծ㡮׾ַֽ֮׏ג
 ؿ؋؎ٕ׾؝ىحز

    ˖ ؝ىحزِ٦ؠ٦כⰋ㆞ずِׄ٦ؠ٦זךדծ؝ىحز
 ًحإ٦آחせ⵸׾ろ׭׷
  11. ׫׿זךؐؑر؍ؚٝ؎ٝؿٓ橆㞮䔲儗 ˖ ⟎䟝㼔欽؟٦غ٦ ˖ ؒٝآص،ך䩛⡲噟ח״׷鏣㹀盖椚 ˖ ؟٦غ٦ך顤欽ָ넝ֻծ厫鮾ח锃麦דֹזְ ˖ מהאך؟٦غ٦ח醱侧ך䕵ⶴָず㽿 ˖

    ⽃♧ꥺ㹱挿410'ָ㶷㖈׃ծغحؙ،حفָ♶僇然 ˖ 湊鋔⡤ⵖָ♶⼧ⴓדꥺ㹱׾嗚濼דֹזְ ˖ ؙٓ؎،ٝزַ׵ך鸬窃דءأذيꥺ㹱ָⴻ僇
  12. 䎃剢 3VCZⰕꟚ 䎃剢 3VCZPO3BJMTⰕꟚ 䎃剢 3VCZPO3BJMTⰕꟚ 䎃剢 傈劤3VCZؕٝؿ؋ٖٝأ㛇锃闌怴%)) 䎃剢 傈劤3VCZ⠓陽㛇锃闌怴%BWF5IPNBT

    䎃剢 3VCZPO3BJMTⰕꟚ  3VCZⰕꟚ 䎃剢 (JU)VC؟٦ؽأꟚ㨣 3VCZ٥3VCZPO3BJMTך娖〷
  13. ˖ ؽآطأ䧭ꞿך׋׭ך㖇⸂ָ䓼ֻծ䪮遭涸ז䫎项ָ
 זֶׂ׶חז׏גְ׋ ˖ 竰竲涸ז何㊣׾׃גְֻ׋׭ךꟚ涪⡤ⵖָזַ׏׋

  14. ؒٝآص،ؚٔٝך顑⟣罏ה׃ג וך״ֲז䨌殛׾ה׷ַ

  15. ˖ ؝ٌر؍ذ؍׾ⵃ欽ׅ׷ ˖ فٗإأך،آٔذ؍׾ぢ♳ׇׁ׷

  16. ίϞσΟςΟͱ͸ ʲӳʳDPNNPEJUZ ίϞσΟςΟͱ͸ҰൠԽͨͨ͠ΊࠩผԽ͕ࠔ೉ ͱͳͬͨ੡඼΍αʔϏεͷ͜ͱΛ͍͏ɻ ŠŠτϥΠϕοΫɾϒϥϯυઓུݚڀॴ

  17. ؝ٌر؍ذ؍ךًٔحز ˖ 㹋䨌ד嗚鏾ׁ׸גְ׷CBUUMFQSPWFO ˖ ِ٦ؠ٦؝ىُصذ؍ָ֮׶ظؐعָؐ崧鸐׃גְ׷ ˖ 鞢ַזؒ؝ءأذيָ㶷㖈ׅ׷

  18. Ԩ 3VCZPO3BJMT Ԩ "NB[PO8FC4FSWJDFT "84

  19. فٗإأך،آٔذ؍

  20. None
  21. A. Where do we want to be? B. Where are

    we? C. How do we improve our position?
  22. չאֻ׷׮ךպ׌ֽדכזֻ չאֻ׶ַ׋պ׮ؕ؎ئׅٝ׷

  23. Ԩ ،آٍ؎ٕꟚ涪 Ԩ رـؔفأ

  24. DevOps is the practice of operations and development engineers participating

    together in the entire service lifecycle, from design through the development process to production support. IUUQTUIFBHJMFBENJODPNXIBUJTEFWPQT
  25. ˖ غ٦آّٝ盖椚 ˖ 铬겗盖椚 ˖ 圓䧭盖椚 ˖ 竰竲涸؎ٝذؚٖ٦ءّٝ ˖ 湊鋔

    ˖ ذأز荈⹛⻉ ˖ رفٗ؎
  26. Lowering risk of change
 through tools and culture — John

    Allspaw
  27. culture

  28. ΠσΦϩΪʔ͸ɺ෺࣭తͳΠσΦϩΪʔ૷ஔ ͷͳ͔ʹଘࡏ͠ɺ͜ͷ૷ஔ͸෺࣭తͳّࣜʹ Αͬͯௐ੔͞ΕΔ෺࣭తͳॾ࣮ફΛ໋ྩ͠ɺ ͜ΕΒͷॾ࣮ફ͸ࣗݾͷ৴ڼʹैͬͯશ͘ҙ ࣝతʹߦಈ͢Δओମͷ෺࣭తͳॾߦҝͷͳ͔ ʹଘࡏ͢Δ ŠŠϧΠɾΞϧνϡηʔϧ

  29. ؒٝآص،ؚٔٝך顑⟣罏ה׃ג וך״ֲז䨌殛׾ה׷ַ ˖ "84הرـؔفأ ˖ 3VCZPO3BJMTה،آٍ؎ٕꟚ涪

  30. ➙תדך؎ٝؿٓ ֿ׸ַ׵ך؎ٝؿٓ

  31. ➙תדך؎ٝؿٓ ֿ׸ַ׵ך؎ٝؿٓ

  32. None
  33. 3VCZח״׷؎ٝؿٓ盖椚 ˖ ؟٦غ٦圓䧭盖椚خ٦ٕJUBNBFח״׷鏣㹀盖椚 ˖ ؟٦ؽأ圓䧭盖椚خ٦ٕח״׷"84鏣㹀盖椚
 CVLFMBUUBFJQNBQLFMCJNQJDVMFUSPBEXPSLFS ˖ ر٦ةك٦أأؗ٦و盖椚SJEHFQPMF (JU)VCדךغ٦آّٝ盖椚ה؝٦سٖؽُ٦

  34. execute "hostname #{node[:ec2][:tags][:Name]}" do not_if "[ $(hostname) = \"#{node[:ec2][:tags][:Name]}\" ]"

    notifies :restart, 'service[rsyslog]' end file '/etc/sysconfig/network' do action :edit block do |content| unless content[node[:ec2][:tags][:Name]] content.sub!(/^HOSTNAME=.*$/, "HOSTNAME=#{node[:ec2][:tags][:Name]}") end end end
  35. $ bundle exec rake itamae:apply HOSTS=tools-001 INFO: Apply /Users/alice/infra/itamae/roles/base/default.rb,/User itamae

    ssh -h 10.1.2.197 -j /var/folders/l7/16_nsg7s35b6f4_brh_pv infra/itamae/functions.rb /Users/alice/infra/itamae/roles/base/de infra/itamae/post-processing.rb INFO : Starting Itamae... INFO : Loading node data from /var/folders/l7/16_nsg7s35b6f4_brh /Users/alice/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/net-s Object#timeout is deprecated, use Timeout.timeout instead. /Users/alice/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/net-s Object#timeout is deprecated, use Timeout.timeout instead. INFO : Recipe: /Users/alice/infra/itamae/functions.rb INFO : Recipe: /Users/alice/infra/itamae/roles/base/default.rb INFO : Recipe: /Users/alice/infra/itamae/roles/base/disable-ip INFO : Recipe: /Users/alice/infra/itamae/roles/base/nofile.rb INFO : Recipe: /Users/alice/infra/itamae/roles/base/yum.rb
  36. None
  37. None
  38. None
  39. 3VCZח״׷ؚٗך〳鋔⻉ 3FETIJGU MPH BQQ

  40. None
  41. 湊鋔ך荈⹛⻉ 4MBDL 5XJMJP $MPVE8BUDI -BNCEB

  42. ˖ 3BTQCFSSZ1J ˖ 64#أؾ٦ؕ٦
 ..416#, 갈㡮ד؎ٝؿٓ؎كٝز׾ 鸐濼ׅ׷➬穈׫ $7㩲ꅿאלׁ

  43. module Mina module Handlers class Announce < Ruboty::Handlers::Base BASE_DIR =

    File.join(__dir__, '../../../audio') on(/\A\[(High|Disaster)\]/i, name: 'alert', all: true) def alert(message) Thread.start { invoke_command("mpg123 -q #{BASE_DIR}/#{fi end end end end
  44. ➙תדךꟚ涪 ֿ׸ַ׵ךꟚ涪

  45. ➙תדךꟚ涪 ֿ׸ַ׵ךꟚ涪

  46. 3VCZPO3BJMTפך獳遤䨌殛 ˖ .PCB4J'ה3VCZPO3BJMTדر٦ةك٦أ׾Ⱏ剣ׅ׷ ˖ ٔغ٦أفٗؗء׾鏣縧׃ծ63-⽃⡘דⴖ׶剏ִגְֻ 3FWFSTF1SPYZ SFQMBDFEQBUI PMEQBUI %BUBCBTF

  47. ؽٕسفٗإأך荈⹛⻉ $PEF%FQMPZ TUBHJOH 4MBDL $PEF%FQMPZ QSPEVDUJPO .JOB FTBJP 鸐濼 鎸ꐮ

  48. None
  49. None
  50. None
  51. None
  52. ،آٍ؎ٕꟚ涪ךֶ秈勲 ˖ 㡮׌׃גְֲֿ ˖ 秈勲׾ת׮׹ֲ

  53. 剢鎘歗 加ס׶ִַ׶ ꆃأفٔٝزٖؽُ٦ 嫣傈劉⠓ Ꟛ涪

  54. (JU)VCفؙٕٔؒأز侧䱿獳         ݄

    ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ 1FSM 3VCZ
  55. ؒٝآص،ؚٔٝך顑⟣罏ה׃ג וך״ֲז䨌殛׾ה׷ַ ˖ "84הرـؔفأ ˖ 3VCZPO3BJMTה،آٍ؎ٕꟚ涪 3VCZث٦ي

  56. None