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

スペックを上げてクラウドで殴るCI / pixiv TECH SALON #pixivTECH...

sue445
March 05, 2019

スペックを上げてクラウドで殴るCI / pixiv TECH SALON #pixivTECHSALON

pixiv TECH SALON ( https://techsalon.pixiv.co.jp/ )の発表資料です。

sue445

March 05, 2019
Tweet

More Decks by sue445

Other Decks in Technology

Transcript

  1. • HN: sue445 • ށ੶ωʔϜ: Go Sueyoshi • 2018೥7݄ɹϐΫγϒೖࣾ ‣

    ࠓճͷొஃऀͷதͰ͸ൺֱత৽ࢀऀ • Πϯϑϥ෦ • ϑϧελοΫΩϡΞΤϯδχΞ ‣ ϓϦΩϡΞͷΧόϨοδ100%ܧଓத go versionʢࣗݾ঺հʣ
  2. • VRoid StudioʢUnityʣͰϏϧυͷ͕͔͔͍࣌ؒͬͯͨ ‣ Ϗϧυ1ճ100෼ʢʂʣ ‣ ϋΠεϖοΫͳGitLab Runner͕΄͍͠ͱ͍͏ཁ๬ ‣ ͔ͤͬ͘ͳͷͰVRoid

    Studioઐ༻Ͱͳ͘ɺࣾ಺GitLabͷશମͰ࢖͑ΔRunnerʹͨ͠ ‣ CIͷվળ݁ՌɺΈΜͳͷੜ࢈ੑ͸όΫ্͕Γʹͳͬͯ޾ͤʹͳͬͯ·͢ CIͷ໰୊఺
  3. • Before ‣ MacMini ‣ ௚ྻͰ100෼ • After ‣ EC2

    c5.2xlargeΠϯελϯεʢvCPU 8, ϝϞϦ16GiBʣ ‣ 3ฒྻͰ25෼ ܶతϏϑΥʔΞϑλʔ
  4. • εϙοτΠϯελϯε • Docker Machine • Ansible • Terraform •

    Packer • Serverless Framework ओͳొ৔ਓ෺
  5. • ϩʔΧϧ։ൃ༻ʹVagrantಋೖ • Vagrant΍Packer಺ͰͷϓϩϏδϣχϯάʹ͸ mitamaeΛ࢖͍ɺϓϩϏδϣχϯάͨ͠಺༰Λ ServerspecͰςετΛ͍ͯ͠Δ • ΋ͪΖΜGitLab CIͰCI/CD͍ͯ͠Δ •

    ৄ͍͜͠ͱ͸શ෦ https://sue445.booth.pm/items/ 1033989 ʹॻ͍ͯΔʢεςϚʣ ‣ CircleCIΛGitLab CIʹม͑ͨҎ֎͸αϯϓϧϦϙδτϦ Λ΄΅ؙύΫϦͰ͖ͯΉͬͪΌศརͩͬͨ Packer + Vagrant + mitamae + Serverspec
  6. CIͷδϣϒؒͰେ༰ྔϑΝΠϧΛड͚౉ͤΔΑ͏ʹͨ͠ • ܦҢ ‣ VRoid StudioνʔϜͷਓʮδϣϒ͕ऴΘͬͯGitLabʹArtifactsΛΞοϓϩʔυ͠Α͏ͱ͢ΔͱΤ ϥʔʹͳΔʯ ‣ sue445ʮGitLabͷϩάݟͨΒ413Τϥʔ(Request Entity

    Too Large)ग़ͯ·͢ͶɻnginxͷΞοϓ ϩʔυ੍ݶʹҾ͔͔ͬͬͯΔΑ͏ͳͷͰGitLabଆͷΞοϓϩʔυαΠζ؇Ί·͕͢zipʹݻΊ ͨ࣌ͷϑΝΠϧαΠζͲΕ͘Β͍͋Γ·͢ʁʯ
  7. • ΞϓϦ͔ΒಛผͳઃఆΛͤͣʹS3ʹΞΫηεͰ͖ΔΑ͏ʹͨ͠ • ΍Γํ ‣ ಛఆͷS3όέοτͷΈʹΞΫηεͰ͖ΔIAMϩʔϧΛ࡞੒ ‣ Docker Machine͕EC2ΠϯελϯεΛىಈ͢Δ࣌ͷΠϯελϯεϓϩϑΝΠϧʹ͜ͷIAM ϩʔϧΛઃఆ

    ‣ ͜͏͢Δ͜ͱͰRunnerଆ͸awscli͚ͩ༻ҙ͍ͯ͠Ε͹όέοτʹಡΈॻ͖Ͱ͖ΔɻʢΞϓ ϦଆͰΞΫηεΩʔͳͲͷઃఆෆཁʣ • ಉҰϦʔδϣϯ಺ͩͱEC2ͱS3ͰϑΝΠϧ΍ΓऔΓ͢Δ࣌ͷ௨৴අ͕͔͔Βͳ͍ͷ ΋خ͍͠ ղܾࡦ: S3ʹΞοϓϩʔυ͢ΔʢԦಓʣ