1
00:00:04,130 --> 00:00:10,280
The next step in the process would be to use the IWC ally to deploy this new version that we have just

2
00:00:10,280 --> 00:00:16,129
uploaded and unfortunately, this is not as easy as copying a file from one side to the other.

3
00:00:16,280 --> 00:00:23,300
I need to explain a few things in order to deploy to IWC Elastic Bienstock, we need to do two things.

4
00:00:23,630 --> 00:00:26,890
First of all, we need to create a new application version.

5
00:00:27,080 --> 00:00:30,290
And second of all, we need to update the environment.

6
00:00:30,630 --> 00:00:33,710
Let me quickly remind you what these terms mean.

7
00:00:34,810 --> 00:00:42,400
One application is called API, and we have created an environment called production later we'll have

8
00:00:42,400 --> 00:00:43,680
other environments as well.

9
00:00:44,230 --> 00:00:48,430
Now for this environment production, we have a running version.

10
00:00:48,430 --> 00:00:50,470
You will see this is a sample application.

11
00:00:50,470 --> 00:00:54,520
One doesn't really matter just to keep in mind that there are different versions.

12
00:00:54,820 --> 00:01:02,050
This is why we need to make these two steps to create an application version and then to update the

13
00:01:02,050 --> 00:01:06,220
environment with the application version that we have just created.

14
00:01:08,250 --> 00:01:12,280
Going back to our pipeline configuration, there are a few things that we can improve.

15
00:01:12,690 --> 00:01:20,030
Now, you have noticed that we have used the artifact name here and again here and here.

16
00:01:20,430 --> 00:01:26,910
So every time we start duplicating things in our configuration, it's always a good idea to think about

17
00:01:26,910 --> 00:01:28,080
using a variable.

18
00:01:28,350 --> 00:01:30,340
This is exactly what we're going to do next.

19
00:01:31,110 --> 00:01:32,340
I'm going to copy this name.

20
00:01:34,010 --> 00:01:36,440
And before stages, I'm going to define variables.

21
00:01:37,580 --> 00:01:42,970
And the first variable, I'll call it artifact name, because this will be the name of our artifact.

22
00:01:47,170 --> 00:01:53,410
And everywhere where the artifact cars appeared, that car was present, I'm going to replace it with

23
00:01:53,410 --> 00:01:54,130
this variable.

24
00:02:03,510 --> 00:02:09,900
Because previously I have mentioned versions, it would really make sense to give this artifact name

25
00:02:09,900 --> 00:02:14,010
sort of like a variable name instead in the sense that it should contain a version as well.

26
00:02:14,640 --> 00:02:20,490
If you remember, it comes with a huge list of prettified environment variables.

27
00:02:20,790 --> 00:02:25,380
And one of these variables is SII, underscore pipeline, underscore idee.

28
00:02:27,050 --> 00:02:32,960
Now, there are at least two options of these you can use to underscore on this caller ID, and this

29
00:02:32,960 --> 00:02:37,100
will be an unique I.D. to the current pipeline that Gottleib uses internally.

30
00:02:37,490 --> 00:02:43,090
And the other one, which I d is unique I.D. that it's coalbed to the project.

31
00:02:43,550 --> 00:02:46,280
So I'm going to take a look at this and see how that goes.

32
00:02:46,890 --> 00:02:52,280
Of course, you are free to use any environment variable that you feel that matches your need.

33
00:02:53,520 --> 00:02:59,850
This will be a simple idea that will be incremental, at least not directly incremental, but it will

34
00:02:59,850 --> 00:03:01,950
be larger than the previous one.

35
00:03:01,960 --> 00:03:06,740
So this will tell you if a version is newer or older than the previous version.

36
00:03:07,260 --> 00:03:13,050
In this day and age, keeping track of versions as we used to do in terms of semantic versioning like

37
00:03:13,050 --> 00:03:18,040
version one, version two, version three and so on, it's not really a requirement anymore.

38
00:03:18,150 --> 00:03:24,120
And simply having a unique idea which can help you identify which version of the project is deployed

39
00:03:24,120 --> 00:03:28,020
on the server, it's still good enough in order to get Destrehan.

40
00:03:30,380 --> 00:03:37,730
So I'm going to call that this is fresh and in this core idea, that's what you do with a WASC ally

