1 00:00:17,160 --> 00:00:19,800 BEN DIXON: OK. So, I'm Ben. 2 00:00:19,800 --> 00:00:22,170 I'm a Rails developer and the author 3 00:00:22,170 --> 00:00:26,150 of a book called Reliably Deploying Rails Applications. 4 00:00:26,180 --> 00:00:28,090 I spend a lot of people - a lot of people? 5 00:00:28,100 --> 00:00:30,810 A lot of time teaching people Ruby at 6 00:00:30,810 --> 00:00:32,259 MakeItWithCode dot com, 7 00:00:32,259 --> 00:00:35,120 which is an online mentor-driven class 8 00:00:35,120 --> 00:00:36,780 for people who are new to Ruby 9 00:00:36,780 --> 00:00:39,000 but want to get started making things quickly. 10 00:00:39,000 --> 00:00:41,200 I spend the rest of my time working with 11 00:00:41,200 --> 00:00:43,680 the awesome guys at HelloSwimio, where we make cool 12 00:00:43,680 --> 00:00:46,110 tech for swimmers. So we make things like the 13 00:00:46,110 --> 00:00:49,310 time tabling system for the Olympic pool in London, 14 00:00:49,310 --> 00:00:52,010 the speedo swim tracking app, and the first automatic 15 00:00:52,020 --> 00:00:54,359 lap tracker for the Pebble smart watch. 16 00:00:54,360 --> 00:00:57,750 So, before we get started, could you put your 17 00:00:57,750 --> 00:01:00,451 hands up if you've deployed a Rails app of 18 00:01:00,460 --> 00:01:05,209 some sort to Heroku. Awesome. Now keep your hand 19 00:01:05,209 --> 00:01:07,341 up if you've deployed a Rails app to a 20 00:01:07,341 --> 00:01:11,610 server that you've set up yourself. Good. That's less 21 00:01:11,640 --> 00:01:12,570 people. 22 00:01:12,570 --> 00:01:14,770 So if someone came to me and said, I 23 00:01:14,770 --> 00:01:16,279 want to deploy my first Rails app, how should 24 00:01:16,280 --> 00:01:18,571 I do it? I wouldn't think about it, I'd 25 00:01:18,580 --> 00:01:22,150 just say use Heroku. And I'd say use Heroku, 26 00:01:22,150 --> 00:01:25,530 because Heroku makes deploying apps incredibly simple. You just 27 00:01:25,530 --> 00:01:29,750 commit your code, Heroku create, git push Heroku, and 28 00:01:29,780 --> 00:01:32,660 magically, a couple of minutes later, your application is 29 00:01:32,660 --> 00:01:36,010 live, on the internet, for the world to see. 30 00:01:36,010 --> 00:01:38,630 And because Heroku has made this process so simple 31 00:01:38,630 --> 00:01:40,860 and so easy, it's really easy to take that 32 00:01:40,860 --> 00:01:42,220 server stuff and kind of put it in a 33 00:01:42,240 --> 00:01:44,990 bucket of things we don't look at. Because it's 34 00:01:44,990 --> 00:01:48,500 complicated and Heroku makes it really easy, so why 35 00:01:48,500 --> 00:01:50,030 would we bother? 36 00:01:50,040 --> 00:01:51,750 And what I'd like to demonstrate in this talk 37 00:01:51,750 --> 00:01:53,850 is that, in the same way Rails makes building 38 00:01:53,850 --> 00:01:57,070 web applications really, really easy, there are lots of 39 00:01:57,080 --> 00:01:59,080 great tools out there that make setting up servers 40 00:01:59,080 --> 00:02:02,050 for them and deploying to those servers really easy. 41 00:02:02,060 --> 00:02:03,600 And once you get the hang of these tools, 42 00:02:03,600 --> 00:02:06,170 you can do some really cool stuff. 43 00:02:06,170 --> 00:02:09,758 Before we get started, two important bits of terminology, 44 00:02:09,759 --> 00:02:12,931 which probably you already know. A PaaS, a platform 45 00:02:12,940 --> 00:02:15,260 as a service, and by that I mean something 46 00:02:15,260 --> 00:02:18,030 like Heroku. So something that just abstracts all of 47 00:02:18,030 --> 00:02:19,420 your infrastructure away so that you don't have to 48 00:02:19,420 --> 00:02:20,610 worry about it. 49 00:02:20,610 --> 00:02:23,060 On the other scale, you've got a VPS, a 50 00:02:23,060 --> 00:02:26,120 Virtual Private Server, and for the purposes of this 51 00:02:26,140 --> 00:02:28,480 talk, I just mean some sort of Linux server 52 00:02:28,480 --> 00:02:30,560 running the cloud. So the type of thing you 53 00:02:30,560 --> 00:02:33,630 get from Linode or RackSpace or DigitalOcean. 54 00:02:33,630 --> 00:02:36,370 So, to get started, I want to take a 55 00:02:36,380 --> 00:02:38,730 little look at what's going on behind the scenes 56 00:02:38,730 --> 00:02:41,790 when you deploy a typical Rails application. How do 57 00:02:41,790 --> 00:02:44,570 we go from Rails S on our development machine 58 00:02:44,570 --> 00:02:47,280 to a Rails app on a VPS somewhere serving 59 00:02:47,280 --> 00:02:49,160 our application to the world? 60 00:02:49,160 --> 00:02:52,450 So, here we've got a beautiful picture that I've 61 00:02:52,460 --> 00:02:55,660 drawn, because I'm new to Keynote. And the black 62 00:02:55,660 --> 00:02:57,900 box around the outside is our VPS. It's a 63 00:02:57,920 --> 00:03:01,010 single VPS. And this is the first thing that 64 00:03:01,010 --> 00:03:03,920 seemed to surprise lots of people. For a simple 65 00:03:03,920 --> 00:03:07,510 production configuration, you only need one VPS. In the 66 00:03:07,520 --> 00:03:10,360 same way, in development, you can run your entire 67 00:03:10,360 --> 00:03:14,430 Rails application on your development machine. For simple production 68 00:03:14,430 --> 00:03:17,210 application, you can run everything on a single VPS. 69 00:03:17,220 --> 00:03:20,670 And that VPS will have three main components on 70 00:03:20,670 --> 00:03:23,339 it for almost all Rails applications. You're gonna have 71 00:03:23,340 --> 00:03:25,761 a web server, you're gonna have an app server, 72 00:03:25,761 --> 00:03:29,650 and you're gonna have a database server. So, when 73 00:03:29,660 --> 00:03:31,830 someone types in the address of our website, a 74 00:03:31,830 --> 00:03:35,199 request comes in. It hits our VPS, and the 75 00:03:35,200 --> 00:03:36,931 first place that request is gonna go is our 76 00:03:36,940 --> 00:03:40,319 web server. Now, if that request was for a 77 00:03:40,320 --> 00:03:42,781 static file, and by a static file, I basically 78 00:03:42,781 --> 00:03:45,510 mean, anything that goes in the Rails asset pipeline 79 00:03:45,510 --> 00:03:47,520 or anything that you might find in the public 80 00:03:47,520 --> 00:03:49,640 folder, the web server's gonna deal with that directly. 81 00:03:49,640 --> 00:03:51,880 It's gonna send that file straight back to the 82 00:03:51,880 --> 00:03:54,220 user for display in their browser and that's the 83 00:03:54,220 --> 00:03:55,390 end of it. 84 00:03:55,400 --> 00:03:58,760 If, however, that request is for a dynamic page, 85 00:03:58,760 --> 00:04:02,970 so for a page in our Rails app, essentially, 86 00:04:02,970 --> 00:04:05,830 that's gonna get passed back to an app server. 87 00:04:05,840 --> 00:04:09,209 Now, when we run Rails S in development, what 88 00:04:09,209 --> 00:04:12,840 we're starting is an instance of an app server. 89 00:04:12,840 --> 00:04:15,491 So, the app server here is Rails S running 90 00:04:15,491 --> 00:04:17,630 on our VPS. So the web server passes the 91 00:04:17,630 --> 00:04:21,079 request back. The app server generates the response and 92 00:04:21,079 --> 00:04:24,041 then passes it back to the web server, which 93 00:04:24,041 --> 00:04:26,220 then returns it to the user. 94 00:04:26,220 --> 00:04:28,329 And in development, we're probably used to the web, 95 00:04:28,329 --> 00:04:31,271 the app server being something like Thin or WebRick. 96 00:04:31,280 --> 00:04:33,109 In production it might also be Thin or Webrick. 97 00:04:33,109 --> 00:04:35,051 It might also be something a bit more advanced 98 00:04:35,060 --> 00:04:37,470 like Puma or Unicorn. 99 00:04:37,470 --> 00:04:40,880 Finally, for pretty much all Rails applications, we're gonna 100 00:04:40,880 --> 00:04:43,370 want some sort of database server. And that's probably 101 00:04:43,380 --> 00:04:47,230 gonna be PostGres or mySQL or Mongo. And, again, 102 00:04:47,230 --> 00:04:49,960 we don't need a separate database server. This all 103 00:04:49,980 --> 00:04:52,370 runs on our single VPS. 104 00:04:52,380 --> 00:04:55,440 So, to recap, a request comes in and it 105 00:04:55,440 --> 00:04:58,350 hits our web server. Probably EngineX or Apache. If 106 00:04:58,350 --> 00:05:00,520 it's for a static file, the web server deals 107 00:05:00,520 --> 00:05:02,680 with it. If it's for part of our Rails 108 00:05:02,680 --> 00:05:05,110 application, it gets passed back to the app server, 109 00:05:05,110 --> 00:05:07,640 which is basically Rails S, and the app server 110 00:05:07,640 --> 00:05:10,420 may communicate with the database server, read some data, 111 00:05:10,420 --> 00:05:13,110 write some data, and then the app server constructs 112 00:05:13,110 --> 00:05:14,810 the response, sends it back to the web server, 113 00:05:14,820 --> 00:05:16,420 which serves it to the user. 114 00:05:16,420 --> 00:05:19,600 So, you'd be forgiven for looking at that and 115 00:05:19,600 --> 00:05:22,890 thinking, well, that already looks more complicated than Heroku. 116 00:05:22,890 --> 00:05:24,880 Why on earth would you ever do that? Why 117 00:05:24,880 --> 00:05:26,359 not just use Heroku? 118 00:05:26,360 --> 00:05:28,351 Well, I started doing this, if I'm honest, because 119 00:05:28,360 --> 00:05:30,610 of cost. I had quite a lot of side 120 00:05:30,620 --> 00:05:35,770 projects, and as you probably already know, most past 121 00:05:35,780 --> 00:05:38,050 solutions charge by the process. And a lot of 122 00:05:38,050 --> 00:05:41,890 my personal projects and side projects had background jobs. 123 00:05:41,890 --> 00:05:45,190 Now when you've got five or six side projects, 124 00:05:45,190 --> 00:05:47,609 all of which would need two Heroku dynos, suddenly 125 00:05:47,620 --> 00:05:48,930 that bill at the end of the month starts 126 00:05:48,930 --> 00:05:52,481 to get quite substantial. 127 00:05:52,481 --> 00:05:53,960 And so I wanted to save money by deploying 128 00:05:53,960 --> 00:05:57,210 to my own servers. And I did. It's worth 129 00:05:57,240 --> 00:05:59,510 bearing in mind, if that's also your motivation, that, 130 00:05:59,510 --> 00:06:03,590 as with any new skill, you have to invert. 131 00:06:03,590 --> 00:06:05,200 Invert? You have to put in a certain amount 132 00:06:05,220 --> 00:06:07,850 of time to learn it. If you were to 133 00:06:07,850 --> 00:06:09,510 account for the time I put into learning this 134 00:06:09,510 --> 00:06:12,390 to begin with, at market rates, I'm fairly sure 135 00:06:12,390 --> 00:06:14,320 there would have been no saving at all. Personally, 136 00:06:14,340 --> 00:06:16,740 they're my own projects. I wasn't paying myself market 137 00:06:16,740 --> 00:06:19,080 rates. And I was happy to treat it as 138 00:06:19,080 --> 00:06:20,770 an investment which would pay off in the long 139 00:06:20,770 --> 00:06:23,190 term, and it has. 140 00:06:23,200 --> 00:06:26,800 Actually, it turned out, the biggest benefit of learning 141 00:06:26,800 --> 00:06:28,300 how to do this was nothing to do with 142 00:06:28,300 --> 00:06:31,640 money. It was the infrastructure went from being this 143 00:06:31,640 --> 00:06:33,770 kind of necessary evil that I have to have 144 00:06:33,770 --> 00:06:36,250 in order to run my Rails apps, to just 145 00:06:36,250 --> 00:06:38,640 another tool that I could use for building interesting 146 00:06:38,660 --> 00:06:42,020 stuff. And the best example of that, for me, 147 00:06:42,040 --> 00:06:44,830 is Make It With Code. We provide our students 148 00:06:44,830 --> 00:06:47,840 with a cloud IDE that has Ruby pre-installed. And 149 00:06:47,840 --> 00:06:50,060 that means they can hit the ground running. They 150 00:06:50,060 --> 00:06:53,200 can start writing Ruby code really quickly. 151 00:06:53,200 --> 00:06:54,700 And the techniques that we use setting those up 152 00:06:54,700 --> 00:06:57,480 automatically for all of our students are exactly the 153 00:06:57,480 --> 00:06:59,540 same techniques that I'm gonna cover in this presentation 154 00:06:59,540 --> 00:07:01,879 for setting up Rails apps. So it means that 155 00:07:01,880 --> 00:07:04,481 our infrastructure has gone from being this thing that 156 00:07:04,481 --> 00:07:05,999 we have to have in the background, as like 157 00:07:06,000 --> 00:07:09,201 a supporting thing, to something that actually adds value 158 00:07:09,201 --> 00:07:11,439 to our product in itself. It's a part of 159 00:07:11,440 --> 00:07:13,171 our product. 160 00:07:13,180 --> 00:07:14,830 So if you decide to give this a go, 161 00:07:14,830 --> 00:07:16,920 I really, really urge you not to do it 162 00:07:16,920 --> 00:07:19,580 even slightly like I did it originally. Because it 163 00:07:19,580 --> 00:07:21,450 was terrible. I started off by getting a VPS. 164 00:07:21,450 --> 00:07:23,560 That bit was good. That bit worked. I Googled, 165 00:07:23,580 --> 00:07:26,740 how do I set up a Rails VPS. I 166 00:07:26,740 --> 00:07:28,810 found all these great tutorials that said, type in 167 00:07:28,810 --> 00:07:31,189 this command, then that command, then edit this config 168 00:07:31,200 --> 00:07:33,241 file. And I found loads of things on StackOverflow 169 00:07:33,241 --> 00:07:34,759 that said, here's what to do when that goes 170 00:07:34,760 --> 00:07:37,211 wrong and that goes wrong. And eventually I had 171 00:07:37,211 --> 00:07:38,439 this working server. And it was great. 172 00:07:38,440 --> 00:07:40,671 And it broke a few times in the first 173 00:07:40,680 --> 00:07:43,419 few weeks. But we fixed that when it happened. 174 00:07:43,420 --> 00:07:47,700 And, by and large, it worked for quite awhile. 175 00:07:47,700 --> 00:07:49,920 And it worked until it didn't work, and when 176 00:07:49,920 --> 00:07:51,931 it didn't work, I was in France, on a 177 00:07:51,931 --> 00:07:53,710 holiday with my family, and it was a fairly 178 00:07:53,720 --> 00:07:56,610 rural bit of France, and we had, we had 179 00:07:56,610 --> 00:07:58,409 a wifi connection. But it was only one wifi 180 00:07:58,409 --> 00:08:02,701 connection for, basically, the village. And to access that, 181 00:08:02,720 --> 00:08:04,699 we, we could access it by sitting half in 182 00:08:04,700 --> 00:08:08,181 a wardrobe on the top floor of the house, 183 00:08:08,181 --> 00:08:09,979 which was nice. 184 00:08:09,980 --> 00:08:12,461 And, so one morning I woke up and I 185 00:08:12,461 --> 00:08:14,979 was sitting in the wardrobe with a coffee and 186 00:08:14,980 --> 00:08:17,230 checking my email, and I had a wonderful, a 187 00:08:17,230 --> 00:08:19,220 lovely email from my host to say, Dear Valued 188 00:08:19,220 --> 00:08:20,931 Customer, your server is dead, you need to make 189 00:08:20,940 --> 00:08:23,580 a new one, Lots of love, from your hosts. 190 00:08:23,580 --> 00:08:25,940 And I thought, good. Right. So I set up 191 00:08:25,940 --> 00:08:28,250 a little desk in this wardrobe and for the 192 00:08:28,250 --> 00:08:30,180 rest of the day, my family sat by a 193 00:08:30,180 --> 00:08:35,490 river. They drank wine, ate cheese, mocked me slightly, 194 00:08:35,490 --> 00:08:37,590 and I sat in a roof, in a wardrobe, 195 00:08:37,600 --> 00:08:40,009 in a heat wave, and pretty much followed the 196 00:08:40,009 --> 00:08:42,601 same tutorials I employed the first time. Made the 197 00:08:42,601 --> 00:08:45,140 same mistakes that I'd made the first time, and 198 00:08:45,160 --> 00:08:47,110 I got the server back up, but it really 199 00:08:47,110 --> 00:08:49,740 wasn't any easier the second time. And that seemed 200 00:08:49,740 --> 00:08:52,130 kind of wrong to me. That it seemed really 201 00:08:52,130 --> 00:08:52,430 frustrating. 202 00:08:52,430 --> 00:08:53,710 So I figured there must be a better way 203 00:08:53,740 --> 00:08:56,290 of doing this. If I'm honest, actually what I 204 00:08:56,290 --> 00:08:58,320 thought was, I can't believe there isn't already a 205 00:08:58,320 --> 00:09:00,540 better way of doing this, I should invent it 206 00:09:00,540 --> 00:09:01,970 and then I'll be rich and famous and everyone 207 00:09:01,980 --> 00:09:05,670 will love me. Luckily I took a step back 208 00:09:05,670 --> 00:09:07,510 and thought, OK, this probably already exists. 209 00:09:07,520 --> 00:09:11,180 And, of course, it did. And what I wanted 210 00:09:11,180 --> 00:09:15,080 was a configuration management tool. And a configuration management 211 00:09:15,080 --> 00:09:17,360 tool is really simple. It allows you to define 212 00:09:17,360 --> 00:09:19,330 and automate the commands that it takes to set 213 00:09:19,330 --> 00:09:22,300 up the server to do a particular thing. And 214 00:09:22,300 --> 00:09:25,079 what's amazing about a configuration management tool is once 215 00:09:25,080 --> 00:09:27,281 you've done it once, doing it again and again 216 00:09:27,281 --> 00:09:29,980 and again is completely trivial. 217 00:09:29,980 --> 00:09:33,530 So, that time you put in to start with, 218 00:09:33,530 --> 00:09:34,870 it will probably only be one command to set 219 00:09:34,920 --> 00:09:37,639 up an identical server the next time. And to 220 00:09:37,640 --> 00:09:38,890 give you an idea of just how simple it 221 00:09:38,890 --> 00:09:40,940 can be, I've got a brief demonstration of the 222 00:09:40,960 --> 00:09:43,101 process that I actually move, at the moment, on 223 00:09:43,101 --> 00:09:45,390 a pretty much weekly basis for setting up new 224 00:09:45,390 --> 00:09:45,960 servers. 225 00:09:45,960 --> 00:09:49,120 At the end of this presentation, I'll link to 226 00:09:49,120 --> 00:09:51,060 tutorials of how to do this yourself and the 227 00:09:51,060 --> 00:09:53,490 sample code. So please don't worry about following it 228 00:09:53,500 --> 00:09:54,730 step by step, I just want to give an 229 00:09:54,730 --> 00:09:57,220 idea about how simple it can be. 230 00:09:57,220 --> 00:10:02,210 So, here you can see, on the left, your 231 00:10:02,220 --> 00:10:04,300 left, there is a list of servers that I've 232 00:10:04,300 --> 00:10:07,779 deployed in the past. And I'm using my configuration 233 00:10:07,780 --> 00:10:11,161 management tool of choice, Chef Solo, which uses JSON 234 00:10:11,161 --> 00:10:14,910 files for defining what should go onto a particular 235 00:10:14,910 --> 00:10:15,500 type of server. 236 00:10:15,500 --> 00:10:17,100 And on the bottom you can see I've got 237 00:10:17,100 --> 00:10:18,470 a couple of web servers for Make It With 238 00:10:18,470 --> 00:10:20,650 Code, which at the moment is running a selection 239 00:10:20,650 --> 00:10:23,429 of Rails and Sinatra apps. And I want to 240 00:10:23,440 --> 00:10:25,781 write a new one. And to do this, I 241 00:10:25,781 --> 00:10:28,390 just create a new JSON file, web3 dot makeitwithcode 242 00:10:28,390 --> 00:10:31,510 dot com. I save it, and then this server, 243 00:10:31,520 --> 00:10:33,400 it's gonna be pretty much the same as web2. 244 00:10:33,400 --> 00:10:35,069 It's just running Rails apps. 245 00:10:35,080 --> 00:10:36,311 So I just copy all the JSON from my 246 00:10:36,320 --> 00:10:39,720 previous server, but it into the new one, and 247 00:10:39,720 --> 00:10:40,899 the bit I want to draw your attention to 248 00:10:40,900 --> 00:10:43,351 is, if you look at the bottom of that, 249 00:10:43,351 --> 00:10:44,699 you've got this run list with a list of 250 00:10:44,700 --> 00:10:47,311 things that are being called roles. And pretty much 251 00:10:47,320 --> 00:10:50,820 all configuration management systems have some sort of analogous 252 00:10:50,820 --> 00:10:55,940 concept to this, which, kind of individual components that 253 00:10:55,940 --> 00:10:58,260 you can mix and match to define what should 254 00:10:58,260 --> 00:11:00,490 go onto this server that you're setting up. 255 00:11:00,490 --> 00:11:02,980 So I've defined in the past, what goes on 256 00:11:02,980 --> 00:11:04,850 an internet server. What goes on a PostGres server. 257 00:11:04,850 --> 00:11:06,700 And now if I want that, I can just 258 00:11:06,720 --> 00:11:08,320 drop that role in, and I know that it 259 00:11:08,320 --> 00:11:09,769 will be set up in exactly the way that 260 00:11:09,769 --> 00:11:12,491 I want it. So on this server I want 261 00:11:12,500 --> 00:11:14,450 Redis. I didn't on the previous one. So I 262 00:11:14,450 --> 00:11:17,930 can just uncomment it. Uncomment it, yeah. And I'll 263 00:11:17,940 --> 00:11:20,870 get exactly the Redis configuration I want. 264 00:11:20,870 --> 00:11:22,780 The good bit, the fun bit, is once I've 265 00:11:22,780 --> 00:11:25,310 done this, I can type on command - knife 266 00:11:25,310 --> 00:11:27,069 solo bootstrap - and then the address of the, 267 00:11:27,069 --> 00:11:31,051 the VPS I've created. Presenter. And then leave it 268 00:11:31,060 --> 00:11:33,640 for about twenty minutes, go and get a coffee, 269 00:11:33,660 --> 00:11:36,420 and the output that will scroll through, it will 270 00:11:36,420 --> 00:11:39,269 tell me what commands it's applying. It will show 271 00:11:39,269 --> 00:11:42,010 me diffs of any configuration files that it's changing. 272 00:11:42,020 --> 00:11:43,611 And if it goes wrong, which it doesn't very 273 00:11:43,611 --> 00:11:45,400 often, it will tell me exactly what it was 274 00:11:45,400 --> 00:11:47,000 doing when it went wrong, so I can fix 275 00:11:47,000 --> 00:11:47,509 it. 276 00:11:47,509 --> 00:11:49,771 And at the end of this process, I will 277 00:11:49,780 --> 00:11:52,710 have a Rails server which is identical the last 278 00:11:52,710 --> 00:11:54,590 one I set up, and the one before that, 279 00:11:54,600 --> 00:11:56,360 and I can check that this works. I can 280 00:11:56,360 --> 00:11:58,639 fire up a web browser. I can go to 281 00:11:58,640 --> 00:12:00,760 web3 and the address that I gave it, and 282 00:12:00,760 --> 00:12:03,421 I'll get this wonderful Welcome to EngineX page, which 283 00:12:03,421 --> 00:12:05,910 says, that server is set up and it's ready 284 00:12:05,910 --> 00:12:06,759 to use. 285 00:12:06,780 --> 00:12:10,261 So, what I'm trying to demonstrate with that figure 286 00:12:10,261 --> 00:12:14,790 is that configuration management is basically, don't repeat yourself 287 00:12:14,790 --> 00:12:17,050 for setting up servers. If you think back to 288 00:12:17,060 --> 00:12:20,050 the first time you used, say, Devise, for example, 289 00:12:20,050 --> 00:12:21,590 the first time I used Devise, it took me 290 00:12:21,590 --> 00:12:24,210 ages to get all_auth and things like that working. 291 00:12:24,210 --> 00:12:26,619 And then, six months later, I came back to 292 00:12:26,640 --> 00:12:28,441 it, and didn't really remember any of the stuff 293 00:12:28,441 --> 00:12:31,069 that I'd done to get it to work. But 294 00:12:31,080 --> 00:12:32,330 I could go back to the code I wrote 295 00:12:32,330 --> 00:12:34,381 the first time, I could look at that code, 296 00:12:34,381 --> 00:12:37,220 copy bits of it, and it was much quicker. 297 00:12:37,220 --> 00:12:41,470 Now, the problem with just copying commands or entering 298 00:12:41,470 --> 00:12:44,140 commands manually when setting up the server is there 299 00:12:44,160 --> 00:12:46,769 is no natural audit trail of what did I 300 00:12:46,769 --> 00:12:49,091 do to make this work the first time. So 301 00:12:49,100 --> 00:12:50,810 there's a good chance, the second time you're gonna 302 00:12:50,810 --> 00:12:52,630 do it, you'll make the same mistakes as the 303 00:12:52,640 --> 00:12:53,680 first time. 304 00:12:53,680 --> 00:12:56,680 With a configuration management utility, you naturally create this 305 00:12:56,680 --> 00:12:59,959 audit trail as you go along. So that, in 306 00:12:59,960 --> 00:13:02,301 time, that time you invest up front, it goes 307 00:13:02,301 --> 00:13:05,250 much, much further in the long run. 308 00:13:05,250 --> 00:13:08,920 So, hopefully that's shown that the bit where people 309 00:13:08,920 --> 00:13:11,400 often trip up, getting a server setup, it doesn't 310 00:13:11,400 --> 00:13:12,889 need to be that difficult, and I'll give you 311 00:13:12,889 --> 00:13:14,801 the exact sample code at the end, which you 312 00:13:14,820 --> 00:13:17,240 can use if you want a head start. 313 00:13:17,240 --> 00:13:20,180 But something like Heroku, it doesn't just make setting 314 00:13:20,180 --> 00:13:23,290 up a server really easy. It makes deploying to 315 00:13:23,290 --> 00:13:25,590 one incredibly easy. Git push heroku. It pretty much 316 00:13:25,600 --> 00:13:28,290 couldn't be easier. And I think it's fair to 317 00:13:28,290 --> 00:13:29,889 say that the first time I used Heroku, it 318 00:13:29,889 --> 00:13:31,760 was completely revolutionary. 319 00:13:31,780 --> 00:13:34,411 So I came to Rails from Python/Jengo, and before 320 00:13:34,411 --> 00:13:37,380 that, PHP, and I'd used a whole range of, 321 00:13:37,380 --> 00:13:40,819 kind of, home grown deployment systems, which ranged from 322 00:13:40,820 --> 00:13:42,861 trying to remember what files you've changed and FTP 323 00:13:42,861 --> 00:13:47,230 them across to all sync things and custom shell 324 00:13:47,230 --> 00:13:49,160 scripts. And the one thing they all had in 325 00:13:49,180 --> 00:13:52,320 common was they were flaky and deployment was something 326 00:13:52,320 --> 00:13:54,339 you didn't want to do, because it would probably 327 00:13:54,340 --> 00:13:56,701 break. So you maybe deployed a couple of times 328 00:13:56,701 --> 00:13:57,709 a week. 329 00:13:57,709 --> 00:13:59,361 So I used Heroku for the first time and 330 00:13:59,361 --> 00:14:02,370 it was amazing. Suddenly I could apploy. Apploy? Deploy 331 00:14:02,370 --> 00:14:05,619 ten times a day. And it was just fitted 332 00:14:05,620 --> 00:14:06,711 into my normal workflow. 333 00:14:06,720 --> 00:14:09,060 So I was really keen that if I was 334 00:14:09,060 --> 00:14:11,060 deploying to my own servers, it had to be 335 00:14:11,060 --> 00:14:12,600 as simple as that. It had to be one 336 00:14:12,600 --> 00:14:15,660 command to deploy. And luckily, as is often the 337 00:14:15,660 --> 00:14:18,040 case in the Rails community, loads of very clever 338 00:14:18,040 --> 00:14:20,360 people wanted exactly the same thing, and so have 339 00:14:20,360 --> 00:14:23,220 developed some awesome tools, some awesome gems, to make 340 00:14:23,220 --> 00:14:25,720 it really simple to set that up. 341 00:14:25,720 --> 00:14:27,569 In the Rails community, I think the best known 342 00:14:27,580 --> 00:14:30,411 of these is probably Capistrano, which I'll talk about 343 00:14:30,411 --> 00:14:34,680 a bit more towards the end of the presentation. 344 00:14:34,680 --> 00:14:37,210 But, first, another brief demo of how simple it 345 00:14:37,220 --> 00:14:40,200 is to add Capistrano into an existing, in this 346 00:14:40,200 --> 00:14:43,769 case, Rails 4.1 application. Again, at the end, I'll 347 00:14:43,769 --> 00:14:46,880 give details of step by, a step by step 348 00:14:46,880 --> 00:14:49,351 tutorial and the ensemble code for doing this. So 349 00:14:49,360 --> 00:14:51,190 please don't worry about the individual steps. I just 350 00:14:51,190 --> 00:14:55,030 want to give an idea of what's involved. 351 00:14:55,040 --> 00:15:00,970 So, to get started, Rails 4.1 application. I just 352 00:15:00,970 --> 00:15:04,780 drop in the Capistrano gem and a few supporting 353 00:15:04,780 --> 00:15:08,019 helper gems. Save that, and then add it to 354 00:15:08,020 --> 00:15:11,520 git and, sorry, bundle and add it to Git. 355 00:15:11,520 --> 00:15:13,941 Under the hood we're still using Git to deploy 356 00:15:13,941 --> 00:15:15,900 in the same way Heroku does, so it's important 357 00:15:15,900 --> 00:15:18,259 to make sure changes like that are committed. 358 00:15:18,260 --> 00:15:20,411 And then running cap install, which just generates some 359 00:15:20,420 --> 00:15:23,339 basic configuration files. The first one of these is 360 00:15:23,340 --> 00:15:25,661 a cap file. This is just a rake file 361 00:15:25,661 --> 00:15:28,540 for capistrano. And here, I'm just telling it that 362 00:15:28,540 --> 00:15:30,720 I want to use those helper gems that I 363 00:15:30,720 --> 00:15:32,490 included in the first step. So I'm telling it 364 00:15:32,490 --> 00:15:34,319 that I want to use rbenv to manage what 365 00:15:34,320 --> 00:15:36,461 Ruby version I'm using. I want it to install 366 00:15:36,461 --> 00:15:39,600 gems for me, compile assets for me, and apply 367 00:15:39,600 --> 00:15:42,079 migrations. All the normal stuff you do when setting 368 00:15:42,080 --> 00:15:43,140 up a Rails app. 369 00:15:43,140 --> 00:15:45,940 We've then got our main config file, just deploy 370 00:15:45,940 --> 00:15:48,471 dot rb. And here I'm just giving the app 371 00:15:48,480 --> 00:15:50,580 a name, telling it which Git repository to deploy 372 00:15:50,580 --> 00:15:53,190 from, and getting rid of the load of the 373 00:15:53,190 --> 00:15:56,831 boilerplate for the simple application. I'm not gonna use 374 00:15:56,840 --> 00:15:58,920 it. Uncommenting out a few other bits of boilerplate. 375 00:15:58,920 --> 00:16:02,480 And then finally I'm gonna add an rbenv specific 376 00:16:02,480 --> 00:16:05,290 block that tells it to always use a particular 377 00:16:05,290 --> 00:16:08,100 Ruby version. I think, in this case, 2 point 378 00:16:08,100 --> 00:16:10,360 1 point 1, when deploying this app. 379 00:16:10,360 --> 00:16:13,270 Finally, we have stage configuration files, so if you 380 00:16:13,270 --> 00:16:15,679 have a production server and a staging server, and 381 00:16:15,700 --> 00:16:17,931 here I'm just telling it that the production server 382 00:16:17,940 --> 00:16:20,630 is going to be web3 dot makeitwithcode dot com, 383 00:16:20,630 --> 00:16:21,710 which is the server we set up in the 384 00:16:21,720 --> 00:16:24,279 first demo. And then that should be made available 385 00:16:24,280 --> 00:16:28,371 to the public at, imaginatively, web3 dot makeitwithcode dot 386 00:16:28,371 --> 00:16:28,970 com. 387 00:16:28,970 --> 00:16:32,990 Then, firing up a console, running a command called 388 00:16:32,990 --> 00:16:35,640 setup config, and you can think of this like 389 00:16:35,660 --> 00:16:38,379 heroku create. This is just telling that server, or 390 00:16:38,380 --> 00:16:41,330 preparing that server for a new application. It's generating 391 00:16:41,330 --> 00:16:44,190 a few config files, it's creating a new database 392 00:16:44,190 --> 00:16:48,211 yml and telling EngineX that it needs to serve 393 00:16:48,220 --> 00:16:50,920 a new site. Then running another helper task that 394 00:16:50,940 --> 00:16:55,639 I added this time. Create database. This is just, 395 00:16:55,640 --> 00:16:57,770 create a new database on that server. Making sure 396 00:16:57,770 --> 00:17:00,130 there's a user that has permission to access that 397 00:17:00,130 --> 00:17:00,570 server. 398 00:17:00,570 --> 00:17:03,651 And this is the important command. Cap production deploy. 399 00:17:03,660 --> 00:17:06,970 And this, if we're using capistrano, is our equivalent 400 00:17:06,980 --> 00:17:10,449 to git push heroku. And if you look at 401 00:17:10,449 --> 00:17:12,780 the output, it's doing some pretty standard stuff. It's 402 00:17:12,780 --> 00:17:16,910 applying migrations, compiling assets and restarting the app server. 403 00:17:16,920 --> 00:17:18,871 And once that completes, we can fire up the 404 00:17:18,880 --> 00:17:21,089 web browser, visit it, and you can see we've 405 00:17:21,089 --> 00:17:23,420 got a simple, if utterly useless Rails application. 406 00:17:23,420 --> 00:17:26,020 And it has access to the database, it can 407 00:17:26,020 --> 00:17:27,980 read and write, and now we can iterate on 408 00:17:27,980 --> 00:17:30,420 that, and every time we want to make a 409 00:17:30,420 --> 00:17:34,410 change, we can just make that change, commit it, 410 00:17:34,410 --> 00:17:37,811 cap production deploy, and it really is as simple 411 00:17:37,820 --> 00:17:40,710 as deploying it to heroku. 412 00:17:40,720 --> 00:17:43,080 So one thing that we haven't looked at yet 413 00:17:43,080 --> 00:17:46,389 is, it's very easy to set this stuff up, 414 00:17:46,389 --> 00:17:48,191 but the other great thing about using a path 415 00:17:48,200 --> 00:17:50,720 like heroku is that when it breaks at 2 416 00:17:50,720 --> 00:17:53,239 AM, it kind of isn't our problem. They have 417 00:17:53,240 --> 00:17:55,260 engineers and they get woken up at 2 AM. 418 00:17:55,260 --> 00:17:57,821 And they go and fix it. And our application 419 00:17:57,821 --> 00:17:59,759 just comes back up online again. 420 00:17:59,760 --> 00:18:04,050 And we can't get around that completely. It's now 421 00:18:04,050 --> 00:18:06,380 our problem when it breaks at 2 AM. But 422 00:18:06,380 --> 00:18:09,610 luckily there are lots of tools out there which 423 00:18:09,620 --> 00:18:11,510 mean we can minimize the number of times this 424 00:18:11,510 --> 00:18:15,201 will happen. If you think in a typical production 425 00:18:15,201 --> 00:18:19,999 Rails application, you probably got some exception handling. You 426 00:18:20,000 --> 00:18:22,100 know some exceptions will happen from time to time, 427 00:18:22,100 --> 00:18:23,691 and so you've got to have your begin and 428 00:18:23,700 --> 00:18:26,359 rescues in that. And then hopefully you've also got 429 00:18:26,360 --> 00:18:29,351 some sort of exception notification. And that means that 430 00:18:29,351 --> 00:18:32,219 when an exception that you haven't planned for happens, 431 00:18:32,220 --> 00:18:34,050 you get an email and you know that you 432 00:18:34,050 --> 00:18:35,441 can go in, you should go in and fix 433 00:18:35,441 --> 00:18:36,080 it. 434 00:18:36,080 --> 00:18:38,959 So, there are an analogous set of tools when 435 00:18:38,980 --> 00:18:41,601 you're setting up your own servers. And these are 436 00:18:41,601 --> 00:18:45,009 called monitoring tools, and they're really, really simple. They're 437 00:18:45,009 --> 00:18:47,431 essentially just a list of checks that say, here's 438 00:18:47,440 --> 00:18:50,029 how something ought to behave. If it's not behaving, 439 00:18:50,029 --> 00:18:52,441 here's a command that you can run to try 440 00:18:52,441 --> 00:18:55,879 and fix it. If it's still not working, here's 441 00:18:55,880 --> 00:18:57,660 the person to notify and how to notify them 442 00:18:57,660 --> 00:18:58,890 there's a problem. 443 00:18:58,890 --> 00:19:02,051 And that might sound a little bit daunting. So 444 00:19:02,060 --> 00:19:03,499 every time you set up an application you're gonna 445 00:19:03,500 --> 00:19:05,990 have to think about all these checks. In practice, 446 00:19:06,000 --> 00:19:08,640 this is where configuration management comes in. So, if 447 00:19:08,640 --> 00:19:10,941 you remember in that first demonstration, when I uncommented 448 00:19:10,941 --> 00:19:14,330 that Redis role, as part of that Redis role, 449 00:19:14,330 --> 00:19:16,639 when I originally wrote it, probably a year or 450 00:19:16,640 --> 00:19:19,380 a couple of years ago, I included the monitoring 451 00:19:19,380 --> 00:19:22,980 configuration for it, which basically says, is Redis working? 452 00:19:22,980 --> 00:19:25,331 If no, restart it. If it's still not working, 453 00:19:25,340 --> 00:19:25,840 email me. 454 00:19:25,840 --> 00:19:28,950 And now that will get automatically setup every time 455 00:19:28,950 --> 00:19:31,210 I include that Redis role. So there really isn't 456 00:19:31,210 --> 00:19:33,889 that much duplication. Configuration management just does all of 457 00:19:33,900 --> 00:19:35,931 this for us. 458 00:19:35,940 --> 00:19:38,919 So to get a bit more practical, if you 459 00:19:38,920 --> 00:19:41,831 decide to, to go ahead and try this. This 460 00:19:41,831 --> 00:19:44,060 is the stack that I end up using, probably 461 00:19:44,060 --> 00:19:48,729 99% of the time. For a web server, EngineX, 462 00:19:48,729 --> 00:19:50,571 really popular in the Rails community. There's lots of 463 00:19:50,580 --> 00:19:54,060 really great Rails-specific documentation out there. 464 00:19:54,060 --> 00:19:56,550 For an app server, Unicorn. This probably isn't what 465 00:19:56,560 --> 00:19:58,359 you're using in development at the moment. That's more 466 00:19:58,380 --> 00:20:01,191 likely to be Thin or Webrick. Unicorn's a little 467 00:20:01,191 --> 00:20:04,259 bit more complicated. But, for that little bit of 468 00:20:04,260 --> 00:20:07,760 extra complexity, you get some really nice features. In 469 00:20:07,760 --> 00:20:09,900 particular, it's very easy to set up what's called 470 00:20:09,900 --> 00:20:13,650 zero-downtime deployment, which you may already be familiar with. 471 00:20:13,650 --> 00:20:16,860 Essentially what this means is, the simplest way to 472 00:20:16,880 --> 00:20:21,120 deploy an application is to deploy your new code, 473 00:20:21,120 --> 00:20:23,560 stop the existing application, and then start it again 474 00:20:23,560 --> 00:20:25,260 with the new code. The problem is, if you've 475 00:20:25,260 --> 00:20:27,060 got a big Rails application, it can take two 476 00:20:27,060 --> 00:20:29,211 or three minutes to start up. And that means 477 00:20:29,211 --> 00:20:30,680 that, for two or three minutes, every time you 478 00:20:30,680 --> 00:20:33,969 deploy, your app's offline, which is pretty bad for 479 00:20:33,980 --> 00:20:36,750 your customers if you're doing this five, six times 480 00:20:36,750 --> 00:20:37,571 a day. 481 00:20:37,580 --> 00:20:39,309 With Unicorn, you can set it up so that 482 00:20:39,309 --> 00:20:42,260 when you deploy new code, it will start up 483 00:20:42,260 --> 00:20:44,090 your app in the background, and only once it's 484 00:20:44,090 --> 00:20:46,410 ready will it switch it over and stop the 485 00:20:46,410 --> 00:20:51,041 previous version, so your customers don't notice an interruption. 486 00:20:51,060 --> 00:20:53,599 For a database, I typ, by default go with 487 00:20:53,600 --> 00:20:56,420 PostGres. Again, you've probably all heard of it. Very 488 00:20:56,420 --> 00:20:59,260 popular in the Rails community. I recommend it to 489 00:20:59,260 --> 00:21:01,420 people, because if you're on the Heroku free plan, 490 00:21:01,420 --> 00:21:05,500 it's probably what you're using already, because it's their 491 00:21:05,500 --> 00:21:06,590 default database. 492 00:21:06,600 --> 00:21:09,010 The only controversial item on this list, because all 493 00:21:09,010 --> 00:21:11,081 lists should have at least one controversial item, is 494 00:21:11,081 --> 00:21:14,239 probably Monit. And it's a bit controversial because there 495 00:21:14,240 --> 00:21:16,321 are some amazing monitoring tools out there which are 496 00:21:16,321 --> 00:21:20,710 written using Ruby syntax for defining rules. I keep 497 00:21:20,710 --> 00:21:24,560 coming back to Monit because it's tiny. Its syntax 498 00:21:24,580 --> 00:21:25,980 isn't quite as nice to work with as some 499 00:21:26,000 --> 00:21:27,721 of the others, some of the others, but it 500 00:21:27,721 --> 00:21:30,450 uses absolutely no memory, and once you set it 501 00:21:30,450 --> 00:21:32,169 up, it just stays out of the way and 502 00:21:32,169 --> 00:21:35,500 works, which is pretty much what I look for 503 00:21:35,520 --> 00:21:37,290 in a monitoring tool. 504 00:21:37,290 --> 00:21:39,211 For setting up your server, so your server provisioning 505 00:21:39,220 --> 00:21:43,259 tool, I recommend getting started with Chef Solo. Chef 506 00:21:43,260 --> 00:21:44,721 Solo is the tool you saw me using in 507 00:21:44,721 --> 00:21:49,989 the first demonstration. And it's designed for deploying individual 508 00:21:49,989 --> 00:21:53,211 servers from your development machine. What's really nice about 509 00:21:53,220 --> 00:21:56,499 Chef Solo is it's built on top of a 510 00:21:56,500 --> 00:21:58,941 much bigger piece of software called Chef Server. And 511 00:21:58,941 --> 00:22:00,509 Chef Server is designed for when you need to 512 00:22:00,509 --> 00:22:03,831 deploy lots of servers in complicated configurations. 513 00:22:03,840 --> 00:22:06,190 So, if you need, eventually, to move on from 514 00:22:06,190 --> 00:22:10,619 your simple single-box configuration to much more complicated ones, 515 00:22:10,620 --> 00:22:13,811 almost everything you've learnt using Chef Solo will be 516 00:22:13,820 --> 00:22:15,399 applicable to Chef Server. 517 00:22:15,400 --> 00:22:21,020 I mentioned, previously, there were lots of deployment tools, 518 00:22:21,020 --> 00:22:24,221 automation tools out there for Rails. Probably the best-known 519 00:22:24,221 --> 00:22:28,239 one is Capistrano. At the moment, there are two 520 00:22:28,240 --> 00:22:31,331 stable versions of Capistrano out in the wild. There 521 00:22:31,331 --> 00:22:36,129 is Capistrano 2 and Capistrano 3. Most of the 522 00:22:36,140 --> 00:22:39,760 documentation and tutorials that you find will probably be 523 00:22:39,760 --> 00:22:43,201 for Capistrano 2. 524 00:22:43,201 --> 00:22:45,950 Despite that, I recommend starting off with Capistrano 3, 525 00:22:45,950 --> 00:22:48,359 if you are starting from a blank slate. The 526 00:22:48,360 --> 00:22:50,961 reason for this is that version 3 was a 527 00:22:50,961 --> 00:22:55,080 complete ground-up rewrite of version 2. In particular, it's 528 00:22:55,080 --> 00:22:58,700 just a rake application. So Capistrano 3 is just 529 00:22:58,700 --> 00:23:03,549 a, a layer on top of rake that provides 530 00:23:03,549 --> 00:23:07,020 deployment-specific functionality. And that means that any knowledge you've 531 00:23:07,040 --> 00:23:09,000 already got of how to write rake tasks and 532 00:23:09,000 --> 00:23:10,640 how to interact with rake tasks and how to 533 00:23:10,640 --> 00:23:13,920 debug them is directly applicable to Capistrano 3. And 534 00:23:13,920 --> 00:23:16,071 that just makes the learning curve that little bit 535 00:23:16,071 --> 00:23:19,129 shallower. 536 00:23:19,129 --> 00:23:21,311 So next steps, if you're gonna give it a 537 00:23:21,320 --> 00:23:23,830 go. I suggest you go and get a VPS. 538 00:23:23,830 --> 00:23:26,779 I suggest starting off with a one gig one. 539 00:23:26,800 --> 00:23:28,640 You can run a Rails app on a 512 540 00:23:28,640 --> 00:23:31,250 meg VPS. You can also spend a huge amount 541 00:23:31,250 --> 00:23:33,340 of time troubleshooting out of memory hours, which I 542 00:23:33,340 --> 00:23:36,711 think is the least enjoyable thing possible. You can 543 00:23:36,720 --> 00:23:39,289 get a one gig VPS for about ten dollars 544 00:23:39,289 --> 00:23:42,970 a month at DigitalOcean, I think. They're also a 545 00:23:42,970 --> 00:23:45,760 sponsor, and they're really generous with free credit. So 546 00:23:45,780 --> 00:23:47,370 if you corner them in a booth, I imagine 547 00:23:47,370 --> 00:23:48,800 you can get at least a few months of 548 00:23:48,800 --> 00:23:50,331 experimentation for free. 549 00:23:50,340 --> 00:23:54,009 So, the url at the top there, talkingquickly dot 550 00:23:54,009 --> 00:23:58,850 co dot uk slash deploying_rails. That's a page specific 551 00:23:58,850 --> 00:24:02,250 to this presentation, and it contains links to two 552 00:24:02,250 --> 00:24:06,110 key tutorials. The first one goes through step-by-step how 553 00:24:06,110 --> 00:24:08,430 to set up a Rails server in the way 554 00:24:08,460 --> 00:24:10,650 I did in the first video, and the second 555 00:24:10,660 --> 00:24:13,430 one is how to set up Capistrano with a 556 00:24:13,430 --> 00:24:16,170 new or existing Rails application, as per the second 557 00:24:16,180 --> 00:24:17,591 video. 558 00:24:17,591 --> 00:24:20,619 They also include the complete sample code that I'm 559 00:24:20,620 --> 00:24:23,270 actually using in production, pretty much every day, for 560 00:24:23,280 --> 00:24:27,571 deploying new Rails apps. So, hopefully, the fairly large 561 00:24:27,571 --> 00:24:29,119 amount of time I put in originally trying to 562 00:24:29,120 --> 00:24:31,290 work out how to get a working configuration management 563 00:24:31,290 --> 00:24:33,030 set up, you can take that as a starting 564 00:24:33,030 --> 00:24:35,880 point and get it started very quickly. It should 565 00:24:35,900 --> 00:24:37,821 take maybe an hour and a half to get 566 00:24:37,821 --> 00:24:40,169 your first server set up and an app deployed 567 00:24:40,180 --> 00:24:41,010 to it. 568 00:24:41,010 --> 00:24:43,470 I mentioned at start, I've also written a book 569 00:24:43,480 --> 00:24:46,081 about this. Reliably Deploying Rails Applications. 570 00:24:46,081 --> 00:24:46,960 This was basically 571 00:24:46,960 --> 00:24:48,879 the reference that I wish I'd had when I 572 00:24:48,880 --> 00:24:51,961 started doing this. It uses exactly the same sample 573 00:24:51,961 --> 00:24:56,269 code as those tutorials. So if you start off 574 00:24:56,269 --> 00:24:58,441 using those and find you want to do more 575 00:24:58,441 --> 00:24:59,789 complicated things, 576 00:24:59,800 --> 00:25:01,010 hopefully that will be a useful reference. 577 00:25:01,010 --> 00:25:03,740 And there's a discount code, et cetera, for RailsConf 578 00:25:03,740 --> 00:25:06,811 attendees on that link. 579 00:25:06,820 --> 00:25:10,619 Finally, I'll be in the AirPad Pit at 4:30 580 00:25:10,620 --> 00:25:12,150 today. So if anyone wants to give this a 581 00:25:12,150 --> 00:25:14,821 go for real and wants a hand setting stuff 582 00:25:14,821 --> 00:25:17,219 up, I'd be very happy to help out. Yeah. 583 00:25:17,220 --> 00:25:19,720 Thank you so much for coming to the talk. 584 00:25:19,720 --> 00:25:22,920 I've really enjoyed doing this. Let's have some questions.