Differences between revisions 9 and 10
Revision 9 as of 2013-03-06 16:03:06
Size: 1647
Editor: 118
Comment:
Revision 10 as of 2013-05-10 04:15:33
Size: 3467
Editor: c-67-173-253-207
Comment:
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
$ ssh lava@localhost -p 2222  ssh lava@localhost -p 2222
Line 22: Line 22:
$ sudo apt-get install bzr  sudo apt-get install bzr
Line 25: Line 25:
$ bzr branch lp:lava-deployment-tool
$ cd lava-deployment-tool
 bzr branch lp:lava-deployment-tool
 cd lava-deployment-tool
Line 29: Line 29:
$ ./lava-deployment-tool setup -n  ./lava-deployment-tool setup -n
Line 32: Line 32:
$ ./lava-deployment-tool install -n mylava  ./lava-deployment-tool install -n mylava
Line 34: Line 34:
# create administrator users
$ ./lava-deployment-tool manage mylava createsuperuser
# create administrator users  {user: admin, password: admin}
 ./lava-deployment-tool manage mylava createsuperuser
Line 38: Line 38:
$ sudo apt-get install qemu-system  sudo apt-get install qemu-system
Line 41: Line 41:
$ cd /srv/lava/instances/mylava
$ mkdir
etc/lava-dispatcher/devices
$ cd etc/lava-dispatcher/devices
$ nano
qemu01.conf
$
cd
 mkdir /srv/lava/instances/mylava/etc/lava-dispatcher/devices
 echo "device_type = qemu" > /srv/lava/instances/mylava/etc/lava-dispatcher/devices/qemu01.conf
Line 48: Line 45:
$ sudo apt-get install lava-scheduler-tool lava-dashboard-tool  sudo apt-get install lava-scheduler-tool lava-dashboard-tool
Line 51: Line 48:
$ lava-dashboard-tool auth-add http://admin@localhost/RPC2/  lava-dashboard-tool auth-add http://admin@localhost/RPC2/

### (You need to get the authentication token from LAVA's web interface)
### sign in as admin / admin
### Browse to API->Authentication Tokens
### Create New Token
### Copy and paste into the shell that shows up below
Line 57: Line 60:
$ lava-dashboard-tool submit-job http://admin@localhost/RPC2/ qemu.json  lava-dashboard-tool submit-job http://admin@localhost/RPC2/ qemu.json

#######
# get qemu test image: /home/userx/lava/beagle-nano.img.gz
## http://releases.linaro.org/images/12.03/oneiric/nano/beagle-nano.img.gz

#######
# create test shell file: /home/userx/lava/lava-test-shell-simple.yaml
####################################################
############ lava-test-shell-simple.yaml ###########
####################################################
metadata:
  name: lava-test-shell-simple
  version: 1.0
  format: "Lava-Test-Shell Test Definition 1.0"

run:
  steps:
    - lava-test-case yeah-it-works --result pass

parse:
  pattern: "^\\s*(?P<test_case_id>\\w+)=(?P<result>\\w+)\\s*$"

#######
# create job file: /home/userx/lava/qemu.json
####################################################
##################### qemu.json ####################
####################################################
{
  "timeout": 1800,
  "job_name": "qemu-test",
  "device_type": "qemu",
  "logging_level": "DEBUG",
  "actions": [
    {
      "command": "deploy_linaro_image",
      "parameters": {
        "image": "file:///home/userx/lava/beagle-nano.img.gz"
        }
    },
    {
      "command": "lava_test_shell",
      "parameters": {
        "timeout": 1800,
        "testdef_urls": [
            "file:///home/userx/lava/lava-test-shell-simple.yaml"
        ]
      }
    },
    {
        "command": "submit_results",
        "parameters": {
            "stream": "/anonymous/qemu/",
            "server": "http://localhost/RPC2/"
        }
    }
  ]
}

LAVA VM disk image for training

Download the VM

VM DISK IMAGE DOWNLOAD

SHA1SUM: ac7fd95d3e408fd8aa0f4428e76a39cdbb54b1b7

Slide sets

Commands for copy and paste

# connecting to the VM
 ssh lava@localhost -p 2222

# install bzr
 sudo apt-get install bzr

# get lava-deployment-tool
 bzr branch lp:lava-deployment-tool
 cd lava-deployment-tool

# setup the system
 ./lava-deployment-tool setup -n

# install lava instance
 ./lava-deployment-tool install -n mylava

# create administrator users  {user: admin, password: admin}
 ./lava-deployment-tool manage mylava createsuperuser

# install QEMU
 sudo apt-get install qemu-system

# Create device configuration file
 mkdir /srv/lava/instances/mylava/etc/lava-dispatcher/devices
 echo "device_type = qemu" > /srv/lava/instances/mylava/etc/lava-dispatcher/devices/qemu01.conf 

# install client tools
 sudo apt-get install lava-scheduler-tool lava-dashboard-tool

# authenticate to the API
 lava-dashboard-tool auth-add http://admin@localhost/RPC2/

### (You need to get the authentication token from LAVA's web interface)
### sign in as admin / admin
### Browse to API->Authentication Tokens
### Create New Token
### Copy and paste into the shell that shows up below

# create bundle stream
lava-dashboard-tool make-stream --dashboard-url http://admin@localhost/RPC2/ /anonymous/qemu/

# submit a job 
 lava-dashboard-tool submit-job http://admin@localhost/RPC2/ qemu.json

#######
# get qemu test image: /home/userx/lava/beagle-nano.img.gz
##  http://releases.linaro.org/images/12.03/oneiric/nano/beagle-nano.img.gz 

#######
# create test shell file: /home/userx/lava/lava-test-shell-simple.yaml
####################################################
############ lava-test-shell-simple.yaml ###########
####################################################
metadata:
  name: lava-test-shell-simple
  version: 1.0
  format: "Lava-Test-Shell Test Definition 1.0"

run:
  steps:
    - lava-test-case yeah-it-works --result pass

parse:
  pattern: "^\\s*(?P<test_case_id>\\w+)=(?P<result>\\w+)\\s*$"

#######
# create job file: /home/userx/lava/qemu.json
####################################################
##################### qemu.json ####################
####################################################
{
  "timeout": 1800,
  "job_name": "qemu-test",
  "device_type": "qemu",
  "logging_level": "DEBUG",
  "actions": [
    {
      "command": "deploy_linaro_image",
      "parameters": {
        "image": "file:///home/userx/lava/beagle-nano.img.gz"
        }
    },
    {
      "command": "lava_test_shell",
      "parameters": {
        "timeout": 1800,
        "testdef_urls": [
            "file:///home/userx/lava/lava-test-shell-simple.yaml"
        ]
      }
    },
    {
        "command": "submit_results",
        "parameters": {
            "stream": "/anonymous/qemu/",
            "server": "http://localhost/RPC2/"
        }
    }
  ]
}

Platform/LAVA/TrainingVM (last modified 2013-05-15 20:37:44)