Merken

Docker isn’t just for deployment

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
and in the and and so on it OK so from the outside in terms of how it's used docker looks quite a lot like a normal virtual machine and everything think the virtual machine allows us to take 1 host and partition it into multiple smaller hosts at each of those of those bunch machine combine different OF have different packages on and dependencies allergen then 1 processes in each of those the ends and goes processes don't know they're running at the end and they don't know anything about the processing right running on other VM's on the same host and they don't wear thing about processes running on the host itself i in this respect you can say doctors are actually quite similar we can create an image of a doc image which defines the base OS that we want to run a base OS we can define packages we can find application code we can find configuration changes we can then create a container based on this image among a process in and this process doesn't running a container that it has no knowledge of process running in other containers on the same host and has no knowledge of the other processes running on the host itself this summer however some big differences between documentation via and only 1 additional Vienna and with virtualizing on the physical hardware and we're running a complete instance but OS including its own kernel that means that if we imagine we're running on bond to the and if you're going to be annotates say 500 meg of ram for its kernel based components that the we used by the Jamaica around for the LS plus whatever at where we need for the process running likewise we started up and they have been to normally takes 20 or 30 seconds to start it will take 20 of 30 seconds to start at the n + however long it takes to start our processes docket works really differently when you when a process in the docket container your actually running a process on the host itself that sharing the host country that this means that there is almost no overhead in terms of resources to running for assessment of container this also because we're not starting a new kernel and starting to play a less that's almost no events of start so if we start seeing say you call server in container if it normally takes say 10 seconds style that locally it will take about 10 seconds to start it off and and so we can of docking was getting on the benefits of BN without resource the head with a big simplification but for the purposes of this talk at so we look like from the outside a bigger that doctors also little attention the deployment we can run containers and development we had about this in the in the last over here contains and development only can then identical containers in production can be pretty confident that we don't see identical development production behavior but to me that's not the most exciting but about docker but most exciting that to me is that because of the way document and or because the title interface doctor provides the containers we can now build features around containerization very very easily and so rather than talking about often contain just being something we use to deploy existing features they catch to become a part of features like allows to to build new things are in this case will be that would have been much harder and productive and so on again
I signed then but mechanical making with code and we teach people where be and we discovered really early on that 1 of the key reasons beginners using Ruby is a kind of 1st language which is because of language it's because they get stuck setting up a development environment and they'll try and still RBM a RBM and 1 into issues with system rubies pop variables and they'll give up without ever writing a line of work which is a real shame at whatever speed they never get to see how they get a friendly will the language actually is and we want to bypass this completely we want to provide a complete browser-based development environment from students as we watched alive terminal wanted a file browser was the Texas and we're really lucky because when we have the time we are planning on doing this the open source code books project was announced now codebooks is a new GS based application to doing exactly this fall for providing a browser-based development environment a lot like and like Cloud 9 can come across and so we started off each week groups of about 10 students would join and we would then you shift low to spin up in the that 10 each student would get a Unix user that we would run an instance of this node j s that under each user accounts and had also to and that logic so that's a act as a front-end proxy would then send traffic these unique development environments that back to each of these and no JS instances and this worked really well for our students and we saw at the beginning of the course they look for the learning through the because they were having to worry about how to install would be to begin with but they have some very big poems on the business side and particularly it was still quite manual that we have to provision UBM for a group of and so people can get started instantly they had to wait for a group of people to start and it's really inefficient use of resources and we can get about 10 students per to give the end and and most of the students reduction be using it for about 5 to 10 hours a month but the rest of the time this No-GSR still running aims to using resources I was getting really quite expensive quite quickly and it may be impossible for store for any sort of free lessons try-before-you-buy because we just can't afford to be proficient in these environments people who who want definitely paying for the calls for and so we started looking at Dr. on my page document in the past I was really impressed with that and I think what most people might adopt the doctor that was the command line and if you go through the doc a tutorial that's how you you 1st learn how to start and run containers and so
1st version of it for my Rails apps that use the docket alongside um don't worry too much about the exact details about command and the basically what happens with the you use would sign up for our wells are and we would have a psychological that which would then um construct this doctor Run command which says more based image of what OS working from a case in details such as ports we need access to folders our shared file system that should be announced into that container and that's like a job that had we shall out and execute this fear SSH on a node that offer cluster and I imagine anyone who's a little bit familiar with Dr. may be laughing at us like we have this approach because it is ridiculous of to talk of course has a
complete HTTP API which is amazing and so anything you can do via the traditional Dr. CLI everyone gets introduce to you can do that the API so an example here that they be readable you can see 2 creates a container and we can do a simple POST request to an endpoint exposed by the doctor Damon and I'm not post request we have exactly the same information that was in that really long run command you so that we thought we specify an image that we want to build it from in our case a custom codebooks image and we specify which volumes we might later amount external files and folders into we specify the ports from the container but we may later want to map supports on the host and and finally specify command to be run when you can't stop this container and that's good that we no longer having to watch in terms of the shelling out using rejects applause and at terminal responses which was very process we get a nice Jason back which we can easily manipulate and Ruby in when command worked when they didn't but
naturally this is Ruby and so it gets better the gem for it I strongly recommend this general want to work with mating doctor but here you can see exactly the same some processes in the last slide by passing in normal rehash to Dr. container creates and so assuming that succeeds by will get a container object back and I commend form and other actions such as starting and stopping it checking status directly on that will be objects and this is already much much better than that of the Regional Command Line based approach and this is a much less of a switching called the working in a standard we API we're not worrying about the occasion to be close and only getting noise-free the object back to manipulate fed into a much more friendly to work with but it's still not perfect because
the way doctors architects and double architecture means there are actually 3 API calls to go from absolutely nothing to running contain 1st we have to create an image if any it doesn't already exist on the host and you can kind of thing to an image class definition it's defining the at the OS the files packages and and this is something you might well call from a doctor register from what doctors official registry off from the trial registry the running 1 at the next API call then creates a container format image so it's a bit like a little bit like creating instance of a class and at this stage we specify and the directories that's we might later want amount externally into that container the port you might want to expose and finally make a 3rd API call to actually stop that contain we just created at this point we specify that which for example for us that we need to mount a particular directory from our cluster reference file system into that contain at a particular point and do we want to map and the Portland IJS HAP is running on to a port on the host so that we can and property back to its and and so we still having to think in terms of doctors contain a workflow we're not really thinking in terms of the uh the business logic about problem that we still need do a quite high switching costs to moving between working on the rest of our enzyme and I'm working on it and declare that that the containerized component as it was when about that this API and this and this Jan if that is really really easy and had to change to
build abstractions that allows to reason differently about containers so we did what we really want to reason in terms of having creating images and turning it into containers and then running contains we want to reason in terms of a container should have these properties for this user and we want to know that contain is running irrespective of what may have happened before and you can think of this quite a lot like 1st or creation active rattled we're not concerned about the underlying database driver or the mocap this the specifics of how do you query for a record Pantocrator doesn't exist we want to say about what has these properties make would exist in maternity because we have used this API from document this jam it was really easy to build
that structure that we a very very imaginatively put out traction back and and here you can see the only way using a standard really have to define a specific properties that they contain should have and this is very similar to what we defining in the other previous API calls saying things like the base image at the port that should be maps of the body that should be mounted and here also defining a few environment variables and higher standard practice and Dr. pretty much any configuration is pulled in for environment variables that you set when you 1st start the container once you got this really which we have generated automatically by a user objects user objects knows how to generate its hash and representing the container for its IDEA we can then just pass that have to adapt to contain and say 2 players on what this will do is work out has that contain being created it so we should start it and it has emigrated then created started in what already running is really they're just do nothing in return it and this means that when you're working with the containers linear you really don't have to think about the sort of the architecture of all about the traditional dock work for on unto me why this
is so exciting and so that's a useful is act or the that containerized infrastructure is now we just another hand DTP API and we can treat it work they're in exactly the same way we do the get have API of the Twitter API and and so in the same way we normally when you work the third-party API will wrap it in some sort of abstractions that maps the way API works to actual business logic to what we're actually trying to do so we can do this with infrastructure which previously was quite difficult to do yeah an imbecile do this for us is the application is now a very very easy to reason about someone who's new incoming T. this application doesn't need to have an in-depth understanding all of the terminology of doctor of and the workflow of going from creating in a registry to the mapping folders that contain starting that contain they just need to have a reason understanding of the diffraction we built around it and they can start working on the application and the outcome cross and
this was incredibly positive and so the prices we now have is a user signs up and to the this rather application rather application triggers a sidekick job and that's like job responsible using Dr. which in terms the dock uses the doctor API that to make sure these containers started and created and and then once that was the job the turns making sure that front-end and proxy log dated to reduce the user back to that's at that node j if that when they try and visit that developed by probably the biggest sort of business benefit for us and this is the because containers are designed to be stopped and started very easily that we can now we have a con job which goes to inject the last time this containers used where the last 1 user access to and it has been used so I think half an hour so we can then stop that container when you lattices is access that accesses it again but so that we can once again use actually Dockery PR in the background to detect that container is no longer running and we need to start it and then want started again and we updated proxy so servers and the traffic is being written back to the container and and that allowed us to go from a density of about 10 users per to node which was getting very expensive but to least 500 users particularly and I say this because it's probably much higher than we have tested on yeah it is also a lattice leaving but offering free trial speakers in the same way Europe you can afford to offer free apps because most never get usually get spun down we can do exactly the same thing with these ideas so someone can sign up they can try that if they don't continue using that contain is stopped and that has effectively no ongoing cost frosted tool am I
so the start I want to talk about additional that deployment site thing of most exciting thing and you could sort of argued that i'd sidestepped that because we talked about deploying IJS at runtime and good we used in quite a few different scenarios these a couple the other ones have worked which we have nothing to do with employment but we had a scenario where and we had a proprietary dataset which we couldn't share with 3rd parties but we needed to allow 3rd parties to rights analysis tools in C which we could then and build run this data through that generate summaries of their results and then provide back to the and again we're able to create a very it's simpler structure adopt container so that we could on and we see the top their C-code injected into a container build that's the height the pipe a dataset in non-standard in and then wait for an event to be raised to the finished and that they tried some of our own and by the analysis and so that we want reason terms container states we weren't interested in the ongoing is it running or not we want to know if has execution completed and those Norway's with office getting a huge amount of use or language playground and pretty much when any new language comes out very soon afterwards somebody will create a language playground somewhere where you can run school students that code in the browser and the results of that then run server side and you can see the results of a great that great for teaching and for and in people have a go with a language for getting the set up and again this is a great mistake the doctrine something that we used for lot where you can trace simple really objects that will deal with the preceding code working out what languages in a building a suitable container formats attracting the outputs of the which is generated in the stands out and then providing that Bacteroidales act returned an API response and again it's all about it's all about you can create these very simple wrappers around or around containers so that you don't have to constantly think in terms of of how how does the containerisation process work so hopefully what across a very high level in this talk is that we just don't have this hated the PAP frightful features it's really really easy to create abstractions over containerized in the structure and so that means that we can treat and reason about the structure in exactly the same way we reason about the API is the form the rest of application
and if you have a go with the rest of the page the top 1 is page on model for has these slides and a load of the source links if you'll completely new to Dr. strongly recommend the interactive docket tutorial is a web-based tutorials will take you through the command line engaged in so the terminology and the doctor gen is excellent if you've been through the dock tutorial who should be in a pretty good place to start using the gym directly I and adapted gem which is our abstraction uh it's open source on get help and feel free to use that as an example of 1 possible way of creating these abstractions as a fun side effects because that works entirely in will be hatches and we can also do young file-based employment so you can have much like Figure composed these to do so you can define the young file that you have a wells container Postgres container and reckless container and and then have tackled orchestrate that in development or across multiple hosts in production thank you very much for listening of any questions right hand on on the on the in the in the in the
Subtraktion
Prozess <Physik>
Mathematisierung
Virtuelle Maschine
Kartesische Koordinaten
Term
Code
Computeranimation
Kernel <Informatik>
Virtuelle Maschine
Nichtunterscheidbarkeit
Zusammenhängender Graph
Softwareentwickler
Konfigurationsraum
Bildgebendes Verfahren
Schnittstelle
Schreib-Lese-Kopf
Vervollständigung <Mathematik>
Gebäude <Mathematik>
Zwei
Systemaufruf
Programmierumgebung
Biprodukt
Partitionsfunktion
Ereignishorizont
Rechter Winkel
Mereologie
Server
Overhead <Kommunikationstechnik>
Normalvektor
Overhead <Kommunikationstechnik>
Instantiierung
Codebuch
Proxy Server
Bit
Freeware
Browser
Formale Sprache
Web-Applikation
Versionsverwaltung
Gruppenkeim
t-Test
Kartesische Koordinaten
Mathematische Logik
Code
Computeranimation
Homepage
CLI
Knotenmenge
Prozess <Informatik>
Code
Radikal <Mathematik>
Dateiverwaltung
Speicher <Informatik>
Bildgebendes Verfahren
Gerade
Vervollständigung <Mathematik>
Gruppe <Mathematik>
Open Source
Eindeutigkeit
Browser
Programmierumgebung
Physikalisches System
Elektronische Publikation
Quick-Sort
Ordnungsreduktion
Projektive Ebene
Versionsverwaltung
Programmierumgebung
Schlüsselverwaltung
Streuungsdiagramm
Instantiierung
Codebuch
Prozess <Physik>
Vervollständigung <Mathematik>
Gruppenoperation
Güte der Anpassung
Elektronische Publikation
Term
Computeranimation
Rechenschieber
Objekt <Kategorie>
Spezialrechner
Bildschirmmaske
Code
Endogene Variable
Volumen
Radikal <Mathematik>
Spezifisches Volumen
Information
Versionsverwaltung
Bildgebendes Verfahren
Standardabweichung
Bit
Punkt
Klasse <Mathematik>
Gebäude <Mathematik>
Abstraktionsebene
Mathematische Logik
Term
Computeranimation
Spezialrechner
Datensatz
Dateiverwaltung
Zusammenhängender Graph
Delisches Problem
Drei
Bildgebendes Verfahren
Konfigurationsdatenbank
Umwandlungsenthalpie
Kategorie <Mathematik>
Datenhaltung
Abstraktionsebene
Systemaufruf
Abfrage
Elektronische Publikation
Systemaufruf
Druckertreiber
Dateiformat
Computerarchitektur
Versionsverwaltung
Verzeichnisdienst
Term
Instantiierung
Objekt <Kategorie>
Hash-Algorithmus
Kategorie <Mathematik>
Abstraktionsebene
Kartesische Koordinaten
Programmierumgebung
Abstraktionsebene
Mathematische Logik
Quick-Sort
Computeranimation
Mapping <Computergraphik>
Objekt <Kategorie>
Spezialrechner
Variable
Twitter <Softwareplattform>
Hash-Algorithmus
Volumen
Computerarchitektur
Datenstruktur
Konfigurationsraum
Normalspannung
Programmierumgebung
Bildgebendes Verfahren
Konfigurationsdatenbank
Standardabweichung
Resultante
Proxy Server
Web Site
Prozess <Physik>
Dichte <Physik>
Gemeinsamer Speicher
Browser
Formale Sprache
t-Test
Gebäude <Mathematik>
Kartesische Koordinaten
Abstraktionsebene
Term
Code
Computeranimation
Übergang
Eins
Shareware
Knotenmenge
Bildschirmmaske
Vorzeichen <Mathematik>
Prozess <Informatik>
Code
Wrapper <Programmierung>
Endogene Variable
Datenstruktur
Funktion <Mathematik>
Analysis
App <Programm>
Abstraktionsebene
Rechenzeit
Programmierumgebung
Quick-Sort
Ereignishorizont
Office-Paket
Objekt <Kategorie>
Funktion <Mathematik>
Verbandstheorie
Formale Sprache
Rechter Winkel
Server
Dateiformat
Aggregatzustand
Soundverarbeitung
Abstraktionsebene
Interaktives Fernsehen
Quellcode
Biprodukt
Elektronische Publikation
Binder <Informatik>
Computeranimation
Homepage
Rechenschieber
Informationsmodellierung
Multiplikation
Interaktives Fernsehen
Last
Rechter Winkel
Rechenschieber
Softwareentwickler
Figurierte Zahl

Metadaten

Formale Metadaten

Titel Docker isn’t just for deployment
Serientitel RailsConf 2015
Teil 25
Anzahl der Teile 94
Autor Dixon, Ben
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/30660
Herausgeber Confreaks, LLC
Erscheinungsjahr 2015
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Docker has taken the world by storm as a tool for deploying applications, but it can be used for much more than that. We wanted to provide our students with fully functioning cloud development environments, including shells, to make teaching Ruby easier. Learn how we orchestrate the containers running these development environments and manage the underlying cluster all using a pure ruby toolchain and how deep integration between Rails and Docker has allowed us to provide a unique experience for people learning Ruby online.

Ähnliche Filme

Loading...