Slide 1

Slide 1 text

ωοτϫʔΫӡ༻ίʔυԽ΁ͷ औΓ૊Έ αΠόʔΤʔδΣϯτ ΞυςΫຊ෦ ࢁຊ ޸໌ @Okinawa Open Days 2016

Slide 2

Slide 2 text

Okinawa Open Days 2016 1.͸͡Ίʹ 
 2.ωοτϫʔΫࣗಈԽ(?)Λ΍ͬͯΈͨ࿩
 3.ࣾ಺ʹAPI GatewayΛཱͯͨ࿩
 4.ۤ࿑ͨ͠ϙΠϯτͱΘ͔ͬͨ͜ͱ
 5.͓ΘΓʹ Agenda

Slide 3

Slide 3 text

ࣗݾ঺հ Okinawa Open Days 2016 ΞυςΫຊ෦ͷΠϯϑϥΤϯδχΞɻ ओʹΦϯϓϨͷωοτϫʔΫ(෺ཧ/Ծ૝)͓Αͼ OpenStackͷҰ෦Λ୲౰ɻ • SDN Japan 2016 ΞυςΫʹඞཁͳSDN • IT PRO EXPOʮωοτϫʔΫΛ؂ࢹ͢ΔZabbix ͷ׆༻ࣄྫʯ • Interop Tokyo 2015 / 2016 ͳͲ https://speakerdeck.com/komeiy/ ϓϩϑΟʔϧ@komeinw

Slide 4

Slide 4 text

αΠόʔΤʔδΣϯτ ΞυςΫຊ෦ͱ͸

Slide 5

Slide 5 text

ΞυςΫຊ෦ͷઆ໌ͷલʹɾɾɾ αΠόʔΤʔδΣϯτʹ͍ͭͯ ؆୯ʹઆ໌ͤͯ͞௖͖·͢ɹɹ

Slide 6

Slide 6 text

αΠόʔΤʔδΣϯτʹ͍ͭͯ 1998೥ͷ૑ۀҎདྷɺΠϯλʔωοτΛ࣠ʹࣄۀΛల։͠ ݱࡏͰ͸୅දతͳαʔϏεͰ͋ΔʮAmebaʯΛ͸͡Ίɺ εϚʔτϑΥϯ޲͚ʹଟ਺ͷίϛϡχςΟαʔϏε΍ήʔϜΛ ఏڙ͍ͯ͠·͢ɻ and m ore !!

Slide 7

Slide 7 text

αΠόʔΤʔδΣϯτͷࣄۀ಺༰

Slide 8

Slide 8 text

ΞυςΫຊ෦ʹ͍ͭͯ Πϯλʔωοτ޿ࠂʹ͓͍ͯɺ޿ࠂ഑৴ͷ࠷దԽ΍ϝσΟΞͷऩӹ࠷େԽͱ͍͏ ؍఺͔ΒΞυςΫϊϩδʔͷॏཁ౓͕ߴ·͍ͬͯ·͢ɻ αΠόʔΤʔδΣϯτͰ͸ΞυςΫϊϩδʔ෼໺ʹ͓͚Δ ͜ΕΒͷαʔϏεʹ͍֤ͭͯࢠձࣾΛ௨͡։ൃ͓ͯ͠Γ·͕ͨ͠ɺ ֤αʔϏεͷ։ൃ෦໳Λԣஅͯ͠૊৫Խ͢Δઐ໳෦ॺͱͯ͠ ΞυςΫຊ෦͕ઃཱ͞Ε·ͨ͠ɻ

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

αΠόʔΤʔδΣϯτͷΞυςΫϚοϓ

Slide 11

Slide 11 text

αΠόʔΤʔδΣϯτͷΞυςΫ ৄࡉ͸ʮ೔ຊҰ΍͍͞͠ΞυςΫڭࣨʯΛޚཡ͍ͩ͘͞ʂ https://www.cyberagent.co.jp/ir/personal/adtech/adtech_01/

Slide 12

Slide 12 text

͔͜͜Βຊ୊ʹೖΓ·͢ɾɾɾɻ

