1
00:00:00,480 --> 00:00:05,940
So let's go to the point and in here I'm going to create our first application.

2
00:00:05,940 --> 00:00:07,220
You have to get a name salt.

3
00:00:07,230 --> 00:00:10,290
Call it could deploy demo.

4
00:00:10,290 --> 00:00:15,390
And we need to choose a compute platform as I said for now we'll go easy to an on premise but later

5
00:00:15,390 --> 00:00:22,290
on we'll deal with a lambda and easy s so let's choose these two on premise and create our first application.

6
00:00:22,290 --> 00:00:26,850
It says in order to create a new deployment you first must create a deployment group.

7
00:00:26,940 --> 00:00:33,080
So let's create our first deployment group a deployment group represents a set of easy two instances.

8
00:00:33,080 --> 00:00:42,590
So I'll call it my development instances and they will represent all the instances in E2 that are from

9
00:00:42,800 --> 00:00:45,130
the deploy at the development environments.

10
00:00:45,210 --> 00:00:49,400
I need to create a service role for could deploy that will allow it to.

11
00:00:49,400 --> 00:00:51,900
Targets are easy to instances.

12
00:00:51,900 --> 00:00:53,210
So for this let's go back to you.

13
00:00:53,210 --> 00:00:56,060
I am and will create a roll and scroll down.

14
00:00:56,070 --> 00:01:01,350
This is a role for code deployed and we'll choose code deployed the first one because we want to call

15
00:01:02,340 --> 00:01:06,990
it with services such as ODA scaling if we dealt with E yes or lambda we would create a different set

16
00:01:06,990 --> 00:01:07,780
of rules.

17
00:01:08,070 --> 00:01:09,210
Next for permissions.

18
00:01:09,210 --> 00:01:12,660
There's only one role we should attach which is a double U.S. Code to play a role.

19
00:01:12,660 --> 00:01:21,280
So we'll create it and then review and then I'll call it code deploy wrote create the role the role

20
00:01:21,280 --> 00:01:22,330
has been created.

21
00:01:22,360 --> 00:01:28,000
So if we go back you could deploy now I should be able to refresh this page and I'll rename my group

22
00:01:28,480 --> 00:01:34,770
my development instances and choose a service role we just created.

23
00:01:34,810 --> 00:01:35,920
Excellence.

24
00:01:35,920 --> 00:01:40,030
Now we need to choose a deployment type for that deployment group.

25
00:01:40,030 --> 00:01:43,130
So for now we'll deal with in place in place.

26
00:01:43,140 --> 00:01:49,660
It means that the taking the instances will be taken offline for the upgrade and then put back up online

27
00:01:49,990 --> 00:01:51,490
after they've been upgraded.

28
00:01:51,490 --> 00:01:55,440
Blue green is a different kind of deployments and they're very helpful.

29
00:01:55,450 --> 00:02:01,120
If you have an amazon issue to discussion group or Amazon issue two instances where the current application

30
00:02:01,120 --> 00:02:05,840
revision is deployed so for now which is due in place and we'll go back to these differences between

31
00:02:05,850 --> 00:02:10,120
in placing blue green to understand really how they work with code deployed because this is something

32
00:02:10,120 --> 00:02:11,730
that you should master.

33
00:02:11,860 --> 00:02:17,500
So let's scroll down for not we should select a combination of easy to orders giving groups you see

34
00:02:17,500 --> 00:02:21,190
two instances an on premise instances for this configuration.

35
00:02:21,190 --> 00:02:26,830
So I will just choose Amazon issued two instances and we will see easy to orders killing groups in great

36
00:02:26,830 --> 00:02:31,590
details in the very last section of this course when we deal with orders killing groups in general.

37
00:02:31,600 --> 00:02:38,040
So for now let's just select Amazon as two instances and we should match these instances based on tags.

38
00:02:38,050 --> 00:02:40,150
So we didn't you create tag groups.

39
00:02:40,150 --> 00:02:45,840
And so we need you to choose a tag for example environment and the value would be developments.

40
00:02:45,880 --> 00:02:52,010
And so as you can see here one unique matched instance has been matched based on these tags.

41
00:02:52,030 --> 00:02:57,130
This is because we just tagged our easy to instance in the previous lecture and added the environment

42
00:02:57,220 --> 00:02:59,320
and the name tag to it.

43
00:02:59,360 --> 00:03:06,310
Okay so we're targeting all the E2 instances to have the environment development excellence and then

44
00:03:06,460 --> 00:03:10,060
we scroll down and we do choose a deployment configuration.

45
00:03:10,180 --> 00:03:11,730
We'll see what that means in great detail as well.

46
00:03:11,740 --> 00:03:15,810
But for now let's just choose could deploy default all at once.

47
00:03:15,820 --> 00:03:18,440
Finally is there a load balancer for us.

48
00:03:18,550 --> 00:03:20,660
And right now there is no bouncer.

