diff --git a/documentation/toaster-manual/toaster-manual-setup-and-use.xml b/documentation/toaster-manual/toaster-manual-setup-and-use.xml index b3609c8954..2510c2b878 100644 --- a/documentation/toaster-manual/toaster-manual-setup-and-use.xml +++ b/documentation/toaster-manual/toaster-manual-setup-and-use.xml @@ -440,22 +440,53 @@ - Install the build runner service. - This service needs to be running in order to dispatch - builds. - Use this command: + Prepare the systemd service to run Toaster builds. + Here is a sample configuration file for the service: - /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds + [Unit] + Description=Toaster runbuilds + + [Service] + Type=forking + User=toaster + ExecStart=/usr/bin/screen -d -m -S runbuilds /var/www/toaster/poky/bitbake/lib/toaster/runbuilds-service.sh start + ExecStop=/usr/bin/screen -S runbuilds -X quit + WorkingDirectory=/var/www/toaster/poky + + [Install] + WantedBy=multi-user.target - Here is an example: + Prepare the runbuilds-service.sh + script that you need to place in the + /var/www/toaster/poky/bitbake/lib/toaster/ + directory by setting up executable permissions: - #!/bin/sh - # toaster run builds dispatcher - cd /var/www/toaster/ - source ./venv/bin/activate - ./bitbake/lib/toaster/manage.py runbuilds + #!/bin/bash + + #export http_proxy=http://proxy.host.com:8080 + #export https_proxy=http://proxy.host.com:8080 + #export GIT_PROXY_COMMAND=$HOME/bin/gitproxy + + cd ~/poky/ + source ./oe-init-build-env build + source ../bitbake/bin/toaster $1 noweb + [ "$1" == 'start' ] && /bin/bash + + Run the service: + + # service runbuilds start + + Since the service is running in a detached screen + session, you can attach to it using this command: + + $ sudo su - toaster + $ screen -rS runbuilds + + You can detach from the service again using "Ctrl-a" + followed by "d" key combination. + You can now open up a browser and start using Toaster.