1
00:00:00,000 --> 00:00:01,080
In this lesson,

2
00:00:01,080 --> 00:00:03,480
we're going to talk about three concepts.

3
00:00:03,480 --> 00:00:05,550
This is known as continuous integration,

4
00:00:05,550 --> 00:00:08,850
continuous delivery, and continuous deployment.

5
00:00:08,850 --> 00:00:09,900
Before we do that though,

6
00:00:09,900 --> 00:00:11,100
we really have to take a look back

7
00:00:11,100 --> 00:00:12,630
to the way the code is made

8
00:00:12,630 --> 00:00:15,120
and deployed in most of our environments.

9
00:00:15,120 --> 00:00:16,680
Now, in the old days, the way

10
00:00:16,680 --> 00:00:19,020
we would do things is very linearly.

11
00:00:19,020 --> 00:00:20,550
We would start out with development

12
00:00:20,550 --> 00:00:21,900
and we would start taking the code

13
00:00:21,900 --> 00:00:24,360
and putting it together and figure out what it's going to do.

14
00:00:24,360 --> 00:00:26,790
Then we'd move into testing and integration

15
00:00:26,790 --> 00:00:28,770
where we'd put it into some kind of a test environment

16
00:00:28,770 --> 00:00:31,020
and make sure it didn't break anything.

17
00:00:31,020 --> 00:00:33,900
After that, we would start the integration process,

18
00:00:33,900 --> 00:00:36,240
which means we might be buying new servers

19
00:00:36,240 --> 00:00:37,830
and we might start installing all the software

20
00:00:37,830 --> 00:00:41,250
to see how it's going to operate in that full environment.

21
00:00:41,250 --> 00:00:43,080
After that, we'd move into staging.

22
00:00:43,080 --> 00:00:45,300
Now, staging is where we'd actually put things

23
00:00:45,300 --> 00:00:46,830
into a set of servers that look

24
00:00:46,830 --> 00:00:48,270
like our production environment,

25
00:00:48,270 --> 00:00:50,550
getting ready to move from testing

26
00:00:50,550 --> 00:00:53,490
into staging and then from staging into production,

27
00:00:53,490 --> 00:00:55,860
which brings us to our final step, which is production.

28
00:00:55,860 --> 00:00:56,910
This is when that piece

29
00:00:56,910 --> 00:00:59,610
of software is actually deployed onto those servers

30
00:00:59,610 --> 00:01:01,770
that are being used by your end users.

31
00:01:01,770 --> 00:01:04,140
Now, this was a very slow process especially

32
00:01:04,140 --> 00:01:06,150
if you did it one step after another.

33
00:01:06,150 --> 00:01:07,800
And the challenging thing

34
00:01:07,800 --> 00:01:10,380
is that these steps were all run by different people,

35
00:01:10,380 --> 00:01:12,780
so when you had developers, that was your programmers.

36
00:01:12,780 --> 00:01:15,240
They had one role, and then they would send it over

37
00:01:15,240 --> 00:01:16,650
to another team who did testing,

38
00:01:16,650 --> 00:01:18,000
and then they would send it to another team

39
00:01:18,000 --> 00:01:19,710
that did integration and staging.

40
00:01:19,710 --> 00:01:22,140
And finally, you had the operations folks who took it

41
00:01:22,140 --> 00:01:23,820
from staging into production.

42
00:01:23,820 --> 00:01:25,320
And so there's a lot of handovers

43
00:01:25,320 --> 00:01:26,820
and a lot of problems here

44
00:01:26,820 --> 00:01:29,010
because things were moving from one step to another

45
00:01:29,010 --> 00:01:30,540
and there'd be a lot of internal conflict

46
00:01:30,540 --> 00:01:32,190
within your organization.

47
00:01:32,190 --> 00:01:35,190
Now, the concepts involved with CI/CD tries

48
00:01:35,190 --> 00:01:36,330
to eliminate a lot of that.

49
00:01:36,330 --> 00:01:38,760
It tries to speed this process up.

50
00:01:38,760 --> 00:01:40,890
For instance, I worked at one organization

51
00:01:40,890 --> 00:01:42,630
where when we wanted to add a new feature,

52
00:01:42,630 --> 00:01:44,250
it could take nine to 12 months

53
00:01:44,250 --> 00:01:46,710
to go from development all the way through to production.