Slide 13

Slide 13 text

Okinawa Open Days 2016 ࠓ೔͸ओʹΦϯϓϨ؀ڥͷ
 ͓࿩Λ͠·͢

Slide 14

Slide 14 text

ٻΊΒΕΔωοτϫʔΫͬͯʁ Okinawa Open Days 2016 
 Not ख࡞ۀ but ࣗಈԽ

Slide 15

Slide 15 text

Okinawa Open Days 2016 ࣗಈԽʁ
 
 ηϧϑαʔϏεԽʁ ٻΊΒΕΔωοτϫʔΫͬͯʁ

Slide 16

Slide 16 text

SDNͰղܾʁ Okinawa Open Days 2016 ɹSDNͱ͸ɺίϯϐϡʔλωοτϫʔΫΛߏ੒͢Δ௨৴ػثΛ୯Ұͷιϑτ΢ΣΞʹΑͬͯूதతʹ ੍ޚ͠ɺωοτϫʔΫͷߏ଄΍ߏ੒ɺઃఆͳͲΛॊೈʹɺಈతʹมߋ͢Δ͜ͱΛՄೳͱ͢Δٕज़ͷ૯শɻ ɹ·ͨɺͦͷΑ͏ͳٕज़ʹΑΓɺωοτϫʔΫͷ૷ஔͷ഑ஔ΍഑ઢͳͲͷ෺ཧతߏ੒ͱ͸͋Δఔ౓ಠཱ ʹɺ໨తʹԠͯ͡ෳ਺ͷԾ૝తͳωοτϫʔΫΛߏங͢Δ͜ͱ΍ɺͦͷΑ͏ʹͯ͠ߏங͞Εͨωοτϫʔ Ϋͷ͜ͱɻ͜Ε͸ʮωοτϫʔΫԾ૝Խʯͱ΋ݺ͹Εɺݫີʹ͸SDNͷԠ༻ͷҰͭͰ͋Γɺ·ͨɺ SDNʹΑΒͣผͷٕज़ʹΑ࣮ͬͯݱ͢Δख๏΋͋ΔͨΊɺSDNͦͷ΋ͷͱ͸۠ผ͢Δඞཁ͕͋Δɻ ग़ల: http://e-words.jp/w/SDN.html ཁ͢Δʹɺ͍ΘΏΔίϯτϩʔϥʹ૬౰͢Δ΋ͷ͕ϓ ϥΠϕʔτΫϥ΢υج൫ͷσʔλϕʔεͱ࿈ܞͯ͠ಈ తʹωοτϫʔΫͷઃఆΛ࣮ߦ͢Ε͹OK

Slide 17

Slide 17 text

ฐࣾͷωοτϫʔΫߏ੒ Okinawa Open Days 2016 • SDN ͳ؀ڥ͸͋Δɻ ৽ͨʹ࡞ͬͨҰ෦ͷ؀ڥͰ࠾༻ • ඞཁʹԠͯͦ͡ͷ࣌ʑͰ࠷దͳϋʔυ΢ΣΞΛબ୒͠࠾༻͍ͯ͠Δ • ࠾༻͍ͯ͠Δϋʔυ΢ΣΞʹ͍ͭͯ͸ϚϧνϕϯμʔͰߏ੒ ͳΔ΂͘Φʔϓϯͳٕज़ͰSDNͳ ؀ڥͱͦ͏Ͱͳ͍؀ڥͷ྆ํΛέ Ξ͢Δඞཁ͕͋Δ

Slide 18

Slide 18 text

ҰൠతͳωοτϫʔΫΤϯδχΞͷ͓࢓ࣄ • VLAN௥Ճ/มߋ • ϧʔςΟϯά௥Ճ/มߋ • ϩʔυόϥϯαʔઃఆ௥Ճ • ACL௥Ճ • τϥϑΟοΫ֬ೝ • VPNϢʔβ௥Ճ/มߋ Okinawa Open Days 2016 • ૿ڧͳͲͷߏ੒มߋ • ৽ٕज़ͷݕূ • τϥϒϧγϡʔτ • ߏ੒؅ཧ • ϕϯμʔίϯτϩʔϧ etc… ΤϯδχΞͱͯ͠͸ɺ ͜͜ʹ஫ྗ͍ͨ͠

