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

Application Ops 1.0

Bryan Liles
November 05, 2015

Application Ops 1.0

An introduction to Application Ops (AppOps)

Bryan Liles

November 05, 2015
Tweet

More Decks by Bryan Liles

Other Decks in Programming

Transcript

  1. A P P L I C AT I O N

    O P S 1 . 0
  2. C O N C L U S I O N

    S • Having a continuous integration story • Deploy with confidence • Control your logs • Feel what your application is telling you • Experiment and constantly improve
  3. @ B RYA N L @ D I G I

    TA L O C E A N U R B A N S O F T WA R E D E V E L O P E R B RYA N L I L E S
  4. – D E V E L O P E R

    S E V E RY W H E R E “I write software, someone else deploys and maintains it”
  5. C O N T I N U O U S

    I N T E G R AT I O N
  6. C H O O S I N G A C

    I T O O L • Do you want to manage it? • How much control do you want? • What else can it do? • What can’t it do? • What are the real costs?
  7. C O N T I N U O U S

    I N T E G R AT I O N B U I L D I N G A D E L I V E RY P I P E L I N E Garbage -> -> Stuff Magic
  8. C O N T I N U O U S

    I N T E G R AT I O N Garbage -> -> Stuff Magic
  9. C O N T I N U O U S

    I N T E G R AT I O N Commit -> -> Artifact Test/Build
  10. C O N T I N U O U S

    I N T E G R AT I O N What’s an artifact?
  11. D E P L O Y A L L T

    H E T H I N G S
  12. C H O O S I N G A D

    E P L O Y M E N T S T R AT E G Y • Who does the deploys? • Is it easy to set up? • What happens when it breaks? • Where are we deploying to? • What happens when I oops?
  13. D E P L O Y A L L T

    H E T H I N G S
  14. D E P L O Y A L L T

    H E T H I N G S S E R V E R S E R V E R S E R V E R
  15. D E P L O Y A L L T

    H E T H I N G S I M M U TA B L E I N F R A S T R U C T U R E
  16. D E P L O Y A L L T

    H E T H I N G S I M M U TA B L E I N F R A S T R U C T U R E http://bit.ly/iminfra
  17. D E P L O Y A L L T

    H E T H I N G S I bet your deploys look kind of like this
  18. D E P L O Y A L L T

    H E T H I N G S A RT I FA C T 1 S E R V E R 1 S E R V E R 2 S E R V E R 3 Deploy 1
  19. D E P L O Y A L L T

    H E T H I N G S A RT I FA C T 2 S E R V E R 1 S E R V E R 2 S E R V E R 3 Deploy 2
  20. D E P L O Y A L L T

    H E T H I N G S • What do you servers look like after Deploy 2? • What happens when someone logs in to “fix something”? • Are my servers pets or cattle?
  21. D E P L O Y A L L T

    H E T H I N G S Pets or Cattle?
  22. D E P L O Y A L L T

    H E T H I N G S Pets
  23. P E T S • Are given cute names like

    odin.example.com • Are unique and loving raised • Require you to nurse them back to health when they get ill
  24. D E P L O Y A L L T

    H E T H I N G S Cattle
  25. C AT T L E • Cattle are given numbers

    like app001.dc2.example.com • They are identical to all the other cattle • When they get ill, you get another one
  26. D E P L O Y A L L T

    H E T H I N G S A RT I FA C T 1 S E R V E R 1 S E R V E R 2 S E R V E R 3 Deploy 1
  27. D E P L O Y A L L T

    H E T H I N G S A RT I FA C T 2 S E R V E R 4 S E R V E R 5 S E R V E R 6 Deploy 2
  28. D E P L O Y A L L T

    H E T H I N G S So WHAT does this mean for me?
  29. We always want to deploy to fresh servers and retire

    the old ones to pasture when we’re done.
  30. H O W D O I K N O W

    T H I N G S A R E W O R K I N G C O R R E C T LY ? • What does “Working OK mean?” • Where do I go to see if things are working OK? • What was my app doing at 1545UTC last Thursday?
  31. W H AT ’ S M Y A P P

    D O I N G ? You have logs, right?
  32. W H AT ’ S M Y A P P

    D O I N G ? Where are your logs?
  33. W H AT ’ S M Y A P P

    D O I N G ? S E R V E R 1 L O G S S E R V E R 2 L O G S S E R V E R 3 L O G S
  34. W H AT ’ S M Y A P P

    D O I N G ? S E R V E R 2 L O G S S E R V E R 2 L O G S S E R V E R 2 L O G S L O G S E R V E R
  35. W H AT ’ S M Y A P P

    D O I N G ? S E R V E R 2 L O G S S E R V E R 2 L O G S S E R V E R 2 L O G S
  36. W H AT ’ S M Y A P P

    D O I N G ? S E R V E R 2 L O G S S E R V E R 2 L O G S S E R V E R 2 L O G S
  37. W H AT ’ S M Y A P P

    D O I N G ? PS. You don’t have to use logstash
  38. W H AT ’ S M Y A P P

    D O I N G ? Rant: Why you might not use logstash
  39. W H AT ’ S M Y A P P

    D O I N G ? What kinds of things should I log?
  40. W H AT ’ S M Y A P P

    D O I N G ? Answer these questions:
  41. W H AT ’ S M Y A P P

    D O I N G ? If I were to trace through my application and rebuild a flow, what data would I need?
  42. W H AT ’ S M Y A P P

    D O I N G ? What data do I need when hits the fan?
  43. W H AT ’ S M Y A P P

    D O I N G ? Does my code capture errors?
  44. Y O U H AV E T O B E

    T H E A P P W H I S P E R E R • Your app has a pulse, what is it? • If your app crashes when no one is paying attention, does it make a sound?
  45. W H AT ’ S G O I N G

    O N ? Disclaimer: This is not another section about logging.
  46. W H AT ’ S G O I N G

    O N ? L O G S O T H E R S T U F F P E A C E O F M I N D
  47. W H AT ’ S G O I N G

    O N ? O T H E R S T U F F
  48. W H AT ’ S G O I N G

    O N ? O T H E R S T U F F
  49. W H AT ’ S G O I N G

    O N ? O T H E R S T U F F E X C E P T I O N S
  50. W H AT ’ S G O I N G

    O N ? O T H E R S T U F F E X C E P T I O N S T E L E M E T RY
  51. W H AT ’ S G O I N G

    O N ? E X C E P T I O N S
  52. W H AT ’ S G O I N G

    O N ? E X C E P T I O N S
  53. W H AT ’ S G O I N G

    O N ? Pro Tip: This shouldn’t be a dumping ground
  54. W H AT ’ S G O I N G

    O N ? O T H E R S T U F F E X C E P T I O N S T E L E M E T RY
  55. W H AT ’ S G O I N G

    O N ? T E L E M E T RY
  56. W H AT ’ S G O I N G

    O N ? T E L E M E T RY
  57. E V E RY O N E L O V

    E S P R E T T Y C O L O R S
  58. O S S TAT E A P P R E

    S O U R C E U S A G E N E T W O R K S TAT S C E N T R A L R E P O O F A L L M E T R I C S A S A T I M E S E R I E S
  59. W H AT E L S E C A N

    I D O ? Decrease your infrastructure woes Boot a DigitalOcean Droplet
  60. - B RYA N L I L E S (

    @ B RYA N L ) The end