2013-09-04 12:49:25 +00:00
|
|
|
# -*- mode: org -*-
|
|
|
|
#+TITLE: Virtual machines for testing and Packaging
|
|
|
|
* Prerequisites
|
|
|
|
These virtual machines require
|
|
|
|
- VirtualBox :: for running from [[https://www.virtualbox.org]]
|
2014-03-13 16:52:52 +00:00
|
|
|
- Vagrant :: to automatically set them up from
|
|
|
|
[[http://www.vagrantup.com]] Make sure that you have at
|
|
|
|
least version 1.5 to be able to use the base boxes from
|
|
|
|
https://vagrantcloud.com/
|
2014-02-10 17:03:40 +00:00
|
|
|
To make sure that for the boxes the have the newest
|
|
|
|
VirtualBox-additions do
|
|
|
|
: vagrant plugin install vagrant-vbguest
|
|
|
|
This installs a plugin that tries to update the guest addition if
|
|
|
|
they are for an older version of VirtualBox
|
2013-09-04 12:49:25 +00:00
|
|
|
* Starting
|
|
|
|
A virtual machine is set up with
|
|
|
|
: vagrant up <machineName>
|
|
|
|
will download a virtual machine image and set it up. It will then
|
|
|
|
modify the image:
|
|
|
|
- add packages required to compile OpenFOAM and package it
|
|
|
|
- mount the directory of the sources
|
|
|
|
- from this directory clone it to the local disc with mercurial or
|
|
|
|
git (whatever the parent uses)
|
|
|
|
One can then connect to the virtual machine with
|
|
|
|
: vagrant ssh <machinName>
|
|
|
|
and will be in the =$HOME= directory of the user =vagrant= where in
|
2014-06-01 22:03:19 +00:00
|
|
|
the directory =~/foam/foam-extend-3.1= the sources are
|
2013-09-04 12:49:25 +00:00
|
|
|
available. Modifications can be pushed "outside" the virtual machine
|
|
|
|
with
|
|
|
|
: hg push
|
2014-06-01 22:03:19 +00:00
|
|
|
There is also a symbolic link =~/foam/foam-extend-3.1-parent=
|
2013-09-04 12:49:25 +00:00
|
|
|
to the sources if you want to edit there directly. Use with care
|
|
|
|
and don't compile in that directory unless you know what you're
|
|
|
|
doing
|
2014-05-16 12:05:02 +00:00
|
|
|
** Memory size and CPU-number
|
|
|
|
The number of CPUs in the virtual machine is determined by (the
|
|
|
|
first one that matches is used)
|
|
|
|
* If the variable =WM_VAGRANT_CPUS= exists then the number of CPUs
|
|
|
|
is set to this
|
|
|
|
* If the variable =WM_NCOMPPROCS= is set then the number of CPUs is
|
|
|
|
fixed with *half* that number (so that the virtual machine
|
|
|
|
doesn't make the machine unuable)
|
|
|
|
The amount of memory is set according to the number of CPUs:
|
|
|
|
$(1+N)*512$ Megabytes. This should allow half a Gigabyte for the OS
|
|
|
|
and half a Gigagbyte for each compiling process
|
|
|
|
|
|
|
|
The hostname of the virtual machine is the hostname of the host
|
|
|
|
machine prepended with =vagrant.=
|
2013-09-04 12:49:25 +00:00
|
|
|
* Virtual machines
|
|
|
|
Currently existing virtual machines are
|
2014-05-31 21:36:53 +00:00
|
|
|
- trusty :: Latest LTS 14.04 Ubuntu. Currently the default machine to use
|
|
|
|
- prescise :: Previous LTS Ubuntu.
|
|
|
|
- lucid :: Old LTS Ubuntu. Currently problems
|
2013-09-04 12:49:25 +00:00
|
|
|
with automatic setting up (something with the
|
|
|
|
=postfix=-package)
|
|
|
|
- maverick :: Tries to fix the problems with the
|
|
|
|
=lucid=-machine. Not yet working
|
2014-02-10 14:12:04 +00:00
|
|
|
- centos65 :: A CentOS 6.5 machine with preinstalled development
|
|
|
|
tools
|
2014-03-13 16:52:52 +00:00
|
|
|
- freebsd92 :: FreeBSD 9.2 64-bit machine. Currently this machine
|
|
|
|
does not provision automatically. After the first
|
|
|
|
failure log in and do
|
2014-11-13 14:00:28 +00:00
|
|
|
- centos70 :: A CentOS 7.0 machine with preinstalled development
|
|
|
|
tools
|
2014-03-13 16:52:52 +00:00
|
|
|
: sudo pkg_add -r rsync
|
|
|
|
: sudo pkg_add -r bash
|
|
|
|
then halt the machine and bring it up again (with the
|
|
|
|
=--provision=-option)
|
2014-02-10 17:51:15 +00:00
|
|
|
- freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared
|
|
|
|
folders via NFS. Currently not working
|
2014-02-11 10:29:18 +00:00
|
|
|
- opensuse12 :: OpenSUSE 12.3 machine. Currently not completely
|
|
|
|
compiling Foam
|
2014-06-04 16:02:15 +00:00
|
|
|
- opensuse13 :: OpenSUSE 13.1 machine. The current LTS-version of
|
|
|
|
OpenSUSE
|
2014-02-10 17:03:40 +00:00
|
|
|
Some machines (read: the BSD-boxes) need the =VirtualBox Extension
|
|
|
|
Pack= installed (because they have USB 2.0)
|
2014-02-11 13:01:59 +00:00
|
|
|
* Scripts in the machine
|
2014-02-10 14:12:04 +00:00
|
|
|
In the home directory these scripts are found
|
|
|
|
- bootstrapFoam.sh :: A script whose aim it is to compile Foam and
|
|
|
|
the ThirdParty-packages in one go (no paraview and QT). If this
|
2014-05-16 12:06:25 +00:00
|
|
|
works the box is considered operational. The script leaves a
|
|
|
|
log file =bootstrapFoam-log= in the home directory
|
2014-05-31 21:36:53 +00:00
|
|
|
- bootstrapAndTest.sh :: Calls =bootstrapFoam.sh= and then runs the
|
|
|
|
=testHarness= in the =foam=-installation
|
2014-02-11 13:01:59 +00:00
|
|
|
* Provisioning scripts
|
|
|
|
Every "family" of machines has a specific script that makes sure
|
|
|
|
that the software packages necessary to compile =Foam= are installed
|
|
|
|
into the machine. In the end these scripts should call
|
|
|
|
=initGeneralScript.sh= which gets the sources into the machine. It
|
|
|
|
needs =git=, =mercurial= and =ccache= for that.
|