Pyfest Tunisia 2015 - Python & DevOps
-
Upload
ahmed-bessifi -
Category
Leadership & Management
-
view
495 -
download
0
Transcript of Pyfest Tunisia 2015 - Python & DevOps
Python & DevOps
@pyfest 2015
Python & DevOps
@pyfest 2015
Python & DevOps
@pyfest 2015
Ahmed Bessifi @github/abessifi
DevOps Engineer @IMDEV
- Python, Flask, Puppet, Docker, Jenkins
Open source
- Author : Pyatta, repmgr-puppet
- Contributor : LWP, RQ, PoWA
- Member : Debian, openVswitch, metaflask
And you ?
DevOps !
Mixed Martial DevOps
DevOps, what is it for ?
- Ensure better development of the application.
- Continuous integration and deployment.
- Ensure that the application is working as expected
(monitoring, high availability, etc).
DevOps, what is it ?
DevOps, how to do it ?
What's all the fuss about ?
Docker :
“... an open platform for developers and
sysadmins to build, ship and run distributed
applications.”
https://www.docker.com/whatisdocker
Docker : Concepts
Images
A read only collection of “layers” joined together
via a union File System.
Containers
An instance of an image on which one or more
processes are running or have exited.
Docker : Use cases
- Development environments
- Application deployment
- Continuous integration
- Continuous delivery
- Platform-as-a-Service (PaaS)
+
Development
Environments
Dev Env : Components
- OS
- System libraries
- Python dependencies
- Database, cache, etc
Dev Env : Problems
- Constantly change
- Never truly consistent
- Miscommunication (Ops vs Devs)
Dev Env : Docker !
- Just write a Dockerfile !
- Easy to change and share
- 100 % isolated
- Always consistent
- Production ready
Continuous Integration
Why we write tests ?!
Python testing libs/frameworks :
●- Pytest, Nose : Unittesting library (less boilerplate).
- Mock : easily create fakes for testing.
- WebTest : req/resp testing for WSGI web apps.
- Selenium : browser automation (web).
Why using CI ?
“A CI system improves the productivity of a
development team by automating various
things.”
Jenkins for Python :
- Run builds (pytest, tox, etc).
- Perform pep8 and Pyflakes checks.
- Display xUnit, coverage reports.
- Generate and publish docs.
- Build python/deb package(s).
DevOps in action“workflow”
Thank you !
'' We build software for people
who build software ''
<Codiak>
about.me/abessifi
github.com/abessifi