Slide 19

Slide 19 text

ωοτϫʔΫΤϯδχΞͷ೰Έ Okinawa Open Days 2016 ʮACL௥Ճͯ͠΄͍͠Μ͚ͩͲɻࠓ೔ʯ ʮVPNϢʔβͬͯࠓ୭͕ొ࿥͞Εͯ·͚ͨͬ͠ʁʯ ʮτϥϑΟοΫ͍ͬͯ·Ͳͷ͘Β͍ग़ͯ·͢ʁʯ ໘౗ʹࢥͬͨΓޙճ͠ʹͨ͠ͱࢥ͍ͳ͕Β࡞ۀͨ͠ ܦݧ͸͋Γ·ͤΜ͔ʁʁ

Slide 20

Slide 20 text

࢓૊ΈతʹΑ͘ͳ͍ͷͰɺ
 
 SDNͰ͸ͳ͍؀ڥͰ΋
 
 ָͳӡ༻ʹ͍ͨ͠ ʢશ෦SDNͳ ΒɾɾɾϘιʣ

Slide 21

Slide 21 text

ͱ͍͏͜ͱͰɺ࡞ͬͯΈ·ͨ͠ɻ Okinawa Open Days 2016

Slide 22

Slide 22 text

ԿΛ࡞ͬͨʁͲΜͳޮՌʁ • ެ։༻API Gateway • AWS CLI ΍ gcloud Έ͍ͨͳίϚϯυϥΠϯͷఏڙ • গਓ਺Ͱͷӡ༻ΛΧόʔ • ৽نαʔϏεͷ্ཱͪ͛εϐʔυΛଛͳΘͳ͍࢓૊Έ • ͭ·Βͳ͍࡞ۀ͸ۃྗ΍Γͨ͘ͳ͍ μϝɻ࡞ۀϛεɺϦϦʔε೔΁ͷӨڹɺΤϯδχΞͷϞνϕʔγϣϯ௿Լ Okinawa Open Days 2016 ͜ͷೋ͕ͭ͋Ε͹ࣗಈԽɾηϧϑαʔϏεԽ͸ଅਐͰ͖Δ

Slide 23

Slide 23 text

Okinawa Open Days 2016 ϓϥΠϕʔτΫϥ΢υͷૢ࡞Πϝʔδ • ֶशίετ͕௿͍ʢΞϓϦέʔγϣϯͷ։ൃऀ͕ ɹ֤੡඼ݻ༗ͷίϚϯυΛ֮͑Δඞཁ͕ͳ͍ʣ • ؆୯ʹJOBʹ૊ΈࠐΜͩΓ͢Δ͜ͱ͕Մೳ • ࢥཱ͍ͬͨͱ͖ʹ͙͢Πϯϑϥͷૢ࡞͕Ͱ͖Δ • Ϛϧνϕϯμʔͳ؀ڥͰ΋Ϣʔβ͸ҙࣝ͠ͳ͍ ͜Μͳײ͡ͰͷϧʔλɾεΠονɾϩʔ υόϥϯαʔɺNeutronͷઃఆ͕Ͱ͖ Δɻ Regionͷ֓೦΋͍࣋ͨͤͯ·͢

Slide 24

Slide 24 text

Okinawa Open Days 2016 αʔϏεϝχϡʔ • ৽نαʔϏε্ཱ͕͕ͪΔ͝ͱʹ૿͑Δ΋ ͷ΍ૢ࡞͢Δ΋ͷΛجຊʹߏ੒ • جװܥͷ࡞ۀ͸ಛఆͷϢʔβݖݶͷΈͰ͠ ͔৮Εͳ͍Α͏ʹ੍ޚ • αʔϏεϝχϡʔ͸ӈهҎ֎ʹ΋ෳ਺ଘࡏ • DC಺ͷϩʔΧϧϨϙδτϦ͔Β഑෍

