1
There Should be One Obvious Way to Bring Python into Production
Sebastian Neubauer
sebastian.neubauer@blue-yonder.com @sebineubauer
There Should be One Obvious Way to Bring Python into Production - - PowerPoint PPT Presentation
There Should be One Obvious Way to Bring Python into Production Sebastian Neubauer sebastian.neubauer@blue-yonder.com @sebineubauer 1 Agenda What are we talking about and why? Delivery pipeline Dependencies Packaging What
1
Sebastian Neubauer
sebastian.neubauer@blue-yonder.com @sebineubauer
2
3
4
@sebineubauer
5
@sebineubauer
6
Required:
Nice to have:
Risks:
@sebineubauer
7
@sebineubauer
8
Required:
Nice to have:
Risks:
@sebineubauer
9
@sebineubauer
10
Required:
Nice to have:
Risks:
@sebineubauer
11
@sebineubauer
12
Requirement:
Nice to have
Risks:
@sebineubauer
13
@sebineubauer
14
Required:
Nice to have:
Risks:
@sebineubauer
15
@sebineubauer
16
@sebineubauer
17
fjctitious defjnition
@sebineubauer
18
requirements
(javascript has local dependencies)
#988 open since 11 Jun 2013, but GSoC 2017 project, fjngers crossed)
dependencies
@sebineubauer
19
package manager: pip package format: wheel
For details see: https://ep2017.europython.eu/conference/talks/python- packaging-current-state-and-overview by @webGandi
@sebineubauer
20
System dependencies Language dependencies
language specifjc libraries, frameworks yum, apt-get, homebrew, vcpks… pip, npm, conan, cpan, maven, composer, cargo, godep, gem,… frequent security updates almost no security updates „operations“ take care „developers“ take care root/system wide user space/virtualenv
@sebineubauer
21
System dependencies Language dependencies
language specifjc libraries, frameworks yum, apt-get, homebrew, vcpks… pip, npm, conan, cpan, maven, composer, cargo, godep, gem,… frequent security updates almost no security updates „infrastructure“ takes care „developers“ take care root/system wide user space/virtualenv
@sebineubauer
22
Where does it come from historically?
@sebineubauer
a walk through the different possibilities
23
24
Development environment:
pyscaffold)
@sebineubauer
25
On Jenkins:
artifact repository (artifactory, devpi…)
@sebineubauer
26
In production:
@sebineubauer
27
Pro Con
again and again
binary packages to repository
runtime“, developers must not forget to pin the dependencies
@sebineubauer
28
system
@sebineubauer
29
Pro Con
host
copy the archive to the target, or it pulls from a repo
platter) it integrates well in „standard“ workfmow with standard tools
@sebineubauer
30
package
target machines
2 years ago :face_with_rolling_eyes:)
you bundle them up (see dh-virtualenv)
@sebineubauer
31
Pro Con
you have to create packages and declare the dependencies yourself (or use dh- virtualenv)
globally installed by root, not always what
@sebineubauer
32
Developer’s box:
@sebineubauer
33
On Jenkins:
scripts
registry…)
@sebineubauer
34
In production:
hosts
@sebineubauer
35
Pro Con
industry standard: schedulers, repositories, monitoring
windows, mac, jenkins or coreos in production, the application runs in the `==` same environment
application
to do it wrong: unapproved software in production, heartbleed…
needed
dependencies still exists, but now in a container
@sebineubauer
36
There are many (interesting) other package managers out there: Conda:
@sebineubauer
37
Nix:
expressing dependencies
rollback/revert
dependencies
@sebineubauer
38
Pro Con
problem, so maybe there is a „next package manager“ that solves most of the problems
parts of the problems even today (e.g. get numeric python packages working on mac and on windows using conda…)
package management solution has a huge potential
problem:
testing and production
that it is a holistic solution for the whole problem for all languages
@sebineubauer
39
into your repository
@sebineubauer
40
Pro Con
needs to be done manually
@sebineubauer
41
42
@sebineubauer
43
@sebineubauer
44
@sebineubauer
45
@sebineubauer
46
@sebineubauer
47
@sebineubauer
48
@sebineubauer
49
50
@sebineubauer
51
By BrokenSphere (Own work) [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons By Rl (Own work) [GFDL (http://www.gnu.org/copyleft/fdl.html), CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/) or CC BY-SA 2.5-2.0-1.0 (http://creativecommons.org/licenses/by-sa/2.5-2.0-1.0)], via Wikimedia Commons