1
00:00:00,360 --> 00:00:04,740
In this video, we are going to deploying our SDK application.

2
00:00:05,400 --> 00:00:11,790
So as you remember that we have a lifecycle, we write our constructs, which is the case construct

3
00:00:11,790 --> 00:00:13,980
under the halo seed case stake.

4
00:00:14,250 --> 00:00:21,090
And now we will use the seed case here like with synthesizing to cloud formation template.

5
00:00:21,090 --> 00:00:28,980
And after that using the seed deploy command will be deployed or add resources to the target environment

6
00:00:29,190 --> 00:00:31,410
are using a cloud formation.

7
00:00:31,530 --> 00:00:34,890
So let's follow these steps into our application.

8
00:00:35,130 --> 00:00:36,630
Open the widget studio.

9
00:00:36,990 --> 00:00:42,030
Now we have one is one Q service into our Halo seed case.

10
00:00:43,110 --> 00:00:45,780
So let me open a new terminal.

11
00:00:46,660 --> 00:00:49,630
And I will start with the running cdcc scene command.

12
00:00:52,300 --> 00:00:53,110
He entered.

13
00:00:56,000 --> 00:01:00,900
So you know that CDK command will be generate or need.

14
00:01:02,720 --> 00:01:06,710
Our new template quote of the edible cloud formation.

15
00:01:06,710 --> 00:01:09,050
Yes, it is returning to response.

16
00:01:09,050 --> 00:01:19,010
And as you can see that under the resource section we have seen the Halo Q record and type is a ESC

17
00:01:19,010 --> 00:01:19,520
SKU.

18
00:01:19,550 --> 00:01:22,340
You can see properties are set in correctly.

19
00:01:22,430 --> 00:01:29,240
C Other properties comes from the default level two definition of the CDCC.

20
00:01:29,670 --> 00:01:30,170
Okay.

21
00:01:30,170 --> 00:01:30,830
Very good.

22
00:01:30,950 --> 00:01:38,060
It is going to create cloud formation template which resource existing or add with the properties of

23
00:01:38,060 --> 00:01:39,350
visible to time out.

24
00:01:40,010 --> 00:01:45,180
And there are lots of other properties you can see in here which we don't define.

25
00:01:45,230 --> 00:01:51,050
Those are comes from the default settings, from the level to construct definition by default that will

26
00:01:51,050 --> 00:01:52,370
apply the CDCC team.

27
00:01:52,490 --> 00:01:54,860
So CDK power comes from here.

28
00:01:54,890 --> 00:02:01,580
If you look at the code you have seen very summarised with it and it breakdowns with to all properties

29
00:02:01,580 --> 00:02:04,490
one extracting to cloud formation template.

30
00:02:04,490 --> 00:02:12,050
So if you look at our code, our code is only one line or line of code but one synthesizing this code,

31
00:02:12,080 --> 00:02:14,960
this becomes is lots of configuration.

32
00:02:15,110 --> 00:02:17,380
Even we don't specify it.

33
00:02:17,390 --> 00:02:22,790
It comes from the default settings and also it is mandatory maybe from the cloud formation template

34
00:02:22,790 --> 00:02:28,460
and you don't bother these all these details and configurations into our CDK application.

35
00:02:28,460 --> 00:02:36,530
So this is one of the powerful features of the CDK and we saw basically the CD case in command executes

36
00:02:36,530 --> 00:02:42,680
your application, which causes the resource defined in it to be translated to the a cloud formation

37
00:02:42,680 --> 00:02:43,310
template.

38
00:02:43,310 --> 00:02:48,410
So we have translate to our CDK application to the cloud formation template.

39
00:02:48,440 --> 00:02:53,960
The template also saved into CDK out folder that you can see in here.

40
00:02:54,560 --> 00:02:59,750
Under this folder you can see extracted JSON format template.

41
00:02:59,770 --> 00:03:08,870
Please click this JSON format and see that we have a resource section, we have a Cdcc Q section and

42
00:03:08,870 --> 00:03:13,730
we are going to create A the Q and properties is here.

43
00:03:13,760 --> 00:03:16,520
There's lots of additional properties and so on.

44
00:03:16,670 --> 00:03:20,870
This is the template file that we are going to deploy with cloud formation.

45
00:03:21,290 --> 00:03:22,730
Okay, very good.

46
00:03:22,970 --> 00:03:26,270
We understand how CDK synthesized work.

47
00:03:26,300 --> 00:03:33,080
Also, we can run Cdcc div command in order to see differences with the actual stack and our code base.

48
00:03:33,230 --> 00:03:39,440
This is compared with our cloud infrastructure and existing code.

49
00:03:39,440 --> 00:03:42,800
So let me run cdk it to enter.

50
00:03:47,280 --> 00:03:53,520
Since we are attempting the first deployment deploy command, we see lots of changes, but it's enough