Slide 25

Slide 25 text

ߏ੒Πϝʔδͱ࢖༻ٕज़ Okinawa Open Days 2016 • ݴޠ Python Shell Script • ιϑτ΢ΣΞ ɹ Flask Nginx Gunicorn ͦͷଞ API Server ग़లɿhttps://dzone.com/articles/learn-python-overtakes-learn-java "Learn Python" Overtakes "Learn Java" on Google Trends ೝՄɾೝূ REST API REST API REST API SSH command ଞʹ͸ɾɾɾ

Slide 26

Slide 26 text

@api.route('/pool//member', methods=['POST']) def poolmemberpost(poolname): if not request.json: abort(400) if 'name' not in request.json: abort(400) return b.memberpost(g.bigip_partition, poolname, request.json) • apiΛϧʔςΟϯά͢Δ͚ͩͷ΋ͷ͸ͦͷ··ྲྀ͢ɻՃ޻͕ඞཁͳ΋ͷ ͸ɺదٓσʔλͷ append ΍ ਖ਼౰ੑνΣοΫΛ͍ͯ͠Δ • api ඇରԠσόΠεͱ͸ɺ pexpect Λར༻ APIαʔόͷΠϝʔδ • Python ͷ؆қ WEB ΞϓϦέʔγϣϯͰ͋Δ FLASK Λ࢖༻ Okinawa Open Days 2016

Slide 27

Slide 27 text

APIαʔόͷΠϝʔδ " API αʔόʹ͸֤ϝʔΧʔͷૢ࡞༻ͷεΫϦϓτ͕֨ೲ͞Ε͍ͯΔ ྫʣneutron ͷ port list / port show / port update Λ·ͱ·ͨ΋ͷ ɹɹL3 SW΁ͷΞΫηεϦετ౤ೖͱΞυϨενΣοΫΛ࣮ߦ͢Δ΋ͷ " GitHub (ࣾ಺ Organization) ΁ެ։͠ɺisuue ΍ pull request ϕʔεͰϢʔ β͔Βͷཁ๬ΛऔΓࠐΈ " ݖݶ΋ FLASK ଆͰ؅ཧ͍ͯ͠ΔͨΊɺςφϯτͷ֓೦͕ͳ͍ઃఆઌʹ ʹରͯ͠΋ݖݶΛ֬ೝ͠ద੾ͳૢ࡞͚ͩʹ੍ݶ͍ͯ͠Δ " API Λެ։͢Δ͚ͩͩͱؾܰʹར༻ͯ͠΋Β͑ͳ͍ͨΊɺίϚϯυϥΠ ϯπʔϧΛఏڙͯ͠རศੑͷ޲্ΛਤΔ Okinawa Open Days 2016

Slide 28

Slide 28 text

ͳͥ͜ͷΑ͏ͳߏ੒Λ ࠾༻ͨ͠ͷ͔ Okinawa Open Days 2016

Slide 29

Slide 29 text

REST APIͷ࿩ Okinawa Open Days 2016 • Τϥʔॲཧָ͕ ɹɹͳͷͰɺώϡʔϚϯΤϥʔ͞Α͏ͳΒʹۙͮ͘ • ωοτϫʔΫΤϯδχΞҎ֎Ͱ΋ૢ࡞͠΍͍͢ ɹɹͳͷͰɺެ։͢Ε͹࢖ͬͯ͘Εͦ͏ • ౰વɺߏ੒؅ཧπʔϧͱ͔ͱ͸ҧ͏ • దࡐదॴͰ࢖͍·͠ΐ͏ ΞϓϦέʔγϣϯϓϩάϥϛϯάΠϯλϑΣʔε (APIɺӳ: Application Programming Interface) ͱ͸ɺιϑτ΢ΣΞί ϯϙʔωϯτ͕ޓ͍ʹ΍ΓͱΓ͢Δͷʹ࢖༻͢ΔΠϯλϑΣʔεͷ࢓༷Ͱ͋Δɻ APIʹ͸ɺαϒϧʔνϯɺσʔλߏ଄ɺΦ ϒδΣΫτΫϥεɺม਺ͳͲͷ࢓ؚ༷͕·ΕΔɻ ग़లɿAPI - ΢ΟΩϖσΟΞ https://ja.wikipedia.org/wiki/ΞϓϦέʔγϣϯϓϩάϥϛϯάΠϯ λϑΣʔε

