Choose Your Own Django Deployment Adventure

Video in TIB AV-Portal: Choose Your Own Django Deployment Adventure

Formal Metadata

Choose Your Own Django Deployment Adventure
Title of Series
Part Number
Number of Parts
CC Attribution - ShareAlike 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
From WSGI servers and reverse proxies to continuous integration and automated configuration management, the Django deployment environment is a complicated collection of tools for developers new to the framework. This talk explains the most confusing Django deployment topics as chosen by the audience in real-time via text message votes. Bring your phone to participate!
Point (geometry) Touchscreen Observational study Electronic mailing list Number Hand fan
Adventure game Server (computing) Presentation of a group Touchscreen View (database) Multiplication sign Execution unit Disk read-and-write head Cartesian coordinate system Hypercube 2 (number) Number Type theory Word Voting Computer animation Right angle Data compression
Connectivity (graph theory) Multiplication sign Mereology Cartesian coordinate system Food energy Product (business) Performance appraisal Medical imaging Word Profil (magazine) Hypermedia Atomic number Order (biology) Operating system Pattern language Diagram Quicksort Data structure Logic gate Window
Web 2.0 Gateway (telecommunications) Server (computing) Code Internetworking Interface (computing) Cartesian coordinate system Product (business)
Web 2.0 Server (computing) Computer animation Integrated development environment Personal digital assistant Code Source code Software framework Cartesian coordinate system
Point (geometry) Functional (mathematics) Dependent and independent variables Server (computing) Computer file Connectivity (graph theory) Database Mereology Cartesian coordinate system Web 2.0 Latent heat Computer animation Personal digital assistant Computer configuration Query language Internet service provider Software framework Natural language Codierung <Programmierung> Nichtlineares Gleichungssystem Cycle (graph theory) Computer architecture Task (computing)
Web application Computer animation Hacker (term) Direction (geometry) Information security Information technology consulting 2 (number) Computer architecture Physical system
Injektivität Point (geometry) Dataflow Computer animation Encryption Website Set (mathematics) Right angle Quicksort Public key certificate
Injektivität Home page Sequel Direction (geometry) Sheaf (mathematics) Database Drop (liquid) Cartesian coordinate system Product (business) Computer animation Software Query language Personal digital assistant Order (biology) Encryption output Right angle HTTP cookie Wireless LAN Computer-assisted translation Table (information)
Sensitivity analysis Email Server (computing) Divisor Gender Software developer Projective plane Stress (mechanics) Set (mathematics) Cartesian coordinate system Mereology Revision control Computer animation Integrated development environment Profil (magazine) Hacker (term) Semiconductor memory output Software testing Quicksort Metric system Reading (process) Vulnerability (computing) Exception handling
Noise (electronics) Server (computing) Email Pay television Gender Multiplication sign Product (business) Software bug Computer animation Causality Factory (trading post) Single-precision floating-point format Exception handling Physical system
Computer animation Integrated development environment Computer file Sequel Query language Software developer Debugger Set (mathematics) Software testing Software bug Template (C++)
Point (geometry) Area Email Key (cryptography) Linear regression Multiplication sign Control flow Sound effect Student's t-test Cartesian coordinate system Bookmark (World Wide Web) Product (business) Software bug Number Computer animation Factory (trading post) Software testing Right angle Figurate number Metropolitan area network Resultant Exception handling
Word Email Computer animation Information Integrated development environment Blog Multiplication sign Statement (computer science) Energy level Function (mathematics) Object (grammar)
Server (computing) Email Information Computer file Software developer Set (mathematics) Function (mathematics) Product (business) Medical imaging Computer animation Integrated development environment Different (Kate Ryan album) Energy level Software testing Data logger
Rotation Server (computing) Key (cryptography) Information Graph (mathematics) Physical law 3 (number) Database Login Cartesian coordinate system Replication (computing) Flow separation Product (business) Web 2.0 Type theory Word Uniform resource locator Computer animation Semiconductor memory Logic Different (Kate Ryan album) Cuboid Freezing
Group action Code Length Multiplication sign Decision theory Sheaf (mathematics) Inverse element Computer programming Web 2.0 Medical imaging Mathematics Lattice (group) Different (Kate Ryan album) Single-precision floating-point format Cuboid Physical system Scripting language Email Software developer Computer Flow separation Type theory Category of being Message passing Data management Arithmetic mean Process (computing) Phase transition Pattern language Right angle Virtual reality Fundamental theorem of algebra Spacetime Point (geometry) Server (computing) Mobile app Computer file Branch (computer science) Continuous integration Declarative programming 2 (number) Product (business) Goodness of fit Software testing Computing platform Task (computing) Domain name Scaling (geometry) Cartesian coordinate system Configuration management Computer animation Integrated development environment Personal digital assistant Logic Service-oriented architecture
Dependent and independent variables Scaling (geometry) Multiplication sign Feedback 1 (number) Line (geometry) Mass Cartesian coordinate system Measurement Product (business) Number Coefficient of determination Message passing Computer animation Core dump Computer-assisted translation
and in a and the and so in the end thank you for coming by the end of list with 2 and and joined on stage by an amazing cable 0 introduce yourself I am a fan of engineering company called runs which this is a sweet T-shirt everything's going to be 200 OK at this point in going to present you choose you get better and we were really excited that when I was almost on us this morning with some true you about your sides because that is essentially what today is going to be and we have to do the exact opposite of what most speakers what you what the whole articles and access to data about that because we're going to need and participation but less so there will be many points and will give you phone number in a society where you're going to text and you vote the lower which actually go down as far as this to you about your story the texting and I put the number of the screen in is a number that talk studies easier I know
we aren't doing a 2 is an adventure story this isn't an experiment for also relying on technology which is a very dangerous thing as all of us in this room now the the going to be the protagonist in our story is going to be the hero or heroine but of all the things that z is the union eliminated the hotbed of technology so value you young you're here a fashionable idiots at the back apparatus but too bad I may be shot of a lady then you have an idea it's missing something that idea since hyper the completely fictional compression algorithms on the facility value which is actually a very funny show you will a new idea and we don't have we don't have the view that features could change the world so do you
know 2 of the path the you up application has to make the I distant past each other or did you build myelin and the application of that determines the type of your head and went through that is closest in type theory so in fact the the word passed on 1 melon the number on the screen and the centre the votes show up so this is reviewed the presentation we use website that so back to every single types that comes issue that on the screen and and about a 15 20 seconds what the looks like 1 is 1 over the other and then go down that path so good thing down the 3 you know 36 62 Omega how the head of the world so my have you actually know what they are doing it the didn't have any people know him but and a is he going to and this of the unit and we remind you of the ways in which the and the time that it and wanted to have the right and it is in the eye of the same I to compare the application that provides services to had to me that you know that that's the fair and
that's the thing that happens that they had to have that happens in the media that parts going up a lot in the past that's not at all this is unacceptable as you have discovered now we have ask this changing that can appear where the immune for pattern ways not that's right you have to let you know the they answer to the profile in the afternoon can then connect pleadings if you know any entity the other is very popular for that but it's
the the evaluation of energy you with a million dollars the last obviously based on your aceMedia anywhere the deployed the public to you move about products as it says in the wind which you just read it and that you need to get your general application out into the wild you need to get into the hands the excited atoms will actually has a very images everywhere so this is your initial deployment so you tution Google searches Howard led my general application logic gates but on top of that I am deployments and this is what we what you come up with your OK this is the structure of the woods yet but it's the pieces here so you did this basic diagram and you say OK OK 1 1 step at a time the 1st thing that I need in order to put my application out there is its intracellular could bias some components off the shelf and then put it into your home and then sort of application that doesn't seem like it would be you structure of work of production applications to decide which the local private styrofoam 1 of the many companies that provides them out there but it happened that's a word you need an operating system and you were that 1 can do you develop a Mac Windows you're going to use election do
production of poetry by the application so on
top of the server which approaches were perplexed and then you realized that OK when itself doesn't have a web across so you have in the web server to decide between Apache and that's now the missing pieces you with application Django about so by itself Apache Internet has a new concept of what Python code is and that's where we see comes in web server gateway interface which 2
sides to this 1 is the application of the framework side this is actually an at through through through your work 3 3 3 3 that is specified and with this specifies is that there's an application framework side that the Django new applications case and there is a server-side which is what is at the container that is going be write your application
so the web server you configure posture passed on to with the server that you need basically a applied code so you read about neutral atoms and that there was some way to separate and isolate your environment from other applications be made well in future and you put the application source code that's going execute the application source code and you also have whiskey the framework django in this case an application dependencies and the other thing you may rely on where the department fewer pieces here there's actually 1 critical piece or missing we have a this data about all these acts and start somewhere so the size of
the database in this case where the coach got post this happens to be the 1 of the most general committed to using to actually test that encode to said I'm just as opposed suppose that my support or something like that too but that is part the architecture
and then you have to ask about reading Jake query you may want to move on to an angular gesture back on the backbone and at some point to some JavaScript and CSS files need to point pollution that directly by the web server then uploaded on going through with the server you have those things and then the other piece which is there something you have to on the outside of each GPU request response cycle so for example if a has not been in over among users to that of what the that they really like and commentary application to every node you run attack you run a function in the past few equations of you that accounts so this is the architecture you come up with the use the general concepts so it's look at the specific components so that for example use node is is a is you should work out a brutal private through provider you install onto on top of that you spend genetics as your specific web server using POST grasses your database so we use a task is for the task you you with the engine you with the container and only option you have to say this is what I'm going to go with my initial point and then you have checked out as you well framework so that this
architecture and now my we're down to to the and and we watched a TechCrunch's shrugged it's amazing who so much that so much crust so what was the but now despite the successful launch we want 2 problems you will get so much tracts do that with the patterns of that that you're the generous and so in that situation where hackers a lot of web application and breaking it down and stealing data which 1 of these 2 is the situation we find ourselves in so we should do it so that you had to have that some kind of more kind of about 10 seconds to actually do is we do 1st you 100 to keep going other was discovered in the 2nd at this happen yeah the at this from the so I was broken in to a new web application and they had stolen on user data were not sure the direction pets they may actually be people that look
like this they clearly look like this and dressed like upon the nineties regardless of who broke into our system we use that as a security consultant is security concerns as we got what problems when using self-signed
certificates if unencrypted on critical piece of instead work often what you use recessions there's been a super injection into a database and we've been exploring expose data through some the called Oakley and we know about all this stuff for the initial point we destroyed the upper right so we could watch 1 shot so huge handle each 1 of these the 1st
1 is the step certificate so if you have a self-signed certificate you should know like this so if you do do department and brought by reusing engine that we do what we so we started to forget ourselves receive something like this problem sentiment flow the given warnings we we need to do is go out to putable set certificate following like the gesture and the whole that science certificate so this is actually something that has been shown to be of use this this site is actually who they say they are to have the encryption so that's sort of a subsite certificate problem the 2nd thing is usual
cookies sniffing so cues what happens in a general application this is this scenario our homepage we decide that we are aware that encryption homepage that with the US has each is accessed through each answer you labs in and OK the walking through the application and that the section that they go back to the home page and that's unencrypted that actually work out a sheet which is a plug-in work that considered those cookies and if you are an article to wireless network order so wireless network in general all the all the people so you install about what would that could sniff you you you're cookies and inclusive you and your session and so what you need to do here is that SSL everywhere that's
the production of this picture and it's just weird about so that the considered judgment is if you are take if you if you are not using a general we don't have to worry about this with a general and what we have direct SQL queries we are taking user input will produce right in working cat cat carrying them with our stop-signal then we can be exposed to sequel injection and this is the topic so probabilities the general upper Texas against this but in our case we using direct SQL queries for certain cases and that someone could specify drop tables as a producer input and that is actually executed as a database and then hope we have to do
something that happened recently with this is is able ability in older versions of SSL that allow hackers to redirect read memory publisher so we address these again use publisher quality SSL things if we're going to be using exercise on the work to encode prior over parts of their sensitive data set has a SQL inputs to making sure that we state that a particular indirectly commuters and use the dispersion of vesicle that's itself without gender server to ensure that were not exposed locally vulnerabilities but which solve that problem so for now from that there's no such thing as a toaster up project application that run into another issue usually involves and we don't know the budget happening these users on access about this thing called traction and we show them actual metrics as the sexual out it what he that is the situation by the Sultan so we take those away from their own no go 1st to you guys when you're when you're ready and assigned by users is winning and and I really don't think we have over the people that have I don't know if I mean might have some sort of factor maybe good for us so I'm backtracking exception handling so 1 of the 1st things you need visibility into is going to be accepted in your application so users are now putting bonds it issues that they're having to report them to you so basically that's using application that the e-mail and the like I can do this with my profile and I have no idea what so with
gender so there's the debug setting and most of us know you don't want debug set to true introduction but you can set the by to true in development and test environments that might help you figure out where exceptions are happening and what they look like but we need to
get the exceptions that from production as well so there's a couple of ways that you can do this and you can it have gender generating all every time there is an exception so you basically get e-mail every time someone had some sort of internal 500 are removed for cause because you can set the settings for that you can also use premium services like bugs and they have 3 cheers where you can call them in your application and that with a lot of the exceptions exceptions lacking in aggregation of finally you can use a service like get century in Raven so this country was built by David player David Kramer who spent active with Jano and very active and Python there is a new ideas is more about
systems is if you have lots of traffic and people are hitting exceptions thousands of times on thousands of people earning exceptions you know I get 4 . 7 of 40 700 e-mails for single exception so loud noise and so a lot of these tools will aggravate these exceptions so you can see why exceptions are happening the most whether they're happening and you can see the factories so now you have this facility I see where this is broken the next step is going to
be reproducing this bug in your development or test environment is so the genome genome
debug tool bar is grave and as you can inspect sequel queries you can take a look at your settings you can take a look at your side files and templates somebody but see the stack trace but basically that Adobe it bugs and look around and figure out why this thing is breaking hopefully we
find that you feel like an idiot this is a man of telenovelas but their students about you run into there's the value and into like I'm an idiot I cannot believe that this I put this money and production the 2nd know it kind of I will like my gosh this by super complicated were actually have to rewrite the entire architecture because at the so this is toppling as a result of this by so many only by and about really like I misspelled it's just a key yeah it's really simple effects I'm an idiot and then you add a regression tests because that's the honesty or anyone else to make this simple mistake that you made and fixing bugs like crazy users not only at the e-mail and every time a hidden exception whenever the point of production you can see if there's a huge spike in the number of exceptions did this feature break somewhere you can fix bugs hopefully before users ever have to complain to you about them but now so in that now don't 1 of 2 things
happen again the 1st scenario customers are still important issues but there's no factories there's no exception that's happening so basically doing as missing or data is inconsistent and you realize that you have to implement logging the 2nd situation is that customers alarming application they think if after all these actually coming after loading of other pets in the area that we really want you features I will not be able to share high profiles of other with my friends and then I agree that the syntactic features the which they didn't follow away the 1 and how it was thank you and and you about that the I I they have what they have been basically there missing and this and this is our favorite problem right under the problem we don't know why it's really invisible ink and figure out what's going on so you realize you have to implement logging genome has built logging this is great have import while
being and not belonging don't get longer and you can loving 1
you can actually just output bloggers
they're found was intended as the bad info warning and critical so depending on the type of log even that you have you can choose the level so as I'm just debating something on my dad environment or intact 2nd set the level to debug and this allows me to is out but you know the word here a hundred times like I do here 1 year 2 0 yeah I have made it this far and in the morning and critical and more production-level landing statements basically involves like this is information that we think we're going to need to be able to read through warning and critical our these are things that are really issues perhaps log whenever data is an inconsistent state for if you have a request object that is missing a header that you would really expected to have it
so imaging file you can actually us that all of your logging settings you can set hammer is that is that the level basically we can say is in development and test I would actually only I wanted to add all the levels the by all the way up but in production I really only wanna see info and higher so they is that these things so that you can see different outputs in different environments the resembling to get
started the plant is just the header right the output to log files on each server 2nd simple solution is to pay someone like wildly along entries to do this for you so only aggregates all of your
logs he paid and they give you some really about search tools on top of a lot so you have a lot of data and you can look at call graphs of what people are using them where they're going I'm and you can search things like that and he's and search for key words if you want more
advanced anyone maintain the logs yourself you can activate the logs yourself but you need to do things like levitation back up and clean up the land while can get very large very quickly especially if you're uploading a lot of information and if you have a lot of production servers so that say we have another 10 fun and production web servers might even have a database server for 2 or 3 or replication or all of these different types of servers and asynchronous server is also have several logs salaries going have separate laws of general application have separate logs Syrian had aggregators yourself either in 1 location or again freezing a 3rd party tool you also have to rotate rotor locks really logic and have to that that and were them out and have to back them up if you're worried about historical data I mean you have to clean them up when things get too large so you can keep them on these boxes if they keep getting too large and taking a memory yeah so now we is the data problem you know coming out that you can see what's happening you like OK this is is missing it's not actually getting saved on reading these requests coming in from third-party guys that are working very well but now
again we branch in 1 of 2 things happens the point of taking a really long time they're inefficient you can bugfix quickly you only should maybe once a week because nobody wants to fight fires Monday through Friday all or the team is scaling really quickly here hiring a lot of engineers but having a hard time integrating them into development process and this also includes management's deployed is a but development environments largely the enough to focus on 1 of these 2 things either a deployment of meaning that the the the so the only got to start searching catches up again the saddest already deployments it is the planet automation so like most of the sections in our talk any 1 of these can be expanded out to be a full length the point automation is a huge topic and it's actually really large space and there's a lot of things to automate when it comes to deploy monophones infrastructure management in general the 1st thing timing is going to be a infrastructure configurations so tools and stuff that instable shaft and properties are really good tools there about schools well documented filler out your Web infrastructure configurations and the reason he wanted do this is because you really don't want all of the domain knowledge for Watson Stalin each box in 1 person's you also want to be able to automatically install the things you need for different types of servers so if you want to go to every single friends server and add a new installation every time you had to add a new insulation you'd go nuts it also take a really long time so these tools are great for doing that and so that is max Romanian and the ball is yellow files shaft is Ruby scripts and pop it is its own declarative language the companies I was basically for things like installing hostess installing lattice installing Python setting up user accounts and permissions so you know each each employer your company theoretically has a user on the different pattern boxes just in case done enough to use these tools for there are also some platform as a Service companies out the solution that the rope is the most famous purple and I think the stock will deal with all these things for you so local allows you to build your app locally and then when you push the broker who it does all of these server configuration in solve all of application dependencies on it as soon as the point is it just uses the get pushing for deploys a images all the scaling for you as well as elastic Beanstalk is Amazon solutions in as it's much younger so it's a it's of a solution but the idea is to to be apart from as a Service solution for people and these are expensive programs expensive really fast but if you're making a lot of money and you don't this yourself the great ideas infrastructure and about engineers are some of the most expensive engineers and some animals difficult to find so lot of companies have opted for using tools like this to solve the inverse of the problems I mean the boys so the point in big 1 has actually talking to someone earlier about no downtime deploys some what that means later several seconds versus 0 seconds of downtime but the continually complicated especially if you have 1 really large application in you 2 point changes to it uh the 1 that I'm so 1 of the things that you can use the couple the deploy logic from the infrastructure management logic In the center management involves what's installed box what's installed on the server do I need to post festering gratis Python the application is actually separate so because we have the air like virtual environments of where we can solve the application dependencies within the virtual environment deploying Python code can be separate from updating your actual infrastructure configurations my 1 may to run before the other and that's important to note the coupling this logic in keeping it separate makes each task simpler so rather than trying to do too many things at once and having too many dependencies that are very tightly integrated with you have is you have separate steps for deployed there is very simple and easy to maintain this allowed the deployment quickly to update phase and basically to get your heart out production without things falling over and having huge fires I mean tests so that no 1 right tests and so until it you can use continuous integration tools that's the thing that to automate the testing of your code so every time you have a pull request you can have testsuites run on the code that's that's been opened so know does this code pass tests you can create test coverage tools those very popular to make sure that you have at least a certain percentage of test coverage for any code that has been pushed to production and finally 1 of the big things you can do to make sure that your application is simple to deploy as possible is to think about service-oriented architecture and for those of you who Australia knew the service-oriented architecture the idea is to seperate different pieces of logic into services so 1 application could be a service maybe you love and have a really robust tools for e-mailing customers like the notification center and that can be separated from everything else and you can deal with it through an API you just sending offers API to your own internal service but that logic is the couples so whenever I need to make changes to this 1 e-mail notification service I just deployed about 1 service having out have an abstracted in decompose system like that means that 1 piece goes down it doesn't necessarily topple your entire system which is a good thing and it's actually the fundamentals of building computer systems so thinking about building service-oriented architecture separating out logic having small pieces within your larger system is that whenever is there is no such thing as a small change to a large system the idea behind this is to have more small-systems even have small changes the small systems but you know the continuous deployment but now we come to our most important decision point would
you allow companies selling a continuous deployments but now we use the use of access they said were getting a lot of best approach about the company's the white label which into for pets they want their own GE blended to that's capital and it declarative to pets do you but that would be you clearly denied that as you go out and it was so to stand against the use or do you just acquiescence social will build whatever we're working in a group that you want clearly you've chosen Leslie you know
I have so much more convenient because you've decided to focus on your core audience instead of just dealing with dogs and cats now have a simple product line for hamsters and gerbils money is willing to new application was there to really large customer base rodents the and then you able
2 we use more and more money massive ones for those who coppers the great success with in the back of your mind you wonder the it all just about that and that takes us to the end of our story today that this was based on the number so obviously this popular was but experimental but different than some of the other talks with it's just a linear path through the topics of if you could send a text message to this number it's that this is so as I said is a set number from the other 1 and on a scale of 1 to 10 would you recommend this talk to Bangalore colleague tending extremely likely 1 being not likely at all and uh just from 1 from 1 to 10 what do you recommend this and with this is that allow us to do is have a quantitative measure and you get back over text message response with about those that we written without of resources on all these topics some of which we did not think of a today so you've only seen actually go small portion of this talk and would like to continue iterating the provide you also get back our 2 handles and to the treat us with our eyes would prevent suggestions that have to the super beneficial and we really appreciate the feedback so again and you have 3 or more sentences 3 0 6 3 the 1 2 times 4 that you do time today has then that bar here and the and 100 of his view that but you know we all know it