Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Make App, Using with Study Group

nnao45
January 30, 2019

Make App, Using with Study Group

nnao45

January 30, 2019
Tweet

More Decks by nnao45

Other Decks in Technology

Transcript

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

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

    01 02 03 04 Kubernetes࢖͓͏ͥɻ AWSͰEKSग़ͨ͠ɺͱΓ·AWSͰɻ ։ൃ͸֤ਓͷ೚ҙͷλΠϛϯάͰ΍Δɻ ͓ۚͱ͔͔͚ͨ͘ͳ͍͔Β೔த͸ɺ ΠϯϑϥશମΛམͱ͓͖͍ͯͨ͠ɻ 05 ։ൃதͩͱࢥ͏͔Βɺ։ൃ్தͷঢ়ଶ͸ ࢒͓͖͍ͯͨ͠ɻ νʔϜͷGoྗΛߴΊΔඞཁ͕͋Δɻ
  3. 01

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

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

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

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

  8. 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 使ってみたい衝動駆動開発!
  9. SHOW CNDJP MIDDLEWARE ϩάऩू ؂ࢹ τϨʔγϯά ίϯςφ ϥϯλΠϜ ίϯςφ Φʔέετϥ

    ՄࢹԽ αʔϏε σΟεΧόϦ ߏ੒؅ཧ ΠϯϑϥCD RDS Ωϟογϡ όοΫΞοϓ ϑϩϯτ ίʔυ؅ཧ ΧφϦΞϦϦʔε+GitOps+CNΛ࣮ݱ͢Δϛυϧ΢ΣΞ ໨ࢦͨ͠ͷ͸ͱʹ͔͘ϕϯμʔχϡʔτϥϧͰΫϥ΢υωΠςΟϒ CICDύΠϓϥ Πϯ ෛՙࢼݧ
  10. 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 認証とか、 何を永続化すればいいのとか
  11. Deploy Spinnker on EKS is … Deploy process toooooooooooooooooooooooooo long!!!!!!!!!!!!!!!!!!!!!!!!!

    ΋͠࢖ΘΕΔํʹ͓ಘͳ৘ใ https://d3079gxvs8ayeg.cloudfront.net/ templates/managing.yaml 両方デプロイされちゃうZOI
  12. Deploy AWS Resource by Ansible Ansible is Good!! And… ϥΠϒϥϦ͕ॆ࣮ͯͯ͠খճΓ͕ޮ͘

    ม਺ͷҰׅ؅ཧɺൿಗ৘ใͷ҉߸ԽͳͲɺ ✔ ✔ ✔ ʮႈ౳ੑʯͱ͍͏ίϯηϓτ͸ k8sͱ૬ੑ͕ྑ͍ͷͰɺҰׅ؅ཧ͠΍͍͢ ? AWSͷCf͕༏ल͗ͯ͢ɺ ࠷ऴతʹΠϯϑϥ͸Ansible͔ΒCfΛୟ ͘ͷ͕ຆͲʹͳͬͯ͠·ͬͨɻ ࠓճAnsibleΛΩοΫ͢Δͷ͸ʮVMʯʹ ΍Βͤͨɻ͜͜ΛαʔόϨεʹ͢Δͷ͸ Ωπ͍͚ͲΑ͘Λݴ͑͹ɾɾɾɾɻ ߏ੒؅ཧͷϑϧελοΫͱͯ͠࢖͍΍͍͢ ? マルチベンダだと 恩恵が大きいかも
  13. 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. 月数万って 保険くらい
  14. Step #1 Step #3 Step #5 Step #2 Step #4

    slackʹͯɺ chatbotʹରͯ͠ ʮ্͛ͯʯͱએݴɻ chatbot͕ࢦࣔΛ ड͚औΓɺ ansibleίϚϯυ ΛΩοΫ ࣮ߦίϚϯυΛ ϩάͱͯ͠slack ʹ౤͛ͯɺऴྃΛ એݴɻ slackʹͯɺ chatbotʹରͯ͠ ʮԼ͛ͯʯͱએݴɻ ʮ্͛ͯʯͱಉ༷ ʹansibleίϚϯ υΛΩοΫ͠ɺ όοΫΞοϓΛ͠ ͔ͯΒશͯফ͢ɻ この図が使いたいだけのスライド。
  15. 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 お手本のようなライブラリ。
  16. chatbotʹ͍ͭͯ++ This is about chatbot++ Q. ͦ΋ͦ΋ͳͥChatbot͔ʁ ɾࠓճ͸ʮ୭Ͱ΋ɺ͍ͭͰ΋σϓϩ Πʯ͢Δඞཁ͕͋ͬͨɻ →A.୭Ͱ΋ɿγϯϓϧͳίϚϯυͰ

    ࣮ߦͰ͖Δɻ ը૾Ҿ༻:http://yoo-s.com/topic/labs?category_id=47 →A.͍ͭͰ΋ɿσϓϩΠ͸ίϯιʔ ϧ͍ΒͣͰ΍Γ͍ͨɻ νϟοτϘοτ Ͱ͑͑΍Μ͚ɻ
  17. 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だよね。
  18. ΍ͬͯΈͯͲ͏ͩͬͨʁ How was it when you tried it? νϟοτͳͷͰϩάʹ෼͔Γ΍͘͢࢒Γɺ ૢ࡞΋γϯϓϧʹͳΓଐਓԽ͕ܰݮ

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

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

    to keep the state under development. 05. ։ൃதͩͱࢥ͏͔Βɺ։ൃ్தͷঢ়ଶ͸࢒͓͖͍ͯͨ͠ɻ ྗΛ ༩͑Α͏ɻɻɻ https://github.com/heptio/ark
  21. 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/ コンテナ自体はバックアップしない! ・・・・
  22. 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
  23. Fast etcdͷఆٛσʔλͷ όοΫΞοϓ(ϒϩοΫ σόΠεͷsnapshot) ͚ͩͳͷͰඇৗʹߴ଎ɻ F Vender Neutral etcdఆٛ͸΋ͪΖΜɺ ϒϩοΫσόΠεͷόο

    ΫΞοϓ΋ AWS,Azure,GCP,IBM, Digital Ocean…etcͳ Ͳ֤ϕϯμରԠɻ V Cloud Native όοΫΞοϓͷॲཧʹ͋ Γ͕ͪͳେڼͳΠϯϑϥ ͸ඞཁͳ͘ɺ όοΫΞοϓઌͷՄ༻ੑ ͸͋͘·ͰΫϥ΢υϕϯ μʹ೚ͤΔͱ͍͏ίϯη ϓτ C HEPTIO/ARK’S FEATURE ベンダー製品っぽいスライドだね^^
  24. ͱΓ͋͑ͣग़དྷͨ Just Make it. 01 02 04 06 05 03

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