1
Template data for lava-server
2
=============================
4
To make it easier to setup devices automatically, templates
5
can be generated from a working instance and then populated
6
with data from scripts to create JSON files suitable for use
7
with the south loaddata instructions.
9
add_device.py reads the definition of a Device and a DeviceType
10
from lava_scheduler_app.models and genericizes the data to reset
11
fields to default and provide placeholders for scripts to replace
12
with user-specified data like the hostname and device type name.
14
Optionally, add_device.py can also read the definition of a BundleStream
15
from dashboard_app.models and convert the data to create a default
16
anonymous lab-health bundle stream if no bundle streams exist on this
17
instance. Subsequent bundle streams should be created by individual
18
users with lava-tool as normal.
20
The objective is to be able to script the initial setup of a LAVA
21
install to provide enough support to run TestJob 1 without errors.
22
However, many devices will need small changes to the device configuration
23
files generated by add_device.py. This is not supported currently.
28
debian-dev-build.sh is a simple wrapper to build ad-hoc packages for
29
developers to test their local changes. Packages built from the release
30
branch would use the tag name alone - note that normally release branch
31
builds will be done by Debian maintainers from official tarballs released
32
by Linaro. Packages built from personal branches or the master branch
33
will use the most recent tag name and have a suffix specifying the short
34
git hash of the most recent commit on that branch. (This may be the same
35
as the hash of the commit merged into the release branch to create the
38
Developer builds need various Debian/Ubuntu package tools installed:
40
$ sudo apt-get install dpkg-dev
41
$ sudo apt-get --no-install-recommends install devscripts
43
The lava-server build-dependencies also need to be installed - these
44
change from time to time but debian-dev-build.sh will check
45
dpkg-checkbuilddeps and halt and detail any build-dependencies not
48
A log of the Debian package build will be placed alongside the
51
The Debian packaging for lava-server and lava-dispatcher are
52
available at http://github.com/Linaro/
54
Building KVM images for LAVA
55
============================
57
git clone git://git.linaro.org/lava/lava-vmdebootstrap.git
59
lava-vmdebootstrap is just a small wrapper around
60
[vmdebootstrap](https://gitorious.org/vmdebootstrap) which does all the hard
61
work. What lava-vmdebootstrap does is download the Linaro image overlays
62
and pass some options that we will always need so that you don't need to.
66
$ sudo ./lava-vmdebootstrap --image=myimage.img
68
To run the test image, make sure it is writeable:
70
$ sudo chmod a+w ./myimage.img
72
Execute using qemu, e.g. on amd64 using qemu-system-x86_64:
74
$ qemu-system-x86_64 ./myimage.img
78
Once the overlay packages have been downloaded, you can call vmdebootstrap
79
directly to create other types of images without needing to modify
80
lava-vmdebootstrap. e.g. this is a call to vmdebootstrap to create a
81
KVM image based on Ubuntu:
84
--custom-package='linaro-overlay_1112.2_all.deb' \
85
--custom-package='linaro-overlay-minimal_1112.2_all.deb' \
86
--enable-dhcp --no-kernel --package=linux-image \
87
--serial-console --serial-console-command='/bin/auto-serial-console' \
88
--root-password='root' --hostname='ubuntu' --user=linaro/linaro --sudo \
89
--verbose --image=myimage.img
91
This command extends lava-vmdebootstrap to make a 4G image based on
92
Debian testing using the UK Debian mirror:
95
--custom-package='linaro-overlay_1112.2_all.deb' \
96
--custom-package='linaro-overlay-minimal_1112.2_all.deb' \
98
--serial-console --serial-console-command='/bin/auto-serial-console' \
99
--root-password='root' \
100
--distribution testing --size 4g \
101
--mirror http://ftp.uk.debian.org/debian \
102
--verbose --image=myimage.img