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

StreetVoice 自動化部署演進

StreetVoice 自動化部署演進

C136e508049103f37d35b6c3314e9b1d?s=128

Ming Shien Tzang

August 23, 2016
Tweet

More Decks by Ming Shien Tzang

Other Decks in Technology

Transcript

  1. ᛔ㵕玕蟂ᗟᄍ蝱 @ ModernWeb 2016

  2. 橕ෝ StreetVoice ᤋ肨牏౯

  3. 加缏ᶪ禼ᐒᗭ翕ᒊ ݣ傀牏詂჈牏Ӿ㾴

  4. 窔稧 碍֖ᶪ禼咳ᤈ

  5. 憎挨य़㿁 襎憙℄ፓ牏ᶪ禼蔭ᄍ

  6. 墋㻌ኞၚ℄ 狶ࡅ稭ጱԪ 虏ࡅ稭ጱԪ磪㰷独

  7. tzangms ੜၹ, Ո圸ၹ者ቘ

  8. Intro ࣁ෈獺叨禂牧ग़੝犖ฎ஑蝍穩讨ದ蔩

  9. ض藯᯿讨 StreetVoice ই֜狶ᛔ㵕玕蟂ᗟ

  10. 蝫ೲ衔᮷犋አೲ master branch ݝᥝ磪ๅ碝, 纷ୗ疰䨝ᛔ㵕蟂ᗟکྋୗ絑ह

  11. 傶֜ᥝᛔ㵕蟂ᗟ 狶ࡅ稭ጱԪ 虏ࡅ稭ጱԪ磪㰷独 耆卓ጱԪ眐虏犢ᛔ૩㵕

  12. 翕ᒊॡग़ 犋ᛔ㵕蟂ᗟ䨝稴Ոጱ 30+ instance 20+ instance

  13. ᥝ揗揣ጱ翕ᒊ

  14. 犋ݝ蝡犚 螭磪皃㮆ࣁ憒㴟Ӿ …

  15. ྯ㮆翕ᒊ螭磪犋ݶ絑ह production, staging, development

  16. 翕ᒊአکጱ䩚ᥜॡग़ python npm nginx gunicorn cronjob worker linux etc طฎӞ㮆翕ᒊ疰አک盄ग़๐率

  17. ֕ฎ౯㮉ݝ磪Ӟ㮆 SA 犥獮ฎ vinta Ӟ㮆Ո獊۱

  18. –౯㮉疑 SA ̿ᥝ᯿ୌ SV ܈皃ݣ犋ݶአ蝝ጱ֑๐瑊کӤ娄, ݝ 襑ᥝ妔౯犋ک 20 獤楮̀

  19. ᛔ㵕玕蟂ᗟጱ獮൉ • ᪃䄪ጱᛔ㵕玕介手 • ૡ֢窕纷 • 碻樌

  20. ૡ֢窕纷

  21. None
  22. None
  23. None
  24. 蝢Ꭳ 蝚螂 Slack Ꭳ螇ಅ磪य़ੜԪ

  25. 蟂ᗟᄍ蝱 • FTP • Fabric • SaltStack • Ansible

  26. FTP 犋ᥝᒞ, ک匍ࣁ螭ฎ磪Ոࣁ FTP

  27. Fabric ݢ犥አ㬵狶盄ग़Ԫ, ݢฎ吚翕ᒊ᩼虋᩼蕦褾ጱ碻狡 …

  28. SaltStack

  29. $ salt “*” state.highstate ޷ݞ saltstack 蝱ᤈ蟂ᗟ

  30. ፗ矑ࣁ hipchat 矒ګ saltstack አ hubot 矒ګ

  31. None
  32. None
  33. 匍ࣁ䷱Ոቘ hubot ԧ ࢩ傶蟂ᗟ᮷ᛔ㵕玕ԧ, 犋螂螨ع苭Ӟ, 犢螭ฎࣁ

  34. 蟂ᗟᛔ㵕蝢Ꭳ

  35. 傶֜矦 Ansible

  36. –౯㮉疑 SA ̿穉蚏 saltstack牧ࣗ穉斃੝牧 戔ਧොୗ墋㻌牏竃༩牐̀

  37. 蜢舚ጱ䌃纷ୗ 䌃纷ୗ 樄 feature branch 盅 push Ӥ Github ݚ樄

    Pull Request, ࣁ merge 獮, 䨝ض Code Review 㪐Ӥ粚๜矒ګ羬翄 蝚螂 Travis CI ᪒㻌ز 介手, ইຎ蝢螂介手, Code Review 犖䷱㺔 氂ጱ扖, ׎䨝 merge 㻌ز介手 ইຎ磪纷ୗ merge 蝱 develop ౲ฎ master branch, Travis CI 介 手蝢螂׎䨝ᛔ㵕޷ݞ ansible 樄ত蟂ᗟ ᛔ㵕蟂ᗟ ansible 䨝಩ಅ磪ፘ 橕֑๐瑊ጱ纷ୗ牏 戔ਧ᮷ๅ碝ک磧碝 ጱ制眲 ๅ碝纷ୗ牏制眲 ᛔ㵕玕蟂ᗟ窕纷
  38. ဳ఺Ԫ殻 Ջ讕碻狡犋胼ᛔ㵕蟂ᗟ

  39. DB migration • ࣁ staging 碝ी䳱֖ • ࣁ production 㳫ᴻ䳱֖

    NoSQL ጱ๏݋藶᪡螂, 蘛蘛!
  40. ᛔ㵕玕盅ݢڥአጱ猻玊

  41. 䌕ஞ䌃纷ୗ 蟂ᗟӤ娄஑缛, 㻌ز介手஑缛, 傶֜犋缛ਠ౮蝢Ꭳ疰অ

  42. ֦㮉ᛔ㵕玕ԧ㻟?

  43. Q & A