49
00:03:20,740 --> 00:03:25,000
So our web server should be accessible directly on port 80 and we've we haven't done that will edit

50
00:03:25,030 --> 00:03:30,310
the security group later on but so for now we'll disable load balancing to make things a little bit

51
00:03:30,310 --> 00:03:33,560
more simple and create the deployment group.

52
00:03:33,580 --> 00:03:34,600
This is just to get started.

53
00:03:34,600 --> 00:03:37,440
Don't worry we'll go in great depth in the fight.

54
00:03:37,930 --> 00:03:38,240
OK.

55
00:03:38,270 --> 00:03:43,130
So the deployment group has been created and it represents one easy to instance.

56
00:03:43,150 --> 00:03:47,240
So now what we should do is create a deployment for this group.

57
00:03:47,380 --> 00:03:52,810
So we'll create a deployment and we need to target the deployment group and then we need to choose a

58
00:03:52,810 --> 00:03:55,040
revision of our application.

59
00:03:55,090 --> 00:03:58,930
So this is where our application lives in and Amazon has three buckets.

60
00:03:58,930 --> 00:04:02,770
But currently we do not have an three buckets where we have our revision.

61
00:04:03,280 --> 00:04:07,240
So what we should do is deploy our revision to s three buckets.

62
00:04:07,330 --> 00:04:10,330
So let's go back to our code and this is the script.

63
00:04:10,630 --> 00:04:15,310
So first thing we have to do is to create buckets and will enable versioning for that buckets just to

64
00:04:15,310 --> 00:04:19,550
make sure we can have multiple versions of our application in our three buckets.

65
00:04:19,600 --> 00:04:25,090
So I'll just use the sea life for that I use it obvious as three and B four make buckets and I reference

66
00:04:25,090 --> 00:04:31,240
the bucket here called Ada based of course defined here the region is a US one and the profile to do

67
00:04:31,240 --> 00:04:36,520
it s is something that I did set my still eye with called it was dev ops so please adopt this command

68
00:04:37,000 --> 00:04:38,920
based on your environment and so on.

69
00:04:39,040 --> 00:04:44,660
So I will go ahead and run this command right here and this does not work.

70
00:04:44,950 --> 00:04:48,640
So I guess it's a great time to show you how to reconfigure my ideas Eli.

71
00:04:48,820 --> 00:04:52,570
So let's go back to them and go to users.

72
00:04:52,570 --> 00:04:58,750
I'll go to defend and I'll select security credentials and I'll make inactive these ones because I don't

73
00:04:58,750 --> 00:04:59,370
need them anymore.

74
00:04:59,380 --> 00:05:03,910
Apparently they don't work and I'll actually delete them and I'll create new access keys.

75
00:05:03,910 --> 00:05:08,530
So here's my access code and my secret access key I would say we'll deactivate them after the course

76
00:05:08,530 --> 00:05:09,200
is done.

77
00:05:09,460 --> 00:05:15,610
So I'll go into here and click on a W.S. configure minus minus profile.

78
00:05:15,680 --> 00:05:19,450
It obvious that UPS so he should enter an access code.

79
00:05:20,050 --> 00:05:21,520
Then a secret access key.

80
00:05:21,520 --> 00:05:30,010
So let's go ahead and enter this part of the key then I should select a default region name so EU w

81
00:05:30,010 --> 00:05:33,960
1 will be great and then default I would format Jason.

82
00:05:33,990 --> 00:05:34,860
Here we go.

83
00:05:34,860 --> 00:05:41,250
So now if I run again my errors as three make bucket comments this one should work and yes they worked.

84
00:05:41,280 --> 00:05:46,260
Excellent then will enable versioning for a bucket so we'll do it using the CLIA but you could do it

85
00:05:46,290 --> 00:05:51,110
using the console if you wanted to and now versioning has been enabled.

86
00:05:51,110 --> 00:05:54,960
So let's go back into our as three buckets.

87
00:05:54,990 --> 00:05:58,790
So this quarter is three and see if that bucket has been created.

88
00:05:58,790 --> 00:06:00,370
So yes that bucket has been created.

89
00:06:00,380 --> 00:06:02,490
It obvious dev ops course Stefan.

90
00:06:02,760 --> 00:06:06,710
And it seems like if you go to properties that versioning is enabled.

91
00:06:06,710 --> 00:06:07,020
All right.

92
00:06:07,040 --> 00:06:07,690
Step one.

93
00:06:07,700 --> 00:06:08,670
Done.

94
00:06:08,690 --> 00:06:10,030
Now let's keep on going.

95
00:06:10,130 --> 00:06:17,880
We need to deploy this entire folder right here into S3 and this folder contains this file called aspect

96
00:06:17,880 --> 00:06:18,300
of Yemen.

97
00:06:18,320 --> 00:06:23,000
And we'll spend a lot of time on a perspective in the future but for now this is something that's needed

