Deploy using GitHub Releases

Deploy using GitHub Releases

github のリリースを使った Golang + Ruby on Rails アプリのデプロイについて

155d4d09ec09a276de6c9fba93bde972?s=128

Yuya Matsushima

July 18, 2017
Tweet

Transcript

  1. Deploy using
 GitHub Releases 2017-07-15 Gunma.web#28
 Yuya Matsushima

  2. ࣗݾ঺հ • দౡ ༞໵ / @yterajima • PHP, Ruby, JS,

    Go …etc • Takasaki.go ओ࠵, 
 Tokyo Middleman Meetupओ࠵
  3. ಺༰ • LazySearch ͷ঺հ • σϓϩΠํ๏ • σϓϩΠ੔උͷ݁Ռ • ໰୊఺

    • ·ͱΊ
  4. LazySearch

  5. ߏ੒ • RoR (+ Vue.JS) + Go • Migration (Goose)

    • Crawler (Go) • API (Go) • Web UI (RoR) • CI: CircleCI (v1)
  6. ϒϥϯνͷӡ༻ • `master` ͕࠷৽҆ఆ൛ • GitHub ʹ tag Λ push

    ͢Δͱ
 ࠷৽൛Λ build • Releases ʹ ghr ͰόΠφϦΞοϓϩʔυ • RoR ΋ zip ͰΞοϓϩʔυ
  7. Crawler ͷ build GitHub $ git push origin 1.0.0 CircleCI

    CJOBSZ ᶃ push ᶄ CI ᶅ benchmark AWS S3 ᶇ upload ᶆ build
  8. GitHub Ͱ؅ཧ͞ΕΔόΠφϦ

  9. σϓϩΠํ๏ • ansible + rake • ࣮ߦλΠϛϯά͸ίϚϯυ࣮ߦ • Ұੈ୅લͷঢ়ଶ·Ͱอଘ •

    stg ؀ڥʹσϓϩΠ&&ςετޙ 
 prod ؀ڥ΁
  10. Crawler ͷσϓϩΠ $ rake prod:deploy:crawler CJOBSZ ᶃ backup GitHub ᶄ

    config ߋ৽ ᶅ binary DL ᶆ ࠶ىಈ ᶇ ىಈ௨஌
  11. ͳͥ͜ͷํ๏ͳͷ͔ • ΤϯλʔϓϥΠζ൛ͷ഑෍͕೦಄ʹ • αʔόͷߏ੒؅ཧʹansibleΛ
 ࠾༻͍ͯ͠ΔӨڹ • capistrano ͸࢖Θͳ͍ͷ??? •

    ׬શࣗಈԽͰ͖ͳ͍ͷ???
  12. σϓϩΠ੔උͷ݁Ռ • ໘౗ष͕͞ݮͬͨ • ຾ͯ͘΋໷தʹσϓϩΠՄ

  13. ໰୊఺ • master ͷςετΛύε͔ͯ͠Β
 tag ΛଧͭͷͰ 2 ౓खؒ

  14. ೰ΜͰ͍Δͱ͜Ζ • ؀ڥม਺΍ઃఆϑΝΠϧͷ؅ཧ͕
 ൥ࡶʹͳ͍ͬͯΔ • αʔόߏ੒؅ཧͱσϓϩΠ؅ཧͷ
 ϦϙδτϦ͕1ͭͰ͙ͪΌ͙ͪΌ

  15. ·ͱΊ • σϓϩΠ͸ૣΊʹ੔උ͢Δͱ ؾָ͕ • ೉͍͜͠ͱ͸ߟ͑ͣʹखಈΛ ίϚϯυʹஔ͖׵͑Α͏