Continuous Delivery for Python Developers PyCon 8, 2017

Similar documents
DNS Zone Test Documentation

Azure DevOps. Randy Pagels Intelligent Cloud Technical Specialist Great Lakes Region

Strengthen and Scale security using DevSecOps

PyCon APAC 2014 Documentation

Python Project Example Documentation

Continuous Delivery at Liferay A fast lane for your software updates. Rubén Eduardo

FROM VSTS TO AZURE DEVOPS

DISQUS. Continuous Deployment Everything. David

Conventional Development. Manual Build process. Release Manager Testing Team. Developer Branch. Execute Manual /Automation tests.

CONTINUOUS INTEGRATION; TIPS & TRICKS

From development to production

withenv Documentation

Creating pipelines that build, test and deploy containerized artifacts Slides: Tom Adams

I2C LCD Documentation

Test Automation Strategies in Continuous Delivery. Nandan Shinde Test Automation Architect (Tech CoE) Cognizant Technology Solutions

Linux System Management with Puppet, Gitlab, and R10k. Scott Nolin, SSEC Technical Computing 22 June 2017

open-helpdesk Documentation

Release Nicholas A. Del Grosso

Python Schema Generator Documentation

django-reinhardt Documentation

DevNet Workshop-Hands-on with CloudCenter and Jenkins

Quality Engineering in DevOps world a Strategic Enabler

Welcome to Docker Birthday # Docker Birthday events (list available at Docker.Party) RSVPs 600 mentors Big thanks to our global partners:

Test-driven development

devops with

There Should be One Obvious Way to Bring Python into Production. Sebastian Neubauer

Continuous Delivery the hard way with Kubernetes. Luke Marsden, Developer

Sunil Shah SECURE, FLEXIBLE CONTINUOUS DELIVERY PIPELINES WITH GITLAB AND DC/OS Mesosphere, Inc. All Rights Reserved.

Continuous Testing at Scale

USING DOCKER FOR MXCUBE DEVELOPMENT AT MAX IV

Python State Machine Documentation

JenkinsPipelineUnit. Test your Continuous Delivery Pipeline. Ozan Gunalp - Emmanuel Quincerot

Research Faculty Summit Systems Fueling future disruptions

Game Server Manager Documentation

Jenkins: A complete solution. From Continuous Integration to Continuous Delivery For HSBC

sainsmart Documentation

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

Gunnery Documentation

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

Using NGiNX for release automation at The Atlantic

Git! Fundamentals. IT Pro Roundtable! June 17, 2014!! Justin Elliott! ITS / TLT! Classroom and Lab Computing!! Michael Potter!

Bitte decken Sie die schraffierte Fläche mit einem Bild ab. Please cover the shaded area with a picture. (24,4 x 7,6 cm)

Django Wordpress API Documentation

AGILE DEVELOPMENT AND PAAS USING THE MESOSPHERE DCOS

Think Small to Scale Big

dj-libcloud Documentation

django-idioticon Documentation

Python State Machine Documentation

How Can Testing Teams Play a Key Role in DevOps Adoption?

Roman Numeral Converter Documentation

AEM Code Promotion and Content Synchronization Best Practices

Aircrack-ng python bindings Documentation

Deployment Patterns using Docker and Chef

ContainerOps - DevOps Orchestration. Quanyi Ma

SBB. Java User Group 27.9 & Tobias Denzler, Philipp Oser

DevOps Using VSTS and Azure

Redis Timeseries Documentation

Test-driven development

Con. Continuous Integration

Pursuit of stability. Growing AWS ECS in production. Alexander Köhler Frankfurt, September 2018

Aldryn Installer Documentation

Continuous integration & continuous delivery. COSC345 Software Engineering

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Poulpe Documentation. Release Edouard Klein

Getting Started With Serverless: Key Use Cases & Design Patterns

Docker 101 Workshop. Eric Smalling - Solution Architect, Docker

Achieving Continuous Delivery - Micro Services. - Vikram Gadang

Deployability. of Python. web applications

Git Basi, workflow e concetti avanzati (pt2)

UP! TO DOCKER PAAS. Ming

DevOps Workflow. From 0 to kube in 60 min. Christian Kniep, v Technical Account Manager, Docker Inc.

Deployment and Testing Automation in Web Applications Implementing DevOps Practices in Production

Python wrapper for Viscosity.app Documentation

How to Build an Appium Continuous Testing Pipeline

Step 1: Setup a Gitlab account

PyCRC Documentation. Release 1.0

django-users2 Documentation

Continuous Delivery for Cloud Native Applications

Liquibase Version Control For Your Schema. Nathan Voxland April 3,

Managing Network Configurations with Git and GitLab

Docker at Lyft Speeding up development Matthew #dockercon

Orchestrating the Continuous Delivery Process

Agility on Steroids with a Docker-based CI/CD pipeline on AWS. Jon Christensen July 19, 2018

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

DevOps in the Cloud A pipeline to heaven?! Robert Cowham BCS CMSG Vice Chair

django-cas Documentation

BUILDING A GPU-FOCUSED CI SOLUTION

Engineering Robust Server Software

How Docker Compose Changed My Life

CNA1699BU Running Docker on your Existing Infrastructure with vsphere Integrated Containers Martijn Baecke Patrick Daigle VMworld 2017 Content: Not fo

This tutorial provides a basic understanding of the infrastructure and fundamental concepts of managing an infrastructure using Chef.

django-private-chat Documentation

WE THOUGHT WE WERE DOING CONTINUOUS DELIVERY AND THEN. Aravind and Suzie ThoughtWorks

Technical Comparison Sheet: ez Platform Cloud vs Other Hosting Approaches

google-search Documentation

chatterbot-weather Documentation

Simple libtorrent streaming module Documentation

platform Development Process Optimization For Drupal centric projects

CID Documentation. Release Francis Reyes

ThinkPalm s BreakThrough DevOps Capabilities ThinkPalm

Transcription:

Continuous Delivery for Python Developers PyCon 8, 2017 live slides @ tinyurl.com/pycon8-cd

Peter Bittner Developer (of people, companies, code) Co-founder Painless Software @peterbittner, django@bittner.it behave-django codeship-yaml django-apptemplates djangocms-maps sentrylogs

Hypes are hype!... and hype means crazy.

Our lives, our pain.

Agenda 1. What is CD? 2. Why do it? 3. How do it? 4. Put it into practice 5. Demo, Q&A, workshop

What is ontinuous Delivery?

Continuous Delivery?. As a coach you do: Hands-on coding (infrastructure) 30% Start filling in backlogs (PO) Start doing meetings (SM) 20% 15% Show how PRs/MRs work (pairing) 5% Work with PM + management 10% Internal communication, 15% discussions (change mgmt) 5%

What Is It? (C-level management) hype Replacement for Scrum+Kanban? 1st principle of Agile Manifesto All automatic, just push code! TDD, BDD, Selenium, Docker Deployment button for business

Definition... a set of practices and principles... building, testing, and releasing software, faster and more frequently Text... put release schedule in the hands of the business - not IT Source: https://painless.software/continuous-delivery

It's Agile (Ever Since) Satisfy the customer! Source: http://agilemanifesto.org/principles.html

TDD, BDD, Selenium Tests are fundamental for build pipeline.!! risk!! 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

Containers (Docker) 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

Why ontinuous Delivery after all?

Does It Solve My Problems? On-boarding developers takes days "Works on my machine" Not releasing enough features Only a few can trigger deployment "Never deploy on a Friday!" Move to a different hoster (cloud?)

The Definition Said Build features faster + more frequently Test changes faster + more frequently Release changes faster + more frequently Everyone (even the client) can release... and Docker said Environment parity (production = staging = dev machine) Definition: https://painless.software/continuous-delivery

That's the Plan So, in future, we will: 1. Clone a repo + run a project locally 2. Make, test + push changes 3. Get feedback from build server 4. Have changes reviewed + released All in a matter of minutes No fear to break anything Happy devs + clients

How do we make ontinuous Delivery happen?

What Do We Need? Version control Feature branching - maybe Code review, PRs / MRs A test runner, task runner Build server, CI server, pipeline Artifact storage, image registry Hosting Monitoring

Development Process feature branch Someone needs to ship it. production system push code open PR/MR approve build server review system

What to Look at Someone needs to maintain it. Infrastructure as code Agent-less deployment Stick to standard procedures + popular tools (best practices) Make it work for everyone * Self-explanatory procedures Don't break conventions Make developers love it!

Build Servers + Registries Someone needs to build it. Pipeline will build, push and deploy Pick a solution or combo you love to work with (GitHub+Travis+DockerHub, GitLab,...) Hosted may be cheaper than self-hosted (TCO) Build speed, pleasant UI + workflow may pay off more than a smaller price CI Services: http://alternativeto.net/software/travis-ci/ Registries: http://alternativeto.net/software/docker-hub/

Docker Hosting Someone needs to serve it. Decent Docker hosting supports `docker machine` drivers Regular (dedicated) hosting with `docker` and `docker-compose` also works Avoid manual setup (transient servers) Shortlist: https://blog.codeship.com/the-shortlist-of-docker-hosting/

Monitoring Someone needs to babysit it. Screen resource utilization after deployment Some issues are only discovered in production Capture stack traces, identify bottlenecks Get user feedback, communicate w/ users Collect historical data Monitoring: http://alternativeto.net/software/sentry/ Transparency: https://painless.software/transparency

Now let's do ontinuous Delivery with Python!

Pythonic Choices Tox w/ pytest, Flake8, Pylint, behave uwsgi, Nginx, Compose README.rst, no docs Unit and BDD tests prepared GitHub+Travis CI / GitLab / Bitbucket Run project: `docker-compose up` `manage.py runserver` works too Run tests: `tox` or `pytest`

.travis.yml language: python python: 3.5 env: matrix: - TOXENV=flake8 - TOXENV=py27 - TOXENV=py35 install: pip install tox script: tox deploy: # magic stuff here

tox.ini [tox] envlist = flake8,py27,py35 skipsdist = true [flake8] exclude =.cache,.git,.tox,build max-line-length = 80 [pytest] addopts = --junitxml=unittests.xml --strict

docker-compose.yml version: "2" services: webserver: build:./config/webserver application: build: context:. dockerfile:./config/application/dockerfile user: application database: image: postgres

uwsgi.ini [uwsgi] cheaper = 2 chmod-socket = 660 chown-socket = application:application enable-threads = True master = True processes = 16 python-autoreload = 1 socket = /run/project/uwsgi.sock wsgi-file = /opt/project/application/wsgi.py

nginx.conf server { location / { include uwsgi_params; uwsgi_pass unix:///run/project/uwsgi.sock; } location /media { root /opt/project } location /static { root /opt/project; } }

README.rst Project Name ============ Awesome demo website for PyCon 8. Getting Started --------------- To start developing on this project simply bring up the Docker setup:.. code-block:: bash docker-compose up --build -d docker-compose logs -f

Don't Create Those Files! 1. Create a project skeleton (cookiecutter) 2. Use existing cookiecutters 3. Contribute to the one you love best! 4. Do the hard stuff in public (it will pay off) Run `cookiecutter gh:painless-software/ painless-continuous-delivery` Then start working immediately!

Grandpa nailed it, once again. I'll tell our developers. Just awesome.

One More Thing...

Demo Time! https://github.com/painlesssoftware/painless-continuous-delivery https://painless.cloud

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