From patchwork Thu Sep 20 15:51:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 11580 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C32FA23E57 for ; Thu, 20 Sep 2012 15:51:16 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2849F3D099CB for ; Thu, 20 Sep 2012 15:51:15 +0000 (UTC) Received: by ieje10 with SMTP id e10so3128988iej.11 for ; Thu, 20 Sep 2012 08:51:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=ycUnn0luWqZUX7FavBCofj9QTMN1zFTo2B068qTo9s4=; b=m55Vmvrfx2Tsdj0qBpKqqc44KO5Y4yzBaenWB0v6gw/SDAOgEsYftvvOvQ38doWw+Y RzDEeU+dRQjpph0w9XWd/ebckgr9x03NXaN2/1fNwdtGSpiL7l5dFpZ+0sjYLca8Ur2t y9UlPBN08CZxjdhQCvTU99katjgzpUx952igu1ANwYyD2l38mB8Dg1YfJx4+n6id/0Uu nwzfIe04f0uLaB5oIqmLeBhNBvYDXfH7mJtgERzK1MKVFpLWCEHevoPg/hhjRsPYeClt DTiK2E2s0x/Wlo7a2j56rmECAMQcEtXgqDLwzy+kl1QGzlI2t7diPj5wgwC0RPN5gn08 cL5Q== Received: by 10.50.217.227 with SMTP id pb3mr2870060igc.28.1348156274542; Thu, 20 Sep 2012 08:51:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp82998igc; Thu, 20 Sep 2012 08:51:12 -0700 (PDT) Received: by 10.180.93.8 with SMTP id cq8mr5331470wib.16.1348156271734; Thu, 20 Sep 2012 08:51:11 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id n6si7943746wee.121.2012.09.20.08.51.11 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 08:51:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TEj1y-0006Rr-EE for ; Thu, 20 Sep 2012 15:51:10 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 4900CE2237 for ; Thu, 20 Sep 2012 15:51:10 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-scheduler X-Launchpad-Branch: ~linaro-validation/lava-scheduler/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 212 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 212: update usage doc Message-Id: <20120920155110.18813.43233.launchpad@ackee.canonical.com> Date: Thu, 20 Sep 2012 15:51:10 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15985"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 42a8fd4a3dc8e91e47098d189d6a44e2cfb8e1be X-Gm-Message-State: ALoCoQlepaEf1ct5UWzNn5tpUkhgudMJEbcIOYN59GKaB3wOl1C1K0cUzOMyUZ07SX456QwgldOj ------------------------------------------------------------ revno: 212 committer: Andy Doan branch nick: lava-scheduler timestamp: Thu 2012-09-20 10:49:55 -0500 message: update usage doc This gets it back on par with what was in the wiki at: https://wiki.linaro.org/Platform/Validation/LAVA/SubmittingTests Next step will be to kill the wiki page and point here. modified: doc/usage.rst --- lp:lava-scheduler https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk You are subscribed to branch lp:lava-scheduler. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription === modified file 'doc/usage.rst' --- doc/usage.rst 2011-11-16 21:02:31 +0000 +++ doc/usage.rst 2012-09-20 15:49:55 +0000 @@ -9,26 +9,44 @@ Generating a Token ================== -Before a job can be submitted, a token must be generated. Logged in as -a user with *lava_scheduler_app | test job | Can add test job* and -*linaro_django_xmlrpc | auth token | Can add auth token* permissions -enabled, select *API* from the menu at the top, then *Authentication +Before a job can be submitted, a token must be generated. You can create a +token from the *API* menu at the top, then select *Authentication Tokens*. From this page, click on *Create a new token*. Once you have created at least one token, you can click *Display this token* to show it. The token string can be copied from the browser for pasting into a tool later, or saved to a file. -Using lava-scheduler-tool -========================= -LAVA Scheduler Tool is actually a plugin to LAVA Tool. It can be -installed from debian packages, source, or pypi in the same way -described for installing the scheduler in the installation section. +*NOTE*: Your user account may need the proper permission to allow it to +submit jobs. The user account will need two permissions:: + + lava_scheduler_app | test job | Can add test job + linaro_django_xmlrpc | auth token | Can add auth token + +added to it via the Django admin panel. + +Configuring lava-scheduler-tool +=============================== +There are 3 ways to install the tool:: + + # easiest + sudo add-apt-repository ppa:linaro-maintainers/tools + sudo apt-get update + sudo apt-get install lava-scheduler-tool + + # from pypi + pip install lava-scheduler-tool + + # from source for development with: + bzr branch lp:lava-scheduler-tool + cd lava-scheduler-tool ; ./setup.py develop + +You'll probaly also want the lava-dashboard-tool installed as well. This can +be done using the same steps as outlined above. To submit jobs using the scheduler, you should first set up the server -to which you will be submitting jobs. -With lava-scheduler-tool installed, run :: +to which you will be submitting jobs:: - $ lava-tool auth-add https://user@example.com/lava-server/RPC2/ + $ lava-tool auth-add https://user@example.com/RPC2/ In this example, *user@example.com* should be replaced with your userid and webserver. Using https is *highly* recommended since it will ensure @@ -41,11 +59,19 @@ to a file and use the --token-file parameter to specify the file containing your token. -Once the auth-add step is complete, you can submit jobs by running :: - - $ lava-tool submit-job http://user@example.com/lava-server/RPC2/ - jobfile.json - -.. todo:: - Add link to information about constructing a job - lava-project might - be a better place to put usage information in general +Using lava-scheduler-tool +========================= + +The first thing you may want to do is create a bundle stream in the LAVA +dashboard where you'll put your bundles. This is done with:: + + lava-dashboard-tool make-stream --dashboard-url http://example.com/RPC2/ /anonymous/USERNAME/ + +Next you'll need a job file. You can read about an example job file `here`_ + +.. _here: http://lava.readthedocs.org/en/latest/qemu-deploy.html + +You can now submit jobs by running :: + + $ lava-scheduler-tool submit-job http://user@example.com/RPC2/ jobfile.json +