Slide 30

Slide 30 text

Okinawa Open Days 2016 ChatͰ࿩͔͚Δͱɾɾɾ SVI / VLAN࡞੒ɺLBઃఆɺNeutronઃఆɺςετɺςετ؀ڥ࡟আ ·ͰͷҰ࿈ͷྲྀΕΛ࣮ࢪɻ݁Ռ͸ChatͰ௨஌ɻ APIԽ͢ΔͱChatOpsָ͕ʹͳΔ

Slide 31

Slide 31 text

Okinawa Open Days 2016 • άϥϑΟΧϧͳ෦෼͸ChatͰͰ͖ΔΑ ͏ʹ͓ͯ͘͠ͱҎ֎ͱศརɻ • “པ·ΕΔଆ” ΋ ”པΉଆ” ʹऔͬͯ΋ε τϨεϑϦʔ • ଞʹ΋ՄࢹԽͱ؆୯ͳϓϩϏδϣϯͰ ׆༻ • Jobʹ૊ΈࠐΜͩΓ͢ΔՄೳੑ͕͋Δ ΋ͷ͸ɺCLIͳ͍͠͸APIͰఏڙͨ͠ํ ͕Α͍ APIԽ͢ΔͱChatOpsָ͕ʹͳΔ

Slide 32

Slide 32 text

Okinawa Open Days 2016 • ؂ࢹ͸ Zabbix ͕ࣗಈͰरͬͯ͘Δ • Zabbix͕ϝʔΧ΍໾ׂΛ൑ผͯ͠άϧʔϐϯά͢Δ • ωοτϫʔΫ؅ཧऀ͸ DNS ͷొ࿥ͱ ZTP ͷ४උ͚͓ͩͯ͘͠ • όοΫΞοϓͷδϣϒ͸ Jenkins ͕ຖ൩࣮ߦͯ͠ɺ໰୊͋Ε͹ Slack Ͱ௨஌ • όοΫΞοϓର৅͸ Zabbix ͷ API Λ Jenkins ͔Βୟ͍ͯ࠷৽Λऔ ಘ • VLAN ࡞੒ͳͲͷ JOB ΋ Zabbix ͷ࠷৽Λݩʹੜ੒͞ΕΔ ଞʹ΋͜Μͳͱ͜ΖͰAPI͕ɾɾɾ

Slide 33

Slide 33 text

ωοτϫʔΫΤϯδχΞͷ೰Έ Okinawa Open Days 2016 ʮACL௥Ճͯ͠΄͍͠Μ͚ͩͲɻࠓ೔ʯ ʮVPNϢʔβͬͯࠓ୭͕ొ࿥͞Εͯ·͚ͨͬ͠ʁʯ ʮτϥϑΟοΫ͍ͬͯ·Ͳͷ͘Β͍ग़ͯ·͢ʁʯ ͜͏͍͏࡞ۀ͔Βղ์͞Ε·ͨ͠ɻ͓ޓ͍ʹɻ

Slide 34

Slide 34 text

Okinawa Open Days 2016 ੈؒҰൠͷSDNͱ͸ҧ͏͚Ͳɺ
 
 ͜Ε΋Ұͭͷ
 Software Defined Network??

Slide 35

Slide 35 text

