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
DevOps for beginners
Search
Kohei Ota
June 30, 2018
1
470
DevOps for beginners
Kohei Ota
June 30, 2018
Tweet
Share
More Decks by Kohei Ota
See All by Kohei Ota
CloudNative Meets WebAssembly: Exploring Wasm's Potential to Replace Containers
inductor
3
1.4k
The Cloud Native Chronicles: 10 Years of Community Growth Inside and Outside Japan
inductor
0
95
Cracking the KubeCon CfP
inductor
3
430
KubeCon Recap -Platform migration at Scale-
inductor
1
930
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
440
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
26
6.1k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
740
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.2k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
19
5.9k
Featured
See All Featured
The Invisible Side of Design
smashingmag
297
50k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
What's new in Ruby 2.0
geeforr
343
31k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
830
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Music & Morning Musume
bryan
46
6.2k
Fireside Chat
paigeccino
33
3k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Happy Clients
brianwarren
98
6.7k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Transcript
DevOps ͜ͱ͡Ί(ॳڃฤ) At Πϯϑϥษڧձ Presented by inductor
͋͐͡Μͩ ࣗݾհ DevOpsͱ ·ͱΊ
ࣗݾհ inductor (Twitter: @_inductor_) Z◦Z◦φϯτΧ͍ͬͯ͏ձࣾͷ ΠϯϑϥΤϯδχΞ(AWS) աڈͷ৬Ͱ։ൃɾӡ༻ͷ ܦݧ͋Γ
DevOpsͬͯͳ͋ʹʁ
ࠓ͜Ε͚֮ͩ͑ͯؼ͍ͬͯͩ͘͞
DevOpsจԽʂʂʂ
ʁʁʁ
ࡢࠓͷITۀքʹ͓͚Δମ࣭ͷมԽ ΞϓϦέʔγϣϯΠϯϑϥͷ։ൃεΩʔϜ͕มԽͭͭ͋͠Δ ύοέʔδΛ1͖ΓͰͯ͠ऴΘΓͰࡁ·ͳ͍͜ͱ͕૿͖͑ͯͨ ITͷਐԽͷʹ͑͏ΔΑ͏ʹ͍ͨ͠(e.g. ੬ऑੑରԠ, ػೳՃ etc) ΞδϟΠϧͳ։ൃΛऔΓೖΕΔۀքɾϏδωε͕૿͑ͨ Ϗδωεʹର͢Δεϐʔυײɺ৽͍͠ͷͰΞϐʔϧ͍ͨ͠ͱ͍͏ ϚʔέςΟϯάઓུతଆ໘ͳͲͷاըαΠυͷཁʹ͑ΒΕΔΈͮ͘Γ
ͭ·ΓɺΞϓϦ։ൃػೳՃ ༷มߋͳͲʹର͢Δ εϐʔυΛٻΊΒΕͯେมʂ
Πϯϑϥӡ༻ͷؾ͍࣋ͪͯΈ·͠ΐ͏
ӡ༻ʹେ͖ͳෛ୲͕ൃੜ͢Δ ӡ༻ͷۀʮʑͷ࡞ۀʯΛԁʹਐΊΔ͜ͱ มԽ͕͋Δͱ࡞ۀऀͷίετ্͕͕ͬͯ͠·͏ ࡞ۀ༰ɺ༷มߋʹର͢ΔϚχϡΞϧͳͲͷυΩϡϝϯτͷै σϓϩΠ࡞ۀ͕िʹ1ճʁͳΊͯΜͷʁ ͦͦӡ༻ʹίετ͔͚ͨ͘ͳ্͍ͬͯͷਓୡ͕ݴ͏͔Βͦ͜ɺ ʑͷۀͷͨΊʹͦͦ͜͜ΪϦΪϦͷίετͰճͯ͠ΔΜͰ͕͢
ӡ༻ɺʑͷۀΛ ҆શʹ͜ͳ͍ͨ͠ʂ ༨ܭͳมԽɺ ۃྗՃ͑ͳ͍Ͱཉ͍͠ʂ
όνόνͯ͠·͢Ͷ
Ͱͬͯʁ
։ൃӡ༻ͷຊདྷͷతΛߟ͑Δ ։ൃɺʮՁʯΛʮ࡞Γଓ͚Δ͜ͱʯʹҙຯ͕͋Δ ӡ༻ɺʮՁʯΛʮಧ͚ଓ͚Δ͜ͱʯʹҙຯ͕͋Δ ͲͪΒɺϏδωεʹԠ͑ΔͨΊͷखஈͰ͋Δ ӡ༻։ൃɺຊདྷͷతಉ͡ͳΜͰ͢ʂ
ͦ͜ͰZOZOSUITDevOpsͰ͢Α
DevOpsͬͯͳ͋ʹʁ
DevOpsͰΑࣖ͘ʹ͢Δݴ༿ ΞδϟΠϧ։ൃ ϚΠΫϩαʔϏεΞʔΩςΫνϟ Ϋϥυ Infrastructure as Code ߏཧ ࣗಈԽ CI/CDύΠϓϥΠϯ
ϩάɾσʔλͷՄࢹԽ
DevOpsͱ ϏδωεͷՁΛސ٬ʹಧ͚ΔͨΊʹɺʮ։ൃ(Dev)ʯͱʮӡ༻(Ops)ʯ͕ Ұؙͱͳͬͯಈ͜͏ͱ͢ΔҰͭͷߟ͑ํ ۩ମతʹڠྗ͠߹͏͜ͱͰɺνʔϜײͰੜ͡ΔຎࡲΦʔόʔϔου ΛݮΒͨ͢Ίʹಈ͘͜ͱΛࢦ͢ ʮ۩ମతͳʯఆٛͳ͍ ͜͜10ऑͰɺେମͷΈ͕ܾ·Γͭͭ͋Δ
DevOpsʹΑ͋͘Δצҧ͍ DevOps۩ମతͳख๏Ͱͳ͍ CI/CDɺίϯςφɺΫϥυͳͲΛಋೖ͢Δʹʮ४උʯ͕ඞཁ ͍͖ͨͩͳΓಥͬࠐΜͰͤʹͳΕͳ͍ ͨͩͷແܭըͳࣗಈԽଐਓԽΛੜΉͷͰةݥ ൿͷλϨࣗಈԽεΫϦϓτ
DevOpsΛཧղͨ͠ਓ͕ɺ৫νʔϜͷ ΈΛগͣͭ͠ม͍͑ͯ͘ඞཁ͕͋Γ·͢
1. ΞϓϦέʔγϣϯ։ൃͷΈΛม͑Δ
ϚΠΫϩαʔϏεΞʔΩςΫνϟ ܧଓతʹมߋΛՃ͑ΔͨΊʹɺΞϓϦέʔγϣϯઃܭॏཁ 1ίʔυͷมԽ͕10ݸͷΞϓϦʹӨڹ͢Δͷ ʮૄ݁߹ʯͰɺʮΛ͚ͨʯίʔυΛॻ͔ͳ͍ͱ͍͚ͳ͍ 1ϑΝΠϧͷindex.phpͰશͯΛॲཧ͢Δͷɾɾɾ ೝূपΓͳͲͷॲཧͪΌΜͱ࣮ͷ͋ΔϑϨʔϜϫʔΫΛ͏ͳͲͳͲ ύοέʔδཧγεςϜॏཁ
ςετΛॻ͜͏ ن͕େ͖͍΄Ͳɺςετͷنେ͖͘ͳΔ ਓతෛ୲Λগ͠ͰݮΒͨ͢ΊʹɺςετΛ͖ͪΜͱॻ͍ͯෆཁͳϛεΛݮΒͦ͏ ςετࣗಈԽʹΑͬͯʮશʹʯόάΛ͛ΔΘ͚Ͱͳ͍͕ɺجຊతͳϛεͷ େ෦͙͜ͱ͕Ͱ͖Δ ͩ͘Βͳ͍ϛεΛݮΒͯ͠ɺʮຊདྷͷۀʯʹूதͰ͖ΔΑ͏ʹ ςετͦͷͷΛॻ͘ίετ͔͔ΔͷͰɺΧόϨοδͲ͜·ͰऔΔ͔ όϥϯεେࣄ
GitͳͲͷόʔδϣϯཧγεςϜ ͳͲͱॻ͍͕ͨɺن͕େ͖͚Εେ͖͍΄ͲGitʹͨ͠΄͏͕͈́ ෳਓͰͷ։ൃΛ࠷ॳ͔Βҙࣝͨ͠ࢄܕͷόʔδϣϯཧγεςϜ ࣮: LinuxΧʔωϧɺओཁͳΞϓϦέʔγϣϯϑϨʔϜϫʔΫͷଟ͘ ʮ୭͕ʯʮ͍ͭʯʮͳΜͷͨΊʹʯมߋΛՃ͔͑ͨཤྺΛ͢ ͕͋ͬͨ߹ʹ؆୯ʹΓ͕͠Ͱ͖Δ GitHubɺGitHub Enterprise(ΦϯϓϨ༻)ɺGitLabɺGiteaͳͲ ͍Ζ͍ΖͳGitϗεςΟϯάαʔϏεͷબࢶ͋Δ
CIπʔϧΛಋೖ͠Α͏ Gitɺςετίʔυͱ࿈ܞͯ͠ɺίʔυʹมߋ͕Ճ͑ΒΕͨΒࣗಈͰςε τ͕ΔΑ͏ͳΈΛ࡞Δ͜ͱ͕Ͱ͖Δ ܧଓతΠϯςάϨʔγϣϯʹΑͬͯɺʮมߋѱͩʯͱ͍͏ؾ࣋ͪΛେ ෯ʹݮͤ͞Δ͜ͱ͕Ͱ͖Δ CIπʔϧ͕Δ࢟ΛΈ͍ͯΔͱ৺͕҆Β͔ʹͳΔ
2. ΞϓϦέʔγϣϯσϓϩΠͷΈΛม͑Δ
σϓϩΠͷࣗಈԽ CIπʔϧʹʮύΠϓϥΠϯʯʮϫʔΫϑϩʔʯͱ͍ͬͨػೳ͕͋Δ ͋Δಈ࡞Λ࣮ߦͤͯ͞ޭͨ͠Β࣍ͷॲཧʹߦ͘ͳͲ ςετ͕ͬͯͳ͚Ε։ൃڥʹσϓϩΠ͢Δɺͱ͔ ਓͷखʹΑΔԹ͔Έͷ͋ΔσϓϩΠ͔͔࣌ؒΔ͠ϛε͋Δ
3. ΠϯϑϥͷΈΛม͑Δ
Ϋϥυ vs ΦϯϓϨ ผʹΫϥυ͡Όͳ͍͍ͯ͘Μ͡ΌͶʢͳ΄͡ʣ ਖ਼ɺͳΜͷతͰͲ͜ʹίετΛ͖͍͔͕ͨ͞ॏཁͰ͔͠ͳ͍ DropboxΫϥυʹҠߦ͚ͨ͠Ͳ݁ہΦϯϓϨʹͨ͠Β͍͠ ͋ΔҰఆͷنΛ͑ΔͱɺΦϯϓϨͷ΄͏͕ίετԼ͕Δ ʢͱࢥ͏ʣ
Infrastructure as Codeͱߏཧ ߏཧͷࣗಈԽͱɺNWϚγϯͷཧΛίʔυϕʔεͰߦ͏͜ͱ AnsibleɺTerraformɺChefͳͲ͍Ζ͍Ζͳπʔϧ͕͋Δ ਓͷखʹΑΔԹ͔Έͷ͋ΔཧϚγϯͷௐୡʮۃྗʯආ͚͍ͨ ߏཧΛίʔυԽˠGitཧ͢Δ͜ͱͰԿ͕͍ͭߦΘΕ͔ͨ໌֬ʹ͢Δ ίϯςφԽɺΫϥυωΠςΟϒԽ͜Εͷ1ͭͷखஈͰ͔͠ͳ͍ ·ͣϩʔΧϧ։ൃڥͱݴͬͨখ͍͞ͱ͜Ζ͔Β͡Ί͍ͯ͘
ϩάͷՄࢹԽɾεέʔϦϯά ߏཧΠϯϑϥΛࣗಈԽ͢Δ͜ͱͰͰ͖Δ͜ͱʹͳΔ͜ͱͷ1ͭ εέʔϥϒϧͳߏʹͰ͖ΔͷͰɺՄ༻ੑ͕୲อ͍͢͠ ϩάΛՄࢹԽπʔϧʹ৯ΘͤΔ͜ͱͰϞχλϦϯάͷίετΛԼ͛Δ ՄࢹԽʹΑͬͯϢʔβʔ֤୲ऀͷಈ͖͕ಡΊΔΑ͏ʹͳΔ ͍Βͳ͍ػೳͷআɺύϑΥʔϚϯεվળͷͨΊͷେ͖ͳࢀߟࢿྉʹͳΔ ʢ͋Μ·Γͷৄ͍͠Ͱͳ͍ͷͰৄ͍͠ਓཔΜͩʣ
3. νʔϜͷߟ͑ํΛม͑Δ
มԽɺࠓ·ͰͷߏѱͰͳ͍ Α͘ੲͷߏʹจ۟Λݴ͏ਓ͕͍Δ͕ɺͦΕҧ͏ 10ޙʹࠓͷʮֵ৽తͳߟ͑ํʯͩͬͯϨΨγʔʹͳ͍ͬͯΔ͔ ࠓ·Ͱͷߏͷྑ͞Λ׆͔͠ͳ͕Βɺ৽͍͠ߏΛߟ͑Δ ਓߏܟҙΛͬͯࣄ͍ͨ͠
νʔϜϏϧσΟϯά Έ͕มΘΔͱ͍͏͜ͱɺਓͷߟ͑ํม͑Δඞཁ͕͋Δ ࣗಈԽѱɺมԽѱͩͱࢥ͍ͬͯΔਓͨͪʹมԽΛڧཁ͢Δͷ͍͠ ͳͥͦ͏͖͢ͳͷ͔ɺ͖ͪΜͱ্ʢ͞Βʹͦͷ্ʣͳͲަ͑ͯ ਅʹ࣌ؒΛॻ͚ͯٞ͢Δ֮ޛඞཁ ՄೳͰ͋ΕʑͷΠϯϑϥͱผͷ෦ୂΛ࡞ͬͯঃʑʹҠߦ͢Δͷ͕ ·͍͜͠ͱ͋ΔʢʑͷۀͷӨڹ͋ΔͷͰʣ
·ͱΊ
·ͱΊ DevOpsɺ։ൃ͕։ൃʹɺӡ༻͕ӡ༻ʹूத͢ΔͨΊʹޓ͍ʹ औΒͳ͚ΕͳΒͳ͍าΈدΓͷಈ͖ ܧଓతʹՁΛఏڙ͠ଓ͚Δ͖αʔϏε͔Ͳ͏͔ݟۃΊΔ ࣾʹཧղͯ͘͠ΕΔਓΛΊΔ ։ൃɾӡ༻ͷڠྗମ੍Λ࡞Δ طଘҊ݅ʹ͓͚ΔDevOps࣮ݱͷಓͷΓ͍
࠷ޙʹ͏Ұ
DevOpsจԽʂʂʂ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