1 00:00:00,770 --> 00:00:03,780 - [Alana] So, you're now ready for the next exercise. 2 00:00:03,780 --> 00:00:05,460 This is where we put all the pieces 3 00:00:05,460 --> 00:00:07,520 of what we learned together. 4 00:00:07,520 --> 00:00:09,350 If you took the first class in the series, 5 00:00:09,350 --> 00:00:11,390 you'll already be familiar with CodeCommit, 6 00:00:11,390 --> 00:00:14,860 CodeBuild, and CodePipeline, and in this course, 7 00:00:14,860 --> 00:00:18,640 you spent time learning about CodeDeploy and CloudFormation. 8 00:00:18,640 --> 00:00:21,400 So, if we're using all of these services, 9 00:00:21,400 --> 00:00:24,550 what could this lab possibly be about? 10 00:00:24,550 --> 00:00:26,340 Well, you might have already guessed it. 11 00:00:26,340 --> 00:00:27,860 You'll be automating the creation 12 00:00:27,860 --> 00:00:30,570 of an entire CI/CD pipeline. 13 00:00:30,570 --> 00:00:32,070 Here's how this will work. 14 00:00:32,070 --> 00:00:33,800 I'll provide you the template that I showed 15 00:00:33,800 --> 00:00:36,580 in the Automation of a Pipeline video. 16 00:00:36,580 --> 00:00:38,680 You'll upload this template to CloudFormation, 17 00:00:38,680 --> 00:00:41,320 and it will provision every piece of your pipeline, 18 00:00:41,320 --> 00:00:44,870 including CodeCommit, CodeBuild, and CodeDeploy. 19 00:00:44,870 --> 00:00:48,050 It will also kickstart your pipeline initially. 20 00:00:48,050 --> 00:00:50,470 Take a look at the template and try to understand 21 00:00:50,470 --> 00:00:52,750 each resource that gets created. 22 00:00:52,750 --> 00:00:55,050 You can also see some of the CloudFormation features 23 00:00:55,050 --> 00:00:58,263 that Raf mentioned earlier, such as the Parameters section. 24 00:01:00,840 --> 00:01:03,870 For example, one of the parameters is an AMI ID 25 00:01:03,870 --> 00:01:05,493 for the EC2 instance. 26 00:01:06,670 --> 00:01:09,361 Instead of you specifying an Amazon Machine Image, 27 00:01:09,361 --> 00:01:13,677 or AMI ID, the template grabs the latest AMI ID 28 00:01:13,677 --> 00:01:16,630 from AWS Systems Manager Parameter Store, 29 00:01:16,630 --> 00:01:19,883 so you don't have to worry about choosing the wrong AMI. 30 00:01:21,080 --> 00:01:22,640 After you provision the template, 31 00:01:22,640 --> 00:01:25,430 you'll look at the pipeline that CodePipeline created 32 00:01:25,430 --> 00:01:27,780 and check the output of the pipeline, 33 00:01:27,780 --> 00:01:30,640 which is the application on your EC2 instance, 34 00:01:30,640 --> 00:01:33,800 in this case, a website that shows a blog. 35 00:01:33,800 --> 00:01:37,190 The other output of the pipeline is your acceptance test. 36 00:01:37,190 --> 00:01:39,080 We've populated the CodeCommit repository 37 00:01:39,080 --> 00:01:41,690 with a buildspec that shows the acceptance tests 38 00:01:41,690 --> 00:01:44,090 we'll be performing on this application. 39 00:01:44,090 --> 00:01:46,233 I'll display that same file on screen. 40 00:01:47,230 --> 00:01:50,570 As you can see, we're getting the IP address of the server, 41 00:01:50,570 --> 00:01:53,200 using cURL to get data from that IP address, 42 00:01:53,200 --> 00:01:57,030 and the result we should get is the index.html page, 43 00:01:57,030 --> 00:01:59,470 when we go to look at the output of this test. 44 00:01:59,470 --> 00:02:02,520 That'll tell us that the website is reachable. 45 00:02:02,520 --> 00:02:05,700 From there, you'll make a change to the index.html file 46 00:02:05,700 --> 00:02:07,840 in the repository, which will kick off 47 00:02:07,840 --> 00:02:09,910 the pipeline once again. 48 00:02:09,910 --> 00:02:12,550 You'll then check the results of that pipeline by verifying 49 00:02:12,550 --> 00:02:14,903 the code on your instance was changed. 50 00:02:15,790 --> 00:02:17,810 Once again, feel free to post in the forums 51 00:02:17,810 --> 00:02:20,270 if you run into any issues. 52 00:02:20,270 --> 00:02:22,863 All right, let's get started with Exercise 3.