ۤ࿑ͨ͠ϙΠϯτ Okinawa Open Days 2016 • APIͳ͠ͷػثΛૢ࡞͢Δ৔߹ɺexpectͰରԠͤ͟ΔΛಘͳ͍ ɹɹˠॲཧ్͕தͰࢭ·Δͱ͔ɾɾɾ ɹɹɹෛ୲ʹͳΒͳ͍ఔ౓ͷΤϥʔॲཧΛɻ • ໰୊͕͋ͬͨ࣌ͷ੾Γ෼͚ΛͲ͏͢Δ͔ ɹɹˠ DebugΦϓγϣϯΛ࣮૷ɻClientଆͰऔΕΔΑ͏ʹɻ ɹɹɹ APIͷΤϥʔίʔυͱϝοηʔδΛΫϥΠΞϯτଆ΁ग़ྗ • REST APIͷઃܭ ɹɹˠ ૉਓ͕΍ͬͨͷͰԚ͍ɻۤ࿑ͨ͠ํ͕ྑ͔ͬͨϙΠϯτɻ ɹɹɹ ޙչɻ

Slide 36

Slide 36 text

Θ͔ͬͨ͜ͱ Okinawa Open Days 2016 • ݖݶपΓ͸ࣗ෼Ͱ࡞ͬͨ΄͏͕͍͍ ɹɹˠ ֤ػثͷػೳࠩΛٵऩ͢Δඞཁ͋Γ • ঎༻ʹཔΓ͗ͯ͢ϕϯμʔϩοΫΠϯʹͳΒͳ͍Α͏஫ҙ ɹɹˠ ίϯτϩʔϥʔཚཱ΋ͪΐͬͱɾɾɾ • Ͱ΋ࣗ࡞ͰଐਓԽʹ΋஫ҙɻΤϯδχΞʹҰఆͷϨϕϧΛ ɹɹˠ νʔϜ։ൃͰ͖Δ؀ڥΛ

Slide 37

Slide 37 text

Interop Tokyo 2016 ෭࢈෺తͳ΋ͷͰ͕͢ɾɾɾ • ωοτϫʔΫػثͱͯ͠΋ɺσϓϩΠπʔϧͱͯ͠΋ɺӡ༻πʔϧͱͯ͠΋ɺط੒ ͷιϑτ΢ΣΞΛ׆༻͢Δ͜ͱͰΦʔϓϯͳωοτϫʔΫʹۙͮ͘͜ͱ͕Ͱ͖Δ • ࣮ࡍͷωοτϫʔΫΛ੍ޚ͢Δ૷ஔͷมΘΓʹιϑτ΢ΣΞͰωοτϫʔΫ Λ૊Ήʢϋʔυͱιϑτͷ෼཭ʣ͜ͱ΋͋Δ • σϓϩΠपΓͰ͸ɺదٓඞཁͳ࢓૊ΈΛࣾ಺Ͱ࡞ͬͯӡ༻ΛΧόʔ͍ͯ͠Δ έʔε΋͋ΔʢPython෦෼ͰதؒϨΠϠʔ࡞ͬͯHWͷࠩΛٵऩ͍ͯ͠·͢ʣ • Ͳ͜Ͳ͜੡ͷίϯτϩʔϥΛങ͏ͷ͔ɺࣗ෼ͰͦΕͬΆ͍࢓૊ΈΛ࡞Δͷ͔ ͸ɺϙϦγʔ࣍ୈͰ൑அ Okinawa Open Days 2016

Slide 38

Slide 38 text

·ͱΊ Okinawa Open Days 2016 ● ϨΨγʔͳ؀ڥͰ΋ SDN ͷΑ͏ʹརศੑͷ޲্Λ໨ࢦ͢͜ ͱ͸Մೳ ● ωοτϫʔΫΑΓ΋αʔόଆͷٕज़ֵ৽͕ਐΜͰ͓ΓɺΦʔ ϓϯͳٕज़Λར༻͍ͯ͠ΔͷͰඇৗʹࢀߟʹͳΔ 5෼ͷख࡞ۀΑΓ15෼ͰίʔυΛॻ͖·͠ΐ͏ ʢͦΜͳ࣌୅ʁʣ Automation is the new skillset that network engineers need to pick up. Much like sysadmins have had to learn how to use new tools like Chef and Puppet, network engineers are learning that they just can't do things manually anymore. With examples in each chapter, this practical book provides you with baseline skills in network programmability and automation, using a range of technologies including Linux, Python, JSON, and XML. No previous knowledge of software development, programming, automation, or DevOps is required.