2 #+TITLE: Virtual machines for testing and Packaging
4 These virtual machines require
5 - VirtualBox :: for running from [[https://www.virtualbox.org]]
6 - Vagrant :: to automatically set them up from
7 [[http://www.vagrantup.com]] Make sure that you have at
8 least version 1.5 to be able to use the base boxes from
9 https://vagrantcloud.com/
10 To make sure that for the boxes the have the newest
11 VirtualBox-additions do
12 : vagrant plugin install vagrant-vbguest
13 This installs a plugin that tries to update the guest addition if
14 they are for an older version of VirtualBox
16 A virtual machine is set up with
17 : vagrant up <machineName>
18 will download a virtual machine image and set it up. It will then
20 - add packages required to compile OpenFOAM and package it
21 - mount the directory of the sources
22 - from this directory clone it to the local disc with mercurial or
23 git (whatever the parent uses)
24 One can then connect to the virtual machine with
25 : vagrant ssh <machinName>
26 and will be in the =$HOME= directory of the user =vagrant= where in
27 the directory =~/foam/foam-extend-3.0= the sources are
28 available. Modifications can be pushed "outside" the virtual machine
31 There is also a symbolic link =~/foam/foam-extend-3.0-parent=
32 to the sources if you want to edit there directly. Use with care
33 and don't compile in that directory unless you know what you're
35 ** Memory size and CPU-number
36 The number of CPUs in the virtual machine is determined by (the
37 first one that matches is used)
38 * If the variable =WM_VAGRANT_CPUS= exists then the number of CPUs
40 * If the variable =WM_NCOMPPROCS= is set then the number of CPUs is
41 fixed with *half* that number (so that the virtual machine
42 doesn't make the machine unuable)
43 The amount of memory is set according to the number of CPUs:
44 $(1+N)*512$ Megabytes. This should allow half a Gigabyte for the OS
45 and half a Gigagbyte for each compiling process
47 The hostname of the virtual machine is the hostname of the host
48 machine prepended with =vagrant.=
50 Currently existing virtual machines are
51 - trusty :: Latest LTS 14.04 Ubuntu. Currently the default machine to use
52 - prescise :: Previous LTS Ubuntu.
53 - lucid :: Old LTS Ubuntu. Currently problems
54 with automatic setting up (something with the
56 - maverick :: Tries to fix the problems with the
57 =lucid=-machine. Not yet working
58 - centos65 :: A CentOS 6.5 machine with preinstalled development
60 - freebsd92 :: FreeBSD 9.2 64-bit machine. Currently this machine
61 does not provision automatically. After the first
63 : sudo pkg_add -r rsync
64 : sudo pkg_add -r bash
65 then halt the machine and bring it up again (with the
67 - freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared
68 folders via NFS. Currently not working
69 - opensuse12 :: OpenSUSE 12.3 machine. Currently not completely
71 Some machines (read: the BSD-boxes) need the =VirtualBox Extension
72 Pack= installed (because they have USB 2.0)
73 * Scripts in the machine
74 In the home directory these scripts are found
75 - bootstrapFoam.sh :: A script whose aim it is to compile Foam and
76 the ThirdParty-packages in one go (no paraview and QT). If this
77 works the box is considered operational. The script leaves a
78 log file =bootstrapFoam-log= in the home directory
79 - bootstrapAndTest.sh :: Calls =bootstrapFoam.sh= and then runs the
80 =testHarness= in the =foam=-installation
81 * Provisioning scripts
82 Every "family" of machines has a specific script that makes sure
83 that the software packages necessary to compile =Foam= are installed
84 into the machine. In the end these scripts should call
85 =initGeneralScript.sh= which gets the sources into the machine. It
86 needs =git=, =mercurial= and =ccache= for that.