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 on Purpose - Digital PM Summit 2013
jponch
115
7k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
890
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Scaling GitHub
holman
458
140k
GraphQLとの向き合い方2022年版
quramy
43
13k
Speed Design
sergeychernyshev
25
620
YesSQL, Process and Tooling at Scale
rocio
169
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
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