All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem setting up Toaster production enviroment
@ 2016-05-12 22:32 Sebastian Salmhofer
  2016-05-13  7:05 ` Smith, Elliot
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Salmhofer @ 2016-05-12 22:32 UTC (permalink / raw)
  To: toaster

[-- Attachment #1: Type: text/plain, Size: 11721 bytes --]

Hi,

I am new to Yocto Project and I am trying to set up Toaster. I had no
problem setting up Yocto Project and doing a test build on the command line.
Now I want to use toaster but I can't get it to work for me.
I am using Lubuntu 15.10 but I tried Ubuntu 15.10 as well with the same
results.
I am using the user manual (
http://www.yoctoproject.org/docs/1.8/toaster-manual/toaster-manual.html),
wiki (
https://wiki.yoctoproject.org/wiki/Setting_up_a_production_instance_of_Toaster)
as well as this post (
https://lists.yoctoproject.org/pipermail/toaster/2015-December/003525.html).
I think there are some mistakes in the manual and also on the wiki, but I
managed to get a routine that works without major problems, I will show it
later, and the Toaster GUI works. The problem is I can not build. I always
get an error ('NoneType' object has no attribute 'rfind').
The settings in toaster are all default, release is krogoth and the
build-image is core-image-sato.
The console puts out this:

> 2016-05-12 23:43:06,319 DEBUG runbuilds: starting build Test (Release
> krogoth (krogoth), BBV krogoth (Branch: krogoth)) in progress, environment
> BuildEnvironment object
> 2016-05-12 23:43:06,390 DEBUG localhostbecontroller, our git repos are
> {(u'git://git.yoctoproject.org/meta-yocto', u'krogoth'): [(u'meta-poky',
>                                                            u'meta-poky'),
>
> (u'meta-yocto-bsp',
>
>  u'meta-yocto-bsp')],
>  (u'git://git.yoctoproject.org/poky', u'krogoth'): [('bitbake',
> u'bitbake'),
>                                                     (u'openembedded-core',
>                                                      u'meta')]}
> 2016-05-12 23:43:06,390 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/) git
> remote -v
> 2016-05-12 23:43:06,417 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:06,417 INFO Using pre-checked out source for layer
> {'git://git.yoctoproject.org/poky': u'/var/www/toaster/poky/'}
> 2016-05-12 23:43:06,417 DEBUG localhostbecontroller: giturl git://
> git.yoctoproject.org/poky:krogoth checking out in current directory
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
> 2016-05-12 23:43:06,418 DEBUG localhostbecontroller git-copying
> /var/www/toaster/poky/ to
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
> 2016-05-12 23:43:06,418 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/) git
> clone "/var/www/toaster/poky/"
> "/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth"
> 2016-05-12 23:43:10,665 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:10,666 DEBUG lbc_shellcmmd:
> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
> git remote remove origin
> 2016-05-12 23:43:10,699 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:10,700 DEBUG lbc_shellcmmd:
> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
> git remote add origin "git://git.yoctoproject.org/poky"
> 2016-05-12 23:43:10,725 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:10,726 DEBUG localhostbecontroller: checking out commit
> krogoth to
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
> 2016-05-12 23:43:10,726 DEBUG lbc_shellcmmd:
> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
> git fetch --all && git reset --hard "origin/krogoth"
> 2016-05-12 23:43:17,266 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: selected poky dir
> name
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: localdirpath expected
> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/bitbake'
> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: localdirpath expected
> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/meta'
> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: giturl git://
> git.yoctoproject.org/meta-yocto:krogoth checking out in current directory
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: cloning git://
> git.yoctoproject.org/meta-yocto in
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
> 2016-05-12 23:43:17,267 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/) git
> clone "git://git.yoctoproject.org/meta-yocto"
> "/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth"
> 2016-05-12 23:43:20,155 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:20,155 DEBUG localhostbecontroller: checking out commit
> krogoth to
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
> 2016-05-12 23:43:20,155 DEBUG lbc_shellcmmd:
> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth)
> git fetch --all && git reset --hard "origin/krogoth"
> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: localdirpath expected
> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-poky'
> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: localdirpath expected
> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-yocto-bsp'
> 2016-05-12 23:43:20,810 DEBUG localhostbecontroller: current layer list
> [u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/meta',
>
>  u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-poky',
>
>  u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-yocto-bsp']
> 2016-05-12 23:43:20,813 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/) bash
> -c 'source
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/oe-init-build-env
> /var/www/toaster/poky//build-toaster-2'
> 2016-05-12 23:43:20,972 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:20,987 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/) bash
> -c "source
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/oe-init-build-env
> /var/www/toaster/poky//build-toaster-2; BITBAKE_UI=""
> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/bitbake/bin/bitbake
> --read /var/www/toaster/poky//build-toaster-2/conf/toaster.conf
> --server-only -t xmlrpc -B 0.0.0.0:0"
> 2016-05-12 23:43:22,004 DEBUG localhostbecontroller: shellcmd success
> 2016-05-12 23:43:22,005 DEBUG localhostbecontroller: bitbake port 34754
> 2016-05-12 23:43:22,093 ERROR runbuilds: Error launching build 'NoneType'
> object has no attribute 'rfind'
> Traceback (most recent call last):
>   File
> "/var/www/toaster/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py",
> line 67, in schedule
>     "%d:%d" % (br.pk, bec.be.pk))
>   File
> "/var/www/toaster/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py",
> line 323, in triggerBuild
>     local_bitbake = os.path.join(os.path.dirname(os.getenv('BBBASEDIR')),
>   File "/var/www/toaster/venv/lib/python2.7/posixpath.py", line 122, in
> dirname
>     i = p.rfind('/') + 1
> AttributeError: 'NoneType' object has no attribute 'rfind'
> 2016-05-12 23:43:23,302 DEBUG Saving error 'NoneType' object has no
> attribute 'rfind' (Test (Release krogoth (krogoth), BBV krogoth (Branch:
> krogoth)) failed)


This is how I installed everything:
I was pasting all commands into the console one by one by hand, so this is
not a script, just a "log" what I did. '#' means I didn't past whats after
it in the same line.

First setting up the Yocto Project:

> sudo apt-get install gawk wget git-core diffstat unzip texinfo
> gcc-multilib build-essential chrpath socat
> sudo apt-get install libsdl1.2-dev xterm
> sudo apt-get install autoconf automake libtool libglib2.0-dev
> libarchive-dev
> git clone git://git.yoctoproject.org/poky
> cd poky
> git checkout krogoth


And Toaster:

> sudo apt-get install apache2 libapache2-mod-wsgi mysql-server
> python-virtualenv libmysqlclient-dev python-dev python-mysqldb
> #mysql asks to set root password
>


#I don't care about security, as I am just using it localy at home and at
> this point I just want it to work anyway
> sudo chmod -R 777 /var/www
> mkdir -p /var/www/toaster
> cd /var/www/toaster/
> git clone git://git.yoctoproject.org/poky
> cd poky
> git checkout krogoth
>


cd /var/www/toaster/
> virtualenv venv
> source ./venv/bin/activate
> pip install -r ./poky/bitbake/toaster-requirements.txt
> pip install mysql
> pip install MySQL-python
> pip install mysqlclient
>


#Editing the following in
> /var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py
> #DATABASES = {
> #    'default': {
> #        'ENGINE': 'django.db.backends.mysql',
> #        'NAME': 'toaster_data',
> #        'USER': 'toaster',
> #        'PASSWORD': 'toaster',
> #        'HOST': 'localhost',
> #        'PORT': '3306',
> #}

#

#STATIC_ROOT = '/var/www/toaster/static_files/'
>
#

#Don't care about that either, just put in something random

#SECRET_KEY = '$%_^=olgg64c0zwwlfkoy0ehk-u3$70-8f5+&thpkjks4st8o9T'
>


mysql -u root -p
> CREATE DATABASE toaster_data;
> CREATE USER 'toaster'@'localhost' identified by 'toaster';
> GRANT all on toaster_data.* to 'toaster'@'localhost';
> quit
>


cd  /var/www/toaster/poky/
> ./bitbake/lib/toaster/manage.py syncdb
> ./bitbake/lib/toaster/manage.py migrate
> ./bitbake/lib/toaster/manage.py loadconf ./meta-poky/conf/toasterconf.json
> TOASTER_DIR=/var/www/toaster/poky/
> TOASTER_CONF=./meta-poky/conf/toasterconf.json
> ./bitbake/lib/toaster/manage.py checksettings
> ./bitbake/lib/toaster/manage.py lsupdates   #Showed some debug
> information, I think some bb stuff is duplicated, I don't have the exact
> output unfortunately and don't know if it causes the problem
> ./bitbake/lib/toaster/manage.py collectstatic
>


sudo nano /etc/apache2/conf-available/toaster.conf
> #Paste the following:
> #Alias /static /var/www/toaster/static_files
> #<Directory /var/www/toaster/static_files>
> # Order allow,deny
> # Allow from all
> # Require all granted
> #</Directory>
> #WSGIDaemonProcess toaster_wsgi
> python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/venv/lib/python2.7/site-packages
> #WSGIScriptAlias /
> "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
> #<Location />
> #    WSGIProcessGroup toaster_wsgi
> #</Location>
>


sudo a2enmod wsgi
> sudo a2enconf toaster
> chmod +x bitbake/lib/toaster/toastermain/wsgi.py
> sudo service apache2 restart
>


#And to start it up:
>
> /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds


Does anyone here know whats wrong and how I can fix? Or is there a better
manual somewhere?
I tried everything I could think of. I reinstalled the OS a few times and
tried to reinstall Yocto Project and Toaster from scratch on a fresh OS.
Eventually I got to where Toaster at least starts and I can use the GUI,
now I just need it to also build.
I would be really thankful if you could help me to get this to run, so if
anyone has an idea please tell me what to do.


Thanks in advance and
kind regards


Sebastian Salmhofer

[-- Attachment #2: Type: text/html, Size: 18361 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem setting up Toaster production enviroment
  2016-05-12 22:32 Problem setting up Toaster production enviroment Sebastian Salmhofer
@ 2016-05-13  7:05 ` Smith, Elliot
  2016-05-13 11:18   ` Smith, Elliot
  0 siblings, 1 reply; 3+ messages in thread
From: Smith, Elliot @ 2016-05-13  7:05 UTC (permalink / raw)
  To: Sebastian Salmhofer; +Cc: toaster

[-- Attachment #1: Type: text/plain, Size: 12664 bytes --]

On 12 May 2016 at 23:32, Sebastian Salmhofer <sebastian@salmhofer.cc> wrote:

> I am new to Yocto Project and I am trying to set up Toaster. I had no
> problem setting up Yocto Project and doing a test build on the command line.
> Now I want to use toaster but I can't get it to work for me.
>

Hello Sebastian.

Note that you are using the incorrect documentation for Krogoth. The link
you need is
http://www.yoctoproject.org/docs/2.1/toaster-manual/toaster-manual.html.

I will have a look at this today and see if I can figure out what's going
wrong.

Elliot


> I am using Lubuntu 15.10 but I tried Ubuntu 15.10 as well with the same
> results.
> I am using the user manual (
> http://www.yoctoproject.org/docs/1.8/toaster-manual/toaster-manual.html),
> wiki (
> https://wiki.yoctoproject.org/wiki/Setting_up_a_production_instance_of_Toaster)
> as well as this post (
> https://lists.yoctoproject.org/pipermail/toaster/2015-December/003525.html).
> I think there are some mistakes in the manual and also on the wiki, but I
> managed to get a routine that works without major problems, I will show it
> later, and the Toaster GUI works. The problem is I can not build. I always
> get an error ('NoneType' object has no attribute 'rfind').
> The settings in toaster are all default, release is krogoth and the
> build-image is core-image-sato.
> The console puts out this:
>
>> 2016-05-12 23:43:06,319 DEBUG runbuilds: starting build Test (Release
>> krogoth (krogoth), BBV krogoth (Branch: krogoth)) in progress, environment
>> BuildEnvironment object
>> 2016-05-12 23:43:06,390 DEBUG localhostbecontroller, our git repos are
>> {(u'git://git.yoctoproject.org/meta-yocto', u'krogoth'): [(u'meta-poky',
>>                                                            u'meta-poky'),
>>
>> (u'meta-yocto-bsp',
>>
>>  u'meta-yocto-bsp')],
>>  (u'git://git.yoctoproject.org/poky', u'krogoth'): [('bitbake',
>> u'bitbake'),
>>                                                     (u'openembedded-core',
>>                                                      u'meta')]}
>> 2016-05-12 23:43:06,390 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/) git
>> remote -v
>> 2016-05-12 23:43:06,417 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:06,417 INFO Using pre-checked out source for layer
>> {'git://git.yoctoproject.org/poky': u'/var/www/toaster/poky/'}
>> 2016-05-12 23:43:06,417 DEBUG localhostbecontroller: giturl git://
>> git.yoctoproject.org/poky:krogoth checking out in current directory
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
>> 2016-05-12 23:43:06,418 DEBUG localhostbecontroller git-copying
>> /var/www/toaster/poky/ to
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
>> 2016-05-12 23:43:06,418 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/) git
>> clone "/var/www/toaster/poky/"
>> "/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth"
>> 2016-05-12 23:43:10,665 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:10,666 DEBUG lbc_shellcmmd:
>> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
>> git remote remove origin
>> 2016-05-12 23:43:10,699 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:10,700 DEBUG lbc_shellcmmd:
>> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
>> git remote add origin "git://git.yoctoproject.org/poky"
>> 2016-05-12 23:43:10,725 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:10,726 DEBUG localhostbecontroller: checking out commit
>> krogoth to
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
>> 2016-05-12 23:43:10,726 DEBUG lbc_shellcmmd:
>> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
>> git fetch --all && git reset --hard "origin/krogoth"
>> 2016-05-12 23:43:17,266 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: selected poky dir
>> name
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: localdirpath
>> expected
>> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/bitbake'
>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: localdirpath
>> expected
>> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/meta'
>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: giturl git://
>> git.yoctoproject.org/meta-yocto:krogoth checking out in current
>> directory
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: cloning git://
>> git.yoctoproject.org/meta-yocto in
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
>> 2016-05-12 23:43:17,267 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/) git
>> clone "git://git.yoctoproject.org/meta-yocto"
>> "/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth"
>> 2016-05-12 23:43:20,155 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:20,155 DEBUG localhostbecontroller: checking out commit
>> krogoth to
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
>> 2016-05-12 23:43:20,155 DEBUG lbc_shellcmmd:
>> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth)
>> git fetch --all && git reset --hard "origin/krogoth"
>> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: localdirpath
>> expected
>> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-poky'
>> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: localdirpath
>> expected
>> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-yocto-bsp'
>> 2016-05-12 23:43:20,810 DEBUG localhostbecontroller: current layer list
>> [u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/meta',
>>
>>  u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-poky',
>>
>>  u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-yocto-bsp']
>> 2016-05-12 23:43:20,813 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/)
>> bash -c 'source
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/oe-init-build-env
>> /var/www/toaster/poky//build-toaster-2'
>> 2016-05-12 23:43:20,972 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:20,987 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/)
>> bash -c "source
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/oe-init-build-env
>> /var/www/toaster/poky//build-toaster-2; BITBAKE_UI=""
>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/bitbake/bin/bitbake
>> --read /var/www/toaster/poky//build-toaster-2/conf/toaster.conf
>> --server-only -t xmlrpc -B 0.0.0.0:0"
>> 2016-05-12 23:43:22,004 DEBUG localhostbecontroller: shellcmd success
>> 2016-05-12 23:43:22,005 DEBUG localhostbecontroller: bitbake port 34754
>> 2016-05-12 23:43:22,093 ERROR runbuilds: Error launching build 'NoneType'
>> object has no attribute 'rfind'
>> Traceback (most recent call last):
>>   File
>> "/var/www/toaster/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py",
>> line 67, in schedule
>>     "%d:%d" % (br.pk, bec.be.pk))
>>   File
>> "/var/www/toaster/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py",
>> line 323, in triggerBuild
>>     local_bitbake = os.path.join(os.path.dirname(os.getenv('BBBASEDIR')),
>>   File "/var/www/toaster/venv/lib/python2.7/posixpath.py", line 122, in
>> dirname
>>     i = p.rfind('/') + 1
>> AttributeError: 'NoneType' object has no attribute 'rfind'
>> 2016-05-12 23:43:23,302 DEBUG Saving error 'NoneType' object has no
>> attribute 'rfind' (Test (Release krogoth (krogoth), BBV krogoth (Branch:
>> krogoth)) failed)
>
>
> This is how I installed everything:
> I was pasting all commands into the console one by one by hand, so this is
> not a script, just a "log" what I did. '#' means I didn't past whats after
> it in the same line.
>
> First setting up the Yocto Project:
>
>> sudo apt-get install gawk wget git-core diffstat unzip texinfo
>> gcc-multilib build-essential chrpath socat
>> sudo apt-get install libsdl1.2-dev xterm
>> sudo apt-get install autoconf automake libtool libglib2.0-dev
>> libarchive-dev
>> git clone git://git.yoctoproject.org/poky
>> cd poky
>> git checkout krogoth
>
>
> And Toaster:
>
>> sudo apt-get install apache2 libapache2-mod-wsgi mysql-server
>> python-virtualenv libmysqlclient-dev python-dev python-mysqldb
>> #mysql asks to set root password
>>
>
>
> #I don't care about security, as I am just using it localy at home and at
>> this point I just want it to work anyway
>> sudo chmod -R 777 /var/www
>> mkdir -p /var/www/toaster
>> cd /var/www/toaster/
>> git clone git://git.yoctoproject.org/poky
>> cd poky
>> git checkout krogoth
>>
>
>
> cd /var/www/toaster/
>> virtualenv venv
>> source ./venv/bin/activate
>> pip install -r ./poky/bitbake/toaster-requirements.txt
>> pip install mysql
>> pip install MySQL-python
>> pip install mysqlclient
>>
>
>
> #Editing the following in
>> /var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py
>> #DATABASES = {
>> #    'default': {
>> #        'ENGINE': 'django.db.backends.mysql',
>> #        'NAME': 'toaster_data',
>> #        'USER': 'toaster',
>> #        'PASSWORD': 'toaster',
>> #        'HOST': 'localhost',
>> #        'PORT': '3306',
>> #}
>
> #
>
> #STATIC_ROOT = '/var/www/toaster/static_files/'
>>
> #
>
> #Don't care about that either, just put in something random
>
> #SECRET_KEY = '$%_^=olgg64c0zwwlfkoy0ehk-u3$70-8f5+&thpkjks4st8o9T'
>>
>
>
> mysql -u root -p
>> CREATE DATABASE toaster_data;
>> CREATE USER 'toaster'@'localhost' identified by 'toaster';
>> GRANT all on toaster_data.* to 'toaster'@'localhost';
>> quit
>>
>
>
> cd  /var/www/toaster/poky/
>> ./bitbake/lib/toaster/manage.py syncdb
>> ./bitbake/lib/toaster/manage.py migrate
>> ./bitbake/lib/toaster/manage.py loadconf ./meta-poky/conf/toasterconf.json
>> TOASTER_DIR=/var/www/toaster/poky/
>> TOASTER_CONF=./meta-poky/conf/toasterconf.json
>> ./bitbake/lib/toaster/manage.py checksettings
>> ./bitbake/lib/toaster/manage.py lsupdates   #Showed some debug
>> information, I think some bb stuff is duplicated, I don't have the exact
>> output unfortunately and don't know if it causes the problem
>> ./bitbake/lib/toaster/manage.py collectstatic
>>
>
>
> sudo nano /etc/apache2/conf-available/toaster.conf
>> #Paste the following:
>> #Alias /static /var/www/toaster/static_files
>> #<Directory /var/www/toaster/static_files>
>> # Order allow,deny
>> # Allow from all
>> # Require all granted
>> #</Directory>
>> #WSGIDaemonProcess toaster_wsgi
>> python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/venv/lib/python2.7/site-packages
>> #WSGIScriptAlias /
>> "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
>> #<Location />
>> #    WSGIProcessGroup toaster_wsgi
>> #</Location>
>>
>
>
> sudo a2enmod wsgi
>> sudo a2enconf toaster
>> chmod +x bitbake/lib/toaster/toastermain/wsgi.py
>> sudo service apache2 restart
>>
>
>
> #And to start it up:
>>
>> /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds
>
>
> Does anyone here know whats wrong and how I can fix? Or is there a better
> manual somewhere?
> I tried everything I could think of. I reinstalled the OS a few times and
> tried to reinstall Yocto Project and Toaster from scratch on a fresh OS.
> Eventually I got to where Toaster at least starts and I can use the GUI,
> now I just need it to also build.
> I would be really thankful if you could help me to get this to run, so if
> anyone has an idea please tell me what to do.
>
>
> Thanks in advance and
> kind regards
>
>
> Sebastian Salmhofer
>
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>
>


-- 
Elliot Smith
Software Engineer
Intel Open Source Technology Centre

[-- Attachment #2: Type: text/html, Size: 20239 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem setting up Toaster production enviroment
  2016-05-13  7:05 ` Smith, Elliot
