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

Continuous What?! - Deploying software the right way - Part I

Continuous What?! - Deploying software the right way - Part I

The theoretical part of a two-part presentation given to university students about the process of deploying software.

Marcel Neidinger

November 17, 2016
Tweet

More Decks by Marcel Neidinger

Other Decks in Programming

Transcript

  1. Continous what ?
    Deploy software
    in the 21th century

    View Slide

  2. Not continuity

    View Slide

  3. Not code

    View Slide

  4. risk

    View Slide

  5. Progress is impossible without change
    - George Bernard Shaw

    View Slide

  6. Move fast and break things
    - Mark Zuckerberg

    View Slide

  7. break
    Don’t
    sh*t

    View Slide

  8. tools
    culture

    View Slide

  9. culture
    Let’s talk

    View Slide

  10. Source
    Code
    Management

    View Slide

  11. The bad

    View Slide

  12. The average
    master

    View Slide

  13. Feature
    Branches
    master
    add kittens

    View Slide

  14. Feature
    Branches
    Rule #1
    master is always
    deployable

    View Slide

  15. Feature
    Branches
    Rule #2
    change happens in
    feature branches

    View Slide

  16. Pull
    Requests

    View Slide

  17. Feature
    Branches
    Rule #3
    small and trackable
    changes

    View Slide

  18. Tracking
    Site
    Tracker
    PR #1
    PR #2 PR #3 PR #4
    PR #6

    View Slide

  19. Unit
    Tests

    View Slide

  20. What is
    the unit
    Test?
    1
    2
    3

    View Slide

  21. Unit Testing
    protects
    (t - 1)

    View Slide

  22. Feature
    Branches
    Rule #4
    build a reliable
    test suite

    View Slide

  23. make them
    fast

    View Slide

  24. You always
    test

    View Slide

  25. Yes, and
    how ?!

    View Slide

  26. Continous Integration

    View Slide

  27. Kontinuierliche Integration ist ein Begriff aus der Software-Entwicklung,
    der den Prozess des fortlaufenden Zusammenfügens von
    Komponenten zu einer Anwendung beschreibt. […]
    - Wikipedia

    View Slide

  28. code

    View Slide

  29. production

    View Slide

  30. code
    (compile)
    test
    (staging)
    production
    report

    View Slide

  31. tools
    to the rescue

    View Slide

  32. python
    fanboy

    View Slide

  33. nosetests
    unit-testing

    View Slide

  34. nosetests
    unit-testing
    orthogonal
    edge cases

    View Slide

  35. selenium
    integration-testing

    View Slide

  36. selenium
    why-is-this-not-working-anymore?!

    View Slide

  37. sphinx
    documentation

    View Slide

  38. featureflags
    I see something you can’t see

    View Slide

  39. featureflags
    shiny new
    code
    old
    code
    is a
    developer

    View Slide

  40. laboratory
    When old things have to go
    User
    old
    code
    new
    code
    request
    result

    View Slide

  41. import laboratory
    experiment = laboratory.Experiment()
    with experiment.control() as c:
    c.record(get_objects_from_database())
    with experiment.candidate() as c:
    c.record(get_objects_from_cache())
    objects = experiment.run()
    laboratory
    When old things have to go

    View Slide

  42. fabric
    automate deploys

    View Slide

  43. putting it
    together

    View Slide

  44. travis-ci.org circleci.com

    View Slide

  45. View Slide

  46. Questions
    [email protected]
    @sQu4rks

    View Slide