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

EuroPython 2019: Modern Continuous Delivery for Python Developers

EuroPython 2019: Modern Continuous Delivery for Python Developers

Deployment automation, cloud platforms, containerization, short iterations to develop and release software—we’ve progressed a lot. And finally it’s official: Kubernetes and OpenShift are the established platforms to help us do scaling and zero downtime deployments with just a few hundred lines of YAML. It’s a great time.

Can we finally put all our eggs into one basket? Identify the cloud platform that fits our needs, and jump on it? That could well backfire: Vendor lock-in is the new waterfall, it slows you down. In future you’ll want to jump over to the next better platform, in a matter of minutes. Not months.

This talk is about The Art of Writing deployment pipelines that will survive Kubernetes, OpenShift and the like. It’s for Python developers and Kubernetes enthusiasts of all levels – no domain specific knowledge required, all you need to understand will be explained. You’ll learn how to separate application-specific and deployment-specific configuration details, to maximize your freedom and avoid vendor lock-in.

Come see a demo of a Django project setup that covers everything from local development to automatic scaling, flexible enough to be deployed on any of your favorite container platforms. Take home a working, future-proof setup for your Python applications.

See the original presentation at https://slides.com/bittner/modern-continuous-delivery/

Peter Bittner

July 12, 2019
Tweet

More Decks by Peter Bittner

Other Decks in Technology

Transcript

  1. Modern Continuous Delivery
    Modern Continuous Delivery
    “ deploy to production
    deploy to production
    from commit #1
    from commit #1

    View Slide

  2. Peter Bittner
    Peter Bittner
    Developer
    Developer
    of people, companies and code
    of people, companies and code
    @peterbittner, [email protected]
    behave-django
    pyclean
    djangocms-maps
    ansible-role-software
    django-probes
    django-apptemplates
    codeship-yaml
    django-organice
    PythonTurtle
    painless/tox
    django-bootstrap-static

    View Slide

  3. Continuous Delivery
    Continuous Delivery
    “ a set of practices and principles in software engineering
    aimed at building, testing, and releasing software
    safely, faster, more frequently, and in a sustainable way.
    Source: painless.software/continuous-delivery

    View Slide

  4. Continuous Delivery
    Continuous Delivery
    “ a set of practices and principles in software engineering
    aimed at building, testing, and releasing software
    safely, faster, more frequently, and in a sustainable way.
    “ the goal is to put the release schedule
    in the hands of the business, not in the hands of IT.
    Source: painless.software/continuous-delivery

    View Slide

  5. Continuous Delivery
    Continuous Delivery
    “ a set of practices and principles in software engineering
    aimed at building, testing, and releasing software
    safely, faster, more frequently, and in a sustainable way.
    “ the goal is to put the release schedule
    in the hands of the business, not in the hands of IT.
    Source: painless.software/continuous-delivery
    ??
    ??
    Continuous
    Continuous
    integration
    integration

    View Slide

  6. Continuous Delivery
    Continuous Delivery
    “ a set of practices and principles in software engineering
    aimed at building, testing, and releasing software
    safely, faster, more frequently, and in a sustainable way.
    “ the goal is to put the release schedule
    in the hands of the business, not in the hands of IT.
    Source: painless.software/continuous-delivery
    ??
    ??
    Continuous
    Continuous
    integration
    integration
    ??
    ??
    Continuous
    Continuous
    deploym
    ent
    deploym
    ent

    View Slide

  7. Modern?
    Modern?

    View Slide

  8. Modern?
    Modern?
    Immutable infrastructure
    Immutable infrastructure

    View Slide

  9. Modern?
    Modern?
    Immutable infrastructure
    Immutable infrastructure
    Container orchestration
    Container orchestration

    View Slide

  10. Modern?
    Modern?
    Immutable infrastructure
    Immutable infrastructure
    Container orchestration
    Container orchestration
    Version control + automation
    Version control + automation

    View Slide

  11. Modern?
    Modern?
    Immutable infrastructure
    Immutable infrastructure
    Container orchestration
    Container orchestration
    Version control + automation
    Version control + automation
    Cloud-native applications
    Cloud-native applications

    View Slide

  12. Choice or Lock-in?
    Choice or Lock-in?

    View Slide

  13. 1. Clean code
    1. Clean code
    2. Deploy to production
    2. Deploy to production
    from commit #1
    from commit #1
    There must be a better way!
    There must be a better way!

    View Slide

  14. Demo
    Demo

    View Slide

  15. Responsibility Layers
    Responsibility Layers

    View Slide

  16. Responsibility Layers
    Responsibility Layers
    Application
    Application

    View Slide

  17. Responsibility Layers
    Responsibility Layers
    Application
    Application
    Development
    Development

    View Slide

  18. Responsibility Layers
    Responsibility Layers
    Application
    Application
    Development
    Development
    Deployment
    Deployment

    View Slide

  19. Responsibility Layers
    Responsibility Layers
    Application
    Application
    Development
    Development
    Deployment
    Deployment
    Automation
    Automation

    View Slide

  20. Application
    Application
    One environment!
    12-factor app.
    Build with features.
    Compose in environments.
    1
    1

    View Slide

  21. Development
    Development
    Make it easy!
    Standard practices.
    No comprehensive instructions.
    Simple & user-friendly!
    3
    3

    View Slide

  22. Deployment
    Deployment
    Make it beautiful!
    Easy to explain.
    Generate + seal your secrets,
    or seal + commit your secrets.
    2
    2

    View Slide

  23. Automation
    Automation
    Keep it simple!
    What you would do manually.
    Tell a story!
    ASAP
    4
    4

    View Slide

  24. ASAP!
    ASAP!
    as simple as possible
    as simple as possible

    View Slide

  25. Deploy to production!
    Deploy to production!
    often + from commit #1
    often + from commit #1

    View Slide

  26. Iterate!
    Iterate!
    ... and improve
    ... and improve

    View Slide

  27. Agile, please.
    Agile, please.
    test-driven, pair-programming
    test-driven, pair-programming

    View Slide

  28. Free your software
    Free your software
    no secrets, no security holes
    no secrets, no security holes

    View Slide

  29. “ The only way to go fast
    The only way to go fast
    is to go well.
    is to go well.
    --- Robert C. Martin
    Source: , 2015
    Technology and Friends, Episode 354

    View Slide

  30. Thank you!
    Thank you!
    for your precious time
    for your precious time
    Painless Software
    Painless Software
    Less pain, more fun.

    View Slide

  31. Beautiful is better than ugly.
    Explicit is better than implicit.
    Simple is better than complex.
    Complex is better than complicated.
    Flat is better than nested.
    Sparse is better than dense.
    Readability counts.
    Special cases aren't special enough
    to break the rules.
    Although practicality beats purity.
    Pythonistas Oath
    Pythonistas Oath
    1
    1

    View Slide

  32. Errors should never pass silently.
    Unless explicitly silenced.
    In the face of ambiguity, refuse
    the temptation to guess.
    There should be one­­ only one ­­obvious way
    to do it.
    Although that way may not be obvious
    at first sight.
    Pythonistas Oath
    Pythonistas Oath
    2
    2

    View Slide

  33. Now is better than never.
    Although never is often better
    than *right* now.
    If the implementation is hard to explain,
    it's a bad idea.
    If the implementation is easy to explain,
    it may be a good idea.
    Pythonistas Oath
    Pythonistas Oath
    3
    3

    View Slide

  34. Continuous delivery is
    a honking great idea.
    If you deploy to production
    from commit #1.
    Let's do it! ­­ I start today.
    Pythonistas Oath
    Pythonistas Oath
    4
    4
    Python

    View Slide