開発するように運用するインフラ JAWS DAYS 2015
by
mdoi
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
։ൃ͢ΔΑ͏ʹӡ༻͢Δ Πϯϑϥ ,BJ[FO1MBUGPSN*ODɹډɹਖ਼ߦ +"84%":4
Slide 2
Slide 2 text
ࣗݾհ ډɹਖ਼ߦ (@m_doi) Kaizen Platform Inc ΠϯϑϥΤϯδχΞ • ͜Ε·Ͱ • ϑΟʔνϟʔϑΥϯͷιϑτΣΞ։ൃ • SNS/ιγϟήܥͷωοτϫʔΫ / αʔόΤϯδχΞ • ࢹγεςϜɺӡ༻ͷͨΊͷιϑτΣΞ։ൃ • ͓ؾʹೖΓͷAWSαʔϏε • DynamoDB ͱ Kinesis
Slide 3
Slide 3 text
ࠓͷ͓ • Kaizen Platform ͷ։ൃଆͷϫʔΫϑϩʔ • Kaizen Platform ͷӡ༻ଆͷϫʔΫϑϩʔ • ͜ΕΒͷϫʔΫϑϩʔʹࠐΊͨࢥ • ͓·͚
Slide 4
Slide 4 text
No content
Slide 5
Slide 5 text
EC2 Instance VPC ELB Route 53 S3 Glacier CloudFront RDS ElastiCache DynamoDB
Slide 6
Slide 6 text
• ཧը໘ • A/Bςετ࣮ߦ༻ͷ JavaScript ͷ৴ • A/Bςετͷܭଌ
Slide 7
Slide 7 text
No content
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
No content
Slide 10
Slide 10 text
։ൃଆͷϫʔΫϑϩʔ
Slide 11
Slide 11 text
• Work In Progress Ͱ Pull Request • ։ൃ • ϨϏϡʔ • QA • ຊ൪ϦϦʔε ։ൃϓϩηε
Slide 12
Slide 12 text
• Work In Progress Ͱ Pull Request • ։ൃ • ϨϏϡʔ • QA • ຊ൪ϦϦʔε ։ൃϓϩηε
Slide 13
Slide 13 text
master QA ຊ൪ ։ൃϒϥϯν 2"ϓϩηε։࢝ ຊ൪ڥʹσϓϩΠ ։ൃϓϩηε
Slide 14
Slide 14 text
Pull Request
Slide 15
Slide 15 text
ϨϏϡʔґཔ Pull Request ͷ ID Λఴ͑ͯϨϏϡʔґཔ
Slide 16
Slide 16 text
ϨϏϡʔ PRͰɺҙΛఴ͑ͯϨϏϡΞʔʹϝϯγϣϯ
Slide 17
Slide 17 text
ϨϏϡʔ
Slide 18
Slide 18 text
• Work In Progress Ͱ Pull Request • ։ൃ • ϨϏϡʔ • QA • ຊ൪ϦϦʔε ։ൃϓϩηε
Slide 19
Slide 19 text
master QA ຊ൪ ։ൃϒϥϯν 2"ϓϩηε։࢝ ຊ൪ڥʹσϓϩΠ ϦϦʔεϓϩηε
Slide 20
Slide 20 text
ϦϦʔεϓϩηε E2E Test Deploy Unit Test
Slide 21
Slide 21 text
• CI ͷ SaaS • fooϒϥϯνʹpushͨ͠Βbar͢Δ • foo, bar ͷ෦Λࡉ੍͔͘ޚՄೳ • ୯७ͳίϚϯυΛ࣮ߦ͢Δ • ࣗ࡞ͨ͠ҙͷγΣϧεΫϦϓτΛ࣮ߦ͢Δ CircleCI
Slide 22
Slide 22 text
• CI ͷ SaaS • fooϒϥϯνʹpushͨ͠Βbar͢Δ • foo, bar ͷ෦Λࡉ੍͔͘ޚՄೳ • ୯७ͳίϚϯυΛ࣮ߦ͢Δ • ࣗ࡞ͨ͠ҙͷγΣϧεΫϦϓτΛ࣮ߦ͢Δ CircleCI ͭ·ΓɺGitHub ͷ ҙͷϒϥϯνͷ push Λܖػʹɺ ༷ʑͳϫʔΫϑϩʔΛఆٛͰ͖Δɻ
Slide 23
Slide 23 text
ϦϦʔεϓϩηε master ϒϥϯνͷ push Λܖػʹ Unit Test Λ࣮ߦ e2e ϒϥϯνͷ push Λܖػʹ E2E Test Λ࣮ߦ E2E Test Deploy Unit Test deploy ϒϥϯνͷ push Λܖػʹ Deploy Λ࣮ߦ
Slide 24
Slide 24 text
ϦϦʔε࡞ۀ։࢝ σϓϩΠ༻ͷ Pull Request Λ࡞ νϟοτͰίϚϯυΛୟ͘ͱͬͯ͘ΕΔ
Slide 25
Slide 25 text
ϦϦʔε࡞ۀ QAڥʹσϓϩΠ͞ΕΔ ಉ࣌ʹຊ൪σϓϩΠͷ Pull Request ͕࡞͞ΕΔ
Slide 26
Slide 26 text
ϦϦʔε࡞ۀ ຊ൪σϓϩΠͷ Pull Request ʹνΣοΫϦετ͕Ͱ͖Δ ͦΕͧΕͷίϛοτͷಈ࡞֬ೝΛऴ͑ͨΒνΣοΫΛ͚Δ
Slide 27
Slide 27 text
E2E ςετ headless browser ͰγφϦΦΛςετ
Slide 28
Slide 28 text
E2E ςετ QAڥͰ࣮ࢪ
Slide 29
Slide 29 text
E2E ςετ ΠϯϑϥΤϯδχΞνϟοτ͔Β؆୯ʹ࣮ߦͰ͖Δ ͜Ε͕ޙʑʹཱͭ
Slide 30
Slide 30 text
ϦϦʔε࡞ۀ ͯ͢ͷ֬ೝ࡞ۀ͕ऴΘΔͱɺ ຊ൪σϓϩΠ༻ͷϒϥϯνΛmerge ຊ൪ڥʹσϓϩΠ͕։࢝͞ΕΔ
Slide 31
Slide 31 text
ϒϥϯνͷ push/merge ΛτϦΨʹ master QA ຊ൪ ։ൃϒϥϯν Unit Test ͕Δ
Slide 32
Slide 32 text
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ 2"ϓϩηε։࢝NBTUFS2"ͷ1VMM3FRVFTU࡞NFSHF 2"ڥʹσϓϩΠ
Slide 33
Slide 33 text
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ ֤ࣗɺಈ࡞֬ೝ &&ςετ࣮ߦ
Slide 34
Slide 34 text
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ 2"ຊ൪ͷ1VMM3FRVFTUΛNFSHF ຊ൪ڥʹσϓϩΠ
Slide 35
Slide 35 text
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ ֤ࣗɺಈ࡞֬ೝ &&ςετ࣮ߦ
Slide 36
Slide 36 text
• GitHub Λத৺ͱͨ͠։ൃϑϩʔ • CircleCI Λத৺ͱͨ͠ϦϦʔεϑϩʔ • GitHub ͱ CircleCI ͱ νϟοτͷૢ࡞ Ͱ݁ ·ͱΊΔͱ
Slide 37
Slide 37 text
ӡ༻ଆͷϫʔΫϑϩʔ
Slide 38
Slide 38 text
ߏཧ
Slide 39
Slide 39 text
• Work In Progress Ͱ Pull Request • ߏมߋΛ Chef recipe ʹམͱ͜͠Ή • ϨϏϡʔ • ߏஙςετ • ຊ൪ద༻ ӡ༻ϓϩηε
Slide 40
Slide 40 text
ߏཧ
Slide 41
Slide 41 text
ߏཧ 1. recipe ͷ࡞ 2. push 3. ࢼݧߏஙٴͼServerspec ʹΑΔݕূ 4. ߏங༻ϒϥϯν ͷ merge Λܖػʹ ຊ൪ڥʹద༻
Slide 42
Slide 42 text
ߏཧ 1. recipe ͷ࡞ 2. push 3. push Λܖػʹࢼݧߏஙٴͼ Serverspec ʹΑΔݕূ 5. ߏங༻ϒϥϯνͷ merge Λܖػʹ ຊ൪ڥʹద༻ 4. νϟοτͰ ߏங༻ϒϥϯνͷ merge Λࢦࣔ
Slide 43
Slide 43 text
ߏมߋΛมߋΛ Chef recipe ʹམͱ͜͠Ή ߏཧ
Slide 44
Slide 44 text
ߏมߋΛมߋΛ Chef recipe ʹམͱ͜͠Ή ߏཧ
Slide 45
Slide 45 text
push ͯ͠ CI Λ࣮ߦ & ͳ͚Ε master merge ߏཧ
Slide 46
Slide 46 text
Chat Ͱߏங༻ϒϥϯνͷ merge Λࢦࣔ ߏཧ
Slide 47
Slide 47 text
ߏཧ hubot ͕ ߏங༻ pull request Λ࡞Δ
Slide 48
Slide 48 text
ߏཧ hubot ͕ ߏங༻ pull request Λ࡞Δ
Slide 49
Slide 49 text
มߋͷৄࡉͯ͢pull request ͷதʹΔ ߏཧ
Slide 50
Slide 50 text
࡞ۀͷৄࡉͯ͢νϟοτͱCircleCIʹΔ ߏཧ
Slide 51
Slide 51 text
࡞ۀͷৄࡉͯ͢νϟοτͱCircleCIʹΔ ߏཧ
Slide 52
Slide 52 text
ߏཧ ࡞ۀͷৄࡉͯ͢νϟοτͱCircleCIʹΔ
Slide 53
Slide 53 text
ߏมߋޙͷE2E ςετ େ͖ͳߏมߋΛՃ͑ͯɺෆ҆ͳ߹ E2EςετΛࣗͰճͯ͠ɺαʔϏεͷਖ਼ৗੑΛ֬ೝ
Slide 54
Slide 54 text
ߏมߋޙͷE2E ςετ େ͖ͳߏมߋΛՃ͑ͯɺෆ҆ͳ߹ E2EςετΛࣗͰճͯ͠ɺαʔϏεͷਖ਼ৗੑΛ֬ೝ ΠϯϑϥΤϯδχΞతࢹͰɺ͜Ε͕ͱͯศར ΠϯϑϥΤϯδχΞ͚ͩͰɺ ͋ΔఔαʔϏεͷਖ਼ৗੑ͕֬ೝͰ͖Δ
Slide 55
Slide 55 text
ϒϥϯνͷ push/merge ΛτϦΨʹ master QA ຊ൪ ։ൃϒϥϯν ࢼݧߏங / Serverspec ʹΑΔCI
Slide 56
Slide 56 text
ϒϥϯνͷ push / merge ΛτϦΨʹ master cook/QA DPPLຊ൪ ߏมߋΛ2"ڥʹద༻ͯ֬͠ೝ NBTUFSDPPL2"ͷ1VMM3FRVFTU࡞NFSHF 2"ڥʹ৽͍͠SFDJQFͰDPPL hubot cook run qa-***
Slide 57
Slide 57 text
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ ֤ࣗɺಈ࡞֬ೝ &&ςετ࣮ߦ
Slide 58
Slide 58 text
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ NBTUFSDPPLຊ൪ͷ1VMM3FRVFTUΛNFSHF ৽͍͠SFDJQFͰຊ൪ڥΛDPPL
Slide 59
Slide 59 text
ϒϥϯνͷ push / merge ΛτϦΨʹ master QA ຊ൪ ద༻݁Ռ֬ೝ &&ςετ࣮ߦ
Slide 60
Slide 60 text
• GitHub Λத৺ͱͨ͠ߏཧϑϩʔ • CircleCI Λத৺ͱͨ͠มߋద༻ϑϩʔ • GitHub ͱ CircleCI ͱ νϟοτͷૢ࡞Ͱ ݁ ·ͱΊΔͱ
Slide 61
Slide 61 text
։ൃϓϩηεͱӡ༻ϓϩηε ͷൺֱ
Slide 62
Slide 62 text
• Work In Progress Ͱ Pull Request • ։ൃ • ϨϏϡʔ • QA • ຊ൪ϦϦʔε ։ൃϓϩηε
Slide 63
Slide 63 text
• Work In Progress Ͱ Pull Request • ߏཧπʔϧΛ༻ͨ͠ߏஙखॱ࡞ • ϨϏϡʔ • ߏஙςετ • ຊ൪ద༻ ӡ༻ϓϩηε
Slide 64
Slide 64 text
• ։ൃ • GitHub Λத৺ͱͨ͠։ൃϑϩʔ • CircleCI Λத৺ͱͨ͠ϦϦʔεϑϩʔ • GitHub ͱ CircleCI ͱ νϟοτͷૢ࡞Ͱ݁ • ӡ༻ • GitHub Λத৺ͱͨ͠ߏཧϑϩʔ • CircleCI Λத৺ͱͨ͠มߋద༻ϑϩʔ • GitHub ͱ CircleCI ͱ νϟοτͷૢ࡞Ͱ݁ ൺֱ
Slide 65
Slide 65 text
ϓϩηεΛ߹ΘͤΔϝϦοτ • ։ൃଆΠϯϑϥͷมߋΛ͢Δ͜ͱ͕ग़དྷΔ • ٯ·ͨવΓ • ։ൃଆͰΓͨ͘ͳΔมߋ • ϦόʔεϓϩΩγͰ̋̋ϔομ͚͍ͨ • ̋̋ϑΝΠϧΛஔ͍ͨ͠ • ՃػೳͷͨΊʹ̋̋ύοέʔδΛೖΕ͍ͨ
Slide 66
Slide 66 text
ϓϩηεΛ߹ΘͤΔϝϦοτ • ։ൃଆΠϯϑϥͷมߋΛ͢Δ͜ͱ͕ग़དྷΔ • ։ൃଆͰΓͨ͘ͳΔมߋ • ϦόʔεϓϩΩγͰ̋̋ϔομ͚͍ͨ • ̋̋ϑΝΠϧΛஔ͍ͨ͠ • ՃػೳͷͨΊʹ̋̋ύοέʔδΛೖΕ͍ͨ Dev < ͜ΕೖΕ͍ͨͰ͢ Ops < ҰճϛʔςΟϯά͠·͠ΐ͏͔ ʙϛʔςΟϯάʙ Dev < ͜ΕೖΕ͍ͨͰ͢ Ops < ͦͦͳΜͰඞཁͳΜͰ͚ͨͬ͠ Dev < ͔͔͔͔͘͘͠͡ Ops < Ͱௐͯ͠ɺ݄̋☓ʹೖΕ·͠ΐ͏ɻ୲ऀ̋̋͞ ΜΞαΠϯͰɻ ଓ͘…
Slide 67
Slide 67 text
ϓϩηεΛ߹ΘͤΔϝϦοτ • ։ൃଆΠϯϑϥͷมߋΛ͢Δ͜ͱ͕ग़དྷΔ • ։ൃଆͰΓͨ͘ͳΔมߋ • ϦόʔεϓϩΩγͰ̋̋ϔομ͚͍ͨ • ̋̋ϑΝΠϧΛஔ͍ͨ͠ • ՃػೳͷͨΊʹ̋̋ύοέʔδΛೖΕ͍ͨ ɾͦ͜·ͰෳࡶͳมߋͰͳ͍ ɾಈ͖ʹΠϯύΫτΛ༩͑Δͱͯ͠ΠϯϑϥΤϯδχΞΛ ௨ͨ͠ϨϏϡʔͰνΣοΫ
Slide 68
Slide 68 text
KAIZEN ΤϯδχΞߦಈࢦ
Slide 69
Slide 69 text
KAIZEN ΤϯδχΞߦಈࢦ
Slide 70
Slide 70 text
ݖҖతʹͳΒͳ͍ DevOps Day Tokyo 2013 @mirakui ͞ΜͷεϥΠυΑΓҾ༻
Slide 71
Slide 71 text
• डཧͯ͠ڐՄΛग़ཱ͢ͷਓؒݖҖతʹͳ Γ͕ͪ • ීஈ͔Βҙࣝ͠ͳ͍ͱࣗͰͦ͏ͳΔ͕࣌ ͋Δ ݖҖతʹͳΒͳ͍
Slide 72
Slide 72 text
• ։ൃͱӡ༻ͷϓϩηεΛग़དྷΔ͚ͩ߹ΘͤΔ • ։ൃ͕ӡ༻ʹࢀՃ͢ΔෑډΛԼ͛Δ • Ζ͏ͱࢥ͑Ͱ͖Δͱ͍͏ڥ • ΠϯϑϥΤϯδχΞ͜Θ͘ͳ͍ ·ͱΊΔͱ
Slide 73
Slide 73 text
͔͜͜Β͓·͚
Slide 74
Slide 74 text
• ຊ৭ʑ͋Γ·ͨ͠ • དྷ৭ʑ͋ΔͰ͠ΐ͏ ηΩϡϦςΟΞοϓσʔτ
Slide 75
Slide 75 text
ηΩϡϦςΟΞοϓσʔτ νϟοτ͔ΒηΩϡϦςΟΞοϓσʔτΛࢦࣔ
Slide 76
Slide 76 text
ηΩϡϦςΟΞοϓσʔτ yum --secuity check-update ͷ݁ՌΛऔಘ
Slide 77
Slide 77 text
ηΩϡϦςΟΞοϓσʔτ ͦͷ༰͔Β Pull Request Λ࡞ͯ͠ɺΠϯϑϥϝϯόʔʹϝϯγϣϯ
Slide 78
Slide 78 text
ηΩϡϦςΟΞοϓσʔτ ϨϏϡʔͯ͠ͳ͚Ε୲ऀ͕ Pull Request Λ merge
Slide 79
Slide 79 text
ηΩϡϦςΟΞοϓσʔτ merge Λܖػʹɺରͷαʔόʹରͯ͠ yum --security -y update
Slide 80
Slide 80 text
ηΩϡϦςΟΞοϓσʔτ E2E ςετͷ࣮ߦChatܦ༝ͰՄೳͳͷͰɺಉ࣌ʹ࣮ߦ ࠓճͷߋ৽͕ΞϓϦέʔγϣϯͷಈ࡞ʹӨڹΛ༩͍͑ͯͳ͍͔νΣοΫ
Slide 81
Slide 81 text
ݱߦͷӡ༻ϓϩηεͷ՝
Slide 82
Slide 82 text
CircleCI ͕ϘτϧωοΫ
Slide 83
Slide 83 text
CircleCI ͕ϘτϧωοΫ
Slide 84
Slide 84 text
͍ͬͯΔ SaaS Ͱྑ͔ͬͨͷ
Slide 85
Slide 85 text
No content
Slide 86
Slide 86 text
Bugsnag ΤϥʔΛݕͯ͠ɺݟ͘͢μογϡϘʔυʹ·ͱΊͯ͘ΕΔ
Slide 87
Slide 87 text
Bugsnag Slack ͷνϟοτʹ௨ग़ͤΔ Կճ·Ͱڐ༰͢Δ or ͜ͷύλʔϯεϧʔ͢Δ ͳͲͷௐՄೳ
Slide 88
Slide 88 text
Pingdom http(s) ͷΤϯυϙΠϯτͷ֎෦͔Βࢹ ෳͷڌ͔ΒࢹΛߦ͏
Slide 89
Slide 89 text
PagerDuty ো࣌ͷ௨Λߦͬͯ͘ΕΔαʔϏε on-call schedule ʹैͬͯి / SMS / εϚʔτϑΥϯΞϓϦͷ௨
Slide 90
Slide 90 text
PagerDuty Sensu Pingdom ͱͷ Integration ؆୯
Slide 91
Slide 91 text
PagerDuty ࠓ̋̋͞ΜٳΈ͔ͩΒɺon-call εέδϡʔϧม͓͑ͯ͜͏ ͳͲͷௐ༰қ
Slide 92
Slide 92 text
We’re Hiring! https://kaizenplatform.com/hiring/engineer.html