Subject: [Toaster][zeus] stuck on the 'landing' page To: toaster@lists.yoctoproject.org From: "David Marec" X-Originating-Location: Toulouse, Occitanie, FR (86.201.44.116) X-Originating-Platform: Linux Firefox 75 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 02 Apr 2020 02:11:44 -0700 Message-ID: Content-Type: multipart/alternative; boundary="8A6Pkc8dqA1XMIpQYy7O" --8A6Pkc8dqA1XMIpQYy7O Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi folks, I would like to setup of toaster web interface that allows user to build y= octo=C2=A0images=C2=A0on=C2=A0their=C2=A0own. To achieve this, I installed a debian-9[1] linux distro in a VM and read t= his=C2=A0handbook: * https://www.yoctoproject.org/docs/3.0/toaster-manual/toaster-manual.html in order to install toaster from the zeus branch in a * production environ= ment *. I=C2=A0hit=C2=A0the=C2=A0following=C2=A0issues: *=C2=A0The=C2=A0migration=C2=A0process=C2=A0triggers=C2=A0following=C2=A0e= rror: >>=C2=A0Specified=C2=A0key=C2=A0was=C2=A0too=C2=A0long;=C2=A0max=C2=A0key= =C2=A0length=C2=A0is=C2=A0767=C2=A0bytes =E2=80=A6=C2=A0solved=C2=A0by=C2=A0creating=C2=A0a=C2=A0UTF-8=C2=A0complia= nt=C2=A0database: `CREATE DATABASE toaster_data CHARACTER SET utf8 DEFAULT COLLATE utf8_gene= ral_ci` *=C2=A0Apache=C2=A0failed=C2=A0to=C2=A0load=C2=A0django: > mod_wsgi (pid=3D4529): Target WSGI script '/var/www/toaster/poky/bitbake= /lib/toaster/toastermain/wsgi.py' cannot be=C2=A0loaded=C2=A0as=C2=A0Python= = =C2=A0module. > mod_wsgi (pid=3D4529): Exception occurred processing WSGI script '/var/w= ww/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py'. >=C2=A0Traceback=C2=A0(most=C2=A0recent=C2=A0call=C2=A0last): > File "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py", li= ne=C2=A031,=C2=A0in=C2=A0 >=C2=A0from=C2=A0django.core.wsgi=C2=A0import=C2=A0get_wsgi_application >=C2=A0ImportError:=C2=A0No=C2=A0module=C2=A0named=C2=A0'django' I tried with no success to grant www-data group to access to bitbake/lib/t= oaster. Finally, I ** pip-installed ** the toaster requirements into the base syst= em,=C2=A0not=C2=A0in=C2=A0a=C2=A0virtualdev=C2=A0(--user)=C2=A0environment. I=C2=A0do=C2=A0have=C2=A0to=C2=A0install=C2=A0mysqlclient=C2=A0with=C2=A0p= ip=C2=A0also. Finally,=C2=A0I=C2=A0a=C2=A0get=C2=A0a=C2=A0working=C2=A0webserver. ```sh $=C2=A0toaster@debian9:~/poky/build$=C2=A0source=C2=A0../bitbake/bin/toast= er=C2=A0start=C2=A0noweb ``` But now, I 'am stuck on a "landing" page, where I can't do nothing but wai= t=C2=A0for=C2=A0build=C2=A0captures. -=C2=A0unless=C2=A0the=C2=A0django=C2=A0admin=C2=A0pages=C2=A0sounds=C2=A0= ok=C2=A0=C2=A0- At the time I was running the rocko branch, I was able to get a full featu= re=C2=A0web=C2=A0interface=C2=A0running=C2=A0in=C2=A0a=C2=A0local=C2=A0envi= ronment (no=C2=A0sql=C2=A0server,=C2=A0no=C2=A0web=C2=A0server). How can=C2=A0 I give access to this pages while=C2=A0 running in a product= ion environment=C2=A0? Regards, [1]: Debian 10 updated its python base to release 3.7 and the django relea= se=C2=A0shipped=C2=A0with=C2=A0yocto=C2=A0fails=C2=A0to=C2=A0run=C2=A0in=C2= = =A0this=C2=A0environment. -- David=C2=A0Marec FreeBSD=C2=A0AMD64=C2=A0poudriere=C2=A0: http://poudriere.lapinbilly.eu/ --8A6Pkc8dqA1XMIpQYy7O Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Hi folks,

I would like to setup of t= oaster web interface that allows user to build yocto images on&nb= sp;their own.

To achieve this, I installed a debian-9[1] l= inux distro in a VM and read this handbook:

* https://www.yoctoproject.org/docs/3.0/to= aster-manual/toaster-manual.html

in order to install toaste= r from the zeus branch in a *production environment*.

=
I hit the following issues:

* Th= e migration process triggers following error:

>> Specified key was too long; = max key length is 767 bytes

…&n= bsp;solved by creating a UTF-8 compliant data= base:

`CREATE DATABASE toaster_data CHARACTER SET utf8 DEFAULT = COLLATE utf8_general_ci`

* Apache failed to = ;load django:

> mod_wsgi (pid=3D4529): Target WSGI scri= pt '/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py' cannot b= e loaded as Python module.
> mod_wsgi (pid=3D4= 529): Exception occurred processing WSGI script '/var/www/toaster/poky/bitb= ake/lib/toaster/toastermain/wsgi.py'.
> Traceback (most&= nbsp;recent call last):
> File "/var/www/toaster/poky/bi= tbake/lib/toaster/toastermain/wsgi.py", line 31, in <modu= le>
> from django.core.wsgi import get_wsgi= _application
> ImportError: No module named&nb= sp;'django'

I tried with no success to grant www-data group to = access to bitbake/lib/toaster.
Finally, I *pip-installed* the toaster requirements into the base system, = ;not in a virtualdev (--user) environment.
I=  do have to install mysqlclient with pip=  also.

Finally, I a get a working=  webserver.

```sh
$ toaster@debian9:~/poky/buil= d$ source ../bitbake/bin/toaster start noweb
``` =

But now, I 'am stuck on a "landing" page, where I can't do noth= ing but wait for build captures.
- unless th= e django admin pages sounds ok  -
=
At the time I was running the rocko branch, I was able to get a full = feature web interface running in a local = ;environment
(no sql server, no web server).=

How can  I give access to this pages while  running = in a production environment ?


Regards,

[= 1]: Debian 10 updated its python base to release 3.7 and the django release=  shipped with yocto fails to run in = ;this environment.

-- 

David Marec

FreeBSD AMD64 poudriere&nbs= p;: http://poudriere.lapinbilly.eu/


--8A6Pkc8dqA1XMIpQYy7O--