-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
412 lines (364 loc) · 13.3 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
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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>2nd Ansible Meetup</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<meta name="author" content="Luka Dornhecker, Darius Murawski">
<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.min.css">
<link rel="stylesheet" href="css/theme/wlw.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- If the query includes 'print-pdf', include the PDF print sheet -->
<script>
if (window.location.search.match(/print-pdf/gi)) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'css/print/pdf.css';
document.getElementsByTagName('head')[0].appendChild(link);
}
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<!--<header><img src="img/wlw_logo_de.png" style="height:50px"></header>-->
<div class="reveal">
<div class="slides" id="slides-id">
<section>
<h2>2. <img src="img/ansible.png" style="width:20%;margin-bottom:-1%;"> Meetup<br><br> The Fun and Pain with Ansible</h2>
<h3>Hamburg, 19.02.2015</h3>
<h4>Luka Dornhecker, Darius Murawski</h4>
</section>
<section data-background-transition="slide" id="ansible-1">
<h3 class="green">Topics:</h3>
<ul>
<li>Who we are</li>
<li>Where we work</li>
<li>The Pain with Puppet</li>
<li>Infrastructure</li>
<li>Software</li>
<li>The Fun (why we use it)</li>
<li>The Pain (with Ansible)</li>
<li>Best Practice</li>
<li>Vagrant</li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-2">
<h3 class="green">Darius Murawski</h3>
<ul>
<li>Born: 1987</li>
<li>Study: Applied Computer Science @ HAW Hamburg, finished Sommer 2014</li>
<li>Contact: <a href="mailto:dariusgmurawski@googlemail.com">dariusgmurawski@googlemail.com</a></li>
<li>Github: <a href="https://github.com/dariusgm">dariusgm</a></li>
</ul>
<hr>
<h3 class="green">Luka Dornhecker</h3>
<ul>
<li>Born: 1992</li>
<li>Contact: <a href="mailto:luka.dornhecker@gmail.com">luka.dornhecker@gmail.com</a></li>
<li>Github: <a href="https://github.com/lukad">lukad</a></li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-3">
<h3 class="green">We work at <a href="https://www.wlw.de/">Wer liefert was</a></h3>
<img src="img/1024.png">
</section>
<section data-background-transition="slide" id="ansible-4">
<h3 class="green">The Pain with Puppet</h3>
<ul>
<li>Execution Order</li>
<li>DevOps write the stuff</li>
<li>Production Server</li>
<li>Change from monolith software to APIs</li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-5">
<h3 class="green">Infrastructure</h3>
<img src="img/server.png">
</section>
<section data-background-transition="slide" id="ansible-6">
<h3 class="green">Software</h3>
<img src="img/ruby.svg">
<img src="img/rails.png">
<img src="img/postgres.svg" style="width:20%;">
<img src="img/es.png" style="width:20%;">
<img src="img/redis.png" style="width:20%;">
<img src="img/nginx.png" style="width:20%;">
<img src="img/rabbit.png">
<img src="img/monit.gif">
</section>
<section data-background-transition="slide" id="ansible-7">
<h3 class="green">The Fun (why we use it)</h3>
<ul>
<li>We love yml files (rails!)</li>
<li>Requires only sshd and Python</li>
<li>Fast, Clear Execution Order</li>
<li>Modules for psql, rabbitmq and more</li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-8">
<h3 class="green">The Pain (with Ansible)</h3>
<ul>
<li>Keep servers in sync</li>
<li>QA the stuff! (CI integration?)</li>
<li>Handlers</li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-9">
<h3 class="green">Best Practice - Project Structure</h3>
<ul>
<li>Every rails app own playbook file</li>
<li>Every external application own roles file</li>
<li>same path on every environment</li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-10">
<h3 class="green">Project Structure - Example</h3>
<pre>
.
├── handlers
│ └── main.yml
├── library
│ └── users
├── roles
│ ├── appdirs
│ ├── common
│ ├── elasticsearch
│ ├── kibana
│ ├── lock
│ ├── logstash
│ ├── mailcatcher
│ ├── monit
│ ├── nginx
│ ├── nodejs
│ ├── phantomjs
│ ├── postgresql
│ ├── public-keys
│ ├── rabbitmq
│ ├── rbenv
│ ├── redis
│ ├── (roles for our apps)
├── stages
│ ├── sandbox
│ └── vagrant
├── README.md
├── Vagrantfile
├── (many plays for our apps)
└── ansible.cfg
</pre>
</section>
<section data-background-transition="slide" id="ansible-11">
<pre>
├── handlers
│ └── main.yml
├── tasks
│ ├── main.yml
│ ├── sandbox.yml
│ └── vagrant.yml
└── templates
├── etc
│ ├── monit
│ │ └── conf.d
│ │ └── wlw_serp
│ └── nginx
│ ├── assets_locations
│ │ └── wlw_serp_assets.conf
│ ├── locations
│ │ └── wlw_serp.conf
│ └── upstreams
│ └── wlw_serp.conf
├── home
│ └── appsse
│ └── wlw_serp
│ └── shared
│ └── bin
│ └── _unicorn
├── sandbox
│ └── home
│ └── appsse
│ └── wlw_serp
│ └── shared
│ └── config
│ └── unicorn.rb
└── vagrant
└── home
└── appsse
└── wlw_serp
└── shared
├── database.yml
└── unicorn.rb
</pre>>
</section data-background-transition="slide" id="ansible-12">
<section>
<h3>wlw_serp.yml</h3>
<pre>
- hosts: app
sudo: yes
roles:
- common
- monit
- nginx
- appsse
- rbenv
- { role: appdirs, app: wlw_serp }
- wlw_serp
handlers:
- include: handlers/main.yml
</pre>
</section>
<section id="ansible-13">
<h3>main.yml</h3>
<pre>
---
- include: sandbox.yml
when: inventory_hostname_short != "sandbox-dev"
- include: vagrant.yml
when: inventory_hostname_short == "sandbox-dev"
- name: configure nginx
template:
src={{ item }}
dest=/{{ item }}
with_items:
- etc/nginx/locations/wlw_serp.conf
- etc/nginx/upstreams/wlw_serp.conf
notify:
- restart nginx
- name: copy bin/unicorn
template:
src="home/appsse/wlw_serp/shared/bin/_unicorn"
dest="{{ users.appsse.home }}/wlw_serp/shared/bin/_unicorn"
mode=0755
sudo: yes
sudo_user: appsse
- name: configure monit
template:
src=etc/monit/conf.d/wlw_serp
dest=/etc/monit/conf.d/wlw_serp
notify: restart monit
</pre>
</section>
<section data-background-transition="slide" id="ansible-14">
<h3 class="green">Best Practice - Key Management</h3>
<ul>
<li>Key Repository</li>
<li>CI get triggered by changes and publish all keys</li>
<li>Keys as git submodule in your ansible repository</li>
</ul>
<pre>
---
- name: gather public keys to be installed for root
local_action: shell cat roles/public-keys/files/keys/root/*.pub roles/public-keys/files/jenkins.pub
changed_when: False
sudo: False
ignore_errors: yes
register: keys_dev
- name: create .ssh directory for root
file:
path="{{ users.root.home }}/.ssh"
state=directory
owner=root
group="{{ users.root.group }}"
mode=0700
- name: install authorized_keys for root
copy:
content="{{ keys_dev.stdout }}"
dest="{{ users.root.home }}/.ssh/authorized_keys"
owner=appsse
group="{{ users.root.group }}"
mode=0600
</pre>
</section>
<section data-background-transition="slide" id="ansible-15">
<h3 class="green">Best Practice - Release Management</h3>
<ul>
<li>Test from blank!</li>
<li>Test by diff!</li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-16">
<h3 class="green">Best Practice - Work with DevOps</h3>
<ul>
<li>Huge task to transfer puppet to ansible scripts</li>
<li>Show them how both can benefit (Continous Delivery)</li>
<li>Use .env files for configuration</li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-17">
<h3 class="green">Vagrant</h3>
<ul>
<li>Testing ansible stuff</li>
<li>Clean state of development VM?!</li>
<li>Performance ?</li>
<li>Syncing</li>
<li>System Ruby needed on host :-(</li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-19">
<h3 class="green">Thank you!</h3>
<ul>
<li>Questions?</li>
<li>Find this awesome presentation at: <a href="https://github.com/dariusgm/ansible-meetup">https://github.com/dariusgm/ansible-meetup</a></li>
</ul>
</section>
<section data-background-transition="slide" id="ansible-20">
<h3 class="green">Pictures:</h3>
<ul>
<li>http://upload.wikimedia.org/wikipedia/commons/7/73/Ruby_logo.svg</li>
<li>http://rubyonrails.org/images/rails.png</li>
<li>http://de.wikipedia.org/wiki/PostgreSQL#mediaviewer/File:Postgresql.svg</li>
<li>https://pbs.twimg.com/profile_images/631946075/realistic.png</li>
<li>http://sametmax.com/wp-content/uploads/2012/07/banner_redis-300dpi-0315a8013afee137cce47b474541d7f1.png</li>
<li>http://nginx.org/nginx.png</li>
<li>http://www.rabbitmq.com/img/rabbitmq_logo_strap.png</li>
<li>http://en.wikipedia.org/wiki/Monit#mediaviewer/File:Tildeslash_Monit_Logo.gif</li>
</ul>
</section>
</div><!-- slides -->
</div><!-- reveal -->
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: false,
progress: true,
history: true,
center: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
// Parallax scrolling
//parallaxBackgroundImage: 'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg',
//parallaxBackgroundSize: '2100px 900px',
// Optional libraries used to extend on reveal.js
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, condition: function () {
return !!document.body.classList;
} },
{ src: 'plugin/notes/notes.js', async: true, condition: function () {
return !!document.body.classList;
} }
]
});
</script>
</body>
</html>
<!-- vi: set ai ts=2 sts=2 et sw=2: -->