Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
開発するように運用するインフラ JAWS DAYS 2015
Search
mdoi
March 22, 2015
56
15k
開発するように運用するインフラ JAWS DAYS 2015
mdoi
March 22, 2015
Tweet
Share
More Decks by mdoi
See All by mdoi
Sensu と PagerDuty を使って眠れない日々を実装する
mdoi
11
2.8k
Pull Request ベースのインフラ運用と Cookbook CI
mdoi
23
3k
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
Rails Girls Zürich Keynote
gr2m
93
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Visualization
eitanlees
144
15k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Transcript
։ൃ͢ΔΑ͏ʹӡ༻͢Δ Πϯϑϥ ,BJ[FO1MBUGPSN*ODɹډɹਖ਼ߦ +"84%":4
ࣗݾհ ډɹਖ਼ߦ (@m_doi) Kaizen Platform Inc ΠϯϑϥΤϯδχΞ • ͜Ε·Ͱ •
ϑΟʔνϟʔϑΥϯͷιϑτΣΞ։ൃ • SNS/ιγϟήܥͷωοτϫʔΫ / αʔόΤϯδχΞ • ࢹγεςϜɺӡ༻ͷͨΊͷιϑτΣΞ։ൃ • ͓ؾʹೖΓͷAWSαʔϏε • DynamoDB ͱ Kinesis
ࠓͷ͓ • Kaizen Platform ͷ։ൃଆͷϫʔΫϑϩʔ • Kaizen Platform ͷӡ༻ଆͷϫʔΫϑϩʔ •
͜ΕΒͷϫʔΫϑϩʔʹࠐΊͨࢥ • ͓·͚
None
EC2 Instance VPC ELB Route 53 S3 Glacier CloudFront RDS
ElastiCache DynamoDB
• ཧը໘ • A/Bςετ࣮ߦ༻ͷ JavaScript ͷ৴ • A/Bςετͷܭଌ
None
None
None
։ൃଆͷϫʔΫϑϩʔ
• Work In Progress Ͱ Pull Request • ։ൃ •
ϨϏϡʔ • QA • ຊ൪ϦϦʔε ։ൃϓϩηε
• Work In Progress Ͱ Pull Request • ։ൃ •
ϨϏϡʔ • QA • ຊ൪ϦϦʔε ։ൃϓϩηε
master QA ຊ൪ ։ൃϒϥϯν 2"ϓϩηε։࢝ ຊ൪ڥʹσϓϩΠ ։ൃϓϩηε
Pull Request
ϨϏϡʔґཔ Pull Request ͷ ID Λఴ͑ͯϨϏϡʔґཔ
ϨϏϡʔ PRͰɺҙΛఴ͑ͯϨϏϡΞʔʹϝϯγϣϯ
ϨϏϡʔ
• Work In Progress Ͱ Pull Request • ։ൃ •
ϨϏϡʔ • QA • ຊ൪ϦϦʔε ։ൃϓϩηε
master QA ຊ൪ ։ൃϒϥϯν 2"ϓϩηε։࢝ ຊ൪ڥʹσϓϩΠ ϦϦʔεϓϩηε
ϦϦʔεϓϩηε E2E Test Deploy Unit Test
• CI ͷ SaaS • fooϒϥϯνʹpushͨ͠Βbar͢Δ • foo, bar ͷ෦Λࡉ੍͔͘ޚՄೳ
• ୯७ͳίϚϯυΛ࣮ߦ͢Δ • ࣗ࡞ͨ͠ҙͷγΣϧεΫϦϓτΛ࣮ߦ͢Δ CircleCI
• CI ͷ SaaS • fooϒϥϯνʹpushͨ͠Βbar͢Δ • foo, bar ͷ෦Λࡉ੍͔͘ޚՄೳ
• ୯७ͳίϚϯυΛ࣮ߦ͢Δ • ࣗ࡞ͨ͠ҙͷγΣϧεΫϦϓτΛ࣮ߦ͢Δ CircleCI ͭ·ΓɺGitHub ͷ ҙͷϒϥϯνͷ push Λܖػʹɺ ༷ʑͳϫʔΫϑϩʔΛఆٛͰ͖Δɻ
ϦϦʔεϓϩηε master ϒϥϯνͷ push Λܖػʹ Unit Test Λ࣮ߦ e2e ϒϥϯνͷ
push Λܖػʹ E2E Test Λ࣮ߦ E2E Test Deploy Unit Test deploy ϒϥϯνͷ push Λܖػʹ Deploy Λ࣮ߦ
ϦϦʔε࡞ۀ։࢝ σϓϩΠ༻ͷ Pull Request Λ࡞ νϟοτͰίϚϯυΛୟ͘ͱͬͯ͘ΕΔ
ϦϦʔε࡞ۀ QAڥʹσϓϩΠ͞ΕΔ ಉ࣌ʹຊ൪σϓϩΠͷ Pull Request ͕࡞͞ΕΔ
ϦϦʔε࡞ۀ ຊ൪σϓϩΠͷ Pull Request ʹνΣοΫϦετ͕Ͱ͖Δ ͦΕͧΕͷίϛοτͷಈ࡞֬ೝΛऴ͑ͨΒνΣοΫΛ͚Δ
E2E ςετ headless browser ͰγφϦΦΛςετ
E2E ςετ QAڥͰ࣮ࢪ
E2E ςετ ΠϯϑϥΤϯδχΞνϟοτ͔Β؆୯ʹ࣮ߦͰ͖Δ ͜Ε͕ޙʑʹཱͭ
ϦϦʔε࡞ۀ ͯ͢ͷ֬ೝ࡞ۀ͕ऴΘΔͱɺ ຊ൪σϓϩΠ༻ͷϒϥϯνΛmerge ຊ൪ڥʹσϓϩΠ͕։࢝͞ΕΔ
ϒϥϯνͷ push/merge ΛτϦΨʹ master QA ຊ൪ ։ൃϒϥϯν Unit Test ͕Δ
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ 2"ϓϩηε։࢝NBTUFS2"ͷ1VMM3FRVFTU࡞NFSHF 2"ڥʹσϓϩΠ
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ ֤ࣗɺಈ࡞֬ೝ &&ςετ࣮ߦ
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ 2"ຊ൪ͷ1VMM3FRVFTUΛNFSHF ຊ൪ڥʹσϓϩΠ
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ ֤ࣗɺಈ࡞֬ೝ &&ςετ࣮ߦ
• GitHub Λத৺ͱͨ͠։ൃϑϩʔ • CircleCI Λத৺ͱͨ͠ϦϦʔεϑϩʔ • GitHub ͱ CircleCI
ͱ νϟοτͷૢ࡞ Ͱ݁ ·ͱΊΔͱ
ӡ༻ଆͷϫʔΫϑϩʔ
ߏཧ
• Work In Progress Ͱ Pull Request • ߏมߋΛ Chef
recipe ʹམͱ͜͠Ή • ϨϏϡʔ • ߏஙςετ • ຊ൪ద༻ ӡ༻ϓϩηε
ߏཧ
ߏཧ 1. recipe ͷ࡞ 2. push 3. ࢼݧߏஙٴͼServerspec ʹΑΔݕূ 4.
ߏங༻ϒϥϯν ͷ merge Λܖػʹ ຊ൪ڥʹద༻
ߏཧ 1. recipe ͷ࡞ 2. push 3. push Λܖػʹࢼݧߏஙٴͼ Serverspec
ʹΑΔݕূ 5. ߏங༻ϒϥϯνͷ merge Λܖػʹ ຊ൪ڥʹద༻ 4. νϟοτͰ ߏங༻ϒϥϯνͷ merge Λࢦࣔ
ߏมߋΛมߋΛ Chef recipe ʹམͱ͜͠Ή ߏཧ
ߏมߋΛมߋΛ Chef recipe ʹམͱ͜͠Ή ߏཧ
push ͯ͠ CI Λ࣮ߦ & ͳ͚Ε master merge ߏཧ
Chat Ͱߏங༻ϒϥϯνͷ merge Λࢦࣔ ߏཧ
ߏཧ hubot ͕ ߏங༻ pull request Λ࡞Δ
ߏཧ hubot ͕ ߏங༻ pull request Λ࡞Δ
มߋͷৄࡉͯ͢pull request ͷதʹΔ ߏཧ
࡞ۀͷৄࡉͯ͢νϟοτͱCircleCIʹΔ ߏཧ
࡞ۀͷৄࡉͯ͢νϟοτͱCircleCIʹΔ ߏཧ
ߏཧ ࡞ۀͷৄࡉͯ͢νϟοτͱCircleCIʹΔ
ߏมߋޙͷE2E ςετ େ͖ͳߏมߋΛՃ͑ͯɺෆ҆ͳ߹ E2EςετΛࣗͰճͯ͠ɺαʔϏεͷਖ਼ৗੑΛ֬ೝ
ߏมߋޙͷE2E ςετ େ͖ͳߏมߋΛՃ͑ͯɺෆ҆ͳ߹ E2EςετΛࣗͰճͯ͠ɺαʔϏεͷਖ਼ৗੑΛ֬ೝ ΠϯϑϥΤϯδχΞతࢹͰɺ͜Ε͕ͱͯศར ΠϯϑϥΤϯδχΞ͚ͩͰɺ ͋ΔఔαʔϏεͷਖ਼ৗੑ͕֬ೝͰ͖Δ
ϒϥϯνͷ push/merge ΛτϦΨʹ master QA ຊ൪ ։ൃϒϥϯν ࢼݧߏங / Serverspec
ʹΑΔCI
ϒϥϯνͷ push / merge ΛτϦΨʹ master cook/QA DPPLຊ൪ ߏมߋΛ2"ڥʹద༻ͯ֬͠ೝ NBTUFSDPPL2"ͷ1VMM3FRVFTU࡞NFSHF
2"ڥʹ৽͍͠SFDJQFͰDPPL hubot cook run qa-***
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ ֤ࣗɺಈ࡞֬ೝ &&ςετ࣮ߦ
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ NBTUFSDPPLຊ൪ͷ1VMM3FRVFTUΛNFSHF ৽͍͠SFDJQFͰຊ൪ڥΛDPPL
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ ద༻݁Ռ֬ೝ &&ςετ࣮ߦ
• GitHub Λத৺ͱͨ͠ߏཧϑϩʔ • CircleCI Λத৺ͱͨ͠มߋద༻ϑϩʔ • GitHub ͱ CircleCI
ͱ νϟοτͷૢ࡞Ͱ ݁ ·ͱΊΔͱ
։ൃϓϩηεͱӡ༻ϓϩηε ͷൺֱ
• Work In Progress Ͱ Pull Request • ։ൃ •
ϨϏϡʔ • QA • ຊ൪ϦϦʔε ։ൃϓϩηε
• Work In Progress Ͱ Pull Request • ߏཧπʔϧΛ༻ͨ͠ߏஙखॱ࡞ •
ϨϏϡʔ • ߏஙςετ • ຊ൪ద༻ ӡ༻ϓϩηε
• ։ൃ • GitHub Λத৺ͱͨ͠։ൃϑϩʔ • CircleCI Λத৺ͱͨ͠ϦϦʔεϑϩʔ • GitHub
ͱ CircleCI ͱ νϟοτͷૢ࡞Ͱ݁ • ӡ༻ • GitHub Λத৺ͱͨ͠ߏཧϑϩʔ • CircleCI Λத৺ͱͨ͠มߋద༻ϑϩʔ • GitHub ͱ CircleCI ͱ νϟοτͷૢ࡞Ͱ݁ ൺֱ
ϓϩηεΛ߹ΘͤΔϝϦοτ • ։ൃଆΠϯϑϥͷมߋΛ͢Δ͜ͱ͕ग़དྷΔ • ٯ·ͨવΓ • ։ൃଆͰΓͨ͘ͳΔมߋ • ϦόʔεϓϩΩγͰ̋̋ϔομ͚͍ͨ •
̋̋ϑΝΠϧΛஔ͍ͨ͠ • ՃػೳͷͨΊʹ̋̋ύοέʔδΛೖΕ͍ͨ
ϓϩηεΛ߹ΘͤΔϝϦοτ • ։ൃଆΠϯϑϥͷมߋΛ͢Δ͜ͱ͕ग़དྷΔ • ։ൃଆͰΓͨ͘ͳΔมߋ • ϦόʔεϓϩΩγͰ̋̋ϔομ͚͍ͨ • ̋̋ϑΝΠϧΛஔ͍ͨ͠ •
ՃػೳͷͨΊʹ̋̋ύοέʔδΛೖΕ͍ͨ Dev < ͜ΕೖΕ͍ͨͰ͢ Ops < ҰճϛʔςΟϯά͠·͠ΐ͏͔ ʙϛʔςΟϯάʙ Dev < ͜ΕೖΕ͍ͨͰ͢ Ops < ͦͦͳΜͰඞཁͳΜͰ͚ͨͬ͠ Dev < ͔͔͔͔͘͘͠͡ Ops < Ͱௐͯ͠ɺ݄̋☓ʹೖΕ·͠ΐ͏ɻ୲ऀ̋̋͞ ΜΞαΠϯͰɻ ଓ͘…
ϓϩηεΛ߹ΘͤΔϝϦοτ • ։ൃଆΠϯϑϥͷมߋΛ͢Δ͜ͱ͕ग़དྷΔ • ։ൃଆͰΓͨ͘ͳΔมߋ • ϦόʔεϓϩΩγͰ̋̋ϔομ͚͍ͨ • ̋̋ϑΝΠϧΛஔ͍ͨ͠ •
ՃػೳͷͨΊʹ̋̋ύοέʔδΛೖΕ͍ͨ ɾͦ͜·ͰෳࡶͳมߋͰͳ͍ ɾಈ͖ʹΠϯύΫτΛ༩͑Δͱͯ͠ΠϯϑϥΤϯδχΞΛ ௨ͨ͠ϨϏϡʔͰνΣοΫ
KAIZEN ΤϯδχΞߦಈࢦ
KAIZEN ΤϯδχΞߦಈࢦ
ݖҖతʹͳΒͳ͍ DevOps Day Tokyo 2013 @mirakui ͞ΜͷεϥΠυΑΓҾ༻
• डཧͯ͠ڐՄΛग़ཱ͢ͷਓؒݖҖతʹͳ Γ͕ͪ • ීஈ͔Βҙࣝ͠ͳ͍ͱࣗͰͦ͏ͳΔ͕࣌ ͋Δ ݖҖతʹͳΒͳ͍
• ։ൃͱӡ༻ͷϓϩηεΛग़དྷΔ͚ͩ߹ΘͤΔ • ։ൃ͕ӡ༻ʹࢀՃ͢ΔෑډΛԼ͛Δ • Ζ͏ͱࢥ͑Ͱ͖Δͱ͍͏ڥ • ΠϯϑϥΤϯδχΞ͜Θ͘ͳ͍ ·ͱΊΔͱ
͔͜͜Β͓·͚
• ຊ৭ʑ͋Γ·ͨ͠ • དྷ৭ʑ͋ΔͰ͠ΐ͏ ηΩϡϦςΟΞοϓσʔτ
ηΩϡϦςΟΞοϓσʔτ νϟοτ͔ΒηΩϡϦςΟΞοϓσʔτΛࢦࣔ
ηΩϡϦςΟΞοϓσʔτ yum --secuity check-update ͷ݁ՌΛऔಘ
ηΩϡϦςΟΞοϓσʔτ ͦͷ༰͔Β Pull Request Λ࡞ͯ͠ɺΠϯϑϥϝϯόʔʹϝϯγϣϯ
ηΩϡϦςΟΞοϓσʔτ ϨϏϡʔͯ͠ͳ͚Ε୲ऀ͕ Pull Request Λ merge
ηΩϡϦςΟΞοϓσʔτ merge Λܖػʹɺରͷαʔόʹରͯ͠ yum --security -y update
ηΩϡϦςΟΞοϓσʔτ E2E ςετͷ࣮ߦChatܦ༝ͰՄೳͳͷͰɺಉ࣌ʹ࣮ߦ ࠓճͷߋ৽͕ΞϓϦέʔγϣϯͷಈ࡞ʹӨڹΛ༩͍͑ͯͳ͍͔νΣοΫ
ݱߦͷӡ༻ϓϩηεͷ՝
CircleCI ͕ϘτϧωοΫ
CircleCI ͕ϘτϧωοΫ
͍ͬͯΔ SaaS Ͱྑ͔ͬͨͷ
None
Bugsnag ΤϥʔΛݕͯ͠ɺݟ͘͢μογϡϘʔυʹ·ͱΊͯ͘ΕΔ
Bugsnag Slack ͷνϟοτʹ௨ग़ͤΔ Կճ·Ͱڐ༰͢Δ or ͜ͷύλʔϯεϧʔ͢Δ ͳͲͷௐՄೳ
Pingdom http(s) ͷΤϯυϙΠϯτͷ֎෦͔Βࢹ ෳͷڌ͔ΒࢹΛߦ͏
PagerDuty ো࣌ͷ௨Λߦͬͯ͘ΕΔαʔϏε on-call schedule ʹैͬͯి / SMS / εϚʔτϑΥϯΞϓϦͷ௨
PagerDuty Sensu Pingdom ͱͷ Integration ؆୯
PagerDuty ࠓ̋̋͞ΜٳΈ͔ͩΒɺon-call εέδϡʔϧม͓͑ͯ͜͏ ͳͲͷௐ༰қ
We’re Hiring! https://kaizenplatform.com/hiring/engineer.html