Continuous Delivery
starts at your

Development
Environment

PyCon 9, 2018

live slides @ tinyurl.com/py9dev

Peter Bittner

  • Developer (of people, companies, code)
  • Co-founder Painless Software
  • @peterbittner, django@bittner.it

behave-django

codeship-yaml

sentrylogs

django-apptemplates

djangocms-maps

Agenda

  1. Continuous Delivery Intro
  2. More Than Just Servers
  3. Demo: Setup Automation
  4. Demo: Infrastructure Automation

What

Continuous

Delivery?

is

Jez Humble?

Continuous Delivery

... a set of practices and principles ... building, testing, and releasing software, faster and more frequently

... put release schedule in the hands of the business - not IT

   .

Development Process

Automation, pipelines & DevOps.

push code

open PR/MR

approve

build

review

feature

production

system

branch

server

system

TDD, BDD, Selenium

Tests are fundamental for build pipeline.

  • No automated verification w/o tests
  • No safeguarding against regression
  • No safety net against deployments
    that would take the site down

TDD good practice

BDD helpful for acceptance

Selenium / performance

!! risk !!

Envs & Containers

Containers make process easier.

  • Feature parity across environments
  • Develop, Staging, Production identical
  • Simplify deployments, no builds on hosts
  • Simplify rollbacks

Optional, but makes it easier

Container images built by pipeline

Push complete system

It's Agile (Ever Since)

Satisfy the customer!

Why Do It?

Move Faster

  • release more often
  • faster ROI
  • less dependencies
  • eliminate frictions

Improve Confidence

  • high probability of success
  • broken things can be fixed fast / easily
  • sustainable corrections
  • "it's worth investing"
    (time + effort)

CD in a Nutshell

Concept Patterns Techniques
Pipeline CI, automatic feedback, continuous deployment, feature toggles
Empower sponsor review apps, self-service deployment, zero-downtime, canary + b/g releases
Prove feature completeness BDD, TDD, automatic tests (regression, performance, penetration)
Error prevention environment parity, locked-down envs, transient envs, automatic provisioning
Visibility version control, dashboards, monitoring
Speed fast tests, resilient / self-healing envs

More

Servers

than

just

What Did We Do?

  1. deployment
  2. testing
  3. environments

Big picture

Fix things we first neglect

Make It Bigger

We're neglecting dev infra

  • on-boarding developers takes days
  • no tool parity across dev PCs
  • can't wipe PC when it behaves weird
  • everyone asks you (how do I?)
  • "projects" for switching technologies
    or introducing new tools

What's Wrong?

CD Pattern Anti-Pattern
Automate environment config Manual setup, "work of art"
Scripted setup Notes, documentation of setup
Single command builds Comprehensive instructions
Fix broken environments first Ignore errors, postpone fixes
TDD, automate tests Manual verification + fixes
Fully version controlled Parts not version controlled
Visibility, dashboards, sharing Geeky "secret configurations"

Solution (part #1)

Automate your setup

  • configuration management
  • treat your dev env like a container
  • resist manual changes
  • version control
  • backup + restore your data

Demo

Solution (part #2)

Automate your infrastructure

  • fully automatic setup: desktops & servers
  • infrastructure monitoring & mgmt
  • complete tool chain: infra as code
  • automatic backups (offsite)
  • user data synchronization (offline)

Demo

Thank you!

for your precious time

Painless Software

Less pain, more fun.

PyCon 9: Continuous Delivery starts at your Development Environment

By Peter Bittner

PyCon 9: Continuous Delivery starts at your Development Environment

Continuous Delivery is the automation of our deployment and QA, isn’t it? The industrialized software production chain that makes our products more stable. Well, kind of. It’s more than that. It can save you tons of pain when you apply its principles everywhere. This talk explains how you free yourself by doing infrastructure like software development. Everything under control. Everything under version control. https://www.youtube.com/watch?v=31-sNh7llJ8

  • 3,624