51
00:03:53,520 --> 00:03:55,140
to see resource section.

52
00:03:55,140 --> 00:04:01,500
If you come to resource differences, you can see that we are going to add one extra SKU which is the

53
00:04:01,500 --> 00:04:04,710
Halo seed queue and it is generated with this name.

54
00:04:07,130 --> 00:04:07,780
Okay.

55
00:04:07,790 --> 00:04:08,540
Very good.

56
00:04:10,870 --> 00:04:15,010
It is optional to synthesize and command before deploying.

57
00:04:15,400 --> 00:04:17,010
You don't need to run.

58
00:04:17,020 --> 00:04:24,220
I'm running this in order to see and show to you the CDK synthesizes your stack before each deployment.

59
00:04:24,550 --> 00:04:31,630
If your code has security implications, you will see the summary of these and need to confirm them

60
00:04:31,630 --> 00:04:33,280
before deployment process.

61
00:04:33,280 --> 00:04:40,120
So it is good practice is to run the cdcc synthesize and dev command to see some security or any problems.

62
00:04:40,780 --> 00:04:47,660
So now we are going to deploying our stakes in order to deploy the stack using the cloud formation.

63
00:04:47,680 --> 00:04:53,860
We are running the Cdcc deploy command, so I'm going to run Cdcc deploy command.

64
00:04:54,070 --> 00:04:57,100
Write the Cdcc deploy and hit enter.

65
00:04:58,190 --> 00:05:02,030
It is going to deploy our infrastructure to the cloud.

66
00:05:03,760 --> 00:05:08,980
So it takes sometimes and we will see the progress with the logs.

67
00:05:09,680 --> 00:05:16,010
So as you can see that it is deploying to Helo CDK sticks, which is indicating under the lib folder

68
00:05:16,010 --> 00:05:27,460
in our class and we basically create a new stake into the cloud formation and deploy the A list Esquire's

69
00:05:27,500 --> 00:05:31,100
Q into this stack with using the cloud formation.

70
00:05:34,850 --> 00:05:37,610
It take some time and we will wait for a while.

71
00:05:37,910 --> 00:05:41,870
Cdcc deploys displays the progress information.

72
00:05:42,050 --> 00:05:49,880
Your deployment is very good for very good to see the progress of the how we can create cloud formation.

73
00:05:49,880 --> 00:05:56,410
As you can see that first of all, it's creating a new stick, which is the halo, stick, halo, stick,

74
00:05:56,420 --> 00:05:56,690
stick.

75
00:05:56,690 --> 00:05:59,690
And after that it is going to create Amazon.

76
00:06:00,100 --> 00:06:02,300
Q Which name is Halo CD?

77
00:06:02,370 --> 00:06:06,290
Q and continue to their operations?

78
00:06:06,500 --> 00:06:13,350
This is the store to create in-progress and create complete for the metadata and it will be create it

79
00:06:13,370 --> 00:06:21,170
for the CDK and the Q you can see the currently in progress CDK stick and CDK Q.

80
00:06:22,960 --> 00:06:24,130
So this is the looks.

81
00:06:24,130 --> 00:06:29,260
This is going to create Amazon skew into our halo seed case tech.

82
00:06:29,590 --> 00:06:34,510
And at the end of these looks, we will see the erosion of our cloud formation.

83
00:06:35,020 --> 00:06:36,760
Cloud formations, tech definition.

84
00:06:37,180 --> 00:06:42,130
We will see and check the management console.

85
00:06:42,670 --> 00:06:44,320
Okay, it is finished.

86
00:06:44,320 --> 00:06:51,940
As you can see, that Halo seed case tech deployed successfully and you can see the stack Aaron in here.

87
00:06:52,320 --> 00:06:59,170
This is going to create this stack, which name is Halo CDK stacked and create a squeeze into this stack.

88
00:06:59,170 --> 00:07:01,360
So let's go and verify this.

89
00:07:03,570 --> 00:07:05,460
I'm going to open.

90
00:07:06,730 --> 00:07:10,450
A console if you come to the cloud formation.

91
00:07:14,500 --> 00:07:18,700
You can go to the cloud formation on the main console and see that.

92
00:07:19,760 --> 00:07:24,410
It is now neve neve stake in here, which is the halo seed stake.

93
00:07:24,500 --> 00:07:30,850
This is directly representing our Visual Studio project, which is the seed application.

94
00:07:30,890 --> 00:07:36,500
You you will also find the Halo Seed K Q into this tech.

95
00:07:36,530 --> 00:07:40,880
Let me click this stake and come to resources.

96
00:07:41,150 --> 00:07:44,020
You will see that we have Halo Seed K.

97
00:07:44,030 --> 00:07:49,040
Q and this number CDK is defined for our application.
