~ubuntu-branches/debian/jessie/lava-server/jessie

« back to all changes in this revision

Viewing changes to share/README

  • Committer: Package Import Robot
  • Author(s): Neil Williams
  • Date: 2014-06-29 19:29:34 UTC
  • Revision ID: package-import@ubuntu.com-20140629192934-ue8hrzzpye9isevt
Tags: upstream-2014.05.30.09
ImportĀ upstreamĀ versionĀ 2014.05.30.09

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Template data for lava-server
 
2
=============================
 
3
 
 
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.
 
8
 
 
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.
 
13
 
 
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.
 
19
 
 
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.
 
24
 
 
25
Developer builds
 
26
================
 
27
 
 
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
 
36
tag.)
 
37
 
 
38
Developer builds need various Debian/Ubuntu package tools installed:
 
39
 
 
40
$ sudo apt-get install dpkg-dev
 
41
$ sudo apt-get --no-install-recommends install devscripts
 
42
 
 
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
 
46
already installed.
 
47
 
 
48
A log of the Debian package build will be placed alongside the
 
49
packages.
 
50
 
 
51
The Debian packaging for lava-server and lava-dispatcher are
 
52
available at http://github.com/Linaro/
 
53
 
 
54
Building KVM images for LAVA
 
55
============================
 
56
 
 
57
 git clone git://git.linaro.org/lava/lava-vmdebootstrap.git
 
58
 
 
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.
 
63
 
 
64
Example invocation::
 
65
 
 
66
 $ sudo ./lava-vmdebootstrap --image=myimage.img
 
67
 
 
68
To run the test image, make sure it is writeable:
 
69
 
 
70
 $ sudo chmod a+w ./myimage.img
 
71
 
 
72
Execute using qemu, e.g. on amd64 using qemu-system-x86_64:
 
73
 
 
74
 $ qemu-system-x86_64 ./myimage.img
 
75
 
 
76
See vmdebootstrap(1)
 
77
 
 
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:
 
82
 
 
83
 sudo vmdebootstrap \
 
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
 
90
 
 
91
This command extends lava-vmdebootstrap to make a 4G image based on
 
92
Debian testing using the UK Debian mirror:
 
93
 
 
94
 sudo vmdebootstrap \
 
95
  --custom-package='linaro-overlay_1112.2_all.deb' \
 
96
  --custom-package='linaro-overlay-minimal_1112.2_all.deb' \
 
97
  --enable-dhcp \
 
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