@ 2016-05-13 11:18   ` Smith, Elliot
  0 siblings, 0 replies; 3+ messages in thread
From: Smith, Elliot @ 2016-05-13 11:18 UTC (permalink / raw)
  To: Sebastian Salmhofer; +Cc: toaster


[-- Attachment #1.1: Type: text/plain, Size: 14282 bytes --]

Hello again.

I have a set of instructions which worked for me (attached); these are
mostly as in the 2.1 manual, with a couple of fixes for typos and missing
instructions (which I will submit for inclusion in the manual). The short
form is:

---
When you invoke runbuilds, you need to supply the location of the bitbake
script (poky/bitbake/bin/bitbake) via the BBBASEDIR variable. This is
wrong, because the location of bitbake isn't a dir, as suggested by the env
variable name. But it does make Toaster behave.

In my setup (based on the manual), this means doing:

BBBASEDIR=/var/www/toaster/poky/bitbake/bin/bitbake
./bitbake/lib/toaster/manage.py runbuilds
---

In addition, there is a bug in the krogoth release that means the progress
bar doesn't work properly when using MySQL. I have posted a patch to the
mailing list which fixes this:
https://lists.yoctoproject.org/pipermail/toaster/2016-May/004596.html

I've also attached the patch to this email. You can apply it to the krogoth
branch by going to your poky directory then doing:

patch -p1 < progress_bar.patch

Hope this helps. Let me know if you're still having problems.

Elliot


On 13 May 2016 at 08:05, Smith, Elliot <elliot.smith@intel.com> wrote:

> On 12 May 2016 at 23:32, Sebastian Salmhofer <sebastian@salmhofer.cc>
> wrote:
>
>> I am new to Yocto Project and I am trying to set up Toaster. I had no
>> problem setting up Yocto Project and doing a test build on the command line.
>> Now I want to use toaster but I can't get it to work for me.
>>
>
> Hello Sebastian.
>
> Note that you are using the incorrect documentation for Krogoth. The link
> you need is
> http://www.yoctoproject.org/docs/2.1/toaster-manual/toaster-manual.html.
>
> I will have a look at this today and see if I can figure out what's going
> wrong.
>
> Elliot
>
>
>> I am using Lubuntu 15.10 but I tried Ubuntu 15.10 as well with the same
>> results.
>> I am using the user manual (
>> http://www.yoctoproject.org/docs/1.8/toaster-manual/toaster-manual.html),
>> wiki (
>> https://wiki.yoctoproject.org/wiki/Setting_up_a_production_instance_of_Toaster)
>> as well as this post (
>> https://lists.yoctoproject.org/pipermail/toaster/2015-December/003525.html).
>> I think there are some mistakes in the manual and also on the wiki, but I
>> managed to get a routine that works without major problems, I will show it
>> later, and the Toaster GUI works. The problem is I can not build. I always
>> get an error ('NoneType' object has no attribute 'rfind').
>> The settings in toaster are all default, release is krogoth and the
>> build-image is core-image-sato.
>> The console puts out this:
>>
>>> 2016-05-12 23:43:06,319 DEBUG runbuilds: starting build Test (Release
>>> krogoth (krogoth), BBV krogoth (Branch: krogoth)) in progress, environment
>>> BuildEnvironment object
>>> 2016-05-12 23:43:06,390 DEBUG localhostbecontroller, our git repos are
>>> {(u'git://git.yoctoproject.org/meta-yocto', u'krogoth'): [(u'meta-poky',
>>>                                                            u'meta-poky'),
>>>
>>> (u'meta-yocto-bsp',
>>>
>>>  u'meta-yocto-bsp')],
>>>  (u'git://git.yoctoproject.org/poky', u'krogoth'): [('bitbake',
>>> u'bitbake'),
>>>
>>> (u'openembedded-core',
>>>                                                      u'meta')]}
>>> 2016-05-12 23:43:06,390 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/)
>>> git remote -v
>>> 2016-05-12 23:43:06,417 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:06,417 INFO Using pre-checked out source for layer
>>> {'git://git.yoctoproject.org/poky': u'/var/www/toaster/poky/'}
>>> 2016-05-12 23:43:06,417 DEBUG localhostbecontroller: giturl git://
>>> git.yoctoproject.org/poky:krogoth checking out in current directory
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
>>> 2016-05-12 23:43:06,418 DEBUG localhostbecontroller git-copying
>>> /var/www/toaster/poky/ to
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
>>> 2016-05-12 23:43:06,418 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/)
>>> git clone "/var/www/toaster/poky/"
>>> "/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth"
>>> 2016-05-12 23:43:10,665 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:10,666 DEBUG lbc_shellcmmd:
>>> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
>>> git remote remove origin
>>> 2016-05-12 23:43:10,699 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:10,700 DEBUG lbc_shellcmmd:
>>> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
>>> git remote add origin "git://git.yoctoproject.org/poky"
>>> 2016-05-12 23:43:10,725 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:10,726 DEBUG localhostbecontroller: checking out commit
>>> krogoth to
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
>>> 2016-05-12 23:43:10,726 DEBUG lbc_shellcmmd:
>>> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth)
>>> git fetch --all && git reset --hard "origin/krogoth"
>>> 2016-05-12 23:43:17,266 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: selected poky dir
>>> name
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth
>>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: localdirpath
>>> expected
>>> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/bitbake'
>>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: localdirpath
>>> expected
>>> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/meta'
>>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: giturl git://
>>> git.yoctoproject.org/meta-yocto:krogoth checking out in current
>>> directory
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
>>> 2016-05-12 23:43:17,267 DEBUG localhostbecontroller: cloning git://
>>> git.yoctoproject.org/meta-yocto in
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
>>> 2016-05-12 23:43:17,267 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/)
>>> git clone "git://git.yoctoproject.org/meta-yocto"
>>> "/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth"
>>> 2016-05-12 23:43:20,155 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:20,155 DEBUG localhostbecontroller: checking out commit
>>> krogoth to
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth
>>> 2016-05-12 23:43:20,155 DEBUG lbc_shellcmmd:
>>> (/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth)
>>> git fetch --all && git reset --hard "origin/krogoth"
>>> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: localdirpath
>>> expected
>>> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-poky'
>>> 2016-05-12 23:43:20,809 DEBUG localhostbecontroller: localdirpath
>>> expected
>>> '/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-yocto-bsp'
>>> 2016-05-12 23:43:20,810 DEBUG localhostbecontroller: current layer list
>>> [u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/meta',
>>>
>>>  u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-poky',
>>>
>>>  u'/var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_meta-yocto_krogoth/meta-yocto-bsp']
>>> 2016-05-12 23:43:20,813 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/)
>>> bash -c 'source
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/oe-init-build-env
>>> /var/www/toaster/poky//build-toaster-2'
>>> 2016-05-12 23:43:20,972 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:20,987 DEBUG lbc_shellcmmd: (/var/www/toaster/poky/)
>>> bash -c "source
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/oe-init-build-env
>>> /var/www/toaster/poky//build-toaster-2; BITBAKE_UI=""
>>> /var/www/toaster/poky/_toaster_clones/_git___git.yoctoproject.org_poky_krogoth/bitbake/bin/bitbake
>>> --read /var/www/toaster/poky//build-toaster-2/conf/toaster.conf
>>> --server-only -t xmlrpc -B 0.0.0.0:0"
>>> 2016-05-12 23:43:22,004 DEBUG localhostbecontroller: shellcmd success
>>> 2016-05-12 23:43:22,005 DEBUG localhostbecontroller: bitbake port 34754
>>> 2016-05-12 23:43:22,093 ERROR runbuilds: Error launching build
>>> 'NoneType' object has no attribute 'rfind'
>>> Traceback (most recent call last):
>>>   File
>>> "/var/www/toaster/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py",
>>> line 67, in schedule
>>>     "%d:%d" % (br.pk, bec.be.pk))
>>>   File
>>> "/var/www/toaster/poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py",
>>> line 323, in triggerBuild
>>>     local_bitbake = os.path.join(os.path.dirname(os.getenv('BBBASEDIR')),
>>>   File "/var/www/toaster/venv/lib/python2.7/posixpath.py", line 122, in
>>> dirname
>>>     i = p.rfind('/') + 1
>>> AttributeError: 'NoneType' object has no attribute 'rfind'
>>> 2016-05-12 23:43:23,302 DEBUG Saving error 'NoneType' object has no
>>> attribute 'rfind' (Test (Release krogoth (krogoth), BBV krogoth (Branch:
>>> krogoth)) failed)
>>
>>
>> This is how I installed everything:
>> I was pasting all commands into the console one by one by hand, so this
>> is not a script, just a "log" what I did. '#' means I didn't past whats
>> after it in the same line.
>>
>> First setting up the Yocto Project:
>>
>>> sudo apt-get install gawk wget git-core diffstat unzip texinfo
>>> gcc-multilib build-essential chrpath socat
>>> sudo apt-get install libsdl1.2-dev xterm
>>> sudo apt-get install autoconf automake libtool libglib2.0-dev
>>> libarchive-dev
>>> git clone git://git.yoctoproject.org/poky
>>> cd poky
>>> git checkout krogoth
>>
>>
>> And Toaster:
>>
>>> sudo apt-get install apache2 libapache2-mod-wsgi mysql-server
>>> python-virtualenv libmysqlclient-dev python-dev python-mysqldb
>>> #mysql asks to set root password
>>>
>>
>>
>> #I don't care about security, as I am just using it localy at home and at
>>> this point I just want it to work anyway
>>> sudo chmod -R 777 /var/www
>>> mkdir -p /var/www/toaster
>>> cd /var/www/toaster/
>>> git clone git://git.yoctoproject.org/poky
>>> cd poky
>>> git checkout krogoth
>>>
>>
>>
>> cd /var/www/toaster/
>>> virtualenv venv
>>> source ./venv/bin/activate
>>> pip install -r ./poky/bitbake/toaster-requirements.txt
>>> pip install mysql
>>> pip install MySQL-python
>>> pip install mysqlclient
>>>
>>
>>
>> #Editing the following in
>>> /var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py
>>> #DATABASES = {
>>> #    'default': {
>>> #        'ENGINE': 'django.db.backends.mysql',
>>> #        'NAME': 'toaster_data',
>>> #        'USER': 'toaster',
>>> #        'PASSWORD': 'toaster',
>>> #        'HOST': 'localhost',
>>> #        'PORT': '3306',
>>> #}
>>
>> #
>>
>> #STATIC_ROOT = '/var/www/toaster/static_files/'
>>>
>> #
>>
>> #Don't care about that either, just put in something random
>>
>> #SECRET_KEY = '$%_^=olgg64c0zwwlfkoy0ehk-u3$70-8f5+&thpkjks4st8o9T'
>>>
>>
>>
>> mysql -u root -p
>>> CREATE DATABASE toaster_data;
>>> CREATE USER 'toaster'@'localhost' identified by 'toaster';
>>> GRANT all on toaster_data.* to 'toaster'@'localhost';
>>> quit
>>>
>>
>>
>> cd  /var/www/toaster/poky/
>>> ./bitbake/lib/toaster/manage.py syncdb
>>> ./bitbake/lib/toaster/manage.py migrate
>>> ./bitbake/lib/toaster/manage.py loadconf
>>> ./meta-poky/conf/toasterconf.json
>>> TOASTER_DIR=/var/www/toaster/poky/
>>> TOASTER_CONF=./meta-poky/conf/toasterconf.json
>>> ./bitbake/lib/toaster/manage.py checksettings
>>> ./bitbake/lib/toaster/manage.py lsupdates   #Showed some debug
>>> information, I think some bb stuff is duplicated, I don't have the exact
>>> output unfortunately and don't know if it causes the problem
>>> ./bitbake/lib/toaster/manage.py collectstatic
>>>
>>
>>
>> sudo nano /etc/apache2/conf-available/toaster.conf
>>> #Paste the following:
>>> #Alias /static /var/www/toaster/static_files
>>> #<Directory /var/www/toaster/static_files>
>>> # Order allow,deny
>>> # Allow from all
>>> # Require all granted
>>> #</Directory>
>>> #WSGIDaemonProcess toaster_wsgi
>>> python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/venv/lib/python2.7/site-packages
>>> #WSGIScriptAlias /
>>> "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
>>> #<Location />
>>> #    WSGIProcessGroup toaster_wsgi
>>> #</Location>
>>>
>>
>>
>> sudo a2enmod wsgi
>>> sudo a2enconf toaster
>>> chmod +x bitbake/lib/toaster/toastermain/wsgi.py
>>> sudo service apache2 restart
>>>
>>
>>
>> #And to start it up:
>>>
>>> /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds
>>
>>
>> Does anyone here know whats wrong and how I can fix? Or is there a better
>> manual somewhere?
>> I tried everything I could think of. I reinstalled the OS a few times and
>> tried to reinstall Yocto Project and Toaster from scratch on a fresh OS.
>> Eventually I got to where Toaster at least starts and I can use the GUI,
>> now I just need it to also build.
>> I would be really thankful if you could help me to get this to run, so if
>> anyone has an idea please tell me what to do.
>>
>>
>> Thanks in advance and
>> kind regards
>>
>>
>> Sebastian Salmhofer
>>
>> --
>> _______________________________________________
>> toaster mailing list
>> toaster@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/toaster
>>
>>
>
>
> --
> Elliot Smith
> Software Engineer
> Intel Open Source Technology Centre
>



-- 
Elliot Smith
Software Engineer
Intel Open Source Technology Centre

[-- Attachment #1.2: Type: text/html, Size: 22477 bytes --]

[-- Attachment #2: toaster-production-setup.txt --]
[-- Type: text/plain, Size: 4636 bytes --]

I'm on a Fedora 20 system running on x64. Note that this is an unsupported Fedora version, but I have no problems with bitbake or Toaster (I am a developer on Toaster).

I have all the bitbake deps installed already; and the Toaster ones suggested by the manual:

  sudo dnf install httpd mod_wsgi python-virtualenv gcc mysql-devel

Install Apache:

  sudo yum install mod_wsgi

Install MySQL:

  sudo yum install mysql-server
  sudo service mariadb start

For the following steps, I used su so I didn't have to keep typing sudo.

Checkout a copy of poky into the web server directory:

   $ mkdir -p /var/www/toaster
   $ cd /var/www/toaster/
   $ git clone git://git.yoctoproject.org/poky
   $ cd poky
   $ git checkout krogoth

It's best to fix the permissions on the poky directory so a non-root user can write to it. In particular, you should ensure that the user you intend to use for runbuilds can write to this directory, as this is where the build output will go.

Initialize a virtual environment and install Toaster dependencies. Using a virtual environment keeps the Python packages isolated from your system-provided packages:

  $ cd /var/www/toaster
  $ virtualenv venv
  $ source ./venv/bin/activate
  $ pip install -r ./poky/bitbake/toaster-requirements.txt
  $ pip install mysql

(MySQL-python is installed by mysql)

Configure Toaster by editing /var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py as follows:

Edit the DATABASE settings:

   DATABASES = {
       'default': {
           'ENGINE': 'django.db.backends.mysql',
           'NAME': 'toaster_data',
           'USER': 'toaster',
           'PASSWORD': 'foo',
           'HOST': 'localhost',
           'PORT': '3306',
      }
   }

Edit the SECRET_KEY:

   SECRET_KEY = '$%_^=olgg64c0zwwlfkoy0ehk-u3$70-8f5+&thpkjks4st8o9T'

Edit the STATIC_ROOT:

   STATIC_ROOT = '/var/www/toaster/static_files/'

 Add the database and user to the mysql server defined earlier (NB no password required by default mariadb install):

    $ mysql -u root
    mysql> CREATE DATABASE toaster_data;
    mysql> CREATE USER 'toaster'@'localhost' identified by 'foo';
    mysql> GRANT all on toaster_data.* to 'toaster'@'localhost';
    mysql> quit

Get Toaster to create the database schema, default data, and gather the statically-served files (I used su for these steps):

   $ cd  /var/www/toaster/poky/
   $ ./bitbake/lib/toaster/manage.py syncdb
   $ TOASTER_DIR=`pwd` TOASTER_CONF=./meta-poky/conf/toasterconf.json ./bitbake/lib/toaster/manage.py checksettings
   $ ./bitbake/lib/toaster/manage.py collectstatic

(for the last, I got a prompt warning me that I was going to overwrite existing files, which I answered "yes" to)

Add this to /etc/httpd/conf.d/toaster.conf:

  Alias /static /var/www/toaster/static_files
  <Directory /var/www/toaster/static_files>
    Order allow,deny
    Allow from all
    Require all granted
  </Directory>

  WSGIDaemonProcess toaster_wsgi python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/venv/lib/python2.7/site-packages

  WSGIScriptAlias / "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
  <Location />
    WSGIProcessGroup toaster_wsgi
  </Location>

(Note there is a typo in the WSGIProcessGroup value given in the docs, corrected above.)

Restart Apache:

  sudo service httpd restart

Go to http://localhost in a browser to check it's working.

Start runbuilds. (NB a colleague pointed out this is probably where your problem is, as runbuilds doesn't have a value for BBBASEDIR, hence setting it in the environment first.) Also note that you shouldn't do this as root, as bitbake will complain.

  # if you are in a root shell
  exit

  # as a normal user that can write to the poky/ directory
  cd /var/www/toaster/
  source ./venv/bin/activate
  cd /var/www/toaster/poky/
  BBBASEDIR=/var/www/toaster/poky/bitbake/bin/bitbake ./bitbake/lib/toaster/manage.py runbuilds

(Note that setting BBBASEDIR to this value is counter-intuitive, as /var/www/toaster/poky/bitbake/bin/bitbake isn't a directory, but it does allow builds to work.)

Now create a project in the Toaster UI and use the Build text box to enter the name of the recipe to build (I typically use mpfr-native for testing).

There is a bug in the progress bar (https://bugzilla.yoctoproject.org/show_bug.cgi?id=9498), which means it will behave oddly and keep reloading the page. But the build should eventually finish. You can follow its progress in the log file shown on the console where you're running runbuilds, or in the log file you direct its output to if you're using a script (as suggested in the manual).

[-- Attachment #3: progress_bar.patch --]
[-- Type: text/x-patch, Size: 1374 bytes --]

diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 2669606..88967a2 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -416,6 +416,7 @@ class Build(models.Model):
         # to show build progress in mrb_section.html
         for build in recent_builds:
             build.percentDone = build.completeper()
+            build.outcomeText = build.get_outcome_text()
 
         return recent_builds
 
diff --git a/bitbake/lib/toaster/toastergui/static/js/mrbsection.js b/bitbake/lib/toaster/toastergui/static/js/mrbsection.js
index 09117e1..9a76ee6 100644
--- a/bitbake/lib/toaster/toastergui/static/js/mrbsection.js
+++ b/bitbake/lib/toaster/toastergui/static/js/mrbsection.js
@@ -57,12 +57,12 @@ function mrbSectionInit(ctx){
           for (var i in prjInfo.builds){
             var build = prjInfo.builds[i];
 
-            if (build.outcome === "In Progress" ||
+            if (build.outcomeText === "In Progress" ||
                $(".progress .bar").length > 0){
               /* Update the build progress */
               var percentDone;
 
-              if (build.outcome !== "In Progress"){
+              if (build.outcomeText !== "In Progress"){
                 /* We have to ignore the value when it's Succeeded because it
                 *   goes back to 0
                 */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-13 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 22:32 Problem setting up Toaster production enviroment Sebastian Salmhofer
2016-05-13  7:05 ` Smith, Elliot
2016-05-13 11:18   ` Smith, Elliot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.