1 00:00:00,025 --> 00:00:04,843 [SOUND] In previous workshops we manually deployed 2 00:00:04,843 --> 00:00:09,093 our Rails app to a production environment. 3 00:00:09,093 --> 00:00:13,098 We cloned Git repo with our Rails app to a server, created the database, 4 00:00:13,098 --> 00:00:16,740 set up configuration for Nginx in Unicorn, and more. 5 00:00:16,740 --> 00:00:20,750 For every additional server we set up, we're going to need to repeat those steps. 6 00:00:20,750 --> 00:00:22,590 And every time we release a new app version, 7 00:00:22,590 --> 00:00:26,080 we'll need to pull changes from Git and restart our server. 8 00:00:26,080 --> 00:00:30,200 If we do all this manually, over time the potential for mistakes adds up. 9 00:00:30,200 --> 00:00:33,330 So, in this course, we're going to show you how to do all this automatically 10 00:00:33,330 --> 00:00:37,890 using the Rails community's most popular deployment framework, Capistrano. 11 00:00:37,890 --> 00:00:41,841 Capistrano can make your deployments fast, easy, and safe. 12 00:00:41,841 --> 00:00:45,662 This guide covers Capistrano 3 which was released in 2013. 13 00:00:45,662 --> 00:00:49,342 It has several incompatibilities with Capistrano 2 and earlier. 14 00:00:49,342 --> 00:00:53,228 So, when you're searching the web for troubleshooting tips you should double 15 00:00:53,228 --> 00:00:56,768 check any source written before 2013, as the info may be outdated. 16 00:00:56,768 --> 00:01:00,429 Also, be aware that Capistrano scripts often have to be highly customized for 17 00:01:00,429 --> 00:01:02,378 the environment they're deploying to. 18 00:01:02,378 --> 00:01:07,253 We're deploying to a completely fresh Ubuntu server using RPM, PostgreSQL, 19 00:01:07,253 --> 00:01:07,990 and Nginx. 20 00:01:09,250 --> 00:01:12,030 If you are set up different from this in any way, you're almost certainly 21 00:01:12,030 --> 00:01:15,420 going to have to make some changes to the Capistrano code shown here. 22 00:01:15,420 --> 00:01:18,020 Be sure to check the teacher's notes for troubleshooting help and 23 00:01:18,020 --> 00:01:21,520 try pasting any error messages you get into a search engine. 24 00:01:21,520 --> 00:01:24,130 Today, we'll be giving you an introduction to Capistrano. 25 00:01:24,130 --> 00:01:24,760 But in the end, 26 00:01:24,760 --> 00:01:28,600 you'll have a little bit of work to do in order to get it going with your setup. 27 00:01:28,600 --> 00:01:29,730 Okay, ready? 28 00:01:29,730 --> 00:01:31,210 Let's take Capistrano for a spin.