forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvagrant_ansible_internal.html
318 lines (281 loc) · 10.1 KB
/
vagrant_ansible_internal.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Vagrant & Ansible hand by hand</title>
<meta name="description" content="Vagrant & Ansible overview">
<meta name="author" content="Milan Popović">
<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="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css" id="theme">
<link rel="stylesheet" href="css/presentation/vagrant_ansible_internal.css">
<!-- Code syntax highlighting -->
<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>
<h1>
<img src="img/vagrant_ansible_internal/vagrant_ansible.png" alt="Vagrant Ansible" title="Vagrant Ansible">
</h1>
<p>
<small><a target="_blank" href="http://www.milanpopovic.me">Milan Popović</a> / <a target="_blank"
href="http://twitter.com/komita1981">@komita1981</a>
</small>
</p>
</section>
<section>
<h2>Agenda</h2>
<ul>
<li>Automatization importance</li>
<li>Vagrant</li>
<li>Setting up vagrant</li>
<li>Ansible intro</li>
<li>Organizing ansible playbooks</li>
<li>What's next?</li>
</ul>
</section>
<section>
<section>
<h2>
Automatization importance
</h2>
</section>
<section>
<h2>Obsolete workflows</h2>
<p class="fragment">
Using shared development center (expensive, no team collab...)
</p>
<p class="fragment">
Running MAMP, WAMP, LAMP on localhost (no automation, long error prone install guides, no team collab, not shareable, not isolated...)
</p>
</section>
<section>
<h2>What we don't want?</h2>
<p class="fragment">
Not all developers want to be sysadmins
</p>
<p class="fragment">
Install software manually over and over again
</p>
<p class="fragment">
Helping others to install software manualy over and over again
</p>
<p class="fragment">
<img src="img/vagrant_ansible_internal/works_on_my_machine.jpg" alt="Works on my machine" title="Works on my machine">
</p>
</section>
<section>
<h2>What do we want?</h2>
<p class="fragment">
We really need to develop on the same OS, architecture, package versions and configuration as production
</p>
<p class="fragment">
We want to have working code all around
</p>
<p class="fragment">
Scripting is better, having a set-it-and-forget-it service is best
</p>
<p class="fragment">
I want to write code to tell the computer how to set up itself
</p>
<p class="fragment">
Virtualization & Configuration management
</p>
</section>
<section>
<p>
<img src="img/vagrant_ansible_internal/automate_all.png" alt="Automate all" title="Automate all">
</p>
</section>
<section>
<h2>
VAGRANT AS RESCUE
</h2>
<p>
<img src="img/vagrant_ansible_internal/vagrant.jpg" alt="Vagrant" title="Vagrant">
</p>
</section>
</section>
<section>
<section>
<h2>Basic info</h2>
<p>
Free and open source - <a href="https://github.com/mitchellh/vagrant">https://github.com/mitchellh/vagrant</a>
</p>
<p>
Works on Linux, MAC OS, Windows
</p>
<p>
Written in Rubby
</p>
<p>
Started on 21.1.2010 by Mitchell Hashimoto and John Bender
</p>
<p>
7.3.2010 - first release - 0.1.0
</p>
<p>
30.5.2014 - latest release - 1.6.3
</p>
</section>
<section>
<h2>Why vagrant</h2>
<p>
Create and configure leightweight, reproducible and portable development environments.
</p>
<p>
Describe VM resource in Configuration share via VSC
</p>
<p>
Lowers development environment setup time
</p>
<p>
Maximises dev/prod parity
</p>
<p>
Makes the "works on my machine" excuse a relic of the past
</p>
Easy to distribute and update
</p>
</section>
<section>
<img src="img/vagrant_ansible_internal/vagrant_provider_provisioner.jpg" alt="Vagrant provider provisioner" title="Vagrant provider provisioner">
</section>
<section>
<img src="img/vagrant_ansible_internal/vagrant_usage_steps.jpg" alt="Vagrant usage steps" title="Vagrant usage steps">
</section>
<section>
<img src="img/vagrant_ansible_internal/vagrant_options.png" alt="Vagrant options" title="Vagrant options">
</section>
<section>
<pre>
<code>
##################################################
# Generated by phansible.com
##################################################
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |v|
v.name = "Score"
v.customize ["modifyvm", :id, "--memory", 512]
end
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
#
config.vm.network :private_network, ip: "192.168.3.234"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.ssh.forward_agent = true
#############################################################
# Ansible provisioning (you need to have ansible installed)
#############################################################
config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible/playbook.yml"
end
config.vm.synced_folder "./", "/var/www", id: "vagrant-root", :mount_options => ['dmode=777', 'fmode=777']
end
</code>
</pre>
</section>
</section>
<section>
<section>
<img src="img/vagrant_ansible_internal/ansibleLogo_transparent_web.jpg" alt="Ansible logo" title="Ansible logo">
</section>
<section>
<h2>Basic facts</h2>
<p>IT orchestration engine that automates configuration management, application deployment, and many other IT needs.</p>
<p>Open source</p>
<p>Free software</p>
<p>Written in Python</p>
<p>Agent-less</p>
<p>Commercial version</p>
<p>Enterprise support</p>
<p>Comunity growth - 3. provisioner by number of usage in Vagrant</p>
</section>
<section>
<h2>Ansible modules</h2>
<p>Built in & Custom modules</p>
<p>Run commands</p>
<p>Transfer files</p>
<p>Install packages</p>
<p>Manage deamons</p>
<p>Manage users and groups</p>
<p>Gather facts</p>
<p>Manage DBs</p>
</section>
<section>
<h2>Ansible playbooks</h2>
<p>Configuration, deployment, and orchestration language</p>
<p>Yaml files & Jinja 2 templating language</p>
<p>Designed to be human-readable and are developed in a basic text language</p>
<p>Executed in order it is written</p>
<p>http://phansible.com/ - online generator for playbooks</p>
<p>Idempotent operations</p>
</section>
</section>
<section>
<h2>Our new workflow</h2>
<p class="fragment">
All team members will have to install Vagrant, VirtualBox & Ansible
</p>
<p class="fragment">
At least one person will be responsible for writing the Vagrantfile and the provisioning scripts
</p>
<p class="fragment">
Vagrantfile & Ansible scripts are part of version control system
</p>
</section>
<section>
<h1>One rule</h1>
<p class="fragment">
Using localhost is strictly forbidden!!!
</p>
</section>
<section>
<h1>The End</h1>
<h3>Milan Popović / milanpopovic.me</h3>
</section>
<section>
<img src="img/vagrant_ansible_internal/question.jpg" alt="Questions" title="Questions">
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// 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
// Optional reveal.js plugins
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, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>