41
00:03:37,880 --> 00:03:40,150
and see how we can deploy this.

42
00:03:40,610 --> 00:03:44,300
Now, as I mentioned, the first step is to create application version.

43
00:03:44,690 --> 00:03:51,380
So this goes like a WSC Elastic Bienstock create application version with dashes between the.

44
00:03:58,810 --> 00:04:02,080
An experiment that we need to provide is application name.

45
00:04:04,810 --> 00:04:10,320
Because our obligation is cast API, it would make sense to put this in an environment variable as well.

46
00:04:19,050 --> 00:04:24,720
Initially, we're going to give our version label sort of like a back to this version that we can easily

47
00:04:24,720 --> 00:04:29,970
identified because we're already using a variable from Getler, we're going to use the same variable

48
00:04:29,970 --> 00:04:31,290
that we have used for version.

49
00:04:40,390 --> 00:04:47,080
Now finally comes the part where we reference what we have updated in our S3 bucket and practically

50
00:04:47,440 --> 00:04:54,280
a W.S. Elastic Bienstock, hey, take this artifact, take this file that we have and use this in order

51
00:04:54,280 --> 00:05:00,190
to create this application version than the instructions for this will be this dash source.

52
00:05:00,220 --> 00:05:01,090
Dash bundle.

53
00:05:03,920 --> 00:05:05,870
And this will be S3 Buckett.

54
00:05:08,050 --> 00:05:12,250
And then to give the variable that we have used for the S3 bucket.

55
00:05:17,070 --> 00:05:22,470
And he saw the identifier for what you are trying to upload will be the S3, he.

56
00:05:23,840 --> 00:05:25,490
This will be the artifact name.

57
00:05:28,500 --> 00:05:36,690
So it is command, it will know to get this information from the S3 Buckett, which has this S3 Ketso,

58
00:05:36,690 --> 00:05:42,120
get the object old what we have called it, Khazei Peja, when the specific version and create the new

59
00:05:42,120 --> 00:05:42,810
version we did.

60
00:05:43,800 --> 00:05:47,750
Now, this in itself will not change what is being deployed.

61
00:05:47,760 --> 00:05:53,340
What is currently executed on the production side of it will just create a new version, but that version

62
00:05:53,340 --> 00:05:54,330
will not be active.

63
00:05:54,900 --> 00:05:56,580
So for that reason we need to execute.

64
00:05:56,580 --> 00:06:00,900
Another command in this command is called a W.S. That's the Bienstock.

65
00:06:04,010 --> 00:06:05,200
Update environment.

66
00:06:08,970 --> 00:06:10,950
The application name will be the same.

67
00:06:21,900 --> 00:06:24,120
The environment name will be production.

68
00:06:28,710 --> 00:06:34,500
And finally, we have again, diversion label, but we can see that a few informations are still similar

69
00:06:34,500 --> 00:06:39,180
to the previous one because we need to have a relationship between what have we created for an application

70
00:06:39,180 --> 00:06:41,970
version and what do we want to actually deploy.

71
00:06:42,090 --> 00:06:46,860
Because what update environment will do is we'll take this version that we have uploaded, practically

72
00:06:46,860 --> 00:06:48,300
deployed, make it live.

73
00:06:49,080 --> 00:06:52,740
OK, so I don't think the label needs to be equal here.

74
00:06:54,570 --> 00:07:00,580
And finally, in the big process, there's still a small change that we need to do so far we have assumed

75
00:07:00,580 --> 00:07:07,100
that artifact will be called that Daija, and this is how the artifact will be built.

76
00:07:07,380 --> 00:07:12,360
But it doesn't mean that we can keep it this way because now we have a variable name and we need to

77
00:07:12,360 --> 00:07:13,970
rename the artifact as well.

78
00:07:15,210 --> 00:07:21,480
So in order to rename that, we're going to use the move command and we're going to do is to move the

79
00:07:21,480 --> 00:07:27,090
file from built lips, car dash API, Daija to build lips.

80
00:07:27,090 --> 00:07:28,590
And then this will be the artifact.

81
00:07:29,280 --> 00:07:30,810
This is hardcoded in the project.

82
00:07:30,820 --> 00:07:33,600
So this is why this has to stay this way.

83
00:07:33,750 --> 00:07:38,420
And we still need this extra step to commit and see how the deployment goes.

