Pro Yearly is on sale from $80 to $50! »

Make App, Using with Study Group

D02d368f98011616d6a8612af1ca4de5?s=47 nnao45
January 30, 2019

Make App, Using with Study Group

D02d368f98011616d6a8612af1ca4de5?s=128

nnao45

January 30, 2019
Tweet

Transcript

  1. ษڧձͰ ࢖͏ΞϓϦʹඞཁͳ ΠϯϑϥΛٻΊͯɻ

  2. M Y N A M E I S … @nnao45

    2 גࣜձࣾαΠόʔΤʔδΣϯτͷ Πϯϑϥ/αʔόαΠυΤϯδχΞ ✔ ຊ໊ɿԣࢁ ঘ໻ ෭ۀͰελʔτΞοϓاۀͷٕज़ࢧԉ ✔ ٕज़͸BGP,Zsh,Go,Rust,MySQL,K8S,AWS͕ϝΠϯ ✔ Vtuberؑ৆ͱήʔϜͱϓϩάϥϛϯά΍ͬͯੜ͖ͯΔɻ ✔ ずぃーシェルアールシーを書きたい人生だった RustのBoxの使い所教えてください ぶいちゅーばー友達募集! Segment Routing v6凄すぎない? MySQL、、、ぐえーーーっ!!
  3. INTRO

  4. cndjpɺ࣭໰ΞϓϦ࡞Δɻ ͦͯͦ͠ͷཁ݅ɻ cndjp, make a question app. and its requirements.

    01 02 03 04 Kubernetes࢖͓͏ͥɻ AWSͰEKSग़ͨ͠ɺͱΓ·AWSͰɻ ։ൃ͸֤ਓͷ೚ҙͷλΠϛϯάͰ΍Δɻ ͓ۚͱ͔͔͚ͨ͘ͳ͍͔Β೔த͸ɺ ΠϯϑϥશମΛམͱ͓͖͍ͯͨ͠ɻ 05 ։ൃதͩͱࢥ͏͔Βɺ։ൃ్தͷঢ়ଶ͸ ࢒͓͖͍ͯͨ͠ɻ νʔϜͷGoྗΛߴΊΔඞཁ͕͋Δɻ
  5. ͱ͔͍͏ཁ݅Ͱͨ͠ɻ That was a requirement. ͜ͷൃදͰ͸ɺͦͷ̑ͭͷ গ͠ಛघͳΠϯϑϥཁ݅ʹରͯ͠ɺ Ͳ͏΍ͬͯຬͨ͢ΠϯϑϥΛ ࡞͔ͬͨΛൃද͍͖ͤͯͨͩ͞ɺ ׆͔ͤΔͱ͋͜Ε͹׆͔ͯ͠ཉ͍͠

    ͳͱ͍͏ൃදͰ͢ɻ 商用環境では、 あんまりみない・・。
  6. 01

  7. 01.νʔϜͷGoྗΛߴΊΔඞཁ͕͋Δɻ It is necessary to raise the team's ability to

    golang. ΞϓϦͷAPI͸͔ͤͬͩ͘͠ɺ GolangͰ΍Γ·͠ΐ͏ͱͳΔɻ ͕ɺΞϓϦٴͼຊ൪؀ڥ౤ೖܦݧ͕ ͋Δͷ͸nnao45͚ͩͩͬͨɾɾɾɻ ը૾Ҿ༻:https://dribbble.com/shots/3847043-Gopher-Mage あとGOなら、教え切れると 思った次第・・。
  8. ΦϯϥΠϯษڧձ࣮ࢪ Do the Online study group ɾࢿྉ:ࣄલʹ༻ҙͨ͠Google slide (๭ॴͰެ։͞Ε͍ͯΔࢿྉΛݩʹ) ɾձ࿩:DiscordͰ࣮ࢪɺը໘ڞ༗΋ͯ͠ͳ͍ͷ

    Ͱඇৗʹ҆ఆతͳಈ࡞͕Ͱ͖ͨɻ ɾڭࡐ:Go PlaygroundͰ࣮ࡍʹίʔυΛॻ͍ ͯ΋Β͏ྫ୊Λ֤ճ5໰͸༻ҙɻ SaaSってしゅごい!
  9. ΍ͬͯΈͯͲ͏ͩͬͨʁ How was it when you tried it? पลπʔϧ͸ͱͯ΋ॆ࣮͓ͯ͠Γ·ͨ͠ɻ API͸ཁ݅ຬͨͤͨ͠ɺϨϏϡʔͰ͖Δ

    ϝϯπ΋૿͑ͨͷͰ໨ඪ͸ୡ੒ͨ͠ɻ ✔ ✔ ʢ࢖ͬͨڭࡐΛ஌Γ͍ͨਓ͸࠙਌ձͰʣ ✔ ࣮ࡍʹPlaygroundͰखΛಈ͔ͤΔ ͜ͷ࣌୅͸ͱͯ΋ֶͼ΍͍͢ɻ ✖ ि̍Ͱࣾձਓ5ਓҎ্ͷ༧ఆΛซͤΔͷ ෆՄೳͩͶɻ ✖ ि̍Ͱڭࡐ༻ҙ͢Δͷେม͗͢ϫϩλ
  10. 02

  11. 02.Kubernetes࢖͓͏ͥɻAWSͰEKSग़ͨ͠ɺͱΓ·AWSͰɻ Use Kubernetes. Just now start an EKS at AWS,

    using at AWS. ΋ͪΖΜKubernetes͸࢖͏Μ͕ͩɺ ͦͷ࣌ͪΐ͏ͲΑ͘EKS΋Ͱͨ͠ɺ Ϋϥ΢υϕϯμʔ͸AWS࢖͓͚ͬͯ ͹ແ೉ͩ͠ɺ͍͍Μ͡Όͳ͍ʁ ը૾Ҿ༻:https://dribbble.com/shots/3847043-Gopher-Mage 使ってみたい衝動駆動開発!
  12. SHOW CNDJP MIDDLEWARE ϩάऩू ؂ࢹ τϨʔγϯά ίϯςφ ϥϯλΠϜ ίϯςφ Φʔέετϥ

    ՄࢹԽ αʔϏε σΟεΧόϦ ߏ੒؅ཧ ΠϯϑϥCD RDS Ωϟογϡ όοΫΞοϓ ϑϩϯτ ίʔυ؅ཧ ΧφϦΞϦϦʔε+GitOps+CNΛ࣮ݱ͢Δϛυϧ΢ΣΞ ໨ࢦͨ͠ͷ͸ͱʹ͔͘ϕϯμʔχϡʔτϥϧͰΫϥ΢υωΠςΟϒ CICDύΠϓϥ Πϯ ෛՙࢼݧ
  13. SHOW CNDJP INFRASTRUCTURE

  14. Deploy Spinnker on EKS is … Deploy process toooooooooooooooooooooooooo long!!!!!!!!!!!!!!!!!!!!!!!!!

    EKSࣗମͷηοτΞοϓ͔Βɺrole ϕʔεͷೝূ͢ΔҝͷηοτΞοϓɺ halίϚϯυͷΠϯετʔϧɺઃఆ· ͰSpinnakerΛEKSʹσϓϩΠ͠Α͏ ͢ΔͱՌͯ͠ͳ͍ಓͷΓ͕͋Γɺͦ ͯࣗ͠ಈԽ͢Δඞཁ͕͋ͬͨɻ https://aws.amazon.com/jp/blogs/opensource/spinnaker-on-aws/ https://docs.aws.amazon.com/ja_jp/eks/ latest/userguide/configure-kubectl.html 認証とか、 何を永続化すればいいのとか
  15. Deploy Spinnker on EKS is … Deploy process toooooooooooooooooooooooooo long!!!!!!!!!!!!!!!!!!!!!!!!!

    ΋͠࢖ΘΕΔํʹ͓ಘͳ৘ใ https://d3079gxvs8ayeg.cloudfront.net/ templates/managing.yaml 両方デプロイされちゃうZOI
  16. Deploy AWS Resource by Ansible umm…. これクラウドネイティブ・・・? 安心のAnsibleだねぇ。

  17. Deploy AWS Resource by Ansible Ansible is Good!! And… ϥΠϒϥϦ͕ॆ࣮ͯͯ͠খճΓ͕ޮ͘

    ม਺ͷҰׅ؅ཧɺൿಗ৘ใͷ҉߸ԽͳͲɺ ✔ ✔ ✔ ʮႈ౳ੑʯͱ͍͏ίϯηϓτ͸ k8sͱ૬ੑ͕ྑ͍ͷͰɺҰׅ؅ཧ͠΍͍͢ ? AWSͷCf͕༏ल͗ͯ͢ɺ ࠷ऴతʹΠϯϑϥ͸Ansible͔ΒCfΛୟ ͘ͷ͕ຆͲʹͳͬͯ͠·ͬͨɻ ࠓճAnsibleΛΩοΫ͢Δͷ͸ʮVMʯʹ ΍Βͤͨɻ͜͜ΛαʔόϨεʹ͢Δͷ͸ Ωπ͍͚ͲΑ͘Λݴ͑͹ɾɾɾɾɻ ߏ੒؅ཧͷϑϧελοΫͱͯ͠࢖͍΍͍͢ ? マルチベンダだと 恩恵が大きいかも
  18. 03-04

  19. 03.։ൃ͸֤ਓͷ೚ҙͷλΠϛϯάͰ΍Δɻ Development is done at an arbitrary timing of each

    person. ࠓճͷ͜ͷQicoo͸ษڧձϝϯόʔͷ ࣗෲͰ͋Γɺͱʹ͔͓ۚ͘Λ͔͚ͨ ͘ͳ͍ͱ͍͏ڧ͍ؾ͕࣋ͪ͋ͬͨɻ ߋʹօۀޙʹ࡞ۀ͢ΔͷͰɺ͍ͭͰ ΋ɺͦͯ͠୭Ͱ΋ΠϯϑϥΛσϓϩ ΠͰ͖Δඞཁ͕͋ͬͨɻ 04.͓ۚͱ͔͔͚ͨ͘ͳ͍͔Β೔த͸ɺΠϯϑϥશମΛམͱ͓͖͍ͯͨ͠ɻ Do not want to spend a lot of money, so during the day I want to drop the entire infrastructure. 月数万って 保険くらい
  20. Development Staging Production 3 set ※クラスターは分けてません

  21. ߹ܭ $32.91 10݄ ߹ܭ $99.39 11݄ ߹ܭ $65.95 12݄ 個人的には相当安く済んだと思う・・・!

  22. ࣮ࡍͷσϓϩΠ Actual deployment in cndjp More Information

  23. SHOW CNDJP INFRASTRUCTURE deploy!! AWSリソースをデプロイしてから、ARKリストア

  24. SHOW CNDJP INFRASTRUCTURE destroy!! ARKでバックアップとEBSのスナップショットとって

  25. SHOW CNDJP INFRASTRUCTURE destroy!! 全部ぶっ壊す!

  26. Step #1 Step #3 Step #5 Step #2 Step #4

    slackʹͯɺ chatbotʹରͯ͠ ʮ্͛ͯʯͱએݴɻ chatbot͕ࢦࣔΛ ड͚औΓɺ ansibleίϚϯυ ΛΩοΫ ࣮ߦίϚϯυΛ ϩάͱͯ͠slack ʹ౤͛ͯɺऴྃΛ એݴɻ slackʹͯɺ chatbotʹରͯ͠ ʮԼ͛ͯʯͱએݴɻ ʮ্͛ͯʯͱಉ༷ ʹansibleίϚϯ υΛΩοΫ͠ɺ όοΫΞοϓΛ͠ ͔ͯΒશͯফ͢ɻ この図が使いたいだけのスライド。
  27. Πϝʔδ • • GCPͷVMΠϯελϯεΛৗ্ཱ͓͖࣌ͪ͛ͯɺ ʮ্͛ͯʯͳͲͷૢ࡞Λ࣮ࢪ • This is image. •

    杜王町在住の高校生の 過酷な労働環境・・・w
  28. chatbotʹ͍ͭͯ This is about chatbot ɾHubotͱ͔ଵ͍͔ΒPython3͔ͳͱ ɾhttps://github.com/lins05/slackbot ɾඇৗʹ௚ײతͰ୯७ͳίʔυͰಈ͘ ͷͰΦεεϝɻ ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47

  29. chatbotʹ͍ͭͯ This is about chatbot # coding: utf-8 from slackbot.bot

    import respond_to # @botname: Ͱ൓Ԡ͢Δσίʔμ from slackbot.bot import listen_to # νϟωϧ಺ൃ ݴͰ൓Ԡ͢Δσίʔμ from slackbot.bot import default_reply # ֘౰͢ΔԠ౴ ͕ͳ͍৔߹ʹ൓Ԡ͢Δσίʔμ @respond_to(‘ͳΜͷ͜ͱͩʁ’) def mention_func(message): message.reply(‘͜ͷຯ͸ɾɾɾ΢ιΛ͍͍ͭͯΔʮຯʯͩ ͥɾɾɾɾ’) @listen_to('தؒ؅ཧ৬') def listen_func(message): message.send(‘ʮ೚຿Λ਱ߦ͢Δʯʮ෦Լ΋कΔʯ’) message.send(‘ʮ྆ํʯ΍Βͳͬͪ͘Ό͋ͳΒͳ͍’) message.reply(‘֮ޛ͸͍͍͔ʁ') ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47 お手本のようなライブラリ。
  30. chatbotʹ͍ͭͯ++ This is about chatbot++ Q. ͦ΋ͦ΋ͳͥChatbot͔ʁ ɾࠓճ͸ʮ୭Ͱ΋ɺ͍ͭͰ΋σϓϩ Πʯ͢Δඞཁ͕͋ͬͨɻ →A.୭Ͱ΋ɿγϯϓϧͳίϚϯυͰ

    ࣮ߦͰ͖Δɻ ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47 →A.͍ͭͰ΋ɿσϓϩΠ͸ίϯιʔ ϧ͍ΒͣͰ΍Γ͍ͨɻ νϟοτϘοτ Ͱ͑͑΍Μ͚ɻ
  31. chatbotʹ͍ͭͯ++ This is about chatbot++ Q. ໰୊Ͱ͢ ɾEKSͱRDSͱECacheΛt3.medium ͘Β͍ͷΛηοτͰ̏؀ڥΛॱ൪ʹ σϓϩΠ͢Δͷʹ͔͔Δ࣌ؒ͸ʁ

    ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47
  32. chatbotʹ͍ͭͯ++ This is about chatbot++ Q. ໰୊Ͱ͢ ɾEKSͱRDSͱECacheΛt3.medium ͘Β͍ͷΛηοτͰ̏؀ڥΛॱ൪ʹ σϓϩΠ͢Δͷʹ͔͔Δ࣌ؒ͸ʁ

    →A. 2࣌ؒҎ্ ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47
  33. chatbotʹ͍ͭͯ++ This is about chatbot++ ۀޙʹ2࣌ؒ΋଴ͬͯͨΒɺ ৸Δ࣌ؒͰ͢(^p^) →A. ඇಉظॲཧ͢Δ͔ʙʙʙʙʙ ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47

  34. chatbotʹ͍ͭͯ++ This is about chatbot++ ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47 ɾPython3ʹ͸asyncioͱ͍͏ඇಉظ ॲཧͷඪ४ύοέʔδ͕͋Δɻ https://docs.python.jp/3/library/ asyncio.html

    ɾϙΠϯτ͸ɺͳΜͱɺasyncioʹ͸ shellΛऽΔ༻ͷsubprocessϞδϡʔ ϧ͕͋Δɻ 無かったら環境周りでハマりそうだった
  35. chatbotʹ͍ͭͯ++ This is about chatbot++ def async_ansible_up(loop): log_file_path = sys.argv[1]

    command01 = ‘echo 01’ command02 = ‘echo 02’ command03 = ‘echo 03’ commands = asyncio.gather(sh_coroutine(command01), sh_coroutine(command02), \ sh_coroutine(command03) one, two, three = loop.run_until_complete(commands) loop.close() async def sh_coroutine(*args): process = await asyncio.create_subprocess_shell( *args, stdout=asyncio.subprocess.PIPE) stdout, stderr = await process.communicate() return stdout.decode() if __name__ == "__main__": loop = asyncio.get_event_loop() async_ansible_up(loop) 一般的なasync/awaitだよね。
  36. chatbotʹ͍ͭͯ++ This is about chatbot++ ඇಉظॲཧ͢Δ͔ʙʙʙʙʙ ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47 →14෼ʹॲཧΛ୹ॖʂʂ \デデーン/

  37. ΍ͬͯΈͯͲ͏ͩͬͨʁ How was it when you tried it? νϟοτͳͷͰϩάʹ෼͔Γ΍͘͢࢒Γɺ ૢ࡞΋γϯϓϧʹͳΓଐਓԽ͕ܰݮ

    ࠓճͷษڧձͰ࢖͍ͬͯΔΠϯϑϥ΋1ϲ ݄৮ͬͯͳ͔ͬͨͷʹɺಈ͍͍ͯΔʂ ✔ ✔ ✔ ΞχϝͷΩϟϥΫλΛbotͱͨ͠ࣄͰ Ѫ͞Ε΍͘͢ɺอक΋͞Ε΍͔ͬͨ͢ɻ ✖ supervisordͰӬଓԽͤͨ͞Pythonͷ bot͕ߋʹshellΛऽΔͷͰ؀ڥґଘ͕ϝ νϟΫνϟͰΧΦεɻ ͜Εɺdigdagͱ͔Ͱ΍Ε͹Α͘Ͷʁw ଞͷਓ͕ਅࣅ͠΍͍͢ɻ ? <ぜひみなさんも!
  38. LAST

  39. I think that it is under development, so I want

    to keep the state under development. 05. ։ൃதͩͱࢥ͏͔Βɺ։ൃ్தͷঢ়ଶ͸࢒͓͖͍ͯͨ͠ɻ ๻Β͸ຊۀ͕͋ΔͷͰɺ Կ͔࡞ۀ్தͰ৸ͯ͠·͏ࣄ͕͋Δ Ͱ͋Ζ͏ɾɾɾɾɻ ͦͷঢ়ଶͰ໌೔΋͏Ұ౓্ཱͪ͛ͯ ΋ಉ͡K8Sͱ্ཱ͕͖ͯͪͬͯͯ͠΄ ͍͠ɻ ᩵୔ͳ ೰ΈͩͶ͑ɻɻ
  40. I think that it is under development, so I want

    to keep the state under development. 05. ։ൃதͩͱࢥ͏͔Βɺ։ൃ్தͷঢ়ଶ͸࢒͓͖͍ͯͨ͠ɻ ྗΛ ༩͑Α͏ɻɻɻ https://github.com/heptio/ark
  41. heptio/arkʹ͍ͭͯ This is about heptio/ark ,VCFSOFUFT޲͚ͷόοΫΞοϓπʔϧ ,VCFSOFUFT্ͷ͋ΒΏΔϦιʔεͷʮఆ ٛʯΛόοΫΞοϓ͢ΔʢNBOJGFTUΛ όοΫΞοϓ͢Δͬͯײ֮ʹ͍ۙʣ ઐ༻ͷεέδϡʔϥ΍ɺࡉ͔͍ϑΟϧ

    λϦϯά΋Մೳ
  42. heptio/arkʹ͍ͭͯ This is about heptio/ark  BSLΫϥΠΞϯτ͕LTBQJTFSWFSʹ CBDLVQΦϒδΣΫτͷ࡞੒Λཁٻ͢Δɻ  l#BDLVQ$POUSPMMFSz͕LTBQJTFSWFS

    ʹCBDLVQΦϒδΣΫτͷ࡞੒ཁٻΛ֬ ೝ͢Δɻ  l#BDLVQ$POUSPMMFSz͕LTBQJTFSWFS ʹϦιʔεࢀর͢ΔΫΤϦΛૹ৴͢Δɻ ऩूͨ͠৘ใΛݩʹl#BDLVQ$POUSPMMFSz ͕ઃఆ͞ΕͨΫϥ΢υϓϩόΠμʹϑΝ ΠϧΛૹ৴ɻ ը૾Ҿ༻https://www.opcito.com/blogs/tag/ark/ コンテナ自体はバックアップしない! ・・・・
  43. heptio/arkʹ͍ͭͯ This is about heptio/ark  BSLΫϥΠΞϯτ͕LTBQJTFSWFSʹ CBDLVQΦϒδΣΫτͷ࡞੒Λཁٻ͢Δɻ  l#BDLVQ$POUSPMMFSz͕LTBQJTFSWFS

    ʹCBDLVQΦϒδΣΫτͷ࡞੒ཁٻΛ֬ ೝ͢Δɻ  l#BDLVQ$POUSPMMFSz͕LTBQJTFSWFS ʹϦιʔεࢀর͢ΔΫΤϦΛૹ৴͢Δɻ ऩूͨ͠৘ใΛݩʹl#BDLVQ$POUSPMMFSz ͕ઃఆ͞ΕͨΫϥ΢υϓϩόΠμʹϑΝ ΠϧΛૹ৴ɻ Cluster Backup Restore gcr.io/heptio-images/ark
  44. Fast etcdͷఆٛσʔλͷ όοΫΞοϓ(ϒϩοΫ σόΠεͷsnapshot) ͚ͩͳͷͰඇৗʹߴ଎ɻ F Vender Neutral etcdఆٛ͸΋ͪΖΜɺ ϒϩοΫσόΠεͷόο

    ΫΞοϓ΋ AWS,Azure,GCP,IBM, Digital Ocean…etcͳ Ͳ֤ϕϯμରԠɻ V Cloud Native όοΫΞοϓͷॲཧʹ͋ Γ͕ͪͳେڼͳΠϯϑϥ ͸ඞཁͳ͘ɺ όοΫΞοϓઌͷՄ༻ੑ ͸͋͘·ͰΫϥ΢υϕϯ μʹ೚ͤΔͱ͍͏ίϯη ϓτ C HEPTIO/ARK’S FEATURE ベンダー製品っぽいスライドだね^^
  45. SHOW CNDJP INFRASTRUCTURE deploy!! またこの絵です。 ↓「状態」はS3に保存。

  46. SHOW CNDJP INFRASTRUCTURE destroy!! またこの絵です。 ↓「状態」はS3に保存。

  47. SHOW CNDJP INFRASTRUCTURE destroy!! またこの絵です。 ↓「状態」はS3に保存。

  48. CONCLUSION

  49. ͱΓ͋͑ͣग़དྷͨ Just Make it. 01 02 04 06 05 03

    07 08 09 10 11 12 ɾෳ਺ͷٕज़Λ૊Έ߹Θͤ͹ɺ ೉ّͳཁ݅΋ຬͨͤΔɻ ɾίʔυ͕ॻ͚Δͱग़དྷΔࣄ͕޿͕Δͥɻ ɾࠓճͷεϥΠυ͸๭௨৴ձࣾͷ٬ઌৗற ࣌୅ʹഓͬͨςΠετͰ࡞ͬͯΈ·ͨ͠ɻ このドット文字は PixelMplus12というフォント を使用させて頂いてます。