54
00:01:46,710 --> 00:01:49,740
So instead, with continuous integration workflows,

55
00:01:49,740 --> 00:01:52,920
you can actually speed this process up a lot.

56
00:01:52,920 --> 00:01:54,810
When you're dealing with continuous integration workflows,

57
00:01:54,810 --> 00:01:57,240
you have a common source repository.

58
00:01:57,240 --> 00:01:59,040
Everyone ends up checking in their code

59
00:01:59,040 --> 00:02:00,630
to this common source.

60
00:02:00,630 --> 00:02:02,100
Now, this can be your managers,

61
00:02:02,100 --> 00:02:04,200
your developers, whoever's working on it.

62
00:02:04,200 --> 00:02:06,480
Then, when you're ready to get this thing running,

63
00:02:06,480 --> 00:02:09,000
you can take it from that common source and pull it

64
00:02:09,000 --> 00:02:11,100
into the continuous integration server.

65
00:02:11,100 --> 00:02:12,930
At that point, it gets built.

66
00:02:12,930 --> 00:02:14,250
That means it compiles the code.

67
00:02:14,250 --> 00:02:16,260
It tests the code and then it tells you whether

68
00:02:16,260 --> 00:02:17,940
or not it succeeded or it failed.

69
00:02:17,940 --> 00:02:19,140
And then based on that,

70
00:02:19,140 --> 00:02:21,720
it can go back to the developers for the next step,

71
00:02:21,720 --> 00:02:23,640
which might be moving into testing,

72
00:02:23,640 --> 00:02:24,630
moving into integration,

73
00:02:24,630 --> 00:02:26,580
moving into staging, moving into production.

74
00:02:26,580 --> 00:02:29,520
But by doing this, you can automate a lot of this function.

75
00:02:29,520 --> 00:02:31,410
So when we talk about continuous integration,

76
00:02:31,410 --> 00:02:33,030
this is this first piece of this.

77
00:02:33,030 --> 00:02:35,880
Continuous integration is a software development method

78
00:02:35,880 --> 00:02:37,440
where code updates are tested

79
00:02:37,440 --> 00:02:38,730
and committed to a development

80
00:02:38,730 --> 00:02:41,790
or build server/code repository rapidly.

81
00:02:41,790 --> 00:02:44,160
So this allows us to create something,

82
00:02:44,160 --> 00:02:46,440
test it, and then once we know it's good,

83
00:02:46,440 --> 00:02:47,730
we can say this is ready

84
00:02:47,730 --> 00:02:49,950
to be implemented in the environment.

85
00:02:49,950 --> 00:02:52,860
Now, by itself, continuous integration doesn't do

86
00:02:52,860 --> 00:02:55,680
that much for us in terms of speeding things up.

87
00:02:55,680 --> 00:02:57,960
Yes, we are shifting left a little bit here,

88
00:02:57,960 --> 00:02:59,490
and we're letting our developers do some more

89
00:02:59,490 --> 00:03:01,830
of the testing, which is always a good thing.

90
00:03:01,830 --> 00:03:05,010
But continuous integration can do more than that.

91
00:03:05,010 --> 00:03:06,540
By using continuous integration,

92
00:03:06,540 --> 00:03:08,850
you can actually test and commit updates

93
00:03:08,850 --> 00:03:10,350
multiple times per day.

94
00:03:10,350 --> 00:03:12,300
So going from that feature,

95
00:03:12,300 --> 00:03:13,980
taking nine to 12 months,

96
00:03:13,980 --> 00:03:15,240
we can now have systems

97
00:03:15,240 --> 00:03:17,400
where we're doing continuous integration five,

98
00:03:17,400 --> 00:03:20,220
10, 20 times a day if needed.

99
00:03:20,220 --> 00:03:21,750
Now, how do we get that fast though?

100
00:03:21,750 --> 00:03:24,420
Well, that's where we have to bring in continuous delivery

101
00:03:24,420 --> 00:03:26,250
and continuous deployment.

102
00:03:26,250 --> 00:03:28,230
Now, when I talk about continuous integration,

103
00:03:28,230 --> 00:03:30,120
it's really focused on detecting

104
00:03:30,120 --> 00:03:33,240
and resolving development conflicts early and often.

105
00:03:33,240 --> 00:03:34,770
So remember, I said here in the workflow,

106
00:03:34,770 --> 00:03:35,880
we have all of our developers

