Bestand wählen
Merken

Python Applications with Habitat

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
so good afternoon everyone the welcome to the point that I can applications habitat so on 1 thing I wanna go away and that's the basic assumption is that you can done the intraday habitat kind of are learned like the basics and can understand that but also because that's going to be but groundwork you can either have to Canada that if you have go check out some the videos that may be up there plainness and then come back I'll be reading your career but if you haven't done that just Canada 200 reader that is and that allows you to build package the and this includes application configuration and management continued innovation and delivery and it's part from enough
so 1 of the things I want laid out here is kind of like typical Python project because really going dissected and that we can understand and break it down and see all the things you cannot have been doing wrong will have you been doing wrong for all these years
so 1 of the slowest start with is the distribution version of Python and it's always all the non gated and so this is kind of problem not mention the system carries on its own set of libraries that can uninvited themselves in your project so we use things like virtual of environments many basically happens all requirements and run around and this is kind of how like there's been for the longest time community now under the hood this gets a little bit more complicated so obviously I mentioned restricted to distribution version of pi kind philosophy on we're isolating ourselves from this is site packages which is why we doing that and also using the binary wheels and and if you're not familiar with what these are these or on binary compilations of Python packages so using something like the low or I come now these pre Bill images build against an old version of Linux unknown example 5 so habitat doesn't work well with all the redundancy of tragedy on the actor kind to be on the latest stable everything so we extend ignore on use with habitat because the way we do ah packaging you gaseous get virtual and seeing kind of help to yourself as whole workflow because the way were working on shipping habitat are shipping Python if you're trying to strip away all packages and you only get what you need application there's no interference from resources on that now there are some things you can do in existing environments to can work around 1 way the filter from Bill pattern from source or use the party package and local on and then also the same thing to build your binary model from source which if you've done this is painful it's not on and on the other hand the packaged up in a more meaningful way archives summertime minutes 1 meals worth and make it easier for the like a big boon the ion development itself so another fundamental look at is kind of the whole factor of 12 factor so if you've not read this book or seen it on my deathly go recommend reading I get the reference this in the slides in the reference section but I this kind of highlights fundamentals you should be doing your whole application development pipelines and just we should be doing and how have place that so I'm going to on break this down we got 1st 5 here so the 1st 1 is 1 based 1 application what does that mean essentially this means 1 get repository for your application and this can include mobile processes include a web service worker service Acron service and things of that nature that's can like that it does not mean like most what society she packaging Iowa Saporta whether in the single bond that is kind of off bananas now the other item is a k 1st this has the focus on the document URI PIC full swagger are at the area or any other kind of tools around all too likely to documentary gets 1st in this is kind of blueprint to help you like communicate your whole applica teams in nature doing that and it start symbol for the fact that this is in addition on to the top actors so the the next 1 would be dependency management know the Tennessee management can be very heavily covered in this talk that is when the figures were habitats excels the and the other 1 is designed build release and run and this is 1 of other the things that have technology with consideration credentials and code the same thing happened I can help you there so the other thing is blogging disposability banking services environment parity and administrative processes these all other things that haven't had can directly help you in the snow and logging should always be going to send it out and had had to provide a does that and it allows you also grow grab this slot folder sort file I'm having a larger the disposable immutable and habitat allow you to buy new banking services into your code and I think there's are basically a reference to it my sequel register anything of that nature on as well as maintaining environment parity as you've already seen on some of the earlier talks have had production development or an unstable environments and allows you to maintain environment carried out through the entire pipeline as well as creating a miniature process in a miniature posses are referring to have 1 of job those are things like were you going to migrate a database to update your scheme and things of that nature I do things for binding of habitat allows you to explicitly report by needs so this is part of that and so this is part of the process to 1 expert Dr. containers that we get those into their and now doctor knows what to expose on status processes no part of this is making sure you shift your application state and application to a proper back in service but so is part of that it's kind give yourself the ability to handle the chaos montre and make sure you can recover from that and so that can bring this the next object topic of concurrency Concurrency have been able to run them all concurrent versions of application so or not concur version but concurrent instances of your application simultaneously the telemetry is another 1 of the asters as well because it is a new thing to be 12 factors basically commentaries grab everything and as I go on all kind demo 1 of those chemical image told you publish in the your code based on the century and you know interiors of indication of authorization and this is basically making sure you secure your application from unauthorized users either using things like all to single sign-on c and such work the now the 1st thing I wanna get into with
dependency management on and we have this gas herself how reproducible is our environment but how can we ensure or models in it with each other and so if we have a look at what an existing pipeline pipeline looks like we by like requirements that text or anything of that nature tensions that number are you basically get this whole kernel depends a graph the start python down here and you can work your way so this is kind of a basic example of a container that has if you're just to run a basic Django application now where think you cannot do is control passed by on our and ensure atom producibility and so your exist at the point to a existing Linux distro like we're going to rural center lesser things like that you can at the mercy of what the author provides especially if you build your own Python so things contend potentially be inconsistent now only apply more of the habitat model to this we get the whole graph on top the show user application here again I'm sorry for being so small but now we get all of our C libraries all the down the Linux kernel right here and this gives us a lot more reproducibility application so now we're controlling that entire staff and so this categories with the next thing
I is a look like when you make habitat for Python packages so I'm going to run over that so you have counted a dual parity of like ways to do it you can do a habitat plants of 1 type memory where you 1 have time to mobile Python library and essentially this advantages and disadvantages so when the big advantages of 1 1 packaging is you can leverage the Python are the habitat build the system to allow you to update a single Python package and updated higher chain tendencies kind of going back the graph point out the the other thing series of we use the all these space into their own habit package plants and so you get that ability to make sure you binary builds also fully reproducible while I mean if you want to use because simpler use the old traditional kind kind of hidden solve batch our requirements is you can use the 1 many to approach it and part of this is some the work of been doing on habitat to help facilitate making pattern packaging easier so 1 of things to look at is the package and separator and add at an end user functionality that done to evaluate you have d couple pattern packaging and so you can add to the specific items required and what happens we use all these packages together and run them with the supervisor it now takes Maulik label bricks and all of them all into each other and now you can have an instead virtual environment without you having no composing installed like that and so is going walk do the basic idea of plan here's 1 for any of my and I recall IP address and just basis metadata here and nothing other ordinary but in the next stage when we go to define the dependencies we going define our dependency impact on and reusing setuptools up in order to install package and because not every Python packages necessary for runtime in case a set of tools for this package you connected with the bill that that way it gets removed from the environment after the or a package of replication same thing before that I wiII gaining the shipping it told allow people to install libraries into an application once sort of packaged up it's is unnecessary and we go and specify the pipe past separated and this allows us to take our pattern that we find in the package and join it with the other packages in our whole pack on ecosystem so basically your whole pie concept of build out this is kind a way to easily build the package in the folder without installing NetWare encountered run test against it but that's not illustrated here and then we had the do to install on were attach the to the package and reasons fall into R R package prefix now a couple things to note here that the dashed prefixes gonna so Python where to go and salt so its relative to the whole habitat package namespace and the dashed action no compile is also another important thing is well on because we don't want empower PY C files PYO thousand because these can be mixed up mass transit before the fact that you run come with a different level optimization that did that national flag those files will get recompiled investor can break the laws of mutability that have attached onto and then can explore the whole package environment of the more I we can look at how runs at so the only thing that is called at runtime is the package environment and they all run in order which you're packages are defined on in your patched of dependencies and in the place we start out this research your package so this would be a Python package then we would hear your dependencies and then will your transitive dependencies and this is going to build up your entire Python environment stack when you have and then you when you're running on if there is any collisions there's uh it's becomes a no-op and so the issue warning so I this does change a little bit below in the building so when you go to to have build we look at package in environment and package built environment but but when it comes to the dependencies we universe and this is so that we can call early this say say you're going to have collisions with these packages and mean you have the option to offer where you have the option to force all right those of you who want to but it really 1 start with transitive dependencies but the dependencies and or package and like I said overwrites will fail on these and be declared explicitly on the other ones you that's not the I like it is obvious that the package environment separator and this is key if you wanna packages the play with each other like if you're joining past medial defined in this arm allows you to do that so can like the main highlight of wealth undercover is essential and centuries is not a simple application you it's probably 1 of the best examples of real world applications you'll have in thank you so I to think that the 1 doing more Hello world examples because I'm sure everything that at this point but if you're unfamiliar century it can like this and it's helps you track all exception your application and the way it does it has its own plugin called rate and saw application and lot languages are supported the that that the but if you look at underneath the application we have so services so as a top that level we have a web or worker or chronic NNS and the new and part of this is each service should begin its own habitat and this has to do with how the hoax and bindings work In order to use the so that you have to depend on Europe where on the central package and create additional package underneath that to add as additional books needed in order to support the individual processes of this application so you can we can look like this and basically all here from century now the 1
thing is century itself but hasn't like work called bit dependency overload and this is kind was things that I've encountered earlier on with versions of habitat before the introduced the use build system and the 1 of things things that was problematic was the whole version numbers and Bill numbers and changing bringing so many packages that wants and that now can solve that but it's been it's been a bit of a painful I just put this whole since the package itself has undermined packages included in it and there's 338 dependency nodes each connecting to each other now on you if you go and get have you can actually pull the diamond speckle that more but which is massive Ch yeah know also on the talk about is were kind of habitat packages can go in the future on the applicant's sampling which is we've been taking local state that we haven't had a full and that happy with but we're be working on that and so that plants syntax and showed you will be changing a little bit so hopefully be automated by the scaffolding on 1 of the things to is the dependency innovation has been so with large complex graphs such
as this if you have a won't believe it's a would open SSL you build that anything that depend on such as hyponymy other subsequent Python packages will get me build up the entire graph so on top of that we can also do the the test included every single package in this can with the big highlights with that 1 the 1 package so you can actually test all packages make sure they're going coexist with each other before reading the poor who all know like when we deploy and build a single package that you have a limited amount of integration testing so it's nice really get can like that also it and go down the entire pack on and then there's also the more additions the whole package environment now the the references on so understood going do you think I told factor out but that is kind of at the 1st iteration and then this vector book up I packaging that publication was a talk given up actually last week so if you're unfamiliar with how like package of and applications i'd Tolley recommend you check that out I'm always had hi how are habitat documentation and then of all the plans that in using building up century is a much higher plans get recall so you go and follow that aren't you 0 single and do that and I'm going to then demo in minute cool
so here's century running on habitat and the Kennedy example like how this all works was concerned example project so we didn't start example projects habitat and that's
going language but unfortunately rust is not here so with that in this the problem with
this conversation and basically repeal Titus into all applications this is the the the the the and yet
the
Punkt
Datenmanagement
Desintegration <Mathematik>
Mereologie
Güte der Anpassung
Gebäude <Mathematik>
Kartesische Koordinaten
Konfigurationsraum
Videokonferenz
Distributionstheorie
Demo <Programm>
Bit
Prozess <Physik>
Virtualisierung
Datenparallelität
Compiler
Natürliche Zahl
Versionsverwaltung
Datenmanagement
Fortsetzung <Mathematik>
Kartesische Koordinaten
Binärcode
Web Services
Datenmanagement
Prozess <Informatik>
Autorisierung
Code
Unordnung
Mustersprache
Kontrollstruktur
Figurierte Zahl
Distributionstheorie
Addition
Schnelltaste
Teilbarkeit
Prozess <Informatik>
Datenhaltung
Stellenring
Nummerung
Programmierumgebung
Quellcode
Biprodukt
Intelligentes Netz
Teilbarkeit
Web log
Rechenschieber
Dienst <Informatik>
Menge
Gerade Zahl
Datenparallelität
Gerade Zahl
Projektive Ebene
Garbentheorie
Programmierumgebung
Instantiierung
Aggregatzustand
Lesen <Datenverarbeitung>
Web Site
Relationentheorie
Dienst <Informatik>
Code
Informationsmodellierung
Authentifikation
Programmbibliothek
Indexberechnung
Softwareentwickler
Bildgebendes Verfahren
Hilfesystem
Autorisierung
Expertensystem
Fundamentalsatz der Algebra
Konfigurationsraum
Systemverwaltung
Symboltabelle
Physikalisches System
Elektronische Publikation
Fokalpunkt
Quick-Sort
Objekt <Kategorie>
Schnelltaste
Flächeninhalt
Mereologie
Single Sign-On
Eigentliche Abbildung
Innerer Punkt
Zentralisator
Prozess <Physik>
Punkt
Virtuelle Realität
Natürliche Zahl
Minimierung
Formale Sprache
Kartesische Koordinaten
Gesetz <Physik>
Raum-Zeit
Kernel <Informatik>
Übergang
Eins
Metadaten
Datenmanagement
Existenzsatz
Fahne <Mathematik>
Datenreplikation
Mustersprache
Bildauflösung
Softwaretest
Lineares Funktional
Addition
Schnelltaste
Namensraum
Installation <Informatik>
Kategorie <Mathematik>
Gebäude <Mathematik>
Mobiles Internet
Reihe
Ruhmasse
Ausnahmebehandlung
Bitrate
Hoax
Konfiguration <Informatik>
Dienst <Informatik>
Verkettung <Informatik>
Menge
Rechter Winkel
Gerade Zahl
Festspeicher
Dualitätstheorie
Ordnung <Mathematik>
Programmierumgebung
Subtraktion
Stoß
Stab
Gruppenoperation
Automatische Handlungsplanung
Zahlenbereich
Dienst <Informatik>
Netzadresse
Benutzerbeteiligung
Informationsmodellierung
Reelle Zahl
Datentyp
Pi <Zahl>
Programmbibliothek
Ganze Funktion
Grundraum
Autorisierung
Trennungsaxiom
Graph
Rechenzeit
Einfache Genauigkeit
Plug in
Physikalisches System
Elektronische Publikation
Quick-Sort
Modallogik
Basisvektor
Mereologie
Stapelverarbeitung
Softwaretest
Addition
Overloading <Informatik>
Bit
Graph
Gebäude <Mathematik>
Automatische Handlungsplanung
Versionsverwaltung
Iteration
Zahlenbereich
Ruhmasse
Kartesische Koordinaten
Physikalisches System
Vektorraum
Integral
Rhombus <Mathematik>
Knotenmenge
Inverser Limes
Programmierumgebung
Aggregatzustand
Lesezeichen <Internet>
Framework <Informatik>
Beamer
Konfigurationsraum
Formale Sprache
Applet
Skript <Programm>
Projektive Ebene
Arithmetischer Ausdruck
Benutzerführung
Message-Passing
Fehlermeldung
Umsetzung <Informatik>
Verkehrsinformation
Mathematisierung
Indexberechnung
Kartesische Koordinaten
Ereignishorizont

Metadaten

Formale Metadaten

Titel Python Applications with Habitat
Serientitel Chef Conf 2017
Autor Marshall, George
Lizenz CC-Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben.
DOI 10.5446/34602
Herausgeber Confreaks, LLC
Erscheinungsjahr 2017
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Learn how to effectively deploy Python-based applications with Habitat. This is a tale of the effort behind deploying a Sentry (real-time error tracking) cluster to production. Covering the things I wish that I had known when getting started and helping you avoid the same mistakes.

Ähnliche Filme

Loading...
Feedback