Merken

Supercharge your development environment using Docker

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
thank you all for coming in from so my name is then I have been doing quite
development for a couple of years now mostly web development and some of tooling in NSC lies I was with a lot of us sysadmin DevOps stuff and I like to automate as much as I can and I work for a small shop based in
as you probably already used
as a full-blown like virtual boxes and and possible ligament and stuff like that so the most important thing to to me is that containers
are fast so stocking the container is measured in milliseconds that most of the time you can start hundreds and hundreds of containers and that so because there is a minimal overhead and because the container share the the same kernel and therefore it's much easier to an excess of resources like this network etc. and also in of images on copied for every container that we run from them rather like a 2nd containers used as continuous only say this this this is due to technological union of as all this should make it easy to run your whole production step locally and you should do that because it's very important for everybody on the team for every record workstation the same the same versions of libraries and databases and everything on on every workstation and this goes all the way down to the library so how to run a container
we used the doctor around command we said we that the flag which based or parent image to use supply command to run and then I've flagged the notes that you want to run it interact with the so we don't want the process to go into the background whereas before these supplied the flag uh we're going run the print of continuing to background and notice that we have to supply command here because the comment was because the commander was based on into the image and only or even the use of supplies and other command you can also use text to have different versions of your images for for example to denote versions of your database and so on so you would use you would use Dr. BS commands to the to list of the all the running a container that you have on your machine and that shows you among other things the container ID which you can then supplied to the last command to get the large that you're a services is right and to stand up and you can also use the opulence start commands to restart contain not particularly so by default stopCommand sense a term signal to the process inside the container but because of the faults have to reach the sense the signal so so that's a little bit about containers now we're going to talk about images and basically you can build images manually and when I talk about images I don't mean base images like the that in images we saw before I mean your images that are going to be based on image like image for prosperous or an hour or cash or something like that so you would so you would run best front interactively from from a dead an image for instance you would type in your commands to install services configured them and what not and then you would have the I D and to Dr. ps command and then you would you would commit that contain 2 in the image so the Committee creates a new image you can then use the docket protect command to tag that image recovers and perhaps something something else you can also rename it another name and so the user name prefix is important for but for pushing to the to the central hub so the set of that is of course a central repository of private and public images and the the images that are graphics with the user name are maintaining maintain images maintained by the team and images done by the community of prefixed with the user name and you need to before you can push an image to the temporal price for it to be able to share them to log in to the to the house so that was that was a way to manually build your images of better way is to use DNA profiles so it's a it's a small this cell that you would use to describe describe what what follows from head to the to the image of what commands to run and what's the courts to expose also use supply debating command to run if no other from tremendous applied via the command line and you just use the doctor bill command 2 pointed to the director of the doctor file is located and you name names mentioned it will build the image for you and so on most of you are probably thinking about what I do when a man has doctor requires some the Linux kernel and so a doctor is it consists of a doctor the man which is basically just a HTTP API and the doctor CLI Command Line Interface that I just showed just talks today http API and having that in mind there's a helper applications called would to Dr. which is the official way run Dr. on that which basically uses ritual what synsets everything up this is ritual what's the sets everything up on your Mac so you can use the CLI like to communicate with the doctor process running in the in the virtual boxes and OK so those words those words of how how you would use darker to manipulate images and containers but how does that help you in your development environment and it's really important to run to run services in the same emergency services that you running production locally so that you always know if something works on your workstation that it should work on it it should work production as well so you can eliminate eliminate a lot but it's not just being workstation production but between 2 workstations so what we have here is an instance of running an example of running oppose this database uh so we expose so the exposed to the full court that's the container exposes and map to them to the same port on the host so we can connect to it from from the host and if we didn't supply support doctor would generate 1 for us and configure all the port forwarding and and what not and also containers themselves are a fair amount which means which means that and when you start to continue you write some files stop it and run another container from that image and the change the changes that you did in the last container god this is because the the images itself is immutable and you just started the new container from 1 0 so this is troublesome if you wanna run a database because we want to save our tables in our database and the way to to deal with this is to use to use volumes and we chose to mount the host directory and inside the container in the place where the database is going to write a data server time run another container we'll still have our database there retained this is there's another another slightly more portable way which is to have 1 container for your data which doesn't even actually have to run for this to work so 1 container for your data that exposes the volume and then we use the volumes from flag to mount that folder that data folder inside of a running container it actually runs poses process and I like the host version more informal development environment that list because I like to run the clean commander lots of I deleted most of the stuff continues in this but I don't have to worry about deleting might this is the so I've shown examples of how to run a service in a container but what's the benefit of running your weather been container so basically you simplify simplify the runtime lot you make sure that every everyone on the team uses the same version of all the dependencies this is something that and should be 4 in in the park and world Atlas but this isn't true for C libraries as everybody knows that uh ever try to compile and install the Python Imaging Library so you would you mostly sort of warnings at the end of the told you that some image formats and on supported and basically this eliminates the problem so so you don't have stopped working on on 1 workstation and working on another because of missing C library are also another benefit is that you can use links links is a feature of the doctor provides for a living containers talk to each other in a way so you would start you would name and start your container and you would use the link fled to link that was responding to wreak week with this name inside your that that container uh which means that um which they basically does that allows the judge angle at container to uh be able to communicate with the poisonous continue area beyond that of the hosting provided here and also it exports a lot of our own environment
variables reports and IP addresses and what not to use that and to 2 beta was environment variables in
your Django settings file or not so how do you know the ultimate of this is not presumably not everybody everyone on the team needs you need to know how to run doctor I use false a lot so I built a lot of targets or make comments for running each each service so just the 1 liner comments to run opposes database for Q or what not and I also have and commands that can bring up the the whole development environment for the particular project as but sometimes scripts and and make false aren't enough of remember I said that the doctor demon is just an HTTP API so there's a project called occupied it's the official Python wrapper for data that API and it's available on like the and it lets you do I think all the all the things that you can do on the command line interface and there are other in other languages but to my knowledge this is the most complete 1 I I could be wrong but I think it's so so it lets you you could you could write you could write a pure white your whole script for for bringing up your whole development environment and so but what if you use if you use them and civil war chef or puppet or any other of the provision of tools you can basically use use both of them together and so an example financeable example would be that you could use a doctor for to I just bootstrapped environment at and sible needs to run and then run your playbook to provision database inside the image another option another option is to is to have an and Civil War Properties shift from to 2 areas to the local IP address of of the container but this is bad because and therefore that to work you need to have a look at this stage the or another agent from inside the container for 4 of the provision tool to be able to communicate with it entered for that to work you also need a some kind of supervisor which which can be upstart in the always supervisory B which would which would allow you to allow you to run multiple processes inside the same container and this is this is insensitive best practice so doctor advises you to run 1 process per container as shown a lot easier to update just 1 component of your system or just and not updated but possibly change it for another component so for instance if you had this site is a city in there are no Our if there isn't a ability you basically need to update steps that's whole container of which of might have which you possibly could avoid it if you if you didn't have the process running power in there and also there's a there's another project called the the best way to to describe the use of as variant for a so what ligand does for virtual boxes in my in my mind feed the does for for Dr. you can describe you use general syntax and you can describe and how to how to build your images what costs to expose what to which contain 2 think about the container and it also supports dialog automatically downloading images from from the central hub and we to 1 command you can basically have a swarm of containers are running without read out the rest of the team leading to know how the internals of how this works and also I read like an hour ago that of Fig he's becoming part of the there's probably going to be some interesting development there and it was announced on their their blogs so In summary and you should fight for quite convinced you that you should run your production stacking development environment because it's that documents you and not not all team needs to need to be able to install these services on their on their workstations and you use the same environment everywhere and not just works that workstation versus production but well on all of the workstations and each should make sure update process more and more more easily because you can easily that is a leap up about 1 part and the changes reflect an updated version or or a different process and this all happens transparently to your team that they don't need to know that a new image has been pulled from the central part repository just works also I didn't talk about deployment in this stock because I don't have enough time but but by using Dr. are in this way really simplifies deployment because it enables you to bring a new team members on a project more easily so imagine that you what you're DevOps persons have set up the the production using all these images and all you need to do to be able to bring a new person up speed of the world's will set up their development environment is supplied supplied them with the images that you're already running in production and that they don't need to do any any other set what this means you we do
have a few minutes for questions and then there's the microphone about if you and talk about it I that you as you doing Jungwoo developments I was wondering do you includes a jungle replication growth inside you look images or you can use a variety of so it depends on the project of sum of some projects on running inside the container because they're simple by themselves we just use the supporting services in containers like a database if you what's other other projects have a doctor file committed in the Repo and on deployed you just rebuild that Dr. filed have the latest version of your soft repository inside an image of includes occurred inside home yeah you used you'd use not had commanded the doctor filed to include all of the dual of a directory called inside inside the dark orange great thank you I've got 1 question which is what really stupid how do you edit codes inside the repository inside behind the current container so you would you would use volumes for that so you can mount your working directory of inside the running container in unknown path so when you I had the code on your local machine it's automatically visible inside the runtime inside the doctor and the makes perfect sense now should usually can't use the central repository for anything about other than public stuff what do you do with your own groups always on applications that you will on all time you can you somehow put that into custom on your private on private yeah that's true positive so that the hot does allow for private opposes was repositories but it's not it's not a free feature but there is an open source component it's called the registry which you can start which is spiced widened part you can install on your server and you can use that for pushing your product images but also sometimes if it's if it's a small image maybe you don't need to rebuild and maybe you don't need to have it deployed on on and on a central hub that you can just rebuild it undeploy depends on your use it's a problem with for some with European regulations you wouldn't be launched trust trust get constant repository was quite a few of what you would want to work thank you thank Hi good question do you have any tips about the automated deployment from continuous integration like uh you have always your master and branch which is labeled and then you deployed automatically from 2 2 production from the master and do you have any tips like beauty beauty images or not beauty images just to do it on the fly on the server so what's the best practice for that because I'm struggling with that right now how to do it like perfectly and I'm not sure there is a best practice yes of so how do because there's a lot of there's a lot of solutions that don't necessarily work the same way in the sense that you can if you get tired of 1 that you can use another that's that's something that's that Dr. King was trying to fix I think we to introduce you read an introduction to library but the most simplest way I I think that that you can accomplish that is basically just have deployed trigger undercover whatever if that if the bill passes to trigger the server to just revealed the new image and it's written you texts of the latest version you can eat and then you switch your load-balancing suffer a lot or practice often like engine excellent whatever to point to that new image that way it doesn't work you can just switch vector that to the old 1 racist funding you want you knew knew that the container it's fine yeah and this and the other ones like going down yeah cool things in here I think that unfortunate all question time we have that you can find any outside the and Austin and if into thinking again mn
Code
Singularität <Mathematik>
Vorlesung/Konferenz
Computeranimation
Bit
Web-Designer
Vorlesung/Konferenz
Softwareentwickler
Computeranimation
Quader
Virtualisierung
Datennetz
Gemeinsamer Speicher
Datenhaltung
Versionsverwaltung
Biprodukt
Kernel <Informatik>
Datensatz
Arbeitsplatzcomputer
Programmbibliothek
Vorlesung/Konferenz
Overhead <Kommunikationstechnik>
Bildgebendes Verfahren
Zentralisator
Bit
Prozess <Physik>
Hochdruck
Versionsverwaltung
Datenmanagement
Kartesische Koordinaten
Extrempunkt
Hecke-Operator
Kernel <Informatik>
Metropolitan area network
Spezialrechner
Fahne <Mathematik>
Vorlesung/Konferenz
Default
Metropolitan area network
Inklusion <Mathematik>
Dokumentenserver
Datenhaltung
Winkel
Profil <Aerodynamik>
Biprodukt
Arithmetisches Mittel
Dienst <Informatik>
Menge
Verschlingung
Login
Grundsätze ordnungsmäßiger Datenverarbeitung
Server
Dateiformat
Information
Versionsverwaltung
Verzeichnisdienst
Programmierumgebung
Tabelle <Informatik>
Instantiierung
Server
Dualitätstheorie
Mathematisierung
Zellularer Automat
E-Mail
Term
Netzadresse
W3C-Standard
Mailing-Liste
Variable
Front-End <Software>
Arbeitsplatzcomputer
Datentyp
Programmbibliothek
Vererbungshierarchie
Spezifisches Volumen
Hilfesystem
Bildgebendes Verfahren
Schreib-Lese-Kopf
Binärdaten
Data Encryption Standard
Betafunktion
Varianz
Rechenzeit
Mailing-Liste
Elektronische Publikation
Binder <Informatik>
Ausgleichsrechnung
Quick-Sort
Flächeninhalt
Wort <Informatik>
Wiederherstellung <Informatik>
Verkehrsinformation
Zentralisator
Prozess <Physik>
Gewichtete Summe
Web log
Hintertür <Informatik>
Formale Sprache
Gruppenkeim
Versionsverwaltung
Kartesische Koordinaten
Baumechanik
Eins
Metropolitan area network
Perfekte Gruppe
Prozessfähigkeit <Qualitätsmanagement>
Datenreplikation
Skript <Programm>
Vorlesung/Konferenz
Regulator <Mathematik>
Verschiebungsoperator
Konfigurationsdatenbank
Dokumentenserver
Datenhaltung
Güte der Anpassung
Stellenring
Programmierumgebung
Biprodukt
Konfiguration <Informatik>
Sinusfunktion
Konstante
Dienst <Informatik>
Menge
Verschlingung
Rechter Winkel
Client
Server
Projektive Ebene
Programmierumgebung
Verzeichnisdienst
Instantiierung
Web Site
Quader
Mathematisierung
Netzadresse
Code
Virtuelle Maschine
Mailing-Liste
Arbeitsplatzcomputer
Wrapper <Programmierung>
Programmbibliothek
Zusammenhängender Graph
Booten
Spezifisches Volumen
Softwareentwickler
Bildgebendes Verfahren
Leistung <Physik>
Open Source
Verzweigendes Programm
Kontinuierliche Integration
Rechenzeit
Physikalisches System
Vektorraum
Elektronische Publikation
Portscanner
Flächeninhalt
Mereologie
Codierung
Dämon <Informatik>

