Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 85AF7E00997 for ; Thu, 20 Mar 2014 02:54:54 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 20 Mar 2014 02:50:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,693,1389772800"; d="scan'208";a="476283968" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga001.jf.intel.com with ESMTP; 20 Mar 2014 02:54:50 -0700 Received: from irsmsx152.ger.corp.intel.com (163.33.192.66) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 20 Mar 2014 09:54:40 +0000 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.26]) by IRSMSX152.ger.corp.intel.com ([169.254.6.180]) with mapi id 14.03.0123.003; Thu, 20 Mar 2014 09:54:40 +0000 From: "Barros Pena, Belen" To: Scott Rifenbark Thread-Topic: Toaster documentation, 1.6 release Thread-Index: AQHPQsnQRGHjBdFP9U6gk2++jak7HZroyacAgAD1lQA= Date: Thu, 20 Mar 2014 09:54:39 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.237.224.30] MIME-Version: 1.0 Cc: Paul Eggleton , "toaster@yoctoproject.org" Subject: Re: Toaster documentation, 1.6 release X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2014 09:54:57 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <410FC298AC86DE49B6EE4E2F46BA3F2A@intel.com> Content-Transfer-Encoding: quoted-printable Thanks, Scott! This needs to be reviewed by Alex and Paul: hopefully they can provide some feedback. Cheers Bel=E9n On 19/03/2014 19:15, "Scott Rifenbark" wrote: >Belen,=20 > >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: >=20 > > 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=3Dlocalhost:-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 > 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=E9n > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >