Linux Foundation Wiki

project collaboration site

User Tools

Site Tools


B@D Setup and Configuration (2/5)

This set of instructions assumes you have already deployed B@D. If that is not the case please go back to the B@D Virtual Machine Deployment wiki page.

This wiki page will guide you through the configuration process of the Virtual Machine (VM) that contains Kernel CI and LAVA. Kernel CI is used to build, boot and report results whereas LAVA is used to offer a robust automated testing language, a testing engine and the reporting of results.

Vagrant Setup

1. Connect to the Virtual Machine

user@host:board-at-desk-single-dev$ vagrant ssh

 Linux stretch 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64
 The programs included with the Debian GNU/Linux system are free software;
 the exact distribution terms for each program are described in the
 individual files in /usr/share/doc/*/copyright.
 Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
 permitted by applicable law. 
 Last login: Fri Oct 13 08:37:41 2017 from

2. If you downloaded and imported the pre-provisioned VM box, unless you wish to configure emailed notifications (in which case first consult Setting up Notifications), please go to the Beaglebone Black Setup & Configuration wiki page to setup the Beaglebone Black for use with the B@D Virtual Machine since the rest of this page has already been done for you!

If you are building the VM from scratch using Vagrant, please continue to the next step.

Create a LAVA Superuser Account

3. Set up a Superuser for Lava Job maintenance.

vagrant@stretch:~$ sudo lava-server manage createsuperuser --username lavauser

Password: mylava1234

Password (again): mylava1234

Superuser created successfully.

Note: Replace <lavauser> with your desired username and replace with that user’s email address. Select a password and enter it twice.

Configure the LAVA Health Check Jobs for both Devices

4. On your host machine, open a web browser and enter the following in the address box:


5. The LAVA Home Page is displayed in your web browser. Log in to the web server as the superuser:

  • Click the login link in the upper right-hand corner of the Lava Server website
  • Enter the username: lavauser
  • Enter the password: mylava1234

6. From the LAVA homepage, click on your username in the upper right-hand corner of the page. This displays a menu of actions.

  • Click on Administration
  • Scroll down to section labelled “LAVA_SCHEDULER_APP” and click on “Device types”

7. Click on the qemu device type

8. Copy and paste the contents of the file /vagrant/tests/qemu-health-check.yaml into the Health check job textbox. Unless you are using QEMU tests regularly we suggest that you change the pull down 'Initiate health checks by hours or by jobs.' to use 'jobs', as the health check incurs a heavy system load as well as using lots of disk space.

9. Click on the Save button in the lower right-hand corner of the page

Note: Once the health-check job is saved to the device type, the job is automatically started by LAVA.

10. Click on the bbb01 device type

11. Copy and paste the contents of the file /vagrant/tests/bbb_debian_local.yaml into the Health check job textbox.

12. Click on the Save button in the lower right-hand corner of the page. Note that this health check, which will now run automatically, will fail - i.e. it will be marked as incomplete - because the Beaglebone Black has not yet been fully set up.

Setting up notifications

If you wish to set up emailed notifications - to yourself or to the Cip-testing-results list, if you have appropriate permissions, proceed as follows. Inevitably you will need information as to how to send email within your setup and the address of your SMTP server. If you don't need these settings then continue to step 7.

1. If you are comfortable with configuring exim the VM initially has an exim installation and you should modify appropriate files within /etc/exim4 to match your configuration. Then proceed to point 5 after checking that your setup works.

Alternatively: 2. If you would prefer a lighter setup, install SSMTP Server

  vagrant@guest:~$ sudo apt-get install ssmtp

3. Configure SSMTP Server

  vagrant@guest:~$ sudo nano /etc/ssmtp/ssmtp.conf  
  mailhub=your smtp server:port  
  #TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt - This may be needed - see below


UseSTARTTLS: Set it Yes if SMTP server uses TLS else No. (Gmail wants this to be Yes)
TLS_CA_File: This may be required at some point, if you face issues like send-mail: Cannot open

4. Test sending mail using SSMTP

vagrant@guest:~$ /usr/sbin/ssmtp destinationAddress
Subject: This is Subject Line
Email content line 1
Email content line 2
Email content line 3
<Press Control-D when finished composing email body>

5. If the email is received, modify your health check with the following section:

    status: complete
  - to:
    method: irc
    handle: yourIRCHandle
    server: # change if required
  - to:
    method: email
    email: desiredRecipientEmailAddress

If you don't wish to be notified via IRC then just remove that first to: section - but otherwise change the yourIRCHandle appropriately!

6. Note that the current version of LAVA used in B@D also supports finished as a status, so that an email will be received whatever the status of the health check. To be notified about failures change complete to incomplete. See Help in B@D's VM for further information - for this link to work the VM needs to be running.

7. Amend site settings so that the site is localhost:8080 - otherwise the link to the results in the email/IRC will reference You will need to restart the VM after making this change.

7. Next, go to the Beaglebone Black Setup & Configuration wiki page to setup the Beaglebone Black for use with the B@D Virtual Machine.

Back to the B@D Virtual Machine Deployment wiki page

civilinfrastructureplatform/ciptestingboardatdesksingledevsetup.txt · Last modified: 2017/11/07 15:11 by rajmarshall