update content
[obnox/slides/2015-05-sambaXP-vagrant.git] / content.wiki
1 %
2 % colors:
3 %  _blue_text text_
4 %  _red_text text_
5 %
6
7 ==== ====
8
9 <[block]{}
10 %<[quote]
11 \textnormal{We use a lot of VMs and containers for
12 testing and building Samba. The setup and maintenance
13 of these machines requires a lot of work.}
14 %[quote]>
15 [block]>
16
17 <[block]{}
18 %<[quote]
19 \textnormal{%
20 How can we reduce this work while making the result
21 more reproducible and disposable?
22 }
23 %[quote]>
24 [block]>
25
26
27 ==== Enter Vagrant... ====
28
29 * Create and configure virtual test/dev environments:
30 *# reproducible
31 *# disposable
32 *# lightweight
33 *# portable
34 * very easy management
35 %* Create and run machines with a single command: @vagrant up@
36
37 * @https://www.vagrantup.com/@
38 * Mitchell Hashimoto, hashicorp
39
40 ==== Building Blocks ====
41
42 # images of base installs (''base boxes'')
43 # @Vagrantfile@ to configure and further setup
44 # command @vagrant@ to manage all apects
45
46 * ==> simple but very powerful setup
47 * ==> similar to docker concepts
48
49 ==== Providers - Included ====
50
51 * virtualbox
52 * docker ("Er, docker?..." - "Yes!" \smiley)
53 * Hyper-V
54
55
56 ==== Providers - via Plugins ====
57
58 <[block]{local}
59 * '''lxc'''
60 * '''libvirt''' (qemu/kvm)
61 * native kvm
62 * parallels
63 * ...
64 [block]>
65
66 <[block]{remote}
67 * aws
68 * azure
69 * cloudstack
70 * openstack
71 * rackspace
72 * ...
73 [block]>
74
75
76 ==== $\Rightarrow$ Hey, we can use LXC! \smiley ====
77
78 <[center]
79 <<<screenshot-twitter-lxc-docker-cut1.png,height=.9\textheight>>>
80 [center]>
81
82
83 ==== Providers - via Plugins - not free! ====
84
85 * vmware
86 * vmware fusion
87 * vmware workstation
88
89
90 ==== Other Useful Plugins ====
91
92 * @vagrant-cachier@ - cache packages on the host
93 * @vagrant-mutate@ - convert boxes between providers
94 * ...
95
96
97 ==== Base Boxes ====
98
99 * Many on hashicorp's atlas (atlas.hashicorp.com).
100 * Found in other locations as well.
101 * Mostly virtualbox and vmware images.
102 * libvirt: convert vbox ==> libvirt with @vagrant-mutate@
103 * lxc: there are a few boxes. need to create on your own
104
105
106 ==== @Vagrantfile@ ====
107
108 * it is a genuine ruby program
109
110 <[block]{minimal example}
111 <[quote]
112 <[code]
113 Vagrant.configure("2") do |config|
114   config.vm.box = "hashicorp/precise32"
115 end
116 [code]>
117 [quote]>
118 [block]>
119
120 ==== Control ====
121
122 <[block]{vagrant [options] [command] [args]}
123 <[code]
124 up        - create, start and provision
125 provision - provision the machine
126 reload    - restarts, load new config
127 suspend   - suspends the machine
128 resume    - resume a suspended machine
129 halt      - stops the machine
130 destroy   - stops and deletes the machine
131
132 status    - outputs status of the machine
133 ssh       - connects to machine via SSH
134
135 plugin    - manages plugins
136 box       - manages boxes
137 [code]>
138 [block]>
139
140 ==== Config Management ====
141
142 * called ''provisioners''
143 * supported:
144 *# shell (inline/external)
145 *# ansible
146 *# puppet
147 *# chef
148 *# ...
149
150
151 ==== Notes about Installation ====
152
153 * ''Upstream'': current packages at vagrantup.com
154 ** version 1.7.2
155 ** installed, under @/opt@
156 ** ships ruby and many gems
157 ** sometimes problems with system-ruby
158 * ''Ubuntu'' has older vagrant package
159 ** version 1.6.5
160 ** no additional plugins shipped
161 * ''Fedora'' ($\ge 21$) has recent vagrant package now
162 ** version 1.7.2
163 ** package for vagrant-lxc
164 ** package for vagrant-libvirt
165
166
167
168
169 [frame]>
170
171 <[sambabg]
172 ==== ====[plain]
173
174 <[center]
175 \Large
176 Demo Time
177 [center]>
178
179 [frame]>
180 [sambabg]>
181
182 ==== Enter VaSaBi ====
183
184 <[block]{}
185 A tool to build and selftest Samba on various platforms with a single command.
186 [block]>
187
188
189 [frame]>
190
191 <[sambabg]
192 ==== ====[plain]
193
194 <[center]
195 \Large
196 Demo Time
197 [center]>
198
199 [frame]>
200 [sambabg]>
201
202 ==== TODOs ====
203
204 * let vasabi create and manage the Vagrantfile (under @\~{ }/.vasabi@)
205 * dynamically let the vasabi script manage machines based on
206 *# base box
207 *# source directory (hash thereof)
208 *# possibly additional build ID
209 * save test results (@st/@)  like @bin/@
210 * add support for more boxes
211 * possibly add support for autobuild-like jobs instead of plain @make test@
212
213
214 [frame]>
215
216 <[sambabg]
217 ==== Thanks for your attention! ====[plain]
218
219 %\transdissolve
220
221 <[center]
222 <[columns]
223 [[[.6\textwidth]]]
224
225 {\Large
226
227 Questions?
228
229 --*3em--
230
231 @obnox\@samba.org@
232
233 --*.5em--
234
235 @madam\@redhat.com@
236 }
237 [[[.3\textwidth]]]
238 <<<feet-sand-1280.png,height=.8\textheight>>>
239 %<<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
240
241 [columns]>
242 [center]>
243
244 [frame]>
245 [sambabg]>
246
247