Meego Wiki
Views

Quality/QA-tools/OTS/UserDocumentation/Installation rpm

From MeeGo wiki
< Quality | QA-tools | OTS | UserDocumentation(Difference between revisions)
Jump to: navigation, search
(OTS worker installation)
m (Preparation)
 
(3 intermediate revisions not shown)
Line 42: Line 42:
* Get sources
* Get sources
  git clone git://gitorious.org/meego-quality-assurance/ots.git
  git clone git://gitorious.org/meego-quality-assurance/ots.git
 +
 +
* List tags
 +
git tag -l
 +
 +
* Checkout the latest tag
 +
git checkout <tag_name>
* Get building tools
* Get building tools
-
  yum rpm-build python-setuptools
+
  yum install rpm-build python-setuptools
* Build packages
* Build packages
Line 71: Line 77:
* Configure OTS server settings
* Configure OTS server settings
-
  sudo nano /etc/ots_server.ini
+
  sudo nano /etc/ots/server.conf
Recommended to change following:
Recommended to change following:
Line 93: Line 99:
* Configure OTS worker settings
* Configure OTS worker settings
-
  sudo nano /etc/ots.ini
+
  sudo nano /etc/ots/worker.conf
Change 'devicegroup', example meego_n900
Change 'devicegroup', example meego_n900
Line 130: Line 136:
* Configure conductor to use rpm and fetch /var/log/messages
* Configure conductor to use rpm and fetch /var/log/messages
-
  sudo nano /etc/conductor.conf
+
  sudo nano /etc/ots/conductor.conf
-
 
+
-
* If you want run ots_worker as user, copy SSH keys to the user and make udev rule for n900
+
-
install-eat-key.sh
+
-
sudo nano /etc/udev/rules.d/meego-n900.rules
+
-
SUBSYSTEMS=="usb", ATTR{idVendor}=="0421", ATTR{idProduct}=="0105", GROUP="<group>", MODE="0664"
+
-
 
+
-
* Create a power_cycle.sh script for turning N900 on/off. This requires external accessory, like [[Quality/QA-tools/hat-control|HAT]]
+
-
sudo nano /usr/bin/power_cycle.sh
+
-
 
+
-
#!/bin/bash
+
-
+
-
hat_drv &
+
-
hat_ctrl -pwr1=off
+
-
hat_ctrl -usb1data=off
+
-
hat_ctrl -usb1pwr=off
+
-
sleep 2;
+
-
hat_ctrl -usb1pwr=on
+
-
hat_ctrl -usb1data=on
+
-
hat_ctrl -pwr1=on
+
-
killall hat_drv
+
* Test manually that everything is OK, this is executed in the worker
* Test manually that everything is OK, this is executed in the worker
-
  conductor -u <image url>
+
  sudo conductor -u <image url>
* Start OTS worker
* Start OTS worker
-
  ots_worker
+
  sudo ots_worker

Latest revision as of 08:30, 23 November 2011

Contents

OTS 0.8.x installation RPM

These instructions have been tested with Fedora 13. Execute commands as root.

In MeeGo netbook, at least following packages needs to be installed manually:

python-amqp, python-django, minixsv, rabbitmq-server

Network Setup

Using static IP addresses on all OTS machines is strongly recommended. It is possible to setup the system also with dynamic IP addresses but it might cause problems every now and then because IP's and hostnames change.

Note All OTS machines need to be able to access other OTS machines based on their hostname.

How to check that DNS names are correct:

1. Check OTS server's hostname

hostname

2. Ping the OTS server's hostname from the OTS worker

ping <hostname>

If ping fails, add manually OTS server's hostname to OTS workers /etc/hosts file

<IP> <hostname>

Preparation

There are two ways of getting OTS binary packages: from the source code or from the MeeGo Tools:Testing repository. From the repository you can get the stable version and from the source code the development version.

  • Add Tools:Testing source to /etc/yum.repos.d/
cd /etc/yum.repos.d/
yum install wget nano
wget http://download.meego.com/live/Tools:/Testing/Fedora13/Tools:Testing.repo
  • Update the repositories
yum check-update

Build packages from source (optional)

  • Install git core
yum install git-core
  • Get sources
git clone git://gitorious.org/meego-quality-assurance/ots.git
  • List tags
git tag -l
  • Checkout the latest tag
git checkout <tag_name>
  • Get building tools
yum install rpm-build python-setuptools
  • Build packages
mv ots python-ots-0.8.x
tar czf python-ots-0.8.x.tar.gz python-ots-0.8.x
rpmbuild -tb python-ots-0.8.x.tar.gz

OTS server installation

  • Install dependencies
yum install Django python-amqplib python-configobj rabbitmq-server test-definition
easy_install minixsv
yum install python-setuptools
  • Install OTS server components
yum install python-ots-common python-ots-results python-ots-server

or if you are using own built packages

rpm -i ...
  • Add rabbitmq to start on boot
chkconfig --add rabbitmq-server
chkconfig rabbitmq-server on
  • Start rabbitmq server
/etc/init.d/rabbitmq-server start
  • Configure OTS server settings
sudo nano /etc/ots/server.conf

Recommended to change following:

'example_sw_product', example to 'meego_product'
'devicegroup', example to 'meego_n900'
  • Install OTS server plug-ins

See plug-ins from OTS Plug-ins

  • Start OTS server
ots_server

OTS worker installation

  • Install dependencies
yum install python-amqplib testrunner-lite
  • Install OTS worker packages
yum install python-ots-common python-ots-worker
  • Configure OTS worker settings
sudo nano /etc/ots/worker.conf

Change 'devicegroup', example meego_n900

Change 'host' to server's address

  • Start OTS worker (as root)
ots_worker

NOTE: if worker failed to start up with error like "socket.error: [Errno 113] No route to host", check that ots-worker is able to connect to ots-server

OTS tools

Tools are used for triggering test runs from the command line.

  • Install OTS tools
yum install python-ots-tools
  • Trigger a test run
ots_trigger -s localhost:8080 -b test_build -i http://url_to_image -p example_sw_product -e test@man.com
  • Kickstart file for automation can be found from
http://meego.gitorious.org/meego-quality-assurance/enables-automated-testing/blobs/ks/meego-n900-autotest.ks
  • You need to build the image with mic-image-creator with parameters:
--save-kernel --package=tar.gz

How to install N900 automation tools to OTS worker

  • Install dependencies
yum install meego-ai-flaster eat-host

  • Get N900 flasher from the Nokia's tablets-dev portal
http://tablets-dev.nokia.com/maemo-dev-env-downloads.php?f=maemo_flasher-3.5_2.5.2.2.tar.gz
Compile the flasher
  • Configure conductor to use rpm and fetch /var/log/messages
sudo nano /etc/ots/conductor.conf
  • Test manually that everything is OK, this is executed in the worker
sudo conductor -u <image url>
  • Start OTS worker
sudo ots_worker
Personal tools