Metadaten

Formale Metadaten

Titel Supercharge your development environment using Docker
Serientitel EuroPython 2014
Teil 93
Anzahl der Teile 120
Autor Bertovic, Deni
Lizenz CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen 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.
DOI 10.5446/19960
Herausgeber EuroPython
Erscheinungsjahr 2014
Sprache Englisch
Produktionsort Berlin

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Deni Bertovic - Supercharge your development environment using Docker These days applications are getting more and more complex. It's becoming quite difficult to keep track of all the different components an application needs to function (a database, an AMQP, a web server, a document store...). It keeps getting harder and harder to setup new development environments and to bring new developers into the team. Stuff works on one dev machine but doesn't on others? Code breaks often when deployed to production even though all tests were passing and it worked on the dev machine? The idea of this talk is to convey how important it is that we have our development environment as close to production as possible. That means setting up all those various services on your laptop/workstation. ----- In this talk I am going to show how to utilize light weight lxc containers using docker, and make your development process much more straightforward. How to share container images among your development team and be sure that everyone is running the exact same stack. Do all this without hogging too many resources, without the need for complex provisioning scripts and management systems. And above all else, how to do it fast! Rough Guidelines: 1. Describe what is LXC (Linux containers) 2. Benefits of using containers instead of traditional VM's 2. Explain where Docker comes in 3. Show how to build simple containers using Dockefile syntax 4. What are container images and how to share them 5. How to share private container images 6. Tips and tricks on how to automate
Schlagwörter EuroPython Conference
EP 2014
EuroPython 2014

Ähnliche Filme

Loading...