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