Bug 8984 - In the production set up, the build environment object is not created
Summary: In the production set up, the build environment object is not created
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 2.1
Assignee: Ed Bartosh
QA Contact: Mihail Stanciu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-01-22 12:45 UTC by Belen Barros Pena
Modified: 2016-01-27 10:24 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Belen Barros Pena 2016-01-22 12:45:57 UTC
When setting up Toaster in what we've called the production set up, the build environment object is not created, and must be created manually. This makes the toaster set up process somehow harder.

We should automate this step.
Comment 1 Ed Bartosh 2016-01-22 15:27:56 UTC
Fortunately it seems to be documentation issue.

This is an incorrect piece of doc:
Get Toaster to create the database schema, default data, and gather the statically-served files:

     $ cd  /var/www/toaster/poky/
     $ ./bitbake/lib/toaster/manage.py syncdb --migrate
     $ ./bitbake/lib/toaster/manage.py loadconf ./meta-yocto/conf/toasterconf.json
     $ ./bitbake/lib/toaster/manage.py lsupdates
     $ ./bitbake/lib/toaster/manage.py collectstatic

The set of commands is now different. Here is what should be done instead:
$ cd  /var/www/toaster/poky/
$ ./bitbake/lib/toaster/manage.py syncdb
$ ./bitbake/lib/toaster/manage.py migrate
$ TOASTER_DIR=`pwd` TOASTER_CONF=./meta-yocto/conf/toasterconf.json ./bitbake/lib/toaster/manage.py checksettings
Comment 2 Ed Bartosh 2016-01-22 16:14:58 UTC
just figured out that ./bitbake/lib/toaster/manage.py collectstatic is still needed for production setup.

so, the right set of commands is:
    $ cd  /var/www/toaster/poky/
    $ ./bitbake/lib/toaster/manage.py syncdb
    $ ./bitbake/lib/toaster/manage.py migrate
    $ TOASTER_DIR=`pwd` TOASTER_CONF=./meta-yocto/conf/toasterconf.json ./bitbake/lib/toaster/manage.py checksettings
    $ ./bitbake/lib/toaster/manage.py collectstatic

Below description should also be adjusted according to new set of commands:

For the above set of commands, after moving to the poky directory, the syncdb command with the migrate option makes sure the database schema has had changes propagated correctly (i.e. migrations). See the syncdb command for more information.

The loadconf command loads the ./meta-yocto/conf/toasterconf.json JSON file.

The lsupdates command fetches information about machines, recipes and layers available as part of OpenEmbedded. The information is fetched from the OpenEmbedded Metadata Index. This information provides easy access to metadata from Toaster, and it is key for Toaster's usability. It is not recommended that you use Toaster without fetching this information."
Comment 3 Belen Barros Pena 2016-01-25 12:34:17 UTC
Documentation changes submitted for review

https://lists.yoctoproject.org/pipermail/toaster/2016-January/003735.html