[Toaster] Toaster documentation, 1.6 release
Scott Rifenbark
srifenbark at gmail.com
Wed Mar 19 12:15:40 PDT 2014
Belen,
Here is a version from me based purely on the text from the link in the
original email from Alex. I culled out some stuff that seemed to be
"behind the scenes" information for future development and just
concentrated on what I saw as how this stuff needed to be set up now.
One thing I am unclear of .... It seems that the bigger picture here is
not simply setting up an instance of Toaster on a remote host. But,
rather, setting up stuff so that you can log build information from
multiple instances of toaster that might be spread around on various
machines. And, to do this you can set up a common logging server and web
server. Is that right assumption? That is the assumption I based the
front part of the section on. If not, I need more of the bigger picture.
Give me some feedback on this and we will then take it to the next level.
Thanks,
Scott
---------------------------------------
Setting up a Toaster Instance on a Remote Host
Under normal circumstances, starting Toaster causes three things happen:
* A BitBake server starts
* The Toaster UI starts, which connects to the BitBake server on one side
and to the SQL database on the other side
* The web server starts, which reads the database and displays the web user
interface
Situations exist, however, where you might want to have multiple instances
of Toaster running on various remote machines. You can create this
situation by basically modifying how toaster starts and where the common
SQL database resides. You are able to do this because it is not required
that Toaster starts the above set of components in order to run.
Minimally, an instance of Toaster requires just one of the components to
run. Consequently, you are free to manually start as many or few of the
components as you need rather than using the Toaster script to cause all
three things to happen.
The concepts for setting up multiple instances of Toaster revolve around
maintaining a common SQL database and Web server that show data from that
common database and then setting up separate instances of BitBake servers
and Toaster user interfaces for each separate BitBake build directory.
Note that the common SQL database and the Web server shows data from all
the various BitBake builds. Setting the SQL database outside of any
BitBake build directories maintains a separation layer between the various
builds.
The database is persistent because the logging database is set up external
to the database server (e.g. MySQL). It is not even necessary to run the
BitBake servers, the SQL server, and the Web server on the same machine.
Each component can be run on its own machine.
Here are the steps to get set up:
1. Set up the SQL Logging Server and the Web Server
You can use any SQL server out of the box (e.g. apt-get install
mysgl-server for an Ubuntu system) works. If you are concerned about
performance, you might want to hand-tune the server. You must set up
proper username and password access for the server. You need
administration rights for the mysql root account. Realize that this is not
the same thing as root access on the machine.
Clone a separate, local Git repository of the the Toaster master branch to
use for running the web server. You do not perform builds on this tree.
You need to create this local repository away from any build areas.
In the separately cloned tree for the web server, edit the
bitbake/lib/toaster/toastermain/settings.py file so that the "DATABASES"
value points to the previously created database server. Use the username
and password you established earlier.
Run the database sync scripts to create the needed tables as follows:
python bitbake/lib/toaster/manage.py syncdb
python bitbake/lib/toaster/manage.py migrate orm
Start the web server using the following command:
python bitbake/lib/toaster/manage.py runserver
2. Enable build logging to the common SQL server for each build directory
you are using.
Edit _build local_ bitbake/lib/toaster/toastermain/settings.py to alter the
"DATABASES" value to point to the common SQL logging server.
Start the BitBake server using the following command:
bitbake --postread conf/toaster.conf --server-only -t xmlrpc -B
localhost:0 && export BBSERVER=localhost:-1
Start the logging user interface using the following command:
nohup bitbake --observer-only -u toasterui &
NOTE: No hard-coded ports are used as there is enough code to run
autodiscovery for ports to prevent collisions.
At this point, you are ready to run your builds using commands such as:
bitbake core-image-minimal
When you are finished, you need to be to kill the BitBake server for that
particular build area:
bitbake -m
3. Verify that it all works.
You should examine the logs and be sure that the logging worked, that data
is persistent, and that data from multiple builds from different areas was
supported.
---------------------------------------
On Tue, Mar 18, 2014 at 10:47 AM, Barros Pena, Belen <
belen.barros.pena at intel.com> wrote:
> Hi Scott,
>
> As I mentioned, we would like to document how to set up a Toaster instance
> in a remote host. Alex Damian sent an email to the mailing list explaining
> the process back in February. This is it:
>
> https://lists.yoctoproject.org/pipermail/toaster/2014-February/000464.html
>
> We are thinking of documenting this in the wiki for the moment, with maybe
> a link to it from the existing Toaster section in the Development Manual.
>
> Just contact any of us, or the Toaster mailing list, if you have any
> questions.
>
> Thanks for your help with this!
>
> Belén
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20140319/cdaef55f/attachment.html>
More information about the toaster
mailing list