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.}
20 How can we reduce this work while making the result
21 more reproducible and disposable?
27 ==== Enter Vagrant... ====
29 * Create and configure virtual test/dev environments:
34 * very easy management
35 %* Create and run machines with a single command: @vagrant up@
37 * @https://www.vagrantup.com/@
38 * Mitchell Hashimoto, hashicorp
40 ==== Building Blocks ====
42 # images of base installs (''base boxes'')
43 # @Vagrantfile@ to configure and further setup
44 # command @vagrant@ to manage all apects
46 * ==> simple but very powerful setup
47 * ==> similar to docker concepts
49 ==== Providers - Included ====
52 * docker ("Er, docker?..." - "Yes!" \smiley)
56 ==== Providers - via Plugins ====
60 * '''libvirt''' (qemu/kvm)
76 ==== $\Rightarrow$ Hey, we can use LXC! \smiley ====
79 <<<screenshot-twitter-lxc-docker-cut1.png,height=.9\textheight>>>
83 ==== Providers - via Plugins - not free! ====
90 ==== Other Useful Plugins ====
92 * @vagrant-cachier@ - cache packages on the host
93 * @vagrant-mutate@ - convert boxes between providers
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
106 ==== @Vagrantfile@ ====
108 * it is a genuine ruby program
110 <[block]{minimal example}
113 Vagrant.configure("2") do |config|
114 config.vm.box = "hashicorp/precise32"
122 <[block]{vagrant [options] [command] [args]}
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
132 status - outputs status of the machine
133 ssh - connects to machine via SSH
135 plugin - manages plugins
140 ==== Config Management ====
142 * called ''provisioners''
144 *# shell (inline/external)
151 ==== Notes about Installation ====
153 * ''Upstream'': current packages at vagrantup.com
155 ** installed, under @/opt@
156 ** ships ruby and many gems
157 ** sometimes problems with system-ruby
158 * ''Ubuntu'' has older vagrant package
160 ** no additional plugins shipped
161 * ''Fedora'' ($\ge 21$) has recent vagrant package now
163 ** package for vagrant-lxc
164 ** package for vagrant-libvirt
182 ==== Enter VaSaBi ====
185 A tool to build and selftest Samba on various platforms with a single command.
204 * let vasabi create and manage the Vagrantfile (under @\~{ }/.vasabi@)
205 * dynamically let the vasabi script manage machines based on
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@
217 ==== Thanks for your attention! ====[plain]
238 <<<feet-sand-1280.png,height=.8\textheight>>>
239 %<<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>