98
00:06:23,030 --> 00:06:25,610
by code deployed to deploy our application.

99
00:06:25,640 --> 00:06:31,470
So what we'll do is that we'll meet you zip this entire file and put it into S3 but thankfully there

100
00:06:31,480 --> 00:06:36,320
is a little command called either us deploy push which does that for us.

101
00:06:36,320 --> 00:06:40,190
So we just need to change the application name to make sure that things work.

102
00:06:40,190 --> 00:06:43,190
So let's change the application name to what's relevant for me.

103
00:06:43,700 --> 00:06:51,100
So here my application name is could deploy a demo like this or change this right here it could deploy

104
00:06:51,120 --> 00:06:57,770
demo and I will run this comment and you have to run it from within the directory that contains this

105
00:06:57,860 --> 00:06:59,660
ASP expect that will file.

106
00:06:59,870 --> 00:07:01,040
So excellence.

107
00:07:01,070 --> 00:07:04,930
Let me just copy the command and run it.

108
00:07:05,040 --> 00:07:10,020
And so what this will do is that it will zip up all the files in here make sure that we do have an app

109
00:07:10,020 --> 00:07:13,880
spent their email file and then he will upload it to S3.

110
00:07:13,920 --> 00:07:20,160
So if we go to s three now and refresh the page for S3 we can see there is it could deploy them with

111
00:07:20,160 --> 00:07:25,150
directory that's been created and an app the zip file that has been created as well.

112
00:07:25,350 --> 00:07:26,340
So excellent.

113
00:07:26,340 --> 00:07:28,200
This app contains all we need to do.

114
00:07:28,890 --> 00:07:29,880
And so let's go back.

115
00:07:29,880 --> 00:07:36,240
You could deploy and I will refresh this page let's choose again.

116
00:07:36,240 --> 00:07:38,530
My development instances as my deployment group.

117
00:07:38,700 --> 00:07:43,240
And here I can click and find that there is a revision that has been detected by could deploy for me.

118
00:07:44,010 --> 00:07:44,400
Excellent.

119
00:07:44,400 --> 00:07:47,890
So I click here and has the entire revision location.

120
00:07:47,890 --> 00:07:49,410
It notice the zip file.

121
00:07:49,410 --> 00:07:51,230
And for now we're not overwriting anything.

122
00:07:51,240 --> 00:07:53,880
We'll just go ahead and create the deployments.

123
00:07:53,880 --> 00:07:55,890
So the deployment has been created.

124
00:07:55,890 --> 00:08:00,510
And this is the status and we should just see as it happens in the lifecycle events.

125
00:08:00,510 --> 00:08:05,730
So right now the download bundle is in progress and we can view all the events in here so I'll just

126
00:08:05,730 --> 00:08:07,710
wait a few seconds until everything happens.

127
00:08:08,890 --> 00:08:09,760
And everything worked.

128
00:08:09,750 --> 00:08:11,320
So it says succeeded.

129
00:08:11,320 --> 00:08:16,190
I can click on view events to see all the events that happened and we'll have a deep dive at those in

130
00:08:16,190 --> 00:08:16,620
the second.

131
00:08:16,630 --> 00:08:21,520
But applications stop download bundle before install install after install applications start and finally

132
00:08:21,520 --> 00:08:22,450
validate service.

133
00:08:22,570 --> 00:08:24,580
All of these have worked.

134
00:08:24,580 --> 00:08:31,850
And so if I go to my easy to instance and open up the ports 80 so I'll go to my security group and I

135
00:08:31,850 --> 00:08:37,990
will open up the port Eddy just to make sure that I can access my instance onto the HDP protocol.

136
00:08:37,990 --> 00:08:41,760
So I'll choose HP and I'll say from anywhere.

137
00:08:41,890 --> 00:08:42,160
Okay.

138
00:08:42,170 --> 00:08:43,020
Safe.

139
00:08:43,100 --> 00:08:48,520
Now if I got your message for instance and use the public DNS right here I should be saying yes.

140
00:08:48,520 --> 00:08:52,950
Congratulations v 5 and this application was deployed on this.

141
00:08:53,050 --> 00:08:56,050
This is my instance I.D. I'll show you how I got it later on.

142
00:08:56,140 --> 00:08:59,710
And then here is the easy the instance was deployed into.

143
00:08:59,860 --> 00:09:00,510
So perfect.

144
00:09:00,520 --> 00:09:05,110
We have a lot of information and could deploy it did deploy my application onto our easy to instance

145
00:09:05,470 --> 00:09:06,560
which is quite cool.

146
00:09:06,640 --> 00:09:10,870
Obviously there is a lot of things we haven't covered yet but this is our first deploy and this is quite

147
00:09:10,870 --> 00:09:11,890
nice to have.

148
00:09:11,890 --> 00:09:13,480
And I will see you in the next lecture.