107
00:03:35,880 --> 00:03:37,620
who are using the same sources.

108
00:03:37,620 --> 00:03:40,110
Well, if I'm doing something where I take a big feature

109
00:03:40,110 --> 00:03:42,180
and it takes 100 developers to work on it,

110
00:03:42,180 --> 00:03:45,030
that's 100 different people making changes to code.

111
00:03:45,030 --> 00:03:46,230
If they're all working on it

112
00:03:46,230 --> 00:03:47,400
and they're working on these things

113
00:03:47,400 --> 00:03:49,020
and they're checking out for maybe a week

114
00:03:49,020 --> 00:03:50,460
at a time or two weeks at a time,

115
00:03:50,460 --> 00:03:52,650
that causes divergences from

116
00:03:52,650 --> 00:03:54,060
what we started with a week ago

117
00:03:54,060 --> 00:03:55,680
to where we are a week later,

118
00:03:55,680 --> 00:03:57,120
because as you're working on something

119
00:03:57,120 --> 00:03:58,980
and I'm working on something for a whole week,

120
00:03:58,980 --> 00:04:00,780
that means we have a lot of differences.

121
00:04:00,780 --> 00:04:02,700
So instead with continuous integration,

122
00:04:02,700 --> 00:04:04,770
we're constantly taking our code,

123
00:04:04,770 --> 00:04:05,940
we're doing these integrations,

124
00:04:05,940 --> 00:04:08,370
we're testing it, and then putting it back to the master,

125
00:04:08,370 --> 00:04:10,680
so we're all working from the same sheet of music.

126
00:04:10,680 --> 00:04:13,680
This way, we're making sure we don't have these big changes

127
00:04:13,680 --> 00:04:15,540
and these big conflicts.

128
00:04:15,540 --> 00:04:17,550
Now, if we want to take this a step further,

129
00:04:17,550 --> 00:04:19,829
we can actually start speeding up the delivery of things.

130
00:04:19,829 --> 00:04:21,930
And this is known as continuous delivery.

131
00:04:21,930 --> 00:04:23,640
Now, if you're going to do continuous delivery,

132
00:04:23,640 --> 00:04:25,440
you have to do continuous integration,

133
00:04:25,440 --> 00:04:27,720
but just because you're doing continuous integration

134
00:04:27,720 --> 00:04:29,850
doesn't mean you're doing continuous delivery.

135
00:04:29,850 --> 00:04:32,280
These things are not A equals B and B equals A.

136
00:04:32,280 --> 00:04:34,710
It's more like, if you have A, you can do B.

137
00:04:34,710 --> 00:04:38,010
But if you have B, you must be doing A.

138
00:04:38,010 --> 00:04:39,780
Now, when I talk about continuous delivery,

139
00:04:39,780 --> 00:04:42,510
this is a software development method where the application

140
00:04:42,510 --> 00:04:44,640
and platform requirements are frequently tested

141
00:04:44,640 --> 00:04:47,370
and validated for immediate availability.

142
00:04:47,370 --> 00:04:50,400
So, I go out and I code some new feature.

143
00:04:50,400 --> 00:04:52,590
I test it through continuous integration.

144
00:04:52,590 --> 00:04:53,790
Now that I've tested it,

145
00:04:53,790 --> 00:04:55,320
I can go through continuous delivery,

146
00:04:55,320 --> 00:04:57,120
which means it's going to go through all the tests,

147
00:04:57,120 --> 00:04:59,340
all the compliance and all the validations.

148
00:04:59,340 --> 00:05:01,350
So it's now ready to be installed on

149
00:05:01,350 --> 00:05:03,690
that staging server or into production.

150
00:05:03,690 --> 00:05:05,520
Now, I'm not actually going to go forward

151
00:05:05,520 --> 00:05:06,870
and install it on staging

152
00:05:06,870 --> 00:05:08,880
or install it on the production server.

153
00:05:08,880 --> 00:05:10,590
That's not continuous delivery.

154
00:05:10,590 --> 00:05:12,690
That is continuous deployment.

155
00:05:12,690 --> 00:05:13,830
Now, with continuous deployment,

156
00:05:13,830 --> 00:05:15,900
we take the concept of continuous integration

157
00:05:15,900 --> 00:05:16,950
and continuous delivery

158
00:05:16,950 --> 00:05:18,990
and we take it even one step further.

159
00:05:18,990 --> 00:05:21,750
Now we have a software development model where application

