1 00:00:06,573 --> 00:00:08,276 - Now let's run through a demo of launching 2 00:00:08,276 --> 00:00:11,844 a Windows instance on Amazon EC2. 3 00:00:11,844 --> 00:00:15,100 You can see we're logged in to the AWS console. 4 00:00:15,100 --> 00:00:17,767 Again, we're in the Ohio region. 5 00:00:18,765 --> 00:00:21,221 We can see that we have one running instance, 6 00:00:21,221 --> 00:00:24,131 our Linux instance that we launched already. 7 00:00:24,131 --> 00:00:25,531 And from here we're going to go ahead 8 00:00:25,531 --> 00:00:27,414 and launch a Windows instance. 9 00:00:27,414 --> 00:00:30,860 Again, EC2 instances start with the AMI. 10 00:00:30,860 --> 00:00:32,422 So I'm going to click over here. 11 00:00:32,422 --> 00:00:33,851 And I've already done some research, 12 00:00:33,851 --> 00:00:35,506 just to save a little bit of time, 13 00:00:35,506 --> 00:00:38,577 and found the Windows AMI that I want 14 00:00:38,577 --> 00:00:40,111 which is this one here. 15 00:00:40,111 --> 00:00:44,051 So if you know the ID, you can just paste it there 16 00:00:44,051 --> 00:00:45,966 and this one is going to be Windows server 17 00:00:45,966 --> 00:00:47,883 2012.R2 English 64 bit. 18 00:00:49,585 --> 00:00:51,835 So I'm going to click that. 19 00:00:52,722 --> 00:00:54,144 I'm going to pull this up. 20 00:00:54,144 --> 00:00:56,951 You can see some more details around that at the bottom. 21 00:00:56,951 --> 00:01:00,284 So I'm going to go ahead a click launch. 22 00:01:01,799 --> 00:01:04,508 The T2 micro, again, is free tier eligible 23 00:01:04,508 --> 00:01:07,846 so in the cases where you're just wanting to experiment 24 00:01:07,846 --> 00:01:09,327 or check things out, 25 00:01:09,327 --> 00:01:12,295 be sure that you make use of that free tier. 26 00:01:12,295 --> 00:01:13,612 So I'm going to go ahead a click next 27 00:01:13,612 --> 00:01:16,560 and configure the instance details. 28 00:01:16,560 --> 00:01:19,314 Again, in this particular case we only need one 29 00:01:19,314 --> 00:01:22,984 but we could launch more if we really wanted to. 30 00:01:22,984 --> 00:01:27,151 I'm going to make sure that I'm in the appropriate VPC 10.2. 31 00:01:28,752 --> 00:01:31,776 I'm also going to choose a public subnet. 32 00:01:31,776 --> 00:01:33,363 Either one of these would suffice. 33 00:01:33,363 --> 00:01:36,696 I'm going to go ahead a choose public B. 34 00:01:37,683 --> 00:01:40,529 I'm going to ensure that I'm getting 35 00:01:40,529 --> 00:01:42,779 an auto assigned public IP. 36 00:01:45,376 --> 00:01:48,974 I'm going to make sure that I have the IM roll attached 37 00:01:48,974 --> 00:01:53,141 so that later I can make use of that if I need to. 38 00:01:54,293 --> 00:01:55,640 I'm going to scroll down here 39 00:01:55,640 --> 00:01:59,818 just to remind you that such things as user data 40 00:01:59,818 --> 00:02:01,964 and other things are found here 41 00:02:01,964 --> 00:02:04,606 from when you go to work with that. 42 00:02:04,606 --> 00:02:06,713 I'm going to take a look at storage. 43 00:02:06,713 --> 00:02:09,142 You can see here that Windows needs a bit more space 44 00:02:09,142 --> 00:02:13,565 than Linux so these machines default to a 30 gig volume. 45 00:02:13,565 --> 00:02:17,299 In this case it's defaulting to general purpose SSD. 46 00:02:17,299 --> 00:02:21,233 So our root volume will be based on an elastic block store, 47 00:02:21,233 --> 00:02:23,531 which is separate from the machine and we'll talk more 48 00:02:23,531 --> 00:02:26,518 about the details of that service later on. 49 00:02:26,518 --> 00:02:29,177 You can also see that this particular volume 50 00:02:29,177 --> 00:02:32,399 has the flag to leave on termination enabled 51 00:02:32,399 --> 00:02:34,606 so that when we terminate this instance 52 00:02:34,606 --> 00:02:37,530 this particular volume will also be terminated. 53 00:02:37,530 --> 00:02:38,383 But that's optional. 54 00:02:38,383 --> 00:02:39,405 You can uncheck that 55 00:02:39,405 --> 00:02:42,016 if you want the root volume to stick around 56 00:02:42,016 --> 00:02:44,868 after the instance is terminated. 57 00:02:44,868 --> 00:02:47,043 We're going to tag this instance, 58 00:02:47,043 --> 00:02:51,210 again, I'm going to call this one the Windows Server. 59 00:02:54,844 --> 00:02:57,487 Perhaps give it an environment tag. 60 00:02:57,487 --> 00:03:00,079 Again, be sure to leverage tagging. 61 00:03:00,079 --> 00:03:03,026 Really great way to organize your infrastructure. 62 00:03:03,026 --> 00:03:04,602 There's also a way, 63 00:03:04,602 --> 00:03:07,830 if you leverage what's called detailed billing, 64 00:03:07,830 --> 00:03:11,997 detailed billing can send logs every six hours or so, 65 00:03:13,280 --> 00:03:15,990 it can send logs to an S3 bucket 66 00:03:15,990 --> 00:03:19,957 and your billing can be broken down by tags. 67 00:03:19,957 --> 00:03:22,480 So if you're leveraging tags consistently 68 00:03:22,480 --> 00:03:25,113 you can see exactly what you're paying for 69 00:03:25,113 --> 00:03:26,541 across different environments, 70 00:03:26,541 --> 00:03:28,342 across different business units, 71 00:03:28,342 --> 00:03:31,209 across different applications and so on. 72 00:03:31,209 --> 00:03:33,933 And so I'm going to call this one Dev. 73 00:03:33,933 --> 00:03:35,375 You can see that this comes up 74 00:03:35,375 --> 00:03:37,952 because I've used that before. 75 00:03:37,952 --> 00:03:40,199 Let's configure the security group. 76 00:03:40,199 --> 00:03:44,233 I'm going to select an existing group, the web server. 77 00:03:44,233 --> 00:03:47,460 So in case I wanted to run IIS here 78 00:03:47,460 --> 00:03:51,129 or something else that's running on port 80 or 443 79 00:03:51,129 --> 00:03:52,712 and I also want to, 80 00:03:53,579 --> 00:03:55,806 in this case I've already gone and made a change 81 00:03:55,806 --> 00:03:58,078 to the SSH security group 82 00:03:58,078 --> 00:04:00,995 that also allows port 3389 for RDP. 83 00:04:03,607 --> 00:04:06,440 So I'm going to review and launch. 84 00:04:07,744 --> 00:04:10,221 Make sure that we're running a T2 micro, 85 00:04:10,221 --> 00:04:13,309 we have the right security groups, 86 00:04:13,309 --> 00:04:15,642 yes RDP is open on that one. 87 00:04:17,268 --> 00:04:19,716 We have the right size volume, 88 00:04:19,716 --> 00:04:22,716 and we have the right tags in place. 89 00:04:23,816 --> 00:04:25,302 I'm going to go ahead and launch that. 90 00:04:25,302 --> 00:04:28,835 Here, since we've already created a key pair, 91 00:04:28,835 --> 00:04:30,846 now remember key pairs are necessary 92 00:04:30,846 --> 00:04:34,113 in order to be able to actually authenticate 93 00:04:34,113 --> 00:04:37,613 into the operating system of your machine. 94 00:04:39,186 --> 00:04:42,695 So I'm going to acknowledge yes, I have this key. 95 00:04:42,695 --> 00:04:46,272 And I'm going to launch that instance. 96 00:04:46,272 --> 00:04:48,939 So from here I can click this ID 97 00:04:49,833 --> 00:04:54,000 and see that my Windows server is in a pending state. 98 00:04:55,886 --> 00:04:58,055 And it will be there for however long 99 00:04:58,055 --> 00:04:59,545 it takes that machine to boot. 100 00:04:59,545 --> 00:05:02,744 Linux instances typically boot much faster. 101 00:05:02,744 --> 00:05:07,582 But the Windows server here is going to take a few minutes. 102 00:05:07,582 --> 00:05:11,162 Okay, so now you can see that our machine has changed 103 00:05:11,162 --> 00:05:12,694 into a running state. 104 00:05:12,694 --> 00:05:16,861 So one thing to note is that so long as your machine 105 00:05:17,866 --> 00:05:20,698 is in a state ending in ing 106 00:05:20,698 --> 00:05:24,548 such as running, pending, terminating, stopping, 107 00:05:24,548 --> 00:05:26,638 any of those types of states, 108 00:05:26,638 --> 00:05:30,474 you will be paying the hourly cost of that machine 109 00:05:30,474 --> 00:05:33,321 if you're using the on demand billing model 110 00:05:33,321 --> 00:05:35,067 or the spot billing model. 111 00:05:35,067 --> 00:05:38,358 As soon as the machine goes into a stopped state 112 00:05:38,358 --> 00:05:42,680 or a terminated state, that's when you stop paying. 113 00:05:42,680 --> 00:05:46,180 So from here, again I'm going to take this 114 00:05:47,776 --> 00:05:52,004 public IP address, I'm going to copy that, 115 00:05:52,004 --> 00:05:56,087 I'm going to switch over into the remote desktop. 116 00:05:57,369 --> 00:06:00,869 I'm going to create a new connection here. 117 00:06:10,592 --> 00:06:13,259 The name would be administrator. 118 00:06:14,801 --> 00:06:16,926 Now the password, 119 00:06:16,926 --> 00:06:21,680 the password we need to get here from the AWS console. 120 00:06:21,680 --> 00:06:24,847 I'm going to say get Windows password. 121 00:06:26,994 --> 00:06:28,295 And now you'll see here, 122 00:06:28,295 --> 00:06:30,880 in order to get that administrator password, 123 00:06:30,880 --> 00:06:35,047 it was encrypted using the public half of our key pair. 124 00:06:36,247 --> 00:06:39,257 You can see the public half of the live lessons key. 125 00:06:39,257 --> 00:06:41,649 Amazon does not keep the private half. 126 00:06:41,649 --> 00:06:44,059 So in order to decrypt this password, 127 00:06:44,059 --> 00:06:48,020 we need to paste the private half in there. 128 00:06:48,020 --> 00:06:49,260 So here, 129 00:06:49,260 --> 00:06:51,283 what I'm going to do, 130 00:06:51,283 --> 00:06:52,533 is I'm going to 131 00:06:57,024 --> 00:07:01,191 echo that out in a way that will let me copy that. 132 00:07:04,398 --> 00:07:07,231 I'm going to pipe that to PB copy. 133 00:07:08,269 --> 00:07:11,568 So now it's copied to my paste board 134 00:07:11,568 --> 00:07:15,211 and now from here I can paste that private key 135 00:07:15,211 --> 00:07:19,378 into that window and now I can decrypt the Windows password. 136 00:07:21,481 --> 00:07:24,550 And so you can see here, again, here's my public IP. 137 00:07:24,550 --> 00:07:27,721 Username is administrator and my password, 138 00:07:27,721 --> 00:07:31,138 I'm going to copy that, paste that there. 139 00:07:40,269 --> 00:07:44,519 And then, I'm going to double click on that. 140 00:07:44,519 --> 00:07:46,966 It says the certificate can not be verified. 141 00:07:46,966 --> 00:07:48,746 That's okay, I understand that. 142 00:07:48,746 --> 00:07:52,118 I'm going to just say continue. 143 00:07:52,118 --> 00:07:56,343 And sometimes it takes a minute for that to come up. 144 00:07:56,343 --> 00:07:58,461 And there we go, now we have an RDP session 145 00:07:58,461 --> 00:08:01,711 into our Windows server running on EC2. 146 00:08:06,739 --> 00:08:07,607 And there we are. 147 00:08:07,607 --> 00:08:11,331 Now we're at the desktop of our Windows Server 2012.R2. 148 00:08:11,331 --> 00:08:13,502 From here we can go about our business, 149 00:08:13,502 --> 00:08:16,511 do what we need to do to get this machine configured. 150 00:08:16,511 --> 00:08:19,032 If we want to install any applications, 151 00:08:19,032 --> 00:08:20,445 if we want to add users, 152 00:08:20,445 --> 00:08:22,681 configure this particular system, 153 00:08:22,681 --> 00:08:24,641 however it's meant to be run. 154 00:08:24,641 --> 00:08:26,927 And from there we would want to be sure 155 00:08:26,927 --> 00:08:30,378 to create an Amazon machine image from it 156 00:08:30,378 --> 00:08:32,634 so that we could clone this if we needed to. 157 00:08:32,634 --> 00:08:35,559 In the case of systems that are meant to be distributed, 158 00:08:35,559 --> 00:08:37,891 it would be important that we create a machine image 159 00:08:37,891 --> 00:08:41,662 that would allow these systems to scale very quickly. 160 00:08:41,662 --> 00:08:44,538 Again, it's important to think of these systems 161 00:08:44,538 --> 00:08:46,077 as being automated. 162 00:08:46,077 --> 00:08:48,550 We don't want to have to log in 163 00:08:48,550 --> 00:08:50,891 and do things manually every time. 164 00:08:50,891 --> 00:08:52,779 We want them to be automated. 165 00:08:52,779 --> 00:08:56,056 So from here, again, I can go to the start menu 166 00:08:56,056 --> 00:08:58,473 and do whatever I need to do. 167 00:09:00,467 --> 00:09:03,750 From here, I'm just going to go ahead and log out 168 00:09:03,750 --> 00:09:05,969 and that will be our demo 169 00:09:05,969 --> 00:09:09,802 of launching a Windows instance on Amazon EC2.