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

世界展開する大規模ウェブサービスのデプロイを支える技術 / YAPC::Asia Tokyo 2015

49f49940f0831a426745c028684bcdad?s=47 hatena
August 21, 2015

世界展開する大規模ウェブサービスのデプロイを支える技術 / YAPC::Asia Tokyo 2015

Miiverse とは任天堂株式会社が運営しているウェブサービスであり、世界中の Wii U やニンテンドー3DS、そして PC やスマートデバイスから利用することができます。

AWS 上でマルチリージョン構成をとり大量のサーバを抱える Miiverse のデプロイを支える技術と運用上の工夫、そして株式会社はてなと任天堂株式会社が共同で開発する Git リポジトリの同期システムの構築を通して得られた経験をもとに、大規模なウェブサービスを素早くかつ安全に改善する方法を紹介します。

※本資料は YAPC::Asia Tokyo 2015 での発表資料となります。
http://yapcasia.org/2015/talk/show/9ec2791c-05e5-11e5-81fa-79c97d574c3a

49f49940f0831a426745c028684bcdad?s=128

hatena

August 21, 2015
Tweet

Transcript

  1. None
  2. None
  3. Miiverse

  4. 3DS/Wii U Miiverse

  5. Miiverse

  6. Miiverse Miiverse Git

  7. Miiverse

  8. Wii U 3DS Mii

  9. None
  10. None
  11. Web

  12. Miiverse API /

  13. None
  14. 3 Miiverse Amazon Web Services (AWS) JP/US/EU 3

  15. None
  16. REST API

  17. JAWS UG Developers Summit http://developer.hatenastaff.com/entry/2014/03/25/1 85521 https://speakerdeck.com/hatena/devsumi-2015- miiverse

  18. Miiverse

  19. Miiverse

  20. Capistrano2 & Git Git Git git pull Pull

  21. Capistrano2 & Git git pull Miiverse 3 git pull Git

    git pull
  22. Git Git Slave Miiverse Git Slave Git Slave git pull

  23. Git Git Slave Git Slave 10 1 lsyncd inode rsync

    git push lsyncd rsync
  24. Git Git Git Slave Wii U 3DS etc... Git Slave

    sleep `expr $RANDOM % #{$main.sleep_divisor}` && git ...
  25. Git lsyncd JS CSS Git rsync git fetch

  26. Git Git Slave Git

  27. tips

  28. tips Capistrano role Mackerel API net-ssh

  29. tips Mackerel https://mackerel.io/

  30. tips Mackerel role Capistrano

  31. tips Mackerel Mackerel AutoScale Mackerel / cron kick EC2

  32. tips DB

  33. Miiverse Miiverse Pull Cap2 Git Git Git Slave Git Slave

  34. Git

  35. Miiverse Redmine

  36. Miiverse Redmine GitHub Enterprise NEW!

  37. 2 git push git push ghe master git push origin

    master Merge pull request GHE
  38. Git

  39. google/hesokuri ghm

  40. hesokuri google/hesokuri Distributed Git repo synchronization tool. Google Git

  41. ghm in-house Web Application for mirroring pairs managements Stores mirroring

    pairs Has Webhook API that invoke mirroring (later) Provides some APIs @ GHE 2 GREE Tech Talk
  42. ghm

  43. ghm

  44. 3 ghm Miiverse

  45. None
  46. JSON over HTTP API

  47. REST API Git : /servers(/:id) : /servers/:id/promote, /servers/:id/demote : /servers/:server_id/repos(/:id)

    : /jobs/sync
  48. None
  49. GHE

  50. (1) GHE git push

  51. (2) GHE Webhook

  52. (3) Webhook payload

  53. (4) Git Slave DB

  54. (5) Git Slave DB

  55. (6) GHE git pull

  56. (7) git push

  57. GHE 1. GHE git push 2. GHE Webhook 3. payload

    4. Git 5. Git 6. GHE git pull 7. git push
  58. HTTP POST github.com GHE Git

  59. Git Git Git git push --force

  60. ghm

  61. None
  62. None
  63. Git Pull Git Pull 2 1. commit 2.

  64. Git Pull Miiverse Git 3

  65. Pull

  66. Consul + stretcher strecher Pull Hashicorp Consul http://tech.kayac.com/archive/10_stretcher.html https://github.com/fujiwara/stretcher

  67. Consul + stretcher 1. Amazon S3 2. manifest (YAML) Amazon

    S3 3. consul event 4. stretcher agent
  68. Consul + stretcher Amazon S3 Git manifest rollback manifest

  69. Consul + stretcher Jenkins Amazon S3

  70. None
  71. 1) GHE git push

  72. 2) GHE webhook Jenkins

  73. 3) Jenkins S3 push

  74. 4) Consul master

  75. 5) backend S3

  76. Git Cap2 & Git Consul + stretcher

  77. 100 AWS JP/US/EU Miiverse

  78. Cap2 & Git 1,142 Consul + strecher 29 strecher 40

    !
  79. Consul + strecher Cap2 & Git Consul + strecher deploy:update

    git pull vs S3 DL
  80. Consul + strecher carton install 210 1/10 carton install Cap2

    & Git
  81. 1 AutoScale Consul + strecher

  82. 2 Miiverse Miiverse 3 Consul https://www.consul.io/docs/guides/datacenters.html

  83. Pull Consul + stretcher Miiverse 40 AutoScale

  84. Miiverse Miiverse Pull Git Git Consul + stretcher

  85. None
  86. None
  87. None