-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchapter1.html
More file actions
335 lines (314 loc) · 12.3 KB
/
chapter1.html
File metadata and controls
335 lines (314 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Introduction</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="icon" type="image/x-icon" href="mc2/images/favicon.ico">
<link rel="stylesheet" href="mc2/styles/reveal.css">
<link rel="stylesheet" href="mc2/styles/theme.css" id="theme">
<link rel="stylesheet" href="mc2/styles/code.css">
<!--STARTCOURSESPECIFICSTYLES--><link rel="stylesheet" href="styles/styles.css"><!--ENDCOURSESPECIFICSTYLES-->
</head>
<body>
<div id="pos"></div>
<div class="reveal">
<div class="slides">
<section class="slide chaptertitle">
<div class="slidecontent">
<div class="chapternumber"> chapter 1 of 3 </div>
<h1>Introduction</h1>
</div>
</section>
<!--STARTSECTIONINDEX--><section class="slide sectionlist">
<div class="slidecontent">
<h3>Sections in this chapter</h3>
<ol>
<li><a href="#/2">Who am I</a></li>
<li><a href="#/3">Containerization</a></li>
<li><a href="#/4">Docker</a></li>
</ol>
</div>
</section>
<!--ENDSECTIONINDEX-->
<!--STARTCHAPTERCONTENT--><!--STARTSECTION1--><section>
<section class="slide sectiontitle">
<div class="slidecontent">
<div class='sectioncount'>Section 1/3</div>
<h3>Who am I</h3>
</div>
</section>
<section class="slide" data-pos="1-1-1">
<span class="pos">1-1-1</span>
<div class="slidecontent"><h3 id="stephen-lau">Stephen Lau</h3>
<ul>
<li>Originally from Canada</li>
<li>Moved to Sweden 4.5 years ago</li>
<li>Enjoy travelling</li>
<li>Was commuting to China a couple of years</li>
<li>Like tackling complex problems</li>
</ul>
</div></section><section class="slide" data-pos="1-1-2">
<span class="pos">1-1-2</span>
<div class="slidecontent"><h3 id="history">History</h3>
<ul>
<li>Started out in firmware engineering</li>
<li>Worked on the rendering engine for BlackBerry</li>
<li>Have worked with large companies globally on their cloud computing offerings</li>
<li>Have worked at all levels of the stack</li>
<li>Lately even doing some frontend work</li>
</ul>
</div></section><section class="slide" data-pos="1-1-3">
<span class="pos">1-1-3</span>
<div class="slidecontent"><p><img style="max-width: 50%; border: none; box-shadow: none" src="resources/images/edument-logo.png"></p>
<p>A knowledge based company</p>
<ul>
<li>Courses</li>
<li>Consulting/Mentoring</li>
<li>Project Development</li>
</ul>
</div></section>
</section>
<!--ENDSECTION1-->
<!--STARTSECTION2--><section>
<section class="slide sectiontitle">
<div class="slidecontent">
<div class='sectioncount'>Section 2/3</div>
<h3>Containerization</h3>
<p>Why Containers?</p>
</p>
</div>
</section>
<section class="slide" data-pos="1-2-1">
<span class="pos">1-2-1</span>
<div class="slidecontent"><h3 id="isolation">Isolation</h3>
<p>A lot of projects need some kind of <strong>isolation</strong>.</p>
<p>This may be from a security perspective, or to avoid
other processes from conflicting on shared infrastructure.</p>
</div></section><section class="slide" data-pos="1-2-2">
<span class="pos">1-2-2</span>
<div class="slidecontent"><h3 id="reproducibility">Reproducibility</h3>
<p>In addition we want to ensure we have <strong>reproducible environments</strong>.</p>
</div></section><section class="slide" data-pos="1-2-3">
<span class="pos">1-2-3</span>
<div class="slidecontent"><h3 id="virtual-machines">Virtual Machines</h3>
<p><img style="max-width: 60%" src="resources/images/VM.png"></p>
</div></section><section class="slide" data-pos="1-2-4">
<span class="pos">1-2-4</span>
<div class="slidecontent"><p>Abstraction of a <strong>physical machine</strong>.</p>
<ul>
<li>Full copy of OS</li>
<li>One or multiple apps</li>
<li>Necessary Binaries + Libraries</li>
<li>Multiple VMs on a single physical machine</li>
</ul>
</div></section><section class="slide" data-pos="1-2-5">
<span class="pos">1-2-5</span>
<div class="slidecontent"><div class="container-fluid">
<div class="row">
<div class="col-6">
<div>Pros:</div>
<ul>
<li>Isolated</li>
<li>Reproducible</li>
</ul>
</div>
<div class="col-6">
<div>Cons:</div>
<ul>
<li>Large sizes</li>
<li>Long startup time</li>
<li>High maintenance burden</li>
</ul>
</div>
</div>
</div></div></section><section class="slide" data-pos="1-2-6">
<span class="pos">1-2-6</span>
<div class="slidecontent"><h3 id="containers">Containers</h3>
<p><img style="max-width: 60%" src="resources/images/Container.png"></p>
</div></section><section class="slide" data-pos="1-2-7">
<span class="pos">1-2-7</span>
<div class="slidecontent"><p>Abstraction at the <strong>app layer</strong>.</p>
<p>Containers share the <strong>OS kernel</strong> and run in <strong>isolated processes</strong>.</p>
</div></section><section class="slide" data-pos="1-2-8">
<span class="pos">1-2-8</span>
<div class="slidecontent"><div class="container-fluid">
<div class="row">
<div class="col-6">
<div>Pros:</div>
<ul>
<li>Relatively Isolated</li>
<li>Reproducible</li>
<li>Lightweight</li>
<li>Low maintenance burden</li>
</ul>
</div>
<div class="col-6">
<div>Cons:</div>
<ul>
<li>Not completely isolated</li>
<li>Security - Kernel vulnerabilities jeopardize other containers</li>
</ul>
</div>
</div>
</div></div></section><section class="slide question" data-pos="1-2-9">
<span class="pos">1-2-9</span>
<div class="slidecontent">
<p>So, should we not use a virtual machine at all then?</p>
</div></section><section class="slide answer" data-pos="1-2-10">
<span class="pos">1-2-10</span>
<div class="slidecontent">
<p>You still might. In fact, it's not entirely uncommon to run one or
several containers <strong>inside a VM</strong>.</p>
</div></section><section class="slide" data-pos="1-2-11">
<span class="pos">1-2-11</span>
<div class="slidecontent"><h3 id="containers-with-vms">Containers with VMs</h3>
<p><img style="max-width: 60%" src="resources/images/containers-vms-together.png"></p>
</div></section><section class="slide" data-pos="1-2-12">
<span class="pos">1-2-12</span>
<div class="slidecontent"><p>A VM and a container simply have <strong>different use-cases</strong>, but they
are not in any way mutually exclusive.</p>
<ul>
<li><div class='small'>For latency-sensitive applications, you might consider running on real hardware.</div></li>
<li><div class='small'>For optimized system load, you might consider a VM.</div></li>
<li><div class='small'>For mixed workloads, you might consider running containers on both.</div></li>
</ul>
</div></section>
</section>
<!--ENDSECTION2-->
<!--STARTSECTION3--><section>
<section class="slide sectiontitle">
<div class="slidecontent">
<div class='sectioncount'>Section 3/3</div>
<h3>Docker</h3>
</div>
</section>
<section class="slide" data-pos="1-3-1">
<span class="pos">1-3-1</span>
<div class="slidecontent"><p>A lot of projects need some kind of <strong>isolation</strong>. This
may be from a security perspective, or to reliably recreate a certain
environment.</p>
</div></section><section class="slide" data-pos="1-3-2">
<span class="pos">1-3-2</span>
<div class="slidecontent"><p><img src="resources/images/docker.png" alt="docker"></p>
<p>This is where Docker comes in. It allows you to <strong>containerize</strong>
software, installing exactly the things you need, and to reliably
redeploy this container.</p>
</div></section><section class="slide" data-pos="1-3-3">
<span class="pos">1-3-3</span>
<div class="slidecontent"><h2 id="docker-vocabulary">Docker Vocabulary</h2>
<ul>
<li>Docker Engine CE</li>
<li>Docker Engine EE</li>
<li>Docker Machine</li>
<li>Docker Registry</li>
<li>Docker Hub/Store</li>
<li>Docker Compose</li>
<li>Docker Swarm</li>
</ul>
</div></section><section class="slide" data-pos="1-3-4">
<span class="pos">1-3-4</span>
<div class="slidecontent"><p><strong>Docker Engine CE</strong>/<strong>Docker Engine EE</strong></p>
<p>Docker Engine is what we usually refer to when we say docker.
It's comprised of two parts:</p>
<ul>
<li>Docker Daemon</li>
<li>Docker CLI</li>
</ul>
</div></section><section class="slide" data-pos="1-3-5">
<span class="pos">1-3-5</span>
<div class="slidecontent"><p><strong>Docker Machine</strong></p>
<p>Allows <strong>installation and control</strong> of docker engine on virtual hosts.</p>
</div></section><section class="slide" data-pos="1-3-6">
<span class="pos">1-3-6</span>
<div class="slidecontent"><p><strong>Docker Registry</strong></p>
<p>An open source server side application that allows <strong>storage</strong> and
<strong>distribution</strong> of docker images.</p>
</div></section><section class="slide" data-pos="1-3-7">
<span class="pos">1-3-7</span>
<div class="slidecontent"><p><strong>Docker Hub/Store</strong></p>
<p>Previously known as Docker Hub, Docker Store offers a way to get
various images some of which are "certified".</p>
</div></section><section class="slide" data-pos="1-3-8">
<span class="pos">1-3-8</span>
<div class="slidecontent"><p><strong>Docker Compose</strong></p>
<p>A handy tool for running multiple related docker images.</p>
</div></section><section class="slide" data-pos="1-3-9">
<span class="pos">1-3-9</span>
<div class="slidecontent"><p><strong>Docker Swarm</strong></p>
<p>Allows for management of a cluster of docker hosts to schedule
and deploy multiple docker images across the cluster.</p>
</div></section><section class="slide" data-pos="1-3-10">
<span class="pos">1-3-10</span>
<div class="slidecontent"><p>In the upcoming sections, we'll explore how to <strong>create containers</strong>
and work with <strong>base images</strong>.</p>
</div></section><section class="slide" data-pos="1-3-11">
<span class="pos">1-3-11</span>
<div class="slidecontent"><p>Today we'll be experimenting with <strong>Docker Engine</strong> and <strong>Docker Compose</strong>.</p>
</div></section>
</section>
<!--ENDSECTION3--><!--ENDCHAPTERCONTENT-->
</div>
</div>
<script type="text/javascript">
var basehref = window.location.href.replace(/chapter\d.*?$/,'')
document.addEventListener("keydown",function(e){
var code = e.which || e.keyCode;
if (code===13){
window.location.href = basehref+"index.html?from="+(1-1);
} else if (code >= 49 && code <= 3+48) {
window.location.hash = "#/" + (code-48+1+0);
}
if (1 < 3) {
if (code===99){ // the letter C for next Chapter
window.location.href = basehref+"chapter"+(1+1)+".html"
}
}
});
</script>
<script src="mc2/scripts/head.js" type="text/javascript"></script>
<script src="mc2/scripts/reveal.js" type="text/javascript"></script>
<script src="mc2/scripts/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
showNotes: false,
transition: 'slide',
dependencies: [
{ src: 'mc2/scripts/plugin/notes/notes.js', async: true }
]
})
window.onload = function(){
var links = document.querySelectorAll("a.link");
for(var i=0;i<links.length;i++){
var link = links[i];
link.innerHTML = link.innerHTML.replace(/ /g,' ')
}
var posElem = document.getElementById('pos')
function updateReference(){
setTimeout(function(){
var currentpos = document.querySelector('section.present[data-pos]')
if (currentpos){
posElem.innerHTML = currentpos.getAttribute('data-pos')
} else {
posElem.innerHTML = ''
}
if (document.querySelector('.present.chaptertitle')){
document.body.classList.add('atchaptertitle');
} else {
document.body.classList.remove('atchaptertitle');
}
},10)
}
window.addEventListener("hashchange",updateReference);
updateReference();
};
</script>
<!--STARTCOURSESPECIFICSCRIPTS--><script type="text/javascript" src="/reload/reload.js"></script><!--ENDCOURSESPECIFICSCRIPTS-->
</body>
</html>