Setting up a local instance of Toaster: Difference between revisions

From Yocto Project
Jump to navigationJump to search
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Toaster]]
[[Category:Toaster]]
This page explains how to set up Toaster in the same host where you are running your Yocto Project builds. Do it this way if you want to try Toaster or use it for individual purposes.


This page explains how to set up Toaster in the same host where you are running your Yocto Project builds. Do it this way if you want to try Toaster or use it for individual purposes.
== Before you start ==


Before you start, make sure you install the [http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#intro-requirements packages required by the Yocto Project]


== Using the Yocto Project 1.6 "Daisy" release or the master branch ==
== Using Yocto Project 1.6 "Daisy", Yocto Project 1.7 "Dizzy", or the master branch ==


=== You need this stuff ready ===
=== You need this stuff ready ===


* Django 1.5. The easiest way is to install it system wide [http://pip.readthedocs.org/en/latest/installing.html with pip]
1. Django 1.6
 
The easiest way is to install it system wide [http://pip.readthedocs.org/en/latest/installing.html with pip]


     $ sudo pip install django==1.5
     $ sudo pip install django==1.6


Alternatively, you can use  
Alternatively, you can use  


     $ pip install --user django==1.5
     $ pip install --user django==1.6


rather than <code>sudo pip</code>, to install it to your user site-packages directory under <code>~/.local</code>, which won't impact the rest of the system.
rather than <code>sudo pip</code>, to install it to your user site-packages directory under <code>~/.local</code>, which won't impact the rest of the system.


* South 0.8.4
2. South 0.8.4


   $ sudo pip install South==0.8.4
   $ sudo pip install South==0.8.4


* Make sure that port 8000 and 8200 are free, i.e. no servers on them
3. Make sure that port 8000 and 8200 are free, i.e. no servers on them


=== To get Toaster up and running ===
=== To get Toaster up and running ===


* clone the Yocto Project 1.6 (Daisy) branch
* Clone one of the Yocto Project releases supported by Toaster


     $ git clone -b daisy git://git.yoctoproject.org/poky.git
     $ git clone -b daisy git://git.yoctoproject.org/poky.git
    $ git clone -b dizzy git://git.yoctoproject.org/poky.git


or the Yocto Project master branch
* or the Yocto Project master branch


   $ git clone http://git.yoctoproject.org/git/poky
   $ git clone http://git.yoctoproject.org/git/poky
Line 48: Line 53:
     $ bitbake core-image-minimal
     $ bitbake core-image-minimal


* To see the Toaster web interface, open a browser and type of following in the navigation bar
* To see the Toaster web interface, open a browser and type the following in the navigation bar


     $ http://localhost:8000
     $ http://localhost:8000


or type the following command on your terminal
* or type the following command on your terminal


     $ xdg-open http://localhost:8000/  
     $ xdg-open http://localhost:8000/  
Line 60: Line 65:
     $ source toaster stop
     $ source toaster stop


=== Using the Dora + Toaster release (part of Yocto Project 1.5) ===
== Using the Dora + Toaster release (part of Yocto Project 1.5 "Dora" release) ==


==== You need this stuff ready ====
=== You need this stuff ready ===


* Django 1.4.5. The easiest way is to install it system wide [http://pip.readthedocs.org/en/latest/installing.html with pip]
# Django 1.4.5. The easiest way is to install it system wide [http://pip.readthedocs.org/en/latest/installing.html with pip]


     $ sudo pip install django==1.4.5
     $ sudo pip install django==1.4.5


* Make sure that port 8000 and 8200 are free, i.e. no servers on them
# Make sure that port 8000 and 8200 are free, i.e. no servers on them
 
=== To get Toaster up and running ===
 
* Clone the Dora + Toaster release tree
 
    $ git clone http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=dora-toaster
 
* Source your build environment (as you usually do)
 
    $ source poky/oe-init-build-env


==== To get it up and running ====
* Edit your <code>local.conf</code>, layers, etc as required for your build


* checkout the Dora + Toaster release tree: http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=dora-toaster
* Before you start the build, start Toaster   
* set up a build as normal: <code>  source poky/oe-init-build-env </code>
* at this point edit <code>local.conf</code>, or layers, etc.
* start Toaster system:  <code> source toaster start </code>
* run builds normally:  <code> bitbake core-image-minimal </code>
* to see the web interface: <code> xdg-open http://localhost:8000/ </code>
* to stop Toaster: <code> source toaster stop </code>


===Bitbake extra options ===
    $ source toaster start


This is an overview of extra options needed for Bitbake. These should be automatically added by Toaster
* Once Toaster is running, start a build. For example
in a conf/toaster.conf file that is enabled when the system starts through the toaster command.
 
    $ bitbake core-image-minimal
 
* To see the Toaster web interface, open a browser and type the following in the navigation bar
 
    $ http://localhost:8000
 
* or type the following command on your terminal
 
    $ xdg-open http://localhost:8000/
 
* To stop Toaster do
 
    $ source toaster stop
 
== Bitbake extra options ==
 
This is an overview of extra options needed for Bitbake. These should be automatically added by Toaster in a <code>conf/toaster.conf</code> file that is enabled when the system starts through the <code>toaster start</code> command.


The gritty details are here:
The gritty details are here:


[[Toaster]] needs the '''toaster''' bbclass enabled in Bitbake in order to record target image package information.
[[Toaster]] needs the '''toaster''' bbclass enabled in Bitbake in order to record target image package information.
<code>  INHERIT += "toaster" </code>


This enables the '''toaster''' bbclass in Bitbake, needed to record target image package information.
    $ INHERIT += "toaster" </code>
 
This enables the '''toaster''' bbclass in BitBake, needed to record target image package information.


<code>  INHERIT += "buildhistory"  </code>  
    $ INHERIT += "buildhistory"  </code>  
<br />
    $ BUILDHISTORY_COMMIT = "1" </code>
<code>  BUILDHISTORY_COMMIT = "1" </code>


This enables '''buildhistory''' in Bitbake, needed to record target image package information.
This enables '''buildhistory''' in BitBake, needed to record target image package information. This last command is not strictly needed, yet without it '''buildhistory''' will not properly work.
This last command is not strictly needed, yet without it '''buildhistory''' will not work right in it's own right.


==== A bunch of files are created and used under the build/ directory: ====
A bunch of files are created and used under the <code>build/</code> directory:


* toaster.sqlite - the database file
* <code>toaster.sqlite</code> - the database file
* toaster_web.log - the log file of the web server
* <code>toaster_web.log</code> - the log file of the web server
* toaster_ui.log - the log file of the ui component
* <code>toaster_ui.log</code> - the log file of the ui component
* .toastermain.pid - contains the pid of the web server
* <code>.toastermain.pid</code> - contains the pid of the web server
* .toasterui.pid     - contains the pid of the DSI data bridge
* <code>.toasterui.pid</code> - contains the pid of the DSI data bridge
* bitbake-cookerdaemon.log - the log file of the bitbake server
* <code>bitbake-cookerdaemon.log</code> - the log file of the bitbake server

Latest revision as of 14:31, 13 November 2014

This page explains how to set up Toaster in the same host where you are running your Yocto Project builds. Do it this way if you want to try Toaster or use it for individual purposes.

Before you start

Before you start, make sure you install the packages required by the Yocto Project

Using Yocto Project 1.6 "Daisy", Yocto Project 1.7 "Dizzy", or the master branch

You need this stuff ready

1. Django 1.6

The easiest way is to install it system wide with pip

   $ sudo pip install django==1.6

Alternatively, you can use

   $ pip install --user django==1.6

rather than sudo pip, to install it to your user site-packages directory under ~/.local, which won't impact the rest of the system.

2. South 0.8.4

  $ sudo pip install South==0.8.4

3. Make sure that port 8000 and 8200 are free, i.e. no servers on them

To get Toaster up and running

  • Clone one of the Yocto Project releases supported by Toaster
   $ git clone -b daisy git://git.yoctoproject.org/poky.git
   $ git clone -b dizzy git://git.yoctoproject.org/poky.git
  • or the Yocto Project master branch
  $ git clone http://git.yoctoproject.org/git/poky
  • Source your build environment (as you usually do)
   $ source poky/oe-init-build-env 
  • Edit your local.conf, layers, etc as required for your build
  • Before you start the build, start Toaster
   $ source toaster start 
  • Once Toaster is running, start a build. For example
   $ bitbake core-image-minimal
  • To see the Toaster web interface, open a browser and type the following in the navigation bar
   $ http://localhost:8000
  • or type the following command on your terminal
   $ xdg-open http://localhost:8000/ 
  • To stop Toaster do
   $ source toaster stop

Using the Dora + Toaster release (part of Yocto Project 1.5 "Dora" release)

You need this stuff ready

  1. Django 1.4.5. The easiest way is to install it system wide with pip
   $ sudo pip install django==1.4.5
  1. Make sure that port 8000 and 8200 are free, i.e. no servers on them

To get Toaster up and running

  • Clone the Dora + Toaster release tree
   $ git clone http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=dora-toaster
  • Source your build environment (as you usually do)
   $ source poky/oe-init-build-env 
  • Edit your local.conf, layers, etc as required for your build
  • Before you start the build, start Toaster
   $ source toaster start 
  • Once Toaster is running, start a build. For example
   $ bitbake core-image-minimal
  • To see the Toaster web interface, open a browser and type the following in the navigation bar
   $ http://localhost:8000
  • or type the following command on your terminal
   $ xdg-open http://localhost:8000/ 
  • To stop Toaster do
   $ source toaster stop

Bitbake extra options

This is an overview of extra options needed for Bitbake. These should be automatically added by Toaster in a conf/toaster.conf file that is enabled when the system starts through the toaster start command.

The gritty details are here:

Toaster needs the toaster bbclass enabled in Bitbake in order to record target image package information.

   $ INHERIT += "toaster" 

This enables the toaster bbclass in BitBake, needed to record target image package information.

   $ INHERIT += "buildhistory"   
   $ BUILDHISTORY_COMMIT = "1" 

This enables buildhistory in BitBake, needed to record target image package information. This last command is not strictly needed, yet without it buildhistory will not properly work.

A bunch of files are created and used under the build/ directory:

  • toaster.sqlite - the database file
  • toaster_web.log - the log file of the web server
  • toaster_ui.log - the log file of the ui component
  • .toastermain.pid - contains the pid of the web server
  • .toasterui.pid - contains the pid of the DSI data bridge
  • bitbake-cookerdaemon.log - the log file of the bitbake server