Differences between revisions 16 and 17
Revision 16 as of 2013-05-10 05:10:39
Size: 3812
Editor: c-67-173-253-207
Comment:
Revision 17 as of 2013-05-10 05:53:46
Size: 4090
Editor: c-67-173-253-207
Comment:
Deletions are marked like this. Additions are marked like this.
Line 62: Line 62:
http://localhost/api/tokens/create/
Line 65: Line 67:

# configure device type and device
# Add new device type "qemu"
## http://localhost/admin/lava_scheduler_app/devicetype/add/
# Add new device "qemu01" of device type "qemu"
## http://localhost/admin/lava_scheduler_app/device/add/

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

###
# You may need to login
# bzr launchpad-login <launchpad.net login id>
## make sure your public key is uploaded
## make sure your .ssh/config  .ssh/id_rsa...  is configured properly, etc...
###

# 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-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 from web to shell when prompted
http://localhost/api/tokens/create/


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

# configure device type and device
# Add new device type "qemu"
## http://localhost/admin/lava_scheduler_app/devicetype/add/
# Add new device "qemu01" of device type "qemu"
## http://localhost/admin/lava_scheduler_app/device/add/


######
# store files in lava sub directory
mkdir lava

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

#######
# create test shell file: /home/userx/lava/lava-test-shell-simple.yaml
####################################################
############ lava-test-shell-simple.yaml ###########
####################################################
cd
echo '
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*$"
' > lava/lava-test-shell-simple.yaml;
#######
# create job file: /home/userx/lava/qemu.json
####################################################
##################### qemu.json ####################
####################################################
cd
echo '
{
  "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/qemu.json;

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

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