[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:24.90,0:00:29.92,Default,,0000,0000,0000,,VAMSEE KANAKALA: Hello everyone. Very good\Nafternoon. Dialogue: 0,0:00:29.92,0:00:32.88,Default,,0000,0000,0000,,I really enjoyed the lightning talks, thanks Dialogue: 0,0:00:32.88,0:00:37.80,Default,,0000,0000,0000,,everyone. And I hope you guys are slightly\Nawake. Dialogue: 0,0:00:37.80,0:00:41.96,Default,,0000,0000,0000,,So, this is slightly off the center topic,\Nso, Dialogue: 0,0:00:41.96,0:00:45.22,Default,,0000,0000,0000,,this is more about dev-ops rather than Ruby\Nor Dialogue: 0,0:00:45.22,0:00:46.62,Default,,0000,0000,0000,,Rails, per se. So I'd like to know who Dialogue: 0,0:00:46.62,0:00:51.62,Default,,0000,0000,0000,,all are already familiar with Docker, have\Ntried out Dialogue: 0,0:00:51.62,0:00:55.37,Default,,0000,0000,0000,,or just know what it does and stuff like Dialogue: 0,0:00:55.37,0:01:02.37,Default,,0000,0000,0000,,that. OK, not too many. Sorry about that.\NSo Dialogue: 0,0:01:02.91,0:01:05.76,Default,,0000,0000,0000,,I've been a web developer for eight, for quite Dialogue: 0,0:01:05.76,0:01:08.23,Default,,0000,0000,0000,,some time. And a good part of it is Dialogue: 0,0:01:08.23,0:01:12.00,Default,,0000,0000,0000,,Rails. Actually the, I actually remember the\Ndays when Dialogue: 0,0:01:12.00,0:01:16.48,Default,,0000,0000,0000,,the fifteen minute video came out. So all\Nthrough Dialogue: 0,0:01:16.48,0:01:19.07,Default,,0000,0000,0000,,these years I have also kind of ended up Dialogue: 0,0:01:19.07,0:01:21.05,Default,,0000,0000,0000,,setting up servers for the Ruby teams that\NI Dialogue: 0,0:01:21.05,0:01:25.62,Default,,0000,0000,0000,,worked with, and have been the Linux guy for Dialogue: 0,0:01:25.62,0:01:27.54,Default,,0000,0000,0000,,as long as I can remember, as in the Dialogue: 0,0:01:27.54,0:01:32.93,Default,,0000,0000,0000,,professional life of mine. And so I thought,\Nso Dialogue: 0,0:01:32.93,0:01:37.54,Default,,0000,0000,0000,,lately I've been observing what's happening\Non the production Dialogue: 0,0:01:37.54,0:01:40.49,Default,,0000,0000,0000,,side of things, so I guess a bunch of Dialogue: 0,0:01:40.49,0:01:43.05,Default,,0000,0000,0000,,you- so how many of you have set up Dialogue: 0,0:01:43.05,0:01:48.04,Default,,0000,0000,0000,,your own Rails servers, maintained them? Oh,\Nquite a Dialogue: 0,0:01:48.04,0:01:50.21,Default,,0000,0000,0000,,few. OK. Then, this should be relevent to\Nwhat Dialogue: 0,0:01:50.21,0:01:53.21,Default,,0000,0000,0000,,you're doing. So the point of, so we're gonna Dialogue: 0,0:01:53.21,0:01:56.87,Default,,0000,0000,0000,,talk about zero downtime deployments with\NDocker. So the Dialogue: 0,0:01:56.87,0:02:01.56,Default,,0000,0000,0000,,point of this is, so what is Docker? So Dialogue: 0,0:02:01.56,0:02:03.91,Default,,0000,0000,0000,,the first thing that Docker does is it basically Dialogue: 0,0:02:03.91,0:02:09.74,Default,,0000,0000,0000,,commoditizes LXC. LXC is Linux Containers.\NSo the containers, Dialogue: 0,0:02:09.74,0:02:14.23,Default,,0000,0000,0000,,you can think of them as something like chroot Dialogue: 0,0:02:14.23,0:02:17.28,Default,,0000,0000,0000,,jail, change root jail, you have in Linux.\NSo Dialogue: 0,0:02:17.28,0:02:19.79,Default,,0000,0000,0000,,what it, what it basically does is it gives Dialogue: 0,0:02:19.79,0:02:22.06,Default,,0000,0000,0000,,you a separate folder as a root, and you Dialogue: 0,0:02:22.06,0:02:25.62,Default,,0000,0000,0000,,can run off your processes from there, and\Nall Dialogue: 0,0:02:25.62,0:02:28.90,Default,,0000,0000,0000,,the children are only allowed to access that\Npart Dialogue: 0,0:02:28.90,0:02:33.27,Default,,0000,0000,0000,,of the directory, as a root directory. A container Dialogue: 0,0:02:33.27,0:02:38.44,Default,,0000,0000,0000,,extends this concept by giving you isolation\Non the Dialogue: 0,0:02:38.44,0:02:40.99,Default,,0000,0000,0000,,memory level, it gives you isolation on network\Nlevel, Dialogue: 0,0:02:40.99,0:02:44.26,Default,,0000,0000,0000,,it gives you isolation on hard disk level.\NSo Dialogue: 0,0:02:44.26,0:02:51.26,Default,,0000,0000,0000,,LXC is a fairly old technology in Linux, but Dialogue: 0,0:02:51.34,0:02:54.60,Default,,0000,0000,0000,,it has been mostly in the realm of people Dialogue: 0,0:02:54.60,0:02:58.47,Default,,0000,0000,0000,,who understand Linux pretty well, or sysadmins\Nwho are Dialogue: 0,0:02:58.47,0:03:01.55,Default,,0000,0000,0000,,trying to achieve something on the production\Nside. So Dialogue: 0,0:03:01.55,0:03:06.62,Default,,0000,0000,0000,,Docker basically makes this accessible to\Nall of us. Dialogue: 0,0:03:06.62,0:03:12.16,Default,,0000,0000,0000,,So it makes portable deployments across machines\Npossible, so Dialogue: 0,0:03:12.16,0:03:16.87,Default,,0000,0000,0000,,you can basically have, you have, I have,\Nsuppose Dialogue: 0,0:03:16.87,0:03:21.24,Default,,0000,0000,0000,,a vagrant box, which runs Erlang?? [00:03:19]\Ninstall, but Dialogue: 0,0:03:21.24,0:03:25.51,Default,,0000,0000,0000,,you can also, you can actually run production\Nsystems, Dialogue: 0,0:03:25.51,0:03:29.15,Default,,0000,0000,0000,,production installs of, out of, say at 12\Npoint Dialogue: 0,0:03:29.15,0:03:33.41,Default,,0000,0000,0000,,0 precise. So you get a lot of flexibility Dialogue: 0,0:03:33.41,0:03:38.95,Default,,0000,0000,0000,,of moving your production images around. So\Nthere is Dialogue: 0,0:03:38.95,0:03:43.43,Default,,0000,0000,0000,,efficient and quick provisioning, so it saves\Non a Dialogue: 0,0:03:43.43,0:03:46.55,Default,,0000,0000,0000,,disk, how much disk it uses, by doing copy-on-write Dialogue: 0,0:03:46.55,0:03:51.20,Default,,0000,0000,0000,,installs. I'll talk about it a little bit\Nlater. Dialogue: 0,0:03:51.20,0:03:57.06,Default,,0000,0000,0000,,There's, it's near-native performance, it's\Nbasically process virtualization. So Dialogue: 0,0:03:57.06,0:04:00.66,Default,,0000,0000,0000,,you're not, you're not doing hardware virtualization,\Nor, you're Dialogue: 0,0:04:00.66,0:04:04.19,Default,,0000,0000,0000,,not trying to support different OSs and stuff\Nlike Dialogue: 0,0:04:04.19,0:04:08.17,Default,,0000,0000,0000,,that, so the way you, the speed at which Dialogue: 0,0:04:08.17,0:04:11.34,Default,,0000,0000,0000,,your Docker instant boots up is very quick.\NSo Dialogue: 0,0:04:11.34,0:04:15.74,Default,,0000,0000,0000,,you almost have no overhead at all. It also Dialogue: 0,0:04:15.74,0:04:20.34,Default,,0000,0000,0000,,has Git-like versioning of images. So you\Nhave basically Dialogue: 0,0:04:20.34,0:04:23.46,Default,,0000,0000,0000,,a base image, which is Ubuntu, and you can Dialogue: 0,0:04:23.46,0:04:26.95,Default,,0000,0000,0000,,install something like emacs on it and you\Ncan Dialogue: 0,0:04:26.95,0:04:29.44,Default,,0000,0000,0000,,commit it and it'll save it and it'll make Dialogue: 0,0:04:29.44,0:04:32.59,Default,,0000,0000,0000,,it into another image. Which'll also - I'll\Nshow Dialogue: 0,0:04:32.59,0:04:34.85,Default,,0000,0000,0000,,you a little bit more about that. So that Dialogue: 0,0:04:34.85,0:04:39.24,Default,,0000,0000,0000,,enables a lot of reuse. So you can basically Dialogue: 0,0:04:39.24,0:04:43.28,Default,,0000,0000,0000,,push these images to a public depository that\NDocker Dialogue: 0,0:04:43.28,0:04:46.80,Default,,0000,0000,0000,,maintains, index dot docker dot IO, so if\Nthey're Dialogue: 0,0:04:46.80,0:04:50.44,Default,,0000,0000,0000,,public, if they're open for sharing, so you\Ncan Dialogue: 0,0:04:50.44,0:04:53.14,Default,,0000,0000,0000,,push them out there and people can use your Dialogue: 0,0:04:53.14,0:04:58.65,Default,,0000,0000,0000,,own configuration how you, however you configured\Nyour image. Dialogue: 0,0:04:58.65,0:05:03.41,Default,,0000,0000,0000,,And the major difference between how LXC operates,\Nor Dialogue: 0,0:05:03.41,0:05:07.09,Default,,0000,0000,0000,,how LXC is talked about and how Docker encourages Dialogue: 0,0:05:07.09,0:05:11.61,Default,,0000,0000,0000,,you to think about containers is that, so\NLXC Dialogue: 0,0:05:11.61,0:05:17.31,Default,,0000,0000,0000,,was initially thought of as, you know, lightweight\Nservers, Dialogue: 0,0:05:17.31,0:05:19.96,Default,,0000,0000,0000,,which, where you install basically everything\Nand put them Dialogue: 0,0:05:19.96,0:05:22.50,Default,,0000,0000,0000,,up and treat them as, just like any other Dialogue: 0,0:05:22.50,0:05:25.76,Default,,0000,0000,0000,,server. Docker kind of encourages you to look\Nat Dialogue: 0,0:05:25.76,0:05:30.14,Default,,0000,0000,0000,,containers as an application. So you install,\Nsay your Dialogue: 0,0:05:30.14,0:05:33.42,Default,,0000,0000,0000,,database mask in one container, you install\Nyour app Dialogue: 0,0:05:33.42,0:05:38.11,Default,,0000,0000,0000,,server as another container, you install your,\Nyour RDB, Dialogue: 0,0:05:38.11,0:05:45.11,Default,,0000,0000,0000,,you know, so, in another container. So, what\Nis Dialogue: 0,0:05:46.12,0:05:49.31,Default,,0000,0000,0000,,LXC? I actually wanted to take out this slide, Dialogue: 0,0:05:49.31,0:05:54.58,Default,,0000,0000,0000,,probably it's a little too advanced for this\Ntalk. Dialogue: 0,0:05:54.58,0:05:57.48,Default,,0000,0000,0000,,But let - I'll try to cover this quickly. Dialogue: 0,0:05:57.48,0:06:01.68,Default,,0000,0000,0000,,So at the basic level, it provides OS-level\Nvirtualization Dialogue: 0,0:06:01.68,0:06:06.21,Default,,0000,0000,0000,,for Linux. So compared to, say, what virtual\Nbox Dialogue: 0,0:06:06.21,0:06:09.70,Default,,0000,0000,0000,,does for you, or KVM, or Zen, so these Dialogue: 0,0:06:09.70,0:06:14.52,Default,,0000,0000,0000,,are all hardware virtualization, so OS-level\Nvirtualization - much Dialogue: 0,0:06:14.52,0:06:20.14,Default,,0000,0000,0000,,faster, much lightweight. Perfect for production\Ndeployment, so. It Dialogue: 0,0:06:20.14,0:06:24.90,Default,,0000,0000,0000,,basically does this. So LXC basically provides\Nyou one Dialogue: 0,0:06:24.90,0:06:29.44,Default,,0000,0000,0000,,process space, one network interface, and\Nyour own init Dialogue: 0,0:06:29.44,0:06:32.90,Default,,0000,0000,0000,,framework. So your, you can be running on\NUbuntu, Dialogue: 0,0:06:32.90,0:06:37.56,Default,,0000,0000,0000,,which uses Upstart as- and your container\Ncan use Dialogue: 0,0:06:37.56,0:06:41.16,Default,,0000,0000,0000,,systemD. That's not a problem at all. So the Dialogue: 0,0:06:41.16,0:06:44.39,Default,,0000,0000,0000,,basic isolation is achieved with cgroups.\NCgroups are control Dialogue: 0,0:06:44.39,0:06:49.51,Default,,0000,0000,0000,,groups. So what cgroups gives you is that\Nit Dialogue: 0,0:06:49.51,0:06:53.27,Default,,0000,0000,0000,,lets you put limits on the resource usage,\Nbasically. Dialogue: 0,0:06:53.27,0:06:56.50,Default,,0000,0000,0000,,Whether it's network or off your disk or your Dialogue: 0,0:06:56.50,0:07:01.98,Default,,0000,0000,0000,,process usage, so cgroups gives you this nice\Nlittle Dialogue: 0,0:07:01.98,0:07:04.45,Default,,0000,0000,0000,,interface where you can do - this is definitely Dialogue: 0,0:07:04.45,0:07:06.28,Default,,0000,0000,0000,,the Linux geek- do not worry, you don't have Dialogue: 0,0:07:06.28,0:07:09.47,Default,,0000,0000,0000,,to worry about that. So the only catch is Dialogue: 0,0:07:09.47,0:07:12.56,Default,,0000,0000,0000,,that it shares the kernel with the host, so Dialogue: 0,0:07:12.56,0:07:16.07,Default,,0000,0000,0000,,you can do stuff like having an x64 image Dialogue: 0,0:07:16.07,0:07:20.31,Default,,0000,0000,0000,,and put it on i36 or vice versa. So Dialogue: 0,0:07:20.31,0:07:23.32,Default,,0000,0000,0000,,that's pretty much the only catch here and\Nit's Dialogue: 0,0:07:23.32,0:07:26.35,Default,,0000,0000,0000,,probably not very, not much of a catch at Dialogue: 0,0:07:26.35,0:07:29.03,Default,,0000,0000,0000,,all. So a typical docker image kind of looks Dialogue: 0,0:07:29.03,0:07:32.01,Default,,0000,0000,0000,,like this. At the most basic level you will Dialogue: 0,0:07:32.01,0:07:35.54,Default,,0000,0000,0000,,see the kernel, and you have cgroups, you\Nhave Dialogue: 0,0:07:35.54,0:07:41.92,Default,,0000,0000,0000,,name spaces and device mapper. So Docker kind\Nof Dialogue: 0,0:07:41.92,0:07:45.91,Default,,0000,0000,0000,,achieves this git-like portioning through,\Nthrough a unioning file Dialogue: 0,0:07:45.91,0:07:52.49,Default,,0000,0000,0000,,system. Right now, debian-based installs use,\Na UFS, which Dialogue: 0,0:07:52.49,0:07:55.25,Default,,0000,0000,0000,,is quite popular, but it has some limitations,\Nwhich Dialogue: 0,0:07:55.25,0:08:00.18,Default,,0000,0000,0000,,is, it's integrated into a debian kernel,\Na debian-based Dialogue: 0,0:08:00.18,0:08:03.93,Default,,0000,0000,0000,,distros kernels, but it's not really available\Nin others, Dialogue: 0,0:08:03.93,0:08:06.47,Default,,0000,0000,0000,,like Santos and dev-hats ?? of the world.\N[00:08:06] Dialogue: 0,0:08:06.47,0:08:11.11,Default,,0000,0000,0000,,So recently they have switched, created a\Nstorage IO Dialogue: 0,0:08:11.11,0:08:13.73,Default,,0000,0000,0000,,which kind of lets you swap out AUFS with Dialogue: 0,0:08:13.73,0:08:17.45,Default,,0000,0000,0000,,the device-mapper, and has plans for integrating\NRFS and Dialogue: 0,0:08:17.45,0:08:22.01,Default,,0000,0000,0000,,BTRFS and stuff like that. So beyond that,\Nyou Dialogue: 0,0:08:22.01,0:08:24.38,Default,,0000,0000,0000,,see the base image, which is shipped out of Dialogue: 0,0:08:24.38,0:08:29.15,Default,,0000,0000,0000,,docker registry, and you also have images.\NSo I Dialogue: 0,0:08:29.15,0:08:33.24,Default,,0000,0000,0000,,installed emacs and, committed, it becomes\Na read-only- so Dialogue: 0,0:08:33.24,0:08:37.67,Default,,0000,0000,0000,,bootSF is basically read-only, and once you\Nboot up Dialogue: 0,0:08:37.67,0:08:41.53,Default,,0000,0000,0000,,that container you'll get a writable part.\NSo once Dialogue: 0,0:08:41.53,0:08:45.65,Default,,0000,0000,0000,,you commit it, it'll become, again, read-only.\NWe'll go Dialogue: 0,0:08:45.65,0:08:49.34,Default,,0000,0000,0000,,through that. Workflow class- So the basic\Nworkflow, I Dialogue: 0,0:08:49.34,0:08:52.63,Default,,0000,0000,0000,,will do it now again, so you basically pull Dialogue: 0,0:08:52.63,0:08:56.34,Default,,0000,0000,0000,,docker images from the public registry and\Nyou run Dialogue: 0,0:08:56.34,0:08:59.42,Default,,0000,0000,0000,,it on your host, and you add your own Dialogue: 0,0:08:59.42,0:09:01.48,Default,,0000,0000,0000,,changes on top of it, push it back to Dialogue: 0,0:09:01.48,0:09:04.19,Default,,0000,0000,0000,,share them, or you could also build it from Dialogue: 0,0:09:04.19,0:09:09.00,Default,,0000,0000,0000,,the ground up using debootstrap and tools\Nlike that. Dialogue: 0,0:09:09.00,0:09:10.83,Default,,0000,0000,0000,,So you also have a docker file which lets Dialogue: 0,0:09:10.83,0:09:15.52,Default,,0000,0000,0000,,you build your own images. Apart from that,\Nyou Dialogue: 0,0:09:15.52,0:09:18.96,Default,,0000,0000,0000,,can set up a private regist- repor- registry\N- Dialogue: 0,0:09:18.96,0:09:22.81,Default,,0000,0000,0000,,sorry. So the idea of private registry is\Nthat Dialogue: 0,0:09:22.81,0:09:24.46,Default,,0000,0000,0000,,you have your own work groups and you want Dialogue: 0,0:09:24.46,0:09:27.35,Default,,0000,0000,0000,,to share these images within your company\Nand they're Dialogue: 0,0:09:27.35,0:09:31.63,Default,,0000,0000,0000,,not really useful for the public usage. So\Nthis Dialogue: 0,0:09:31.63,0:09:34.51,Default,,0000,0000,0000,,is a very public registry, private registry\Ncomes in Dialogue: 0,0:09:34.51,0:09:37.57,Default,,0000,0000,0000,,and, this is just a simple Python app, you Dialogue: 0,0:09:37.57,0:09:39.61,Default,,0000,0000,0000,,can run it on your own server and set Dialogue: 0,0:09:39.61,0:09:42.32,Default,,0000,0000,0000,,it up. So, oh, you can also sign up Dialogue: 0,0:09:42.32,0:09:45.25,Default,,0000,0000,0000,,for something like quail dot IO, which also\Nlets Dialogue: 0,0:09:45.25,0:09:48.23,Default,,0000,0000,0000,,you push, well, you can have your own account, Dialogue: 0,0:09:48.23,0:09:50.89,Default,,0000,0000,0000,,pay for it, and push your private images there, Dialogue: 0,0:09:50.89,0:09:54.54,Default,,0000,0000,0000,,and it's locked up. So before we go, go Dialogue: 0,0:09:54.54,0:09:57.23,Default,,0000,0000,0000,,into the Docker file part, so let me show Dialogue: 0,0:09:57.23,0:10:04.23,Default,,0000,0000,0000,,you a simple - workflow. So you have images, Dialogue: 0,0:10:07.29,0:10:11.47,Default,,0000,0000,0000,,so you can probably ignore a bunch of these. Dialogue: 0,0:10:11.47,0:10:13.82,Default,,0000,0000,0000,,Look at the last ones, which is basically\N- Dialogue: 0,0:10:13.82,0:10:20.82,Default,,0000,0000,0000,,should I move that a little bit? OK. So Dialogue: 0,0:10:24.15,0:10:26.21,Default,,0000,0000,0000,,at the most basic level, when you pull from Dialogue: 0,0:10:26.21,0:10:33.21,Default,,0000,0000,0000,,Docker, say, so it will try to, so, it's Dialogue: 0,0:10:36.58,0:10:39.40,Default,,0000,0000,0000,,not gonna pull anything really, it'll just\Ncheck for Dialogue: 0,0:10:39.40,0:10:42.47,Default,,0000,0000,0000,,the layers that are available on my system,\Nand Dialogue: 0,0:10:42.47,0:10:47.29,Default,,0000,0000,0000,,it'll just, adjust itself. So you see several\Nlayers Dialogue: 0,0:10:47.29,0:10:51.29,Default,,0000,0000,0000,,there, so if you look at the Ubuntu part, Dialogue: 0,0:10:51.29,0:10:55.09,Default,,0000,0000,0000,,it's actually, the Ubuntu images actually\Ncomprised of precise Dialogue: 0,0:10:55.09,0:10:57.28,Default,,0000,0000,0000,,and quantiles, and you can use any of those Dialogue: 0,0:10:57.28,0:11:00.65,Default,,0000,0000,0000,,to take of your container. So kicking off\Na Dialogue: 0,0:11:00.65,0:11:07.65,Default,,0000,0000,0000,,container is probably as simple as - \Nthe end. Dialogue: 0,0:11:11.28,0:11:13.53,Default,,0000,0000,0000,,You can give it, you have to give it, Dialogue: 0,0:11:13.53,0:11:16.95,Default,,0000,0000,0000,,I'm taking the Ubuntu image, a basic image,\Nand Dialogue: 0,0:11:16.95,0:11:20.58,Default,,0000,0000,0000,,I have to give it an entry point. So Dialogue: 0,0:11:20.58,0:11:25.51,Default,,0000,0000,0000,,it will drop me into a root prompt, and Dialogue: 0,0:11:25.51,0:11:31.19,Default,,0000,0000,0000,,basically I can do, I can run app, get Dialogue: 0,0:11:31.19,0:11:33.88,Default,,0000,0000,0000,,updates, and I can install my own stuff. I'll Dialogue: 0,0:11:33.88,0:11:36.86,Default,,0000,0000,0000,,just install a small, a very tiny package,\Nso, Dialogue: 0,0:11:36.86,0:11:43.86,Default,,0000,0000,0000,,in the interest of time. Wow. That takes-\NSo Dialogue: 0,0:11:47.57,0:11:51.02,Default,,0000,0000,0000,,the basic starter image is pretty much very\Nstripped Dialogue: 0,0:11:51.02,0:11:53.34,Default,,0000,0000,0000,,down, you don't have most of the components\Nthat Dialogue: 0,0:11:53.34,0:11:54.95,Default,,0000,0000,0000,,you would need. So the idea is that it Dialogue: 0,0:11:54.95,0:11:57.37,Default,,0000,0000,0000,,should be very lightweight to deploy, and\Nyou can Dialogue: 0,0:11:57.37,0:12:01.96,Default,,0000,0000,0000,,basically add your own, your own software\Non top Dialogue: 0,0:12:01.96,0:12:05.27,Default,,0000,0000,0000,,of it and commit and push it up. So Dialogue: 0,0:12:05.27,0:12:12.27,Default,,0000,0000,0000,,let's say I install nano. There you go, right. Dialogue: 0,0:12:15.11,0:12:18.86,Default,,0000,0000,0000,,That shouldn't take too long. Yeah. So you\Nhave Dialogue: 0,0:12:18.86,0:12:22.18,Default,,0000,0000,0000,,nano here, and if I switch to the other Dialogue: 0,0:12:22.18,0:12:29.18,Default,,0000,0000,0000,,window, you can see. Docker ps. So among the Dialogue: 0,0:12:35.38,0:12:37.80,Default,,0000,0000,0000,,other ones, are you- you can see the last Dialogue: 0,0:12:37.80,0:12:40.12,Default,,0000,0000,0000,,one, which is being run here, and if I Dialogue: 0,0:12:40.12,0:12:46.94,Default,,0000,0000,0000,,actually switch, use nano there, you can see\N- Dialogue: 0,0:12:46.94,0:12:53.75,Default,,0000,0000,0000,,docker - So each of the, each of the Dialogue: 0,0:12:53.75,0:12:57.39,Default,,0000,0000,0000,,containers will have its own name, so you\Ncan Dialogue: 0,0:12:57.39,0:13:00.02,Default,,0000,0000,0000,,do - cranky - you can also set the Dialogue: 0,0:13:00.02,0:13:03.13,Default,,0000,0000,0000,,names, which is a recent feature. But otherwise\Nit'll Dialogue: 0,0:13:03.13,0:13:10.13,Default,,0000,0000,0000,,just regen- it'll just generate - oh, sorry.\NSo Dialogue: 0,0:13:14.47,0:13:16.59,Default,,0000,0000,0000,,it, it gives you what is happening inside\Nthe Dialogue: 0,0:13:16.59,0:13:18.97,Default,,0000,0000,0000,,container. So you have a basic idea of what's Dialogue: 0,0:13:18.97,0:13:24.40,Default,,0000,0000,0000,,running inside the container. So you can also\Ncommit Dialogue: 0,0:13:24.40,0:13:30.26,Default,,0000,0000,0000,,this. So you exit it, and you see, so Dialogue: 0,0:13:30.26,0:13:32.38,Default,,0000,0000,0000,,cranky curie is on there, so you can do Dialogue: 0,0:13:32.38,0:13:39.38,Default,,0000,0000,0000,,something like docker commit cranky curie.\NSorry. So you Dialogue: 0,0:13:53.30,0:13:55.30,Default,,0000,0000,0000,,can commit it, and it'll show up in your Dialogue: 0,0:13:55.30,0:14:02.30,Default,,0000,0000,0000,,images. Oh, I have to give it a name. Dialogue: 0,0:14:04.05,0:14:11.05,Default,,0000,0000,0000,,Cranky_curie as varsee nano. So, docker images.\NYou'll see Dialogue: 0,0:14:14.18,0:14:16.78,Default,,0000,0000,0000,,the one on top. It has fancy name. And Dialogue: 0,0:14:16.78,0:14:18.79,Default,,0000,0000,0000,,you can push it, you can push it to Dialogue: 0,0:14:18.79,0:14:23.27,Default,,0000,0000,0000,,the public registry, the public registry kind\Nof looks Dialogue: 0,0:14:23.27,0:14:30.27,Default,,0000,0000,0000,,like this. So you can search for your own, Dialogue: 0,0:14:33.39,0:14:36.29,Default,,0000,0000,0000,,whatever images that you might need for your\Ndeployment Dialogue: 0,0:14:36.29,0:14:41.70,Default,,0000,0000,0000,,and stuff like that. So I've, you know, I've Dialogue: 0,0:14:41.70,0:14:43.29,Default,,0000,0000,0000,,been playing around with it a little bit and Dialogue: 0,0:14:43.29,0:14:46.07,Default,,0000,0000,0000,,stuff like that. So this is the public depository. Dialogue: 0,0:14:46.07,0:14:48.94,Default,,0000,0000,0000,,You can install the same thing on your private Dialogue: 0,0:14:48.94,0:14:52.87,Default,,0000,0000,0000,,servers and secure it from outside. And you\Ncan Dialogue: 0,0:14:52.87,0:14:56.30,Default,,0000,0000,0000,,have your own image. So that's basically the\Nworkflow Dialogue: 0,0:14:56.30,0:14:58.88,Default,,0000,0000,0000,,that you would work with. And there's a second Dialogue: 0,0:14:58.88,0:15:00.89,Default,,0000,0000,0000,,part to it. What I've done so far is Dialogue: 0,0:15:00.89,0:15:04.67,Default,,0000,0000,0000,,the manual, so I've logged into a container\Nand Dialogue: 0,0:15:04.67,0:15:07.43,Default,,0000,0000,0000,,I've installed stuff in it. So you basically\Nautomate Dialogue: 0,0:15:07.43,0:15:14.43,Default,,0000,0000,0000,,it with something called a Docker file. Oh,\Nsorry. Dialogue: 0,0:15:23.57,0:15:27.39,Default,,0000,0000,0000,,So Docker file, so is, it's very similar to Dialogue: 0,0:15:27.39,0:15:31.10,Default,,0000,0000,0000,,what you have reg file or make files in Dialogue: 0,0:15:31.10,0:15:35.43,Default,,0000,0000,0000,,your projects. So it's a default way to build Dialogue: 0,0:15:35.43,0:15:38.56,Default,,0000,0000,0000,,it from base image. Basically upload a file\Nscript, Dialogue: 0,0:15:38.56,0:15:42.97,Default,,0000,0000,0000,,but definitely easier to maintain. And you\Nhave directives Dialogue: 0,0:15:42.97,0:15:47.72,Default,,0000,0000,0000,,like from, run, command, expose. So from is\Nbasically Dialogue: 0,0:15:47.72,0:15:51.24,Default,,0000,0000,0000,,which, based on which image do I want to Dialogue: 0,0:15:51.24,0:15:54.03,Default,,0000,0000,0000,,build my docker. And you have run, basically\Nhas, Dialogue: 0,0:15:54.03,0:15:57.21,Default,,0000,0000,0000,,or app to get install commands, whatever is\Ndone Dialogue: 0,0:15:57.21,0:16:00.18,Default,,0000,0000,0000,,manually. And command and entry point are\Nvery similar. Dialogue: 0,0:16:00.18,0:16:03.44,Default,,0000,0000,0000,,So I've entered into the container through\Nbin bash, Dialogue: 0,0:16:03.44,0:16:07.11,Default,,0000,0000,0000,,so I've basically put that in entrypoint.\NAnd the Dialogue: 0,0:16:07.11,0:16:10.70,Default,,0000,0000,0000,,command is what passes, you pass some options\Ninto Dialogue: 0,0:16:10.70,0:16:12.78,Default,,0000,0000,0000,,that. So I'll show you a docker file anyway, Dialogue: 0,0:16:12.78,0:16:16.44,Default,,0000,0000,0000,,so that will, that should put this, all this Dialogue: 0,0:16:16.44,0:16:19.03,Default,,0000,0000,0000,,in context. So you have, you can even add Dialogue: 0,0:16:19.03,0:16:22.32,Default,,0000,0000,0000,,files, you can copy config files from your\Nhost Dialogue: 0,0:16:22.32,0:16:27.21,Default,,0000,0000,0000,,system into your container. You can have volumes,\Nvolumes Dialogue: 0,0:16:27.21,0:16:31.67,Default,,0000,0000,0000,,are basically mount points. You just mount\Na whole Dialogue: 0,0:16:31.67,0:16:35.99,Default,,0000,0000,0000,,directory as either read-only or read-write,\Nit's up to Dialogue: 0,0:16:35.99,0:16:38.76,Default,,0000,0000,0000,,you. And on the whole there are about a Dialogue: 0,0:16:38.76,0:16:42.49,Default,,0000,0000,0000,,dozen commands. It's very simple to get started\Nwith. Dialogue: 0,0:16:42.49,0:16:48.16,Default,,0000,0000,0000,,No nonsense. And doesn't need a lot of time Dialogue: 0,0:16:48.16,0:16:51.06,Default,,0000,0000,0000,,to learn the whole thing. So, and you can Dialogue: 0,0:16:51.06,0:16:55.10,Default,,0000,0000,0000,,create your own base images using debootstrap\Nin centOS, Dialogue: 0,0:16:55.10,0:16:57.81,Default,,0000,0000,0000,,it's, debootstrap is basically a building\Ntool with how Dialogue: 0,0:16:57.81,0:17:01.63,Default,,0000,0000,0000,,you build a base image. But in that other Dialogue: 0,0:17:01.63,0:17:04.41,Default,,0000,0000,0000,,distros you have, you know you can do it Dialogue: 0,0:17:04.41,0:17:08.97,Default,,0000,0000,0000,,with other tools So zero downtime deployment.\NSo why, Dialogue: 0,0:17:08.97,0:17:12.72,Default,,0000,0000,0000,,why do we need that? So the most important Dialogue: 0,0:17:12.72,0:17:17.65,Default,,0000,0000,0000,,part being, you have, you know, things like\Ncontinuous Dialogue: 0,0:17:17.65,0:17:22.67,Default,,0000,0000,0000,,delivery and continuous deployments, right.\NSo they're subtly different Dialogue: 0,0:17:22.67,0:17:25.14,Default,,0000,0000,0000,,from each other, they're very similar concepts,\Nof course Dialogue: 0,0:17:25.14,0:17:30.10,Default,,0000,0000,0000,,you have continous delivery where you send\Nstuff, you Dialogue: 0,0:17:30.10,0:17:33.69,Default,,0000,0000,0000,,deliver your software on a regular basis and\Nyou Dialogue: 0,0:17:33.69,0:17:36.86,Default,,0000,0000,0000,,have tight communication loops with your clients\Nand all Dialogue: 0,0:17:36.86,0:17:38.92,Default,,0000,0000,0000,,that good stuff - ?? and stuff. [00:17:38]\NAnd Dialogue: 0,0:17:38.92,0:17:42.05,Default,,0000,0000,0000,,continous deployment is basically taking it\None step, and Dialogue: 0,0:17:42.05,0:17:45.27,Default,,0000,0000,0000,,I think Chad did a really good example of Dialogue: 0,0:17:45.27,0:17:50.95,Default,,0000,0000,0000,,that yesterday. So you know instead of making\Nyour Dialogue: 0,0:17:50.95,0:17:53.44,Default,,0000,0000,0000,,deployments, say, once a week, or you know,\Nonce Dialogue: 0,0:17:53.44,0:17:56.48,Default,,0000,0000,0000,,every few days, the idea is to make them Dialogue: 0,0:17:56.48,0:18:00.40,Default,,0000,0000,0000,,as continuously as possible with least amount\Nof angst Dialogue: 0,0:18:00.40,0:18:05.39,Default,,0000,0000,0000,,around making deployments. So you basically\Nhave, I'm sure Dialogue: 0,0:18:05.39,0:18:07.92,Default,,0000,0000,0000,,you're all used to long deploys in Rails.\NMigrations, Dialogue: 0,0:18:07.92,0:18:11.31,Default,,0000,0000,0000,,you know, when migrations are happening, you're\Nchanging the Dialogue: 0,0:18:11.31,0:18:14.65,Default,,0000,0000,0000,,schema, other requests, you usually put in\Na maintenance Dialogue: 0,0:18:14.65,0:18:18.91,Default,,0000,0000,0000,,page and when other requests comes in you,\Nif Dialogue: 0,0:18:18.91,0:18:22.10,Default,,0000,0000,0000,,you don't put up a maintenance page, you already, Dialogue: 0,0:18:22.10,0:18:24.89,Default,,0000,0000,0000,,you can get some errors and stuff like that. Dialogue: 0,0:18:24.89,0:18:28.28,Default,,0000,0000,0000,,And obviously you know about asset compilation,\Nit takes Dialogue: 0,0:18:28.28,0:18:30.81,Default,,0000,0000,0000,,way too long. So but these problems are not, Dialogue: 0,0:18:30.81,0:18:34.26,Default,,0000,0000,0000,,really not limited to Rails, per se. I'm sure Dialogue: 0,0:18:34.26,0:18:37.14,Default,,0000,0000,0000,,you have the same issues when you're deploying\NJangle Dialogue: 0,0:18:37.14,0:18:40.71,Default,,0000,0000,0000,,container, so Docker is basically a framework\Ndiagnostic you Dialogue: 0,0:18:40.71,0:18:44.00,Default,,0000,0000,0000,,can run any apps on it, and. So I'm Dialogue: 0,0:18:44.00,0:18:47.74,Default,,0000,0000,0000,,trying to lay out a problem, so there are Dialogue: 0,0:18:47.74,0:18:50.22,Default,,0000,0000,0000,,two parts to this problem. So one is with Dialogue: 0,0:18:50.22,0:18:54.29,Default,,0000,0000,0000,,migrations and without migrations. Without\Nmigrations it's usually a Dialogue: 0,0:18:54.29,0:18:57.88,Default,,0000,0000,0000,,little easier because you don't have to worry\Nabout Dialogue: 0,0:18:57.88,0:19:01.63,Default,,0000,0000,0000,,making sure the databases are in sync and\Nstuff Dialogue: 0,0:19:01.63,0:19:03.77,Default,,0000,0000,0000,,like that. So with databases it's a more complex Dialogue: 0,0:19:03.77,0:19:07.28,Default,,0000,0000,0000,,scenario where you have to take a master DB Dialogue: 0,0:19:07.28,0:19:11.17,Default,,0000,0000,0000,,slave, DB, make sure they're sync, and you\Nhave Dialogue: 0,0:19:11.17,0:19:15.36,Default,,0000,0000,0000,,something like ZooKeeper kind of keeping track\Nof who's Dialogue: 0,0:19:15.36,0:19:17.41,Default,,0000,0000,0000,,master, who's slave, and you switch. So I'll\Ntry Dialogue: 0,0:19:17.41,0:19:22.18,Default,,0000,0000,0000,,to walk you through the simpler case, so we Dialogue: 0,0:19:22.18,0:19:26.07,Default,,0000,0000,0000,,can extend this to, you know, DB level. I Dialogue: 0,0:19:26.07,0:19:29.04,Default,,0000,0000,0000,,don't think I can cover other DB stuff here. Dialogue: 0,0:19:29.04,0:19:33.96,Default,,0000,0000,0000,,So you basically have a HaProxy. HaProxy is\Nbasically Dialogue: 0,0:19:33.96,0:19:37.83,Default,,0000,0000,0000,,a reverse proxy but on steroids. So it's a Dialogue: 0,0:19:37.83,0:19:41.13,Default,,0000,0000,0000,,load balancer, to be exact. But what it does Dialogue: 0,0:19:41.13,0:19:43.07,Default,,0000,0000,0000,,is very similar to what engine x does for Dialogue: 0,0:19:43.07,0:19:46.43,Default,,0000,0000,0000,,you, you have like multiple instances, and\Nyou are, Dialogue: 0,0:19:46.43,0:19:49.61,Default,,0000,0000,0000,,they're running on different multiple instances\Nof your app Dialogue: 0,0:19:49.61,0:19:54.02,Default,,0000,0000,0000,,server, they're running on different ports.\NAnd basically enginex, Dialogue: 0,0:19:54.02,0:19:55.93,Default,,0000,0000,0000,,once a request comes enginex will do a round Dialogue: 0,0:19:55.93,0:19:58.79,Default,,0000,0000,0000,,up and allotment of you know the servers.\NSo Dialogue: 0,0:19:58.79,0:20:01.65,Default,,0000,0000,0000,,HaProxy does that, but also a lot more. It Dialogue: 0,0:20:01.65,0:20:05.03,Default,,0000,0000,0000,,also lets you do funky stuff like what I'm Dialogue: 0,0:20:05.03,0:20:07.30,Default,,0000,0000,0000,,gonna talk about, there's a back-up server,\Nand active Dialogue: 0,0:20:07.30,0:20:11.25,Default,,0000,0000,0000,,server, which you can use cleverly to do zero-downtime Dialogue: 0,0:20:11.25,0:20:15.03,Default,,0000,0000,0000,,deployments. But it also has, if you have\Ntime, Dialogue: 0,0:20:15.03,0:20:17.70,Default,,0000,0000,0000,,I would suggest you go through the configuration\Nfile, Dialogue: 0,0:20:17.70,0:20:20.01,Default,,0000,0000,0000,,which is very dense and long, but very interesting Dialogue: 0,0:20:20.01,0:20:24.32,Default,,0000,0000,0000,,stuff. So what we're gonna use, in HaProxy\Nhere, Dialogue: 0,0:20:24.32,0:20:28.22,Default,,0000,0000,0000,,is that you have basically two types of, you Dialogue: 0,0:20:28.22,0:20:31.32,Default,,0000,0000,0000,,can set up two types of servers. And the Dialogue: 0,0:20:31.32,0:20:33.55,Default,,0000,0000,0000,,like, a bunch of active servers and there\Nare Dialogue: 0,0:20:33.55,0:20:36.32,Default,,0000,0000,0000,,like a bunch of back-up servers, and the idea Dialogue: 0,0:20:36.32,0:20:40.21,Default,,0000,0000,0000,,is that the back-up servers are not used until Dialogue: 0,0:20:40.21,0:20:42.83,Default,,0000,0000,0000,,all the active servers are down, right. So\Nthe Dialogue: 0,0:20:42.83,0:20:45.49,Default,,0000,0000,0000,,request won't come through to back-up servers\Nuntil all Dialogue: 0,0:20:45.49,0:20:49.68,Default,,0000,0000,0000,,the active servers are down. So what we are Dialogue: 0,0:20:49.68,0:20:53.36,Default,,0000,0000,0000,,gonna, how we are gonna use that, sorry, the Dialogue: 0,0:20:53.36,0:20:59.09,Default,,0000,0000,0000,,slides are very basic, so. So, you basically\Nkick Dialogue: 0,0:20:59.09,0:21:02.77,Default,,0000,0000,0000,,off the deploy, kick off the image build with Dialogue: 0,0:21:02.77,0:21:06.61,Default,,0000,0000,0000,,docker, and you take down the back-up servers.\NAt Dialogue: 0,0:21:06.61,0:21:10.03,Default,,0000,0000,0000,,this point your HaProxy is still serving from\Nyour Dialogue: 0,0:21:10.03,0:21:15.02,Default,,0000,0000,0000,,active servers, right. So now you bring up\Nthe Dialogue: 0,0:21:15.02,0:21:18.00,Default,,0000,0000,0000,,new back-up server, new back-up servers with\Nyour new Dialogue: 0,0:21:18.00,0:21:20.07,Default,,0000,0000,0000,,image, which is just being build when the\Ndeploy Dialogue: 0,0:21:20.07,0:21:24.39,Default,,0000,0000,0000,,happened. So, and then you take down the active Dialogue: 0,0:21:24.39,0:21:28.79,Default,,0000,0000,0000,,servers. So after all the active servers are\Ndown, Dialogue: 0,0:21:28.79,0:21:30.99,Default,,0000,0000,0000,,the requests will come in to the back-up ones, Dialogue: 0,0:21:30.99,0:21:34.13,Default,,0000,0000,0000,,right, so which is now serving your new code, Dialogue: 0,0:21:34.13,0:21:36.78,Default,,0000,0000,0000,,which has just been deployed. So after that\Nyou Dialogue: 0,0:21:36.78,0:21:39.82,Default,,0000,0000,0000,,restart your active servers, you're back to\Nnormal again. Dialogue: 0,0:21:39.82,0:21:44.04,Default,,0000,0000,0000,,So at the most basic level, so at least Dialogue: 0,0:21:44.04,0:21:47.20,Default,,0000,0000,0000,,you will definitely won't be able to do migrations Dialogue: 0,0:21:47.20,0:21:49.42,Default,,0000,0000,0000,,with this set-up. You have to go a little Dialogue: 0,0:21:49.42,0:21:51.98,Default,,0000,0000,0000,,bit advanced for that. But at least you'll\Nbe Dialogue: 0,0:21:51.98,0:21:56.24,Default,,0000,0000,0000,,able to avoid frustrations with stuff like\Nlong asset Dialogue: 0,0:21:56.24,0:22:02.13,Default,,0000,0000,0000,,recompilation, you know, long deploys that\Nyou usually get. Dialogue: 0,0:22:02.13,0:22:05.27,Default,,0000,0000,0000,,So let me walk you through the whole thing, Dialogue: 0,0:22:05.27,0:22:11.97,Default,,0000,0000,0000,,quickly. So I was actually quite upset that\Nthe Dialogue: 0,0:22:11.97,0:22:14.60,Default,,0000,0000,0000,,talk, the pamphlet which is being given, which\Nhad Dialogue: 0,0:22:14.60,0:22:18.37,Default,,0000,0000,0000,,shortcuts for sublime and whim, but it doesn't\Nhave Dialogue: 0,0:22:18.37,0:22:24.91,Default,,0000,0000,0000,,shortcuts for emacs. Which is, I object! So\Nthe Dialogue: 0,0:22:24.91,0:22:27.25,Default,,0000,0000,0000,,idea is, OK let me start you off with Dialogue: 0,0:22:27.25,0:22:30.01,Default,,0000,0000,0000,,the simple docker file. So this should, this\Nshould Dialogue: 0,0:22:30.01,0:22:37.01,Default,,0000,0000,0000,,- oh, OK. Yeah. Let me restart it. I'll Dialogue: 0,0:22:51.45,0:22:57.48,Default,,0000,0000,0000,,just show you on my- I think this is Dialogue: 0,0:22:57.48,0:23:04.48,Default,,0000,0000,0000,,a lot more easier to show you. So app Dialogue: 0,0:23:04.64,0:23:11.64,Default,,0000,0000,0000,,server, you have docker file. So at the most Dialogue: 0,0:23:17.81,0:23:20.38,Default,,0000,0000,0000,,basic level, I am picking it up from the Dialogue: 0,0:23:20.38,0:23:25.08,Default,,0000,0000,0000,,Ubuntu image, and basically running some adaptation\Nof my Dialogue: 0,0:23:25.08,0:23:30.44,Default,,0000,0000,0000,,source's list, and you have app-get update,\Napp-get install, Dialogue: 0,0:23:30.44,0:23:33.18,Default,,0000,0000,0000,,y. So let me run the deploy first, and Dialogue: 0,0:23:33.18,0:23:35.25,Default,,0000,0000,0000,,then I will talk about this, because I don't Dialogue: 0,0:23:35.25,0:23:42.25,Default,,0000,0000,0000,,think we'll have enough time to actually wait\Nafterwards. Dialogue: 0,0:24:00.68,0:24:05.30,Default,,0000,0000,0000,,OK. So this will, this will run the deploy Dialogue: 0,0:24:05.31,0:24:09.37,Default,,0000,0000,0000,,process in the background. Let me talk about\Nwhat Dialogue: 0,0:24:09.37,0:24:16.37,Default,,0000,0000,0000,,it actually does out here. OK. So let's get Dialogue: 0,0:24:28.67,0:24:31.40,Default,,0000,0000,0000,,back to our docker file. So what it does Dialogue: 0,0:24:31.40,0:24:33.60,Default,,0000,0000,0000,,- this is almost like the shell script that Dialogue: 0,0:24:33.60,0:24:37.60,Default,,0000,0000,0000,,you use for everyday automation, so, but it\Nadds Dialogue: 0,0:24:37.60,0:24:41.70,Default,,0000,0000,0000,,a little bit more fun to it, I guess. Dialogue: 0,0:24:41.70,0:24:45.58,Default,,0000,0000,0000,,So what I'm doing is pretty straightforward.\NI'm installing Dialogue: 0,0:24:45.58,0:24:49.82,Default,,0000,0000,0000,,chruby, I hate RBM, especially for production\Nit sucks, Dialogue: 0,0:24:49.82,0:24:53.98,Default,,0000,0000,0000,,I mean, yeah. There are other opinions about\Nit. Dialogue: 0,0:24:53.98,0:24:55.90,Default,,0000,0000,0000,,But at least I have, I've thought it's the Dialogue: 0,0:24:55.90,0:24:58.34,Default,,0000,0000,0000,,easiest way to get started. So I'm basically\Ninstalling Dialogue: 0,0:24:58.34,0:25:03.29,Default,,0000,0000,0000,,some default gems, like bundler and puma,\Nand I'm Dialogue: 0,0:25:03.29,0:25:06.37,Default,,0000,0000,0000,,installing other dependencies. So the reason,\NI am actually Dialogue: 0,0:25:06.37,0:25:10.71,Default,,0000,0000,0000,,splitting this into two docker files. So you'll\Nalso Dialogue: 0,0:25:10.71,0:25:17.71,Default,,0000,0000,0000,,have stuff like, so. What I'm doing here is Dialogue: 0,0:25:21.44,0:25:24.15,Default,,0000,0000,0000,,that, so when I'm doing actually a deploy,\NI Dialogue: 0,0:25:24.15,0:25:27.24,Default,,0000,0000,0000,,am only running this. So I'm picking up, I'm Dialogue: 0,0:25:27.24,0:25:30.22,Default,,0000,0000,0000,,installing all my dependencies in my earlier\Nimage, and Dialogue: 0,0:25:30.22,0:25:32.61,Default,,0000,0000,0000,,I'm just reusing it for deploys I want, because Dialogue: 0,0:25:32.61,0:25:35.69,Default,,0000,0000,0000,,I want them to be pretty fast. So what Dialogue: 0,0:25:35.69,0:25:37.63,Default,,0000,0000,0000,,this does is pretty simple. It copies over\Nthe Dialogue: 0,0:25:37.63,0:25:43.06,Default,,0000,0000,0000,,database configurations and it does a bundle,\Nand it Dialogue: 0,0:25:43.06,0:25:47.50,Default,,0000,0000,0000,,does a db migrate. I'm just using sqlite here, Dialogue: 0,0:25:47.50,0:25:52.38,Default,,0000,0000,0000,,so yeah. It exposes a port. So how the Dialogue: 0,0:25:52.38,0:25:55.46,Default,,0000,0000,0000,,containers talk to each other within a docker,\Nin Dialogue: 0,0:25:55.46,0:26:00.54,Default,,0000,0000,0000,,your host, is that through exposing these\Nports. And Dialogue: 0,0:26:00.54,0:26:04.29,Default,,0000,0000,0000,,like I mentioned earlier, my entrypoint is\Nbasically I'm Dialogue: 0,0:26:04.29,0:26:10.35,Default,,0000,0000,0000,,starting Puma there. And I'm running it in\Na Dialogue: 0,0:26:10.35,0:26:16.07,Default,,0000,0000,0000,,?? [00:26:07]. Yeah. So if you look at the, Dialogue: 0,0:26:16.07,0:26:23.07,Default,,0000,0000,0000,,if you. If you look at the deployment, I'm Dialogue: 0,0:26:29.48,0:26:36.22,Default,,0000,0000,0000,,sorry- Yeah. So I don't know how much of Dialogue: 0,0:26:36.22,0:26:39.08,Default,,0000,0000,0000,,this actually makes sense. I'll just show\Nyou the, Dialogue: 0,0:26:39.08,0:26:42.91,Default,,0000,0000,0000,,our deployment code. Sorry, the cap file,\Nso that Dialogue: 0,0:26:42.91,0:26:49.91,Default,,0000,0000,0000,,should make a little bit of more, yeah. OK. Dialogue: 0,0:27:01.62,0:27:06.43,Default,,0000,0000,0000,,So if you see at the bottom, you'll see Dialogue: 0,0:27:06.43,0:27:10.18,Default,,0000,0000,0000,,that I am just doing a bunch of stuff Dialogue: 0,0:27:10.18,0:27:15.48,Default,,0000,0000,0000,,there, so I'm linking from my current deploy\Nto Dialogue: 0,0:27:15.48,0:27:22.41,Default,,0000,0000,0000,,the vagrant, sorry, the docker container build\Ndirectory. And Dialogue: 0,0:27:22.41,0:27:25.24,Default,,0000,0000,0000,,I'm starting from the back-end servers. So\NI'll, I Dialogue: 0,0:27:25.24,0:27:29.68,Default,,0000,0000,0000,,should also show you the, my HaProxy configuration.\NSo Dialogue: 0,0:27:29.68,0:27:34.70,Default,,0000,0000,0000,,it starts with your ports set up and you Dialogue: 0,0:27:34.70,0:27:37.55,Default,,0000,0000,0000,,actually search for those docker containers\Nand take them Dialogue: 0,0:27:37.55,0:27:40.31,Default,,0000,0000,0000,,down. So the build takes a- a little long, Dialogue: 0,0:27:40.31,0:27:42.30,Default,,0000,0000,0000,,so I've kind of commented it out for now, Dialogue: 0,0:27:42.30,0:27:44.33,Default,,0000,0000,0000,,but I can show you outside if you want Dialogue: 0,0:27:44.33,0:27:47.44,Default,,0000,0000,0000,,to see how that works. And it's pretty simple. Dialogue: 0,0:27:47.44,0:27:49.52,Default,,0000,0000,0000,,So at the end of it I'm just restarting Dialogue: 0,0:27:49.52,0:27:52.66,Default,,0000,0000,0000,,all my containers, so you can basically look\Nat Dialogue: 0,0:27:52.66,0:27:58.51,Default,,0000,0000,0000,,them here. Docker ps a. You'll see that these Dialogue: 0,0:27:58.51,0:28:00.77,Default,,0000,0000,0000,,top ones are only up for two minutes. These Dialogue: 0,0:28:00.77,0:28:04.95,Default,,0000,0000,0000,,are recently deployed. So all through, if\Nyou look Dialogue: 0,0:28:04.95,0:28:09.83,Default,,0000,0000,0000,,at your HaProxy page, so you basically have\Ntwo Dialogue: 0,0:28:09.83,0:28:14.63,Default,,0000,0000,0000,,active ones here, and two back-up servers\Nhere. So Dialogue: 0,0:28:14.63,0:28:21.63,Default,,0000,0000,0000,,like, and I also should show you the HaProxy Dialogue: 0,0:28:28.47,0:28:35.47,Default,,0000,0000,0000,,stuff, right. So you can pretty much ignore\Nall Dialogue: 0,0:28:36.62,0:28:39.70,Default,,0000,0000,0000,,this stuff. The most important part is the\Nlast Dialogue: 0,0:28:39.70,0:28:42.26,Default,,0000,0000,0000,,two ones. So as you can see the web Dialogue: 0,0:28:42.26,0:28:46.72,Default,,0000,0000,0000,,01 and web 02 are active servers, and web Dialogue: 0,0:28:46.72,0:28:49.74,Default,,0000,0000,0000,,03 and web 04 are back-up servers. So that's Dialogue: 0,0:28:49.74,0:28:53.90,Default,,0000,0000,0000,,all it takes. So you can basically segment\Nyour, Dialogue: 0,0:28:53.90,0:28:58.03,Default,,0000,0000,0000,,the servers like that and go at it. So Dialogue: 0,0:28:58.03,0:29:05.03,Default,,0000,0000,0000,,that's basically it. So I hope- and, a couple Dialogue: 0,0:29:05.05,0:29:09.20,Default,,0000,0000,0000,,of helpful links if, sorry if it's not very Dialogue: 0,0:29:09.20,0:29:11.64,Default,,0000,0000,0000,,visible. There's docker dot io, where you\Ncan find Dialogue: 0,0:29:11.64,0:29:15.11,Default,,0000,0000,0000,,all of the documentation and stuff, there's\Nhaproxy - Dialogue: 0,0:29:15.11,0:29:17.47,Default,,0000,0000,0000,,go look at it if you are doing deployments Dialogue: 0,0:29:17.47,0:29:21.37,Default,,0000,0000,0000,,through your regular day-to-day developer\Nlife. This is a Dialogue: 0,0:29:21.37,0:29:25.99,Default,,0000,0000,0000,,lifesaving tool to learn well. And there's\Ndockerbook, if Dialogue: 0,0:29:25.99,0:29:28.25,Default,,0000,0000,0000,,you're - it's written by James Turnbull one\Nof Dialogue: 0,0:29:28.25,0:29:32.60,Default,,0000,0000,0000,,my favorite technical authors. He's written\NPro Puppet, which Dialogue: 0,0:29:32.60,0:29:36.49,Default,,0000,0000,0000,,is still quite one of my favorite books. And Dialogue: 0,0:29:36.49,0:29:38.42,Default,,0000,0000,0000,,if you want to know a little bit more Dialogue: 0,0:29:38.42,0:29:43.27,Default,,0000,0000,0000,,about the Linux part of what Docker does,\Nlike Dialogue: 0,0:29:43.27,0:29:46.62,Default,,0000,0000,0000,,the internals of Docker, you can listen to\NJerome Dialogue: 0,0:29:46.62,0:29:49.39,Default,,0000,0000,0000,,Petazzoni, who is part of the Docker team.\NSo Dialogue: 0,0:29:49.39,0:29:51.53,Default,,0000,0000,0000,,he's given a really good talk, in-depth talk\Nabout Dialogue: 0,0:29:51.53,0:29:53.84,Default,,0000,0000,0000,,it, at our next conference you should look\Nat Dialogue: 0,0:29:53.84,0:29:56.41,Default,,0000,0000,0000,,the video. And there are like a bunch of Dialogue: 0,0:29:56.41,0:29:59.36,Default,,0000,0000,0000,,tools you can probably look at. There's Dokku\Nwhich Dialogue: 0,0:29:59.36,0:30:02.73,Default,,0000,0000,0000,,is a PaaS. PaaS is a platform as a Dialogue: 0,0:30:02.73,0:30:05.17,Default,,0000,0000,0000,,service, what- essentially what HaDokku does,\Nyou can build Dialogue: 0,0:30:05.17,0:30:08.60,Default,,0000,0000,0000,,your own HaDokku [00:30:06] with the Docker.\NAnd Flynn Dialogue: 0,0:30:08.60,0:30:12.08,Default,,0000,0000,0000,,dot io, CoreOS is also very import- very interesting Dialogue: 0,0:30:12.08,0:30:15.32,Default,,0000,0000,0000,,tool. CoreOS kind of bundles Docker with a\Nservice Dialogue: 0,0:30:15.32,0:30:18.48,Default,,0000,0000,0000,,disovery thing, like, kind of like ZooKeeper,\Nbut it Dialogue: 0,0:30:18.48,0:30:22.13,Default,,0000,0000,0000,,is called ATCD. And it bundle system ??[00:20:21]\Nin Dialogue: 0,0:30:22.13,0:30:24.95,Default,,0000,0000,0000,,its framework, so if you're into deployments\Nthis is Dialogue: 0,0:30:24.95,0:30:29.00,Default,,0000,0000,0000,,a very interesting ecosystem to look at. And\NQuay Dialogue: 0,0:30:29.00,0:30:32.97,Default,,0000,0000,0000,,dot io I mentioned. It's, you can basically\Nupload Dialogue: 0,0:30:32.97,0:30:36.78,Default,,0000,0000,0000,,your private images there and get started.\NSo they're Dialogue: 0,0:30:36.78,0:30:39.45,Default,,0000,0000,0000,,like a bunch of tools. I don't know if Dialogue: 0,0:30:39.45,0:30:42.39,Default,,0000,0000,0000,,I have any time for questions, but you can Dialogue: 0,0:30:42.39,0:30:47.39,Default,,0000,0000,0000,,catch me. Sorry, but I'm available, you can\Ncatch Dialogue: 0,0:30:47.39,0:30:54.39,Default,,0000,0000,0000,,me at any time. Thanks a lot.