160
00:05:21,750 --> 00:05:25,140
and platform updates are committed to production rapidly.

161
00:05:25,140 --> 00:05:27,270
Essentially, I'm going to create some new piece

162
00:05:27,270 --> 00:05:29,490
of code, maybe a security fix.

163
00:05:29,490 --> 00:05:31,470
It's going to go through the integration testing.

164
00:05:31,470 --> 00:05:32,490
Once that's been approved,

165
00:05:32,490 --> 00:05:34,350
it goes back to the code repository.

166
00:05:34,350 --> 00:05:36,090
At that point, we can go through

167
00:05:36,090 --> 00:05:38,310
and do continuous deployment where it gets tested

168
00:05:38,310 --> 00:05:39,930
and ready to go into staging.

169
00:05:39,930 --> 00:05:42,090
But instead of just sitting there waiting for somebody

170
00:05:42,090 --> 00:05:43,800
to actually install it in staging,

171
00:05:43,800 --> 00:05:45,240
with continuous deployment,

172
00:05:45,240 --> 00:05:48,090
we can take that code and actually deploy it to staging,

173
00:05:48,090 --> 00:05:49,740
and then at regular intervals,

174
00:05:49,740 --> 00:05:52,170
move things from staging into production.

175
00:05:52,170 --> 00:05:53,970
This allows us to do things much quicker

176
00:05:53,970 --> 00:05:56,490
in terms of deployment and release cycles.

177
00:05:56,490 --> 00:05:58,500
Now, when we talk about continuous delivery,

178
00:05:58,500 --> 00:06:00,570
I want you to remember that continuous delivery

179
00:06:00,570 --> 00:06:02,160
is focused on automated testing

180
00:06:02,160 --> 00:06:05,190
of code in order to get it ready for release,

181
00:06:05,190 --> 00:06:08,220
not released, just ready for release.

182
00:06:08,220 --> 00:06:10,230
Now, when I talk about continuous deployment,

183
00:06:10,230 --> 00:06:11,700
I'm taking it a step further.

184
00:06:11,700 --> 00:06:13,530
I'm focusing on automated testing

185
00:06:13,530 --> 00:06:15,720
and the release of code in order to get it

186
00:06:15,720 --> 00:06:18,360
into the production environment much more quickly.

187
00:06:18,360 --> 00:06:20,400
Now, what are the real big benefits here?

188
00:06:20,400 --> 00:06:22,110
Well, think about it like this.

189
00:06:22,110 --> 00:06:23,010
If you're dealing with something

190
00:06:23,010 --> 00:06:24,480
like coding a security fix,

191
00:06:24,480 --> 00:06:25,920
do you want it to take three weeks

192
00:06:25,920 --> 00:06:28,080
or three months or three years to get it out there?

193
00:06:28,080 --> 00:06:30,450
No, you want it out there right now.

194
00:06:30,450 --> 00:06:32,370
And so by doing continuous integration,

195
00:06:32,370 --> 00:06:34,410
continuous delivery and continuous deployment,

196
00:06:34,410 --> 00:06:37,260
you can shorten that cycle and get things out today,

197
00:06:37,260 --> 00:06:39,420
or even within a couple of hours.

198
00:06:39,420 --> 00:06:41,700
Now, for the exam, these concepts are

199
00:06:41,700 --> 00:06:43,020
just a few quick topics

200
00:06:43,020 --> 00:06:45,210
that we need to cover based on your textbook,

201
00:06:45,210 --> 00:06:46,680
but you're really unlikely

202
00:06:46,680 --> 00:06:49,110
to get many questions on these during the exam.

203
00:06:49,110 --> 00:06:49,950
This is really much more

204
00:06:49,950 --> 00:06:51,870
focused on software development lifecycle

205
00:06:51,870 --> 00:06:53,370
and things of that nature.

206
00:06:53,370 --> 00:06:54,960
If you get into IT service management

207
00:06:54,960 --> 00:06:56,880
and you start working in DevSecOps,

208
00:06:56,880 --> 00:06:59,280
you'll probably become very familiar with these terms,

209
00:06:59,280 --> 00:07:01,950
but for now, I just wanted you to be introduced to them

210
00:07:01,950 --> 00:07:03,180
and to cover them because I wanted

211
00:07:03,180 --> 00:07:05,363
to give you a full coverage of your textbook.

