forked from gomex/precisamos-falar-sobre-teste-de-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
257 lines (209 loc) · 7.15 KB
/
index.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Precisamos falar sobre teste de código de infra</title>
<meta name="description" content="Precisamos falar sobre teste de código de infra">
<meta name="author" content="Rafael Gomes">
<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">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/white.css" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h3>Precisamos falar sobre teste de código de infra</h3>
<p>
<small>Criado por <a href="http://hakim.se">Rafael Gomes</a> / <a href="http://twitter.com/gomex">@gomex</a></small>
</p>
</section>
<section>
<h2>Quem sou eu</h2>
<h3>Rafael Gomes</h3>
<img width="320" height="338" data-src="./img/avatar.jpg" align="right" alt="Rafael Gomes">
<ul>
<li>Soteropolitano</li>
<li>Apaixonado por compartilhar</li>
<li>Engenheiro DevOps</li>
<li>@gomex</li>
<li>Docker Captain</li>
<li>gomex.github.io</li>
</ul>
</section>
<section>
<h2>O que estou fazendo</h2>
<h3>Livro</h3>
<img width="230" height="338" data-src="./img/hero.png" align="right" alt="Docker para desenvolvedores">
<ul>
<li>Pague quanto quiser, inclusive nada</li>
<li>Não precisa saber nada de Docker</li>
<li>Licenciado em creative commons</li>
<li>Atualização frequente</li>
</ul>
<p>Para baixar: <a href="tinyurl.com/docker-devel">tinyurl.com/docker-devel</a></p>
</section>
<section>
<h3>Podcast</h3>
<h4><a href="http://gatilhokosmico.com.br/">http://gatilhokosmico.com.br/</a></h4>
</section>
<section>
<h3>Acompanhe os slides ou leia depois</h3>
<h4><a href="https://tinyurl.com/teste-infra">https://tinyurl.com/teste-infra</a></h4>
<h4>Licença:</h4>
<img data-src="./img/CC-BY.png">
</section>
<section data-background="./img/bug.png">
<h2>Por que testar?</h2>
<h4>Pergunta sincera</h4>
</section>
<section>
<h3>O que acontece quando não testo</h3>
<img data-src="./img/preparing-for-deploy.gif">
</section>
<section>
<h3>Como era a entrega de ambientes e testes antigamente</h3>
<img data-src="./img/dev-ops.png">
</section>
<section>
<h3>Problemas com testes manuais</h3>
<ul>
<li>Falta de padronização</li>
<li>Testes insuficientes</li>
<li>Sem rastreabilidade</li>
<li>Pouco interesse em reproduzir</li>
<li>Necessidade de conhecimento especializado</li>
</ul>
</section>
<section>
<h3>Criação de novos ambientes</h3>
<img data-src="./img/criacao-ambientes.png" height="400">
</section>
<section>
<h3>Fazendo deploy</h3>
<img data-src="./img/fazer-deploy.png" height="400">
</section>
<section>
<h3>Modificar ambiente</h3>
<img data-src="./img/modificar-ambiente.png" height="400">
</section>
<section>
<h2>Infraestrutura virou código</h2>
</section>
<section>
<h3>Fatos</h3>
<ul>
<li>Atualização de servidores não se faz mais manual</li>
<li>Equipe de redes usa SDN</li>
<li>Não há como atender a demanda sem automação</li>
<li>Padronização somente com automação</li>
</ul>
</section>
<section>
<h3>Automatizando</h3>
<img data-src="./img/ci-cd.png" height="400">
</section>
<section>
<h3>Comparando</h3>
<img data-src="./img/imperative-declarative.png" height="400" >
</section>
<section>
<h2>Se infra virou código, precisamos testar, certo?</h2>
</section>
<section>
<h3>Automatizando, sem teste</h3>
<img data-src="./img/muda-com-bug.png" height="400" >
</section>
<section>
<h3>Testes manuais?</h3>
<img data-src="./img/muda-com-teste-manual.png" height="400" >
</section>
<section>
<h3>Como eu faço...</h3>
<img data-src="./img/muda-com-teste-auto.png" height="400" >
</section>
<section>
<h2>TDD pra infra?</h2>
</section>
<section>
<h2>Criando seu teste de infra</h2>
<h4>Crie um arquivo chamado <b>test_mytest.py</b></h4>
<pre><code class="hljs" data-trim contenteditable>
def test_nginx_is_installed(Package):
nginx = Package("nginx")
assert nginx.is_installed
assert nginx.version.startswith("1.2")
</code></pre>
<p>Comandos pra executar o teste</p>
<p><b>pip install testinfra</b></p>
<p><b>testinfra --sudo --connection=ssh --host=servidor_a_ser_testado test_mytest.py</b></p>
</section>
<section>
<h3>Soluções para teste</h3>
<ul>
<li>Serverspec</li>
<li>Testinfra</li>
<li>Inspec</li>
<li>Beaker</li>
</ul>
</section>
<section>
<h2>Sysadmin - Você sabe desenvolver?</h2>
</section>
<section>
<h3>Como organizar seus testes</h3>
<img data-src="./img/piramide-teste.png" height="500" >
</section>
<section>
<h2>Duvidas?</h2>
<h3>Rafael Gomes</h3>
<img width="320" height="338" data-src="./img/avatar.jpg" align="right" alt="Rafael Gomes">
<ul>
<li>Engenheiro DevOps</li>
<li>gomex@riseup.net</li>
<li>@gomex</li>
<li>Docker Captain</li>
<li>gomex.github.io</li>
</ul>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>