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.1= the sources are
28 available. Modifications can be pushed "outside" the virtual machine
31 There is also a symbolic link =~/foam/foam-extend-3.1-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 - centos70 :: A CentOS 7.0 machine with preinstalled development
65 : sudo pkg_add -r rsync
66 : sudo pkg_add -r bash
67 then halt the machine and bring it up again (with the
69 - freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared
70 folders via NFS. Needs user interaction during
71 creation (password to get root privileges to
72 manipulate the =/etc/exports=-file to allow the
74 - opensuse12 :: OpenSUSE 12.3 machine. Currently not completely
76 - opensuse13 :: OpenSUSE 13.1 machine. The current LTS-version of
78 - archlinux :: An ArchLinux-machine. Might take a long time during
79 provisioning as the script updated the full
81 Some machines (read: the BSD-boxes) need the =VirtualBox Extension
82 Pack= installed (because they have USB 2.0)
83 * Scripts in the machine
84 In the home directory these scripts are found
85 - bootstrapFoam.sh :: A script whose aim it is to compile Foam and
86 the ThirdParty-packages in one go (no paraview and QT). If this
87 works the box is considered operational. The script leaves a
88 log file =bootstrapFoam-log= in the home directory
89 - bootstrapAndTest.sh :: Calls =bootstrapFoam.sh= and then runs the
90 =testHarness= in the =foam=-installation
91 * Provisioning scripts
92 Every "family" of machines has a specific script that makes sure
93 that the software packages necessary to compile =Foam= are installed
94 into the machine. In the end these scripts should call
95 =initGeneralScript.sh= which gets the sources into the machine. It
96 needs =git=, =mercurial= and =ccache= for that.