Dockerでアプリケーションを 本番リリースするまで
by
Ryo Tomidokoro
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
DockerͰΞϓϦέʔγϣϯΛ ຊ൪ϦϦʔε͢Δ·Ͱ 1)1$POGFSFODF *OOPWBUPS+BQBO*OD ॴ྄ &OHJOFFS
Slide 2
Slide 2 text
͓Βͤ εϥΠυSpeakerDeckʹΞοϓ͠·͕͢… ࡱӨࣗ༝ʹ͍ͯͯ͋͠Γ·ͤΜ !IBOIBO QIQDPOQIQDPO@
Slide 3
Slide 3 text
࣮ ԬͷϖνίϯͰಉ༷ͷηογϣϯΛͨ͠ https://speakerdeck.com/hanhan1978/dockerwoben-fan-deshi-tutemitefen-katutakoto
Slide 4
Slide 4 text
ྫ͑͜Μͳ༰ 1. ։ൃ࣌ʹԿΛ͖͔͢ʁ 2. CIͷ 3. ຊ൪Ͱdockerಈ͔࣌͢ͷ᠘
Slide 5
Slide 5 text
ࠓগ͠झΛม͑·͢ɻ
Slide 6
Slide 6 text
%PDLFSͷຊ൪ීٴ·ͩ·͍ͩ Docker৮ͬͯΈͨΒɺ͜Εྑ͍ͷͩͬͨʂ ͱ͍͑ɺ͍͖ͳΓձࣾʹDockerͷಋೖग़དྷͳ͍ ࠓΊ͓ͯ͜͏…(ٞͱ͔େมͩ͠) ݁Ռͱͯ͠ݟ͕ཷ·Βͳ͍ ͜ͷྲྀΕSubversion -> Git ͷ࣌ʹݟͨ
Slide 7
Slide 7 text
νϚνϚͨ͠ɺݱஈ֊Ͱແҙຯ
Slide 8
Slide 8 text
ຊͷςʔϚ
Slide 9
Slide 9 text
وํͷϋʔτʹՐΛ͚ͭΔ
Slide 10
Slide 10 text
ͭ·Γ ͜ͷηογϣϯΛػձʹ وํ͕ίϯςφΛຊ൪ʹ ϦϦʔεͨͯͨ͘͠·Βͳ͘ͳΔʂ ίϯςφຊ൪ϦϦʔεͷ࣮Λղআͯ͠Β͏ʂ
Slide 11
Slide 11 text
͋͞͡Ί·͠ΐ͏ɻ RIP - Vagrant
Slide 12
Slide 12 text
DockerίϯςφΛຊ൪Ͱ ͏ͷʹඞཁͳ͜ͱ
Slide 13
Slide 13 text
ඞཁͳࣄ 1. Twelve Factor App 2. Dockerͷجૅࣝ 3. Docker࣮ߦڥʹର͢Δཧղ ൱ʂʂ
Slide 14
Slide 14 text
ຊʹඞཁͳ͜ͱ 1. ਂ͘ߟ͑ͳ͍ 2. ίϐϖ 3. ΫϨδοτΧʔυ
Slide 15
Slide 15 text
ͱ͍͑
Slide 16
Slide 16 text
࠷ݶͷࣝ
Slide 17
Slide 17 text
࠷ݶͷ̏ͭ 1. ϩʔΧϧͰίϯςφΛ࡞ 2. ϨδετϦʹPUSH 3. ຊ൪ʹϦϦʔε
Slide 18
Slide 18 text
࠷ݶͷͭͷਤ
Slide 19
Slide 19 text
දతϚωʔδυɾαʔϏε (,&(PPHMF$POUBJOFS&OHJOF %PDLFS$MPVE4XBSN.PEF #&5"
Slide 20
Slide 20 text
,VCFSOFUFT౾ࣝ ɾΫόϧωςεͱಡΉ ɾ,4ͱུ͢ ɾ ɾ4BJMJOH.BTUFSધͷૢॎऀ
Slide 21
Slide 21 text
%PDLFS4XBSN౾ࣝ ɾεΥʔϜͱಡΉ ɾུশແ͍ ɾ4XBSN܈Ε
Slide 22
Slide 22 text
͔͜͜Βຊ൪ڥͷछྨ͝ͱ ʹखॱΛհ͠·͢
Slide 23
Slide 23 text
(,& ,VCFSOFUFT ฤ ࣄલ४උ GCPͷΞΧϯτ࡞ ίϯςφΫϥελͷ࡞ https://cloud.google.com/container-engine/docs/clusters/operations?hl=ja gcloudίϚϯυͷΠϯετʔϧ https://cloud.google.com/container-engine/docs/before-you-begin?hl=ja kubectlίϚϯυͷΠϯετʔϧ
Slide 24
Slide 24 text
(,& ,VCFSOFUFT ฤ ϩʔΧϧͰͷίϯςφ࡞ EPDLFSCVJMEUHDSJP\130+&$5@*%^TBNQMFCMPHW EPDLFSSVOUSNQHDSJP\130+&$5@*%^TBNQMFCMPHW ಈ࡞֬ೝ
Slide 25
Slide 25 text
(,& ,VCFSOFUFT ฤ HDMPVEEPDLFSQVTIHDSJP\130+&$5@*%^TBNQMFCMPHW ϨδετϦʹPUSH
Slide 26
Slide 26 text
(,& ,VCFSOFUFT ฤ LVCFDUMSVOTBNQMFJNBHFHDSJP\130+&$5@*%^TBNQMFCMPHWQPSU LVCFDUMFYQPTFEFQMPZNFOUTBNQMFUZQF-PBE#BMBODFSQPSU ຊ൪ϦϦʔε ֬ೝ LVCFDUMHFUTFSWJDF
Slide 27
Slide 27 text
4XBSN.PEFฤ ࣄલ४උ Docker cloudͷΞΧϯτ࡞ https://cloud.docker.com AWSͷΞΧϯτ࡞ https://cloud.docker.com SwarmΫϥελͷ࡞
Slide 28
Slide 28 text
4XBSN.PEFฤ ϩʔΧϧͰͷίϯςφ࡞ EPDLFSCVJMEUSFHJTUSZHJUMBCDPNIBOIBOCMPHW EPDLFSSVOUSNQSFHJTUSZHJUMBCDPNIBOIBOCMPHW ಈ࡞֬ೝ
Slide 29
Slide 29 text
4XBSN.PEFฤ EPDLFSQVTISFHJTUSZHJUMBCDPNIBOIBOCMPHW ϨδετϦʹPUSH
Slide 30
Slide 30 text
4XBSN.PEFฤ EPDLFSTFSWJDFDSFBUFOBNFTBNQMFQVCMJTISFQMJDBT SFHJTUSZHJUMBCDPNIBOIBOCMPHW ຊ൪ϦϦʔε ֬ೝ EPDLFSTFSWJDFMT
Slide 31
Slide 31 text
)FSPLVฤ ࣄલ४උ herokuίϚϯυͷΠϯετʔϧ herokuͷΞΧϯτ࡞ https://cloud.docker.com
Slide 32
Slide 32 text
)FSPLVฤ APPΛ࡞ͯ͠ɺPUSH IFSPLVDPOUBJOFSMPHJO IFSPLVDSFBUF IFSPLVDPOUBJOFSQVTIXFC IFSPLVPQFO ಈ࡞֬ೝ ίϯςφ࣮ߦڥͱ͍͏ΑΓɺίϯςφbuild & run
Slide 33
Slide 33 text
DEMO
Slide 34
Slide 34 text
·ͱΊ
Slide 35
Slide 35 text
·ͱΊ ϚωʔδυͳڥΛ͏͜ͱͰɺ͔ͳΓ؆୯ɻ ؆୯ͳΞϓϦͳΒɺͳΜ͔͓ࢼ͠Ͱ͖ͦ͏͡Όͳ͍ʁ