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 <[email protected]>
---
  .../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 @@
                        </literallayout>
                        </para></listitem>
                    <listitem><para>
-                      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:
                        <literallayout class='monospaced'>
-   /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds
-                      </literallayout>
-                      Here is an example:
-                      <literallayout class='monospaced'>
-   #!/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
                        </literallayout>
                        </para></listitem>
                </orderedlist>

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



--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to