From zero to first test in your own LAVA laboratory (in less than - - PowerPoint PPT Presentation

from zero to first test in your own lava laboratory
SMART_READER_LITE
LIVE PREVIEW

From zero to first test in your own LAVA laboratory (in less than - - PowerPoint PPT Presentation

From zero to first test in your own LAVA laboratory (in less than 45 minutes) . Pawe Wieczorek February 21, 2017 Samsung R&D Institute Poland Agenda . 1. Introduction 2. Laboratory setup 3. Tools 4. Next steps 5. Conclusion 1/31


slide-1
SLIDE 1

From zero to first test in your own LAVA laboratory

(in less than 45 minutes)

.

Paweł Wieczorek February 21, 2017

Samsung R&D Institute Poland

slide-2
SLIDE 2

Agenda .

  • 1. Introduction
  • 2. Laboratory setup
  • 3. Tools
  • 4. Next steps
  • 5. Conclusion

1/31

slide-3
SLIDE 3

Introduction .

slide-4
SLIDE 4

What is LAVA? .

  • Linaro Automated Validation Architecture
  • Automation system for deploying operating systems
  • Supports both physical and virtual hardware
  • Allows running boot, bootloader and system level tests

(extra hardware may be required)

2/31

slide-5
SLIDE 5

When is it needed? (Single target) .

3/31

slide-6
SLIDE 6

When is it needed? (Single instance) .

4/31

slide-7
SLIDE 7

When is it needed? (Multiple targets) .

5/31

slide-8
SLIDE 8

When is it needed? (New architecture) .

6/31

slide-9
SLIDE 9

When is it needed? (Multiple instances) .

7/31

slide-10
SLIDE 10

When is it needed? (Abstraction layer) .

8/31

slide-11
SLIDE 11

What are LAVA use cases? .

  • Complex device management
  • Resource allocation (various capabilities)
  • Scheduling and dispatching tasks on numerous devices

9/31

slide-12
SLIDE 12

How does it help? .

  • Provides unified device environment
  • Allows test execution parallelization
  • Collects and tracks results over time
  • Supports direct device access
  • Hacking Sessions
  • Board Overseer

10/31

slide-13
SLIDE 13

Who uses LAVA? .

Kernel CI

11/31

slide-14
SLIDE 14

Laboratory setup .

slide-15
SLIDE 15

Where to start? .

  • Standalone instance
  • Virtual devices only
  • Simple tests (health checks)

12/31

slide-16
SLIDE 16

Rationale .

  • Reduce initial complexity
  • Familiarize with the new workflow
  • Understand LAVA concepts
  • Postpone learning how to write tests

13/31

slide-17
SLIDE 17

Requirements .

Machine with supported Debian release (Ubuntu support frozen)

14/31

slide-18
SLIDE 18

Necessary files .

  • System image
  • Health check job
  • Device type template
  • Device dictionary (instance definition):

{% extends 'qemu.jinja2' %} {% set mac_addr = '52:54:00:12:34:AB' %} {% set memory = '1024' %}

15/31

slide-19
SLIDE 19

Installation – Host system .

Step #1: Database & metapackage # apt install postgresql # apt install lava

16/31

slide-20
SLIDE 20

Installation – Web server .

Step #2: Enable access via web UI # a2dissite 000-default.conf # a2enmod proxy # a2enmod proxy_http # a2ensite lava-server.conf # service apache2 restart

17/31

slide-21
SLIDE 21

Configuration – Administrator .

Step #3: Add main laboratory operator # lava-server manage createsuperuser

18/31

slide-22
SLIDE 22

Configuration – Devices .

Step #4: Add devices to LAVA laboratory # lava-server manage add-device-type qemu # lava-server manage add-device

  • -device-type qemu qemu01

# lava-server manage device-dictionary

  • -hostname qemu01 --import qemu01.dict

19/31

slide-23
SLIDE 23

Executing tests .

CLI $ lava-tool submit-job --help Web UI

20/31

slide-24
SLIDE 24

Tools .

slide-25
SLIDE 25

Configuration management .

  • Environment reproducibility
  • Same on staging and production

environment

  • Choose personal favourite
  • LAVA laboratory roles coming to Ansible

Galaxy soon

21/31

slide-26
SLIDE 26

Virtual machine management .

  • New machines brought up instantly
  • Wide range of prebuilt boxes (careful!)
  • Flexible (covers various use cases)
  • User-friendly CLI/GUI tools

22/31

slide-27
SLIDE 27

Next steps .

slide-28
SLIDE 28

Further details .

  • Adding new device types to LAVA

https://validation.linaro.org/static/docs/v2/first-devices.html# adding-new-device-types

  • Writing tests

https://validation.linaro.org/static/docs/v2/developing-tests.html

  • Add your lab to Kernel CI

https://github.com/kernelci/lava-ci#add-your-lab-to-kernelci

23/31

slide-29
SLIDE 29

Good reads .

  • AGL Testframework setup instructions

https://wiki.automotivelinux.org/agl-testframework/setup

  • Civil Infrastructure Platform Testing initiative

https: //wiki.linuxfoundation.org/civilinfrastructureplatform/ciptesting

24/31

slide-30
SLIDE 30

Interesting talks .

  • Getting Started in LAVA V2 – Bill Fletcher (LAS16-TR05)
  • Building a Boards Farm: Continuous Integration and Remote Control –

Antoine Tenart & Quentin Schulz (ELCE 2016)

  • Testing with volcanoes - Fuego+LAVA – Jan-Simon Möller (ELC 2017)

25/31

slide-31
SLIDE 31

Help? .

  • Comprehensive documentation

https://validation.linaro.org/static/docs/v2

  • Lava-users mailing list

https://lists.linaro.org/mailman/listinfo/lava-users

  • #linaro-lava on Freenode

http://webchat.freenode.net/?channels=linaro-lava

26/31

slide-32
SLIDE 32

Conclusion .

slide-33
SLIDE 33

Summary .

  • Easy installation thanks to package repositories
  • Instant setup (once all requirements are met)
  • Environment unification for various device types
  • No cost test execution parallelization
  • Responsibilities division (farm maintained by its operators)

27/31

slide-34
SLIDE 34

Final thoughts .

  • Exhaustive documentation has no downsides
  • No need to reinvent the wheel in board farm management
  • Automation always pays off in the long term

28/31

slide-35
SLIDE 35

Questions?

28/31

slide-36
SLIDE 36

Thank you!

Paweł Wieczorek

p.wieczorek2@samsung.com Samsung R&D Institute Poland

slide-37
SLIDE 37

Acknowledgements

  • Bill Fletcher's YouTube channel
  • Senthil Kumaran S – personal website
  • Metropolis – simple, modern Beamer theme
slide-38
SLIDE 38

Pictures used

  • https://validation.linaro.org/static/docs/v2/_images/lava.svg
  • https://c1.staticflickr.com/4/3845/14491195107_80cc27784a_b.jpg
  • http://core0.staticworld.net/images/article/2016/04/3.artik-10-developer-board-100657852-large.jpg
  • https://upload.wikimedia.org/wikipedia/commons/e/ee/Hardkernel_Odroid_XU3_Board.jpg
  • https://c2.staticflickr.com/4/3862/14903812841_575f03a6c4_b.jpg
  • https://www.linaro.org/wp-content/uploads/2014/03/RGB-Linaro_Standard.png
  • https://upload.wikimedia.org/wikipedia/commons/4/4a/Debian-OpenLogo.svg
  • https://wiki.automotivelinux.org/_media/wiki/logo.png
  • https://upload.wikimedia.org/wikipedia/commons/4/45/Qemu_logo.svg
  • https://upload.wikimedia.org/wikipedia/commons/0/05/Ansible_Logo.png
  • https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Vagrant.png/394px-Vagrant.png
  • https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/Libvirt_logo.svg/800px-Libvirt_logo.svg.png