From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 0FB24E00825; Tue, 5 Jul 2016 07:03:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.65 listed in list.dnswl.org] Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D2125E007A2 for ; Tue, 5 Jul 2016 07:03:12 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 05 Jul 2016 07:03:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,580,1459839600"; d="scan'208";a="1001275162" Received: from linux.intel.com ([10.54.29.200]) by fmsmga001.fm.intel.com with ESMTP; 05 Jul 2016 07:03:11 -0700 Received: from linux.intel.com (vmed.fi.intel.com [10.237.72.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTP id 60C356A4006; Tue, 5 Jul 2016 07:03:05 -0700 (PDT) Date: Tue, 5 Jul 2016 16:53:11 +0300 From: Ed Bartosh To: Michael Wood Message-ID: <20160705135311.GA3995@linux.intel.com> References: <57729AAE.80107@intel.com> MIME-Version: 1.0 In-Reply-To: <57729AAE.80107@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toaster@yoctoproject.org Subject: Re: [PATCH 09/10] toaster-manual: update runbuilds instructions X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: ed.bartosh@linux.intel.com List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 14:03:17 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 28, 2016 at 04:41:34PM +0100, Michael Wood wrote: > On 27/06/16 16:24, Ed Bartosh wrote: > >As Toaster runbuild heavily depends on the environment set by > >oe-init-build-env and toaster script, running runbuilds is not > >enough anymore. Both above mentioned scripts shoud be sourced > >in isolated shell environment using screen or tmux terminal > >multiplexers to make runbuilds service working. > > > >Signed-off-by: Ed Bartosh > >--- > > .../toaster-manual-setup-and-use.xml | 23 ++++++++++------------ > > 1 file changed, 10 insertions(+), 13 deletions(-) > > > >diff --git a/documentation/toaster-manual/toaster-manual-setup-and-use.xml b/documentation/toaster-manual/toaster-manual-setup-and-use.xml > >index febbd15..c37fa65 100644 > >--- a/documentation/toaster-manual/toaster-manual-setup-and-use.xml > >+++ b/documentation/toaster-manual/toaster-manual-setup-and-use.xml > >@@ -438,20 +438,17 @@ > > > > > > > >- Install the build runner service. > >- This service needs to be running in order to dispatch > >- builds. > >- Use this command: > >+ Run Toaster script with 'noweb' command line option. > >+ This needs to be done in order to dispatch builds. > >+ Note that this is better to do in screen or tmux session to be able to detach from it > >+ without stopping Toaster from dispatching builds. > >+ Use these commands: > > > >- /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds > >- > >- Here is an example: > >- > >- #!/bin/sh > >- # toaster run builds dispatcher > >- cd /var/www/toaster/ > >- source ./venv/bin/activate > >- ./bitbake/lib/toaster/manage.py runbuilds > >+ $ sudo su - toaster -s /bin/bash > >+ $ screen > >+ $ cd poky > >+ $ . oe-init-build-env > >+ $ . ../bitbake/bin/toaster start noweb > > > > > > > > We can't really suggest that people use screen or tmux for a > production system, as that requires manual intervention to start and > stop it. The user which they're running this as might not actually > be a full blown system user either and we wouldn't recommend it > being one. A better approach would be to write a systemd or sysvint, > upstart etc service. e.g. > > author "Michael W" > description "start and stop toaster-next build service" > version "1.0" > > start on started networking > stop on runlevel [!2345] > > respawn > > script > exec su toasterbuilder -c source oe-init-build-env && export > DJANGO_SETTINGS_MODULE=toastermain.settings-production && source > toaster start noweb > > end script Thank you for the suggestions! I've added explanation of how to create and run systemd service. Please, review my branch ed/toaster/python3-documentation -- Regards, Ed