Python tooling for continuous Python tooling for continuous - - PowerPoint PPT Presentation

python tooling for continuous python tooling for
SMART_READER_LITE
LIVE PREVIEW

Python tooling for continuous Python tooling for continuous - - PowerPoint PPT Presentation

Python tooling for continuous Python tooling for continuous deployment deployment PyParis Novembre 2018 PyParis Novembre 2018 Arthur Lutz - Logilab Arthur Lutz - Logilab 1 Introduction /me Introduction /me Arthur Lutz @arthurlutz


slide-1
SLIDE 1

Python tooling for continuous Python tooling for continuous deployment deployment

PyParis Novembre 2018 PyParis Novembre 2018

Arthur Lutz - Logilab Arthur Lutz - Logilab

1

slide-2
SLIDE 2

Introduction /me Introduction /me

Arthur Lutz / @arthurlutz @arthurlutz@social.logilab.org Logilab Python Nantes Paris Salt Meetup

2

slide-3
SLIDE 3

Introduction Introduction

How we benefited from a rich Python ecosystem to move from sprint-based delivery to continuous delivery.

3

slide-4
SLIDE 4

Continous delivery Continous delivery

Check in Check in Check in Trigger Trigger Trigger Trigger Trigger Feedback Feedback Feedback Feedback Feedback Feedback Approval Approval Delivery team Version control Build & unit tests Automated acceptance tests User acceptance tests Release

Source: wikipedia

4

slide-5
SLIDE 5

Python Stack Python Stack

(ignore the order) View it on StackShare

5

slide-6
SLIDE 6

Reproducible environment Reproducible environment

using volumes for dev parts (equivalent to pip install -e) to set up postgres, redis, celery, etc. using docker- compose.override.yml and then .env same docker images for acceptance testing, pre-production and production with configuration via environment variables docker docker-compose

6

slide-7
SLIDE 7

Test often, break, test again Test often, break, test again

  • reproducible test envs
  • test runner

/

  • functionnal testing (launch daemons in

pytest fixtures) Tools used in dev, CI/test and supervision. tox pytest flake8 isort pifpaf

7

slide-8
SLIDE 8

Ramping up CI Ramping up CI

  • 1. draft-based
  • 2. parametric (manual)
  • 3. public changeset (hg phases) + user-centric
  • 4. component-centric
  • 5. feature-centric

jenkins (not python) with phabricator + jenkins = and JenkinsFile jenkins-job-builder Differential jenkins job

8

slide-9
SLIDE 9

Acceptance test often, break, Acceptance test often, break, test again test again

BDD with / behave robber selenium python bindings

9

slide-10
SLIDE 10

Push, decrease quality, push Push, decrease quality, push again again

Jenkins test metrics and coverage SonarQube (not python) with Peer review with + (amend) + (phabsend) Continuous Quality Control SonarPython mercurial evolve phabricator mercurial extension

10

slide-11
SLIDE 11

Ship often, break, ship again Ship often, break, ship again

rundeck (not python) & for shared deploy logs generate unique version information tag for validation the shipped Jira tickets & for continuous collection

  • f errors

rundeckrun sentry raven-python

11

slide-12
SLIDE 12

Ship often, measure, ship again Ship often, measure, ship again

collect metrics with and serve with collecting custom metrics see carbon graphite-api cfmgmtcamp: Use Saltstack to deploy a full monitoring and supervision stack

12

slide-13
SLIDE 13

Agile infrastructure Agile infrastructure

infrastructure as code, deploy multiple environments portable cloud scaling for in-house cloud hosting used for example to restore production database snapshots in pre-production saltstack salt-cloud

  • penstack

awscli

13

slide-14
SLIDE 14

Agile infrastructure - Agile infrastructure - supervision and metrics supervision and metrics

sensu (not python) supervision using , ease of deploy of new checks netdata supervision and metrics with to test out complex scenarios

testinfra

sensu- formula python.d.plugin testinfra

14

slide-15
SLIDE 15

Dashboards everywhere Dashboards everywhere

to extract data from Jira to extract data from RunDeck Badges everywhere! (not python) grafana (not python) serving data from Jira python bindings requests https://shields.io graphite

15

slide-16
SLIDE 16

Project impacts Project impacts

shorter tickets, split them into tiny chunks unstable environments can be OK - work with the users feature flags to encourage early integration of code more peer review, collective appropriation no more semantic versionning

16

slide-17
SLIDE 17

Future Future

Merge request / feature stack centric generated environments Automation of data migration between environments Use of version control in sentry and regression identification OpenShift / OKD / Kubernetes type continuous deployment Dev environments could be less necessary

17

slide-18
SLIDE 18

Logilab is hiring ! Logilab is hiring !

18

slide-19
SLIDE 19

Conclusion / Questions Conclusion / Questions

Thanks for your attention Any questions ? Slides (full of links !) : , html pdf

19