Slide 1

Slide 1 text

Google Cloud Platform & Amazon Web Service Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 1

Slide 2

Slide 2 text

Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 2

Slide 3

Slide 3 text

ࣗݾ঺հ • Yoshikawa Ryota ( @rrreeeyyy ) • גࣜձࣾϋʔτϏʔπ ( http://heartbeats.jp ) • Managed Service Providor ͷձࣾͰ͢ • Linux ܥͷαʔό؂ࢹ/؅ཧΛओʹ΍͍ͬͯ·͢ • ج൫։ൃάϧʔϓ ج൫։ൃΤϯδχΞ • ࣗಈԽɾ؂ࢹۀʹؔΘΔϓϩμΫτ࡞੒ͳͲ͕ओͰ͢ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 3

Slide 4

Slide 4 text

Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 4

Slide 5

Slide 5 text

Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 5

Slide 6

Slide 6 text

GCP ͱ AWS • (Google|Amazon) ͷఏڙ͢ΔΫϥ΢υαʔϏε • IaaS/PaaS/SaaS ͷෳ਺ͷαʔϏεΛ·ͱΊ໊ͨশ • GCP ͸ Google I/O 2013 Ͱൃද • ͱ͸ݴ͑ੲ͔Β App Engine ౳ͷαʔϏε͸͋ͬͨ • AWS ͸ 2006 ೥ 7 ݄ʹൃද • ຖ೥αʔϏε΍ϦʔδϣϯΛ௥Ճ͠ண࣮ʹ੒௕͍ͯ͠Δ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 6

Slide 7

Slide 7 text

࠷ॳʹॴײ - GCP • GCP ͸ߴ͍ٕज़ྗΛϕʔεʹͨ͠αʔϏεల։ • Google ͕ࣾࣗࣾͷҝʹ։ൃٕͨ͠ज़͕ΈΜͳ΋࢖͑Δ • ಛʹ ෼ࢄॲཧ/ෛՙ෼ࢄ/Ծ૝Խ/ίϯςφԽ/NW ... ౳͕ڧ͍ • Google Compute Engine (& Load Balancer) • Google Container Engine/Google App Engine • Google BigQuery ౳ͷαʔϏεʹݱΕͯΔ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 7

Slide 8

Slide 8 text

࠷ॳʹॴײ - AWS • AWS ͸ϢʔβχʔζΛϕʔεʹͨ͠αʔϏεల։ • ࠓ΍Ϋϥ΢υͷσϑΝΫτελϯμʔυ • ๛෋ͳαʔϏε/ར༻ࣄྫ/ར༻஌ݟ • ΄ͱΜͲͷࣄ͕ AWS Ͱ׬݁Ͱ͖Δʂ • ஌ݟ͕๛෋ʹ͋ΓɺϢʔβ͕࡞੒ͨ͠πʔϧ΋਺ଟ͋͘Δ • બ΂ΔΠϯελϯελΠϓ/σʔλϕʔελΠϓ౳΋๛෋ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 8

Slide 9

Slide 9 text

GCP ͷ֤ػೳΛ AWS ͷػೳͱൺֱ͠ͳ͕Β঺հ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 9

Slide 10

Slide 10 text

GCP - AWS αʔϏεରԠද 0 0 http://gihyo.jp/admin/serial/01/google-cloud-platform/0001 (ࣅ͍ͯΔαʔϏεͷରԠͳͷͰҧ͏ͱ͜Ζ΋͋Γ·͢) Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 10

Slide 11

Slide 11 text

Google Compute Engine (GCE) Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 11

Slide 12

Slide 12 text

Google Compute Engine (GCE) • Google ͷ IaaS • ىಈ͕ͱͯ΋ૣ͍(େମ 30 ඵఔ౓) • ׬੒͞ΕͨϥΠϒϚΠάϨʔγϣϯ 1 • Developer Console Λ࢖͍ϒϥ΢β͔Β SSH ૢ࡞Մೳ • ී௨ͷσΟεΫͷϥϯμϜ I/O ͕ૣ͍ 1 http://www.rightscale.com/blog/cloud-industry-insights/google-compute-engine-live-migration-passes-test Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 12

Slide 13

Slide 13 text

Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 13

Slide 14

Slide 14 text

Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 14

Slide 15

Slide 15 text

Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 15

Slide 16

Slide 16 text

GCE <=> Amazon EC2 • (ΠϯελϯελΠϓ|αϙʔτ OS) ͸ EC2 ͷํ͕গ͠ଟ͍ • ͱ͸͍͑ GCE Ͱ΋جຊతʹࠔΒͳ͍͙Β͍͋Δ • ϋΠεϖοΫͳΠϯελϯε͸ EC2 ͷํ͕ଟ͍ • GCE ͔Β͸جຊతʹ͸ϝʔϧ͕ૹΕͳ͍ • SendGrid ౳ͷ֎෦αʔϏεΛ࢖͏ 2 2 https://cloud.google.com/compute/docs/tutorials/sending-mail Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 16

Slide 17

Slide 17 text

GCE <=> Amazon EC2 • EC2 ͸ϦβʔϒυΠϯελϯε/εϙοτΠϯελϯε͕͋Δ • ར༻ํ๏ʹΑͬͯ͸্͕҆͘Δ͜ͱ΋͋Δ͔΋ • GCE ͸ Sustained use discounts ͕͋Δ • ௕͘࢖͏͚ͩͰউखʹ҆͘ͳ͍ͬͯ͘ • GCE ͸ 1 ෼୯Ґ/ EC2 ͸ 1 ࣌ؒ୯ҐͰ՝ۚ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 17

Slide 18

Slide 18 text

GCE Loadbalancer Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 18

Slide 19

Slide 19 text

GCE Loadbalancer • GCE/GKE(ޙड़) ౳Ͱར༻Ͱ͖Δϩʔυόϥϯαػೳ • Network Loadbalancer ͱ HTTP Loadbalancer ͕͋Δ • ΢ΥʔϜΞοϓෆཁ (google.com ͱಉ͡Πϯϑϥ) • 100 ສϦΫΤετ/ඵΛࡹ͚ΔϕϯνϚʔΫ݁Ռ • ΤοδΩϟογϡΛར༻͢Δ͜ͱ͕ग़དྷΔ 3 3 http://qiita.com/sinmetal/items/37c105a098174fb6bf77 Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 19

Slide 20

Slide 20 text

GCE Loadbalancer <=> Amazon ELB • ELB • SSL termination ͕ग़དྷΔ(GCE ΋࣮૷༧ఆΒ͍͠) • Cookie Λ࢖ͬͯηογϣϯΞϑΟχςΟΛ࣮ݱͰ͖Δ • GCE ͷ HTTP Loadbalancer • ϦʔδϣϯΛ·͍ͨͩόϥϯγϯά͕ग़དྷΔ • ίϯςϯπϕʔεϧʔςΟϯά(URL ʹԠͨ͡ৼΓ෼͚) Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 20

Slide 21

Slide 21 text

Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 21

Slide 22

Slide 22 text

Google Cloud Storage Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 22

Slide 23

Slide 23 text

Google Cloud Storage • Google ͷΦϒδΣΫτετϨʔδ SaaS • σʔλΛࣗಈతʹ҉߸Խͯ͠อଘ • CDN ʹ͋ͨΔ΋ͷ͕࠷ॳ͔Β෇ਵ͍ͯ͠Δ • Standard/Durable Reduced Availability(DRA)/Nearline ͷ3छ • DRA ͸ Standard ΑΓՄ༻ੑ͕௿͍͕ɺ͍҆ • Nearline ͸҆ՁͰߴ଎ͳίʔϧυσʔλετϨʔδ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 23

Slide 24

Slide 24 text

Google Cloud Storage <=> Amazon S3 • Website ͷϗεςΟϯάग़དྷΔ(྆ํ) • Object Change Notification ͕͋Δ • AWS Ͱ΋ lambda ౳ͷαʔϏεͱ࿈ܞ͢Ε͹ग़དྷͦ͏ • Nearline ͸ Glacier ͱಉ౳ͩͱߟ͑ΔͱϨΠςϯγ͕௿͍ • େ͖ͳࠩ͸ͳͦ͞͏ͳͷͰ࿈ܞαʔϏεʹԠͯ͡બͿͱ٢ʁ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 24

Slide 25

Slide 25 text

Google Cloud SQL Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 25

Slide 26

Slide 26 text

Google Cloud SQL • Cloud SQL ͸ MySQL ͷΈͷαʔϏε • ΤϯυϙΠϯτ͸ IP ΞυϨε • MySQL 5.5 (5.6 ΋࢖͑Δ͕ stable Ͱ͸ͳ͍) • ࣗಈతͳϚΠφʔόʔδϣϯΞοϓ • MySQL ͕࠶ىಈ͞Ε਺ඵͷஅ͕ى͖Δ͜ͱ͕͋Δ • (ϑΣΠϧΦʔό|εϖοΫมߋ)΋਺ඵͰऴΘΔ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 26

Slide 27

Slide 27 text

Google Cloud SQL <=> Amazon RDS • Read Replica/Multi AZ ౳ͷجຊతͳػೳ͸྆ํ࢖͑Δ • RDS ͸ MySQL Ҏ֎ʹ΋৭ʑ࢖͑Δ͠ग़དྷΔࣄ΋ଟ͍ • MySQL/Postgres/Oracle/SQL Server ... • Cloud SQL ͸Πϯελϯεͷىಈ͕࣌ؒૣ͍ • ΞΫςΟϕʔγϣϯϙϦγʔ(઀ଓ͕དྷͨΒىಈɺ౳) • ࣗಈϚΠφʔόʔδϣϯΞοϓ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 27

Slide 28

Slide 28 text

Google BigQuery Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 28

Slide 29

Slide 29 text

Google BigQuery • Google ͷϏοάσʔλղੳ SaaS • TB/PB ڃͷσʔλʹରͯ͠ SQL ϥΠΫͳΫΤϦΛൃߦͰ͖Δ • ਺ඵʙ਺ेඵ୯ҐͰ݁Ռ͕ฦͬͯ͘Δ • ՝͕ۚΫΤϦ୯Ґͱ͔ͳͷͰɺ͙͢ࢼͤΔ • େྔʹΫΤϦΛൃߦ͢Δͱ͔Ͱͳ͚Ε͹҆Ձ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 29

Slide 30

Slide 30 text

Google BigQuery <=> Amazon Redshift • ಉ͡ྖҬΛΧόʔ͢Δ΋ͷͷ΄΅ҧ͏αʔϏε • େ͖ͳձࣾͰ BI πʔϧΛ࡞ΔΑ͏ͳ࣌͸ Redshift ͕ྑͦ͞ ͏ • ޿͍ҙຯͰͷσʔλղੳΈ͍ͨͳͷ͸ BigQuery ͕ྑͦ͞͏ • εέʔϧ౳ͷ഑ྀ͸ෆཁ/ׂͱ؆୯ʹ࢝ΊΒΕΔ • ݸਓͷײ૝Ͱ͢ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 30

Slide 31

Slide 31 text

Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 31

Slide 32

Slide 32 text

Google App Engine Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 32

Slide 33

Slide 33 text

Google App Engine (GAE) • ݴΘͣͱ஌Εͨ Google ͷ PaaS αʔϏε • ΞϓϦ։ൃऀ͕࢖͍͜ͳͤΔͳΒͱͯ΋ศར • ΠϯϑϥΤϯδχΞ͕ډͳͯ͘΋ͳΜͱ͔ͳΔ • ΋ͪΖΜ PaaS ͳͷͰ IaaS ΑΓ੍ݶతʹ͸ͳͬͯΔ • ϩοΫΠϯ͞ΕΔ • ๻ΑΓৄ͍͠ਓձ৔ʹ୔ࢁ͍ΔͷͰฉ͖·͠ΐ͏ʂ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 33

Slide 34

Slide 34 text

Google Container Engine Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 34

Slide 35

Slide 35 text

Google Container Engine (GKE), Amazon ECS • GKE ͸ GCP ্ʹ Docker ίϯςφΛల։Ͱ͖ΔαʔϏε • Kubernetes ( http://kubernetes.io ) Ͱ؅ཧ͞ΕΔ • k8s ͸ OSS ͳͷͰ࢖ͬͯΔͳΒ͙͢ҠߦͰ͖Δ • ECS ΋ AWS ্ʹ Docker ίϯςφΛల։Ͱ͖ΔαʔϏε • json ͰઃఆϑΝΠϧΛॻ͖ίϯςφΛ഑ஔ • ͜Ε͔ΒͷྖҬͳͷͰظ଴ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 35

Slide 36

Slide 36 text

ྉۚʹ͍ͭͯ • αʔϏε΍ܖ໿΍௨৴ྉ΍࢖͍ํ࣍ୈ • ͲΕ͘Β͍ͷظؒ࢖͏͔ • Ͳͷ͘Β͍ͷ௨৴ྉ͕ൃੜ͢Δ͔ • ڝͬͯΔͷͰ౎౓ܭࢉ͢Δͱྑ͍͔΋ • ͲͪΒ͕ѹ౗తʹߴ͍/͍҆ͱ͍͏͜ͱ͸ແͦ͞͏ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 36

Slide 37

Slide 37 text

ͲΜͳਓʹ޲͍ͯΔ͔(GCE/AWS/...) Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 37

Slide 38

Slide 38 text

GCP ͕޲͍ͯͦ͏ (ྫ) • ৽͍͠΋ͷ͕޷͖ͳਓ • όʔεττϥϑΟοΫ͕ൃੜ͢ΔαʔϏε • Πϯελϯεͷىಈ/ෳ੡౳͕සൟʹൃੜ͢ΔαʔϏε • ඞཁͳཁ݅ʹԠͯࣗ͡෼ͰOSS/֎෦αʔϏεΛ࢖͑Δਓ • ྫ͑͹શจݕࡧαʔϏεͱ͔͸ GCP ʹ͸ࠓ͸ແ͍ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 38

Slide 39

Slide 39 text

AWS ͕޲͍ͯͦ͏ (ྫ) • ౦ژ͔ΒͷϨΠςϯγ͕ؾʹͳΔਓ (GCP ͷ࠷دΓ͸ asia) • ͳΔ΂͘ 1 ͭͷαʔϏεͰ৭ʑͳཁ݅Λୡ੒͍ͨ͠ਓ • αϙʔτ΍पล/աڈͷ஌ݟɾπʔϧΛ࢖͍͍ͨਓ • EC2/ELB/RDS ͷߏ੒ҊͷΑ͏ͳ஌ݟ΋୔ࢁ͋Δ • MySQL 5.6 Ҏ্΍ͦΕҎ֎ͷ DB PaaS Λ࢖͍͍ͨਓ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 39

Slide 40

Slide 40 text

એ఻ • ݁ہͲͬͪΛ࢖͍͍͔ͬͯ෼͔Βͳ͔ͬͨͱ͍͏ํ • GCP ࢖ͬͯΈ͍͚ͨͲΠϯϑϥͷઃఆͳͲ೚͍ͤͨͱ͍͏ํ • => ฐࣾ·Ͱ͝༻໋͍ͩ͘͞ʂ • ৭ʑͳΫϥ΢υΛ৮ͬͯΈ͍ͨํ • ৮্ͬͨͰ͓٬༷ͷαʔϏεʹର͠ద੾ʹఏҊͯ͠Έ͍ͨํ • => ٻਓதͰ͢ͷͰԠืԼ͍͞ʂ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 40

Slide 41

Slide 41 text

એ఻ 2 • ձࣾͷϒϩάʹ΋ GCP ͷ͜ͱॻ͍ͯ·͢ • http://heartbeats.jp/hbblog/gcp/ • CTO ͷഅ৔ (@netmarkjp) ͕ gihyo.jp Ͱ GCP ͷ࿈ࡌதͰ͢ • http://gihyo.jp/admin/serial/01/google-cloud-platform Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 41