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

The journey to the automated deployment in Open...

The journey to the automated deployment in OpenChat server

LINE DevDay 2020

November 25, 2020
Tweet

More Decks by LINE DevDay 2020

Other Decks in Technology

Transcript

  1. Agenda › OpenChat Server Release Process › Problem / Objective

    › How We Automated › Result › Future Works
  2. OpenChat Server Release Process › Release Master oversees the entire

    release. › Weekly release › Each member is in charge of 1 or 2 components. › Takes about 1H ~ 1.5H
  3. # of Manual Operations › Currently, the total number of

    components is 7. › 2 of components are the target of Canary Release. (Restart Canary Group => Restart All Servers)
  4. # of Manual Operations Sharing Deployment Monitoring # of Sharing

    = 7 (Start) + 7 (Finish) + 2 (Canary Release) = 16 # of Deployment = 7 (Deploy) + 7 (Restart) + 2 (Canary Release) = 16 # of Monitoring = 7 + 2 (Canary Release) = 9 # of Total Manual Operations = 16 + 16 + 9 = 41 16 16 9
  5. Objective › Reduce human resource : All member => ?

    › Prevent human mistake › Reduce manual operations : 41 => ?
  6. Automate Sharing › LINE OpenChat chatroom: OpenChat Bot Account &

    OpenChat Server API › LINE Group chatroom: LINE Notify › https://notify-bot.line.me/doc/en/
  7. Automate Deployment PMC API Server Python Script Call Deployment API

    Call Restart API Polling to check task is finished Polling to check task is finished
  8. How we monitor after release › System Layer: E-mail Notification

    › Service Layer: Check ERROR / WARN logs on IMON ElasticSearch Kibana › IMON: A system that monitors LINE services in an integrated manner
  9. How we monitor › System Layer: E-mail Notification › Service

    Layer: Check ERROR / WARN logs on IMON ElasticSearch Kibana
  10. A. When there are new error logs we’ve never seen

    before B. When the existing error log increases rapidly When we think the problem occurs
  11. Automate Monitoring › Use IMON ElasticSearch API to collect error

    logs during specific period › Aggregate number of logs by error type › Compare the number of logs before release with after release
  12. Automate Monitoring Suppose we want to collect error logs from

    DAY1 to DAY3 IMON ElasticSearch Python Script
  13. Automate Monitoring IMON ElasticSearch Get error logs through search API

    Return result Python Script Suppose we want to collect error logs from DAY1 to DAY3 A : 20 B : 40 C : 10 A : 20 D : 15 A : 5 B : 10 E : 60 DAY1 DAY2 DAY3
  14. Automate Monitoring Python Script Suppose we want to import error

    logs from DAY1 to DAY3 A: 20 B: 40 C: 10 A : 20 D : 15 A : 5 B : 10 E : 60 Aggregate by error type A : 45 B : 50 C : 10 D : 15 E : 60
  15. Automate Monitoring Suppose that the deployment start time is T,

    A :45 B : 50 C : 10 D : 15 E : 60 A :20 B : 5 D : 2 (T - 10 Days) ~ T T ~ now
  16. Automate Monitoring Suppose that the deployment start time is T,

    A : 20 B : 5 D : 2 F : 3 (T - 10 Days) ~ T T ~ now New error log A :45 B : 50 C : 10 D : 15 E : 60
  17. Automate Monitoring Suppose that the deployment start time is T,

    A : 1 B : 250 C : 5 D : 2 (T - 10 Days) ~ T T ~ now Increased old error log A :45 B : 50 C : 10 D : 15 E : 60 50 < 250
  18. Automate Monitoring New error logs? or Increased old logs? Finish

    deployment Finish monitoring Wait for 5 minutes Share errors to team chatroom Over 3 times? Y Y N N
  19. Integration OpenChat Server API & LINE Notify PMC API iMON

    ElasticSearch API OpenChat Server API & LINE Notify Build Automated!
  20. Future Works › Automate Rollback › Strengthen Monitoring › Pipelining

    (ex. Jenkins Pipeline) › Introduce Interactive Bot (ex. Slack Bot)