toaster-manual-setup-and-use.xml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
  4. <chapter id='toaster-manual-setup-and-use'>
  5. <title>Setting Up and Using Toaster</title>
  6. <section id='starting-toaster-for-local-development'>
  7. <title>Starting Toaster for Local Development</title>
  8. <para>
  9. Once you have set up the Yocto Project and installed the
  10. Toaster system dependencies as described in the
  11. "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>"
  12. chapter, you are ready to start Toaster.
  13. </para>
  14. <para>
  15. Navigate to the root of your
  16. <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
  17. (e.g. <filename>poky</filename>):
  18. <literallayout class='monospaced'>
  19. $ cd poky
  20. </literallayout>
  21. Once in that directory, source the build environment script:
  22. <literallayout class='monospaced'>
  23. $ source oe-init-build-env
  24. </literallayout>
  25. Next, from the build directory (e.g.
  26. <filename>poky/build</filename>), start Toaster using this
  27. command:
  28. <literallayout class='monospaced'>
  29. $ source toaster start
  30. </literallayout>
  31. You can now run your builds from the command line, or with
  32. Toaster as explained in section
  33. "<link linkend='using-the-toaster-web-interface'>Using the Toaster Web Interface</link>".
  34. </para>
  35. <para>
  36. To access the Toaster web interface, open your favorite
  37. browser and enter the following:
  38. <literallayout class='monospaced'>
  39. http://127.0.0.1:8000
  40. </literallayout>
  41. </para>
  42. </section>
  43. <section id='setting-a-different-port'>
  44. <title>Setting a Different Port</title>
  45. <para>
  46. By default, Toaster starts on port 8000.
  47. You can use the <filename>WEBPORT</filename> parameter to
  48. set a different port.
  49. For example, the following command sets the port to "8400":
  50. <literallayout class='monospaced'>
  51. $ source toaster start webport=8400
  52. </literallayout>
  53. </para>
  54. </section>
  55. <section id='setting-up-toaster-without-a-web-server'>
  56. <title>Setting Up Toaster Without a Web Server</title>
  57. <para>
  58. You can start a Toaster environment without starting its
  59. web server. This is useful for the following:
  60. <itemizedlist>
  61. <listitem><para>
  62. Capturing a command-line build’s statistics into
  63. the Toaster database for examination later.
  64. </para></listitem>
  65. <listitem><para>
  66. Capturing a command-line build’s statistics when
  67. the Toaster server is already running.
  68. </para></listitem>
  69. <listitem><para>
  70. Having one instance of the Toaster web server
  71. track and capture multiple command-line builds,
  72. where each build is started in its own “noweb”
  73. Toaster environment.
  74. </para></listitem>
  75. </itemizedlist>
  76. The following commands show how to start a Toaster environment
  77. without starting its web server, perform BitBake operations,
  78. and then shut down the Toaster environment.
  79. Once the build is complete, you can close the Toaster environment.
  80. Before closing the environment, however, you should allow a few
  81. minutes to ensure the complete transfer of its BitBake build
  82. statistics to the Toaster database.
  83. If you have a separate Toaster web server instance running, you
  84. can watch this command-line build’s progress and examine the
  85. results as soon as they are posted:
  86. <literallayout class='monospaced'>
  87. $ source toaster start noweb
  88. $ bitbake <replaceable>target</replaceable>
  89. $ source toaster stop
  90. </literallayout>
  91. </para>
  92. </section>
  93. <section id='setting-up-toaster-without-a-build-server'>
  94. <title>Setting Up Toaster Without a Build Server</title>
  95. <para>
  96. You can start a Toaster environment with the
  97. “New Projects” feature disabled.
  98. Doing so is useful for the following:
  99. <itemizedlist>
  100. <listitem><para>
  101. Sharing your build results over the web server while
  102. blocking others from starting builds on your host.
  103. </para></listitem>
  104. <listitem><para>
  105. Allowing only local command-line builds to be captured
  106. into the Toaster database.
  107. </para></listitem>
  108. </itemizedlist>
  109. Use the following command to set up Toaster without a
  110. build server:
  111. <literallayout class='monospaced'>
  112. $ source toaster start nobuild webport=<replaceable>port</replaceable>
  113. </literallayout>
  114. </para>
  115. </section>
  116. <section id='setting-up-external-access'>
  117. <title>Setting up External Access</title>
  118. <para>
  119. By default, Toaster binds to the loop back address
  120. (i.e. localhost), which does not allow access from
  121. external hosts. To allow external access, use the
  122. <filename>WEBPORT</filename> parameter to open an
  123. address that connects to the network, specifically the
  124. IP address that your NIC uses to connect to the network.
  125. You can also bind to all IP addresses the computer
  126. supports by using the shortcut
  127. "0.0.0.0:<replaceable>port</replaceable>".
  128. </para>
  129. <para>
  130. The following example binds to all IP addresses on the
  131. host:
  132. <literallayout class='monospaced'>
  133. $ source toaster start webport=0.0.0.0:8400
  134. </literallayout>
  135. This example binds to a specific IP address on the host's
  136. NIC:
  137. <literallayout class='monospaced'>
  138. $ source toaster start webport=192.168.1.1:8400
  139. </literallayout>
  140. </para>
  141. </section>
  142. <section id='the-directory-for-cloning-layers'>
  143. <title>The Directory for Cloning Layers</title>
  144. <para>
  145. Toaster creates a <filename>_toaster_clones</filename>
  146. directory inside your Source Directory
  147. (i.e. <filename>poky</filename>) to clone any layers
  148. needed for your builds.
  149. </para>
  150. <para>
  151. Alternatively, if you would like all of your Toaster related
  152. files and directories to be in a particular location other than
  153. the default, you can set the <filename>TOASTER_DIR</filename>
  154. environment variable, which takes precedence over your current
  155. working directory.
  156. Setting this environment variable causes Toaster to create and use
  157. <filename>$TOASTER_DIR./_toaster_clones</filename>.
  158. </para>
  159. </section>
  160. <section id='toaster-the-build-directory'>
  161. <title>The Build Directory</title>
  162. <para>
  163. Toaster creates a build directory within your Source
  164. Directory (e.g. <filename>poky</filename>) to execute
  165. the builds.
  166. </para>
  167. <para>
  168. Alternatively, if you would like all of your Toaster related files
  169. and directories to be in a particular location, you can set
  170. the <filename>TOASTER_DIR</filename> environment variable,
  171. which takes precedence over your current working directory.
  172. Setting this environment variable causes Toaster to use
  173. <filename>$TOASTER_DIR/build</filename> as the build directory.
  174. </para>
  175. </section>
  176. <section id='toaster-creating-a-django-super-user'>
  177. <title>Creating a Django Superuser</title>
  178. <para>
  179. Toaster is built on the
  180. <ulink url='https://www.djangoproject.com/'>Django framework</ulink>.
  181. Django provides an administration interface you can use
  182. to edit Toaster configuration parameters.
  183. </para>
  184. <para>
  185. To access the Django administration interface, you must
  186. create a superuser by following these steps:
  187. <orderedlist>
  188. <listitem><para>
  189. If you used <filename>pip3</filename>, which is
  190. recommended, to set up the Toaster system dependencies,
  191. you need be sure the local user path is in your
  192. <filename>PATH</filename> list.
  193. To append the pip3 local user path, use the following
  194. command:
  195. <literallayout class='monospaced'>
  196. $ export PATH=$PATH:$HOME/.local/bin
  197. </literallayout>
  198. </para></listitem>
  199. <listitem><para>
  200. From the directory containing the Toaster database,
  201. which by default is the
  202. <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
  203. invoke the <filename>createsuperuser</filename> command
  204. from <filename>manage.py</filename>:
  205. <literallayout class='monospaced'>
  206. $ cd ~/poky/build
  207. $ ../bitbake/lib/toaster/manage.py createsuperuser
  208. </literallayout>
  209. </para></listitem>
  210. <listitem><para>
  211. Django prompts you for the username, which you need to
  212. provide.
  213. </para></listitem>
  214. <listitem><para>
  215. Django prompts you for an email address, which is
  216. optional.
  217. </para></listitem>
  218. <listitem><para>
  219. Django prompts you for a password, which you must provide.
  220. </para></listitem>
  221. <listitem><para>
  222. Django prompts you to re-enter your password for verification.
  223. </para></listitem>
  224. </orderedlist>
  225. After completing these steps, the following confirmation message
  226. appears:
  227. <literallayout class='monospaced'>
  228. Superuser created successfully.
  229. </literallayout>
  230. </para>
  231. <para>
  232. Creating a superuser allows you to access the Django administration
  233. interface through a browser.
  234. The URL for this interface is the same as the URL used for the
  235. Toaster instance with "/admin" on the end.
  236. For example, if you are running Toaster locally, use the
  237. following URL:
  238. <literallayout class='monospaced'>
  239. http://127.0.0.1:8000/admin
  240. </literallayout>
  241. You can use the Django administration interface to set Toaster
  242. configuration parameters such as the build directory, layer sources,
  243. default variable values, and BitBake versions.
  244. </para>
  245. </section>
  246. <section id='toaster-setting-up-a-production-instance-of-toaster'>
  247. <title>Setting Up a Production Instance of Toaster</title>
  248. <para>
  249. You can use a production instance of Toaster to share the
  250. Toaster instance with remote users, multiple users, or both.
  251. The production instance is also the setup that can handle
  252. heavier loads on the web service.
  253. Use the instructions in the following sections to set up
  254. Toaster to run builds through the Toaster web interface.
  255. </para>
  256. <section id='toaster-production-instance-requirements'>
  257. <title>Requirements</title>
  258. <para>
  259. Be sure you meet the following requirements:
  260. <note>
  261. You must comply with all Apache,
  262. <filename>mod-wsgi</filename>, and Mysql requirements.
  263. </note>
  264. <itemizedlist>
  265. <listitem><para>
  266. Have all the build requirements as described in the
  267. "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>"
  268. chapter.
  269. </para></listitem>
  270. <listitem><para>
  271. Have an Apache webserver.
  272. </para></listitem>
  273. <listitem><para>
  274. Have <filename>mod-wsgi</filename> for the Apache
  275. webserver.
  276. </para></listitem>
  277. <listitem><para>
  278. Use the Mysql database server.
  279. </para></listitem>
  280. <listitem><para>
  281. If you are using Ubuntu 16.04, run the following:
  282. <literallayout class='monospaced'>
  283. $ sudo apt-get install apache2 libapache2-mod-wsgi-py3 mysql-server python3-pip libmysqlclient-dev
  284. </literallayout>
  285. </para></listitem>
  286. <listitem><para>
  287. If you are using Fedora 24 or a RedHat distribution, run
  288. the following:
  289. <literallayout class='monospaced'>
  290. $ sudo dnf install httpd python3-mod_wsgi python3-pip mariadb-server mariadb-devel python3-devel
  291. </literallayout>
  292. </para></listitem>
  293. <listitem><para>
  294. If you are using openSUSE Leap 42.1, run
  295. the following:
  296. <literallayout class='monospaced'>
  297. $ sudo zypper install apache2 apache2-mod_wsgi-python3 python3-pip mariadb mariadb-client python3-devel
  298. </literallayout>
  299. </para></listitem>
  300. </itemizedlist>
  301. </para>
  302. </section>
  303. <section id='toaster-installation-steps'>
  304. <title>Installation</title>
  305. <para>
  306. Perform the following steps to install Toaster:
  307. <orderedlist>
  308. <listitem><para>
  309. Create toaster user and set its home directory to
  310. <filename>/var/www/toaster</filename>:
  311. <literallayout class='monospaced'>
  312. $ sudo /usr/sbin/useradd toaster -md /var/www/toaster -s /bin/false
  313. $ sudo su - toaster -s /bin/bash
  314. </literallayout>
  315. </para></listitem>
  316. <listitem><para>
  317. Checkout a copy of <filename>poky</filename>
  318. into the web server directory.
  319. You will be using <filename>/var/www/toaster</filename>:
  320. <literallayout class='monospaced'>
  321. $ git clone git://git.yoctoproject.org/poky
  322. $ git checkout &DISTRO_NAME_NO_CAP;
  323. </literallayout>
  324. </para></listitem>
  325. <listitem><para>
  326. Install Toaster
  327. dependencies using the --user flag which
  328. keeps the Python packages
  329. isolated from your system-provided packages:
  330. <literallayout class='monospaced'>
  331. $ cd /var/www/toaster/
  332. $ pip3 install --user -r ./poky/bitbake/toaster-requirements.txt
  333. $ pip3 install --user mysqlclient
  334. </literallayout>
  335. <note>
  336. Isolating these packages is not required but is
  337. recommended.
  338. Alternatively, you can use your operating system's
  339. package manager to install the packages.
  340. </note>
  341. </para></listitem>
  342. <listitem><para>
  343. Configure Toaster by editing
  344. <filename>/var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py</filename>
  345. as follows:
  346. <itemizedlist>
  347. <listitem><para>
  348. Edit the
  349. <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#databases'>DATABASES</ulink>
  350. settings:
  351. <literallayout class='monospaced'>
  352. DATABASES = {
  353. 'default': {
  354. 'ENGINE': 'django.db.backends.mysql',
  355. 'NAME': 'toaster_data',
  356. 'USER': 'toaster',
  357. 'PASSWORD': 'yourpasswordhere',
  358. 'HOST': 'localhost',
  359. 'PORT': '3306',
  360. }
  361. }
  362. </literallayout>
  363. </para></listitem>
  364. <listitem><para>
  365. Edit the
  366. <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-SECRET_KEY'>SECRET_KEY</ulink>:
  367. <literallayout class='monospaced'>
  368. SECRET_KEY = '<replaceable>your_secret_key</replaceable>'
  369. </literallayout>
  370. </para></listitem>
  371. <listitem><para>
  372. Edit the
  373. <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-STATIC_ROOT'>STATIC_ROOT</ulink>:
  374. <literallayout class='monospaced'>
  375. STATIC_ROOT = '/var/www/toaster/static_files/'
  376. </literallayout>
  377. </para></listitem>
  378. </itemizedlist>
  379. </para></listitem>
  380. <listitem><para>
  381. Add the database and user to the <filename>mysql</filename>
  382. server defined earlier:
  383. <literallayout class='monospaced'>
  384. $ mysql -u root -p
  385. mysql> CREATE DATABASE toaster_data;
  386. mysql> CREATE USER 'toaster'@'localhost' identified by 'yourpasswordhere';
  387. mysql> GRANT all on toaster_data.* to 'toaster'@'localhost';
  388. mysql> quit
  389. </literallayout>
  390. </para></listitem>
  391. <listitem><para>
  392. Get Toaster to create the database schema,
  393. default data, and gather the statically-served files:
  394. <literallayout class='monospaced'>
  395. $ cd /var/www/toaster/poky/
  396. $ ./bitbake/lib/toaster/manage.py migrate
  397. $ TOASTER_DIR=`pwd` TEMPLATECONF='poky' \
  398. ./bitbake/lib/toaster/manage.py checksettings
  399. $ ./bitbake/lib/toaster/manage.py collectstatic
  400. </literallayout>
  401. In the previous example, from the <filename>poky</filename>
  402. directory, the <filename>migrate</filename> command
  403. ensures the database schema changes have propagated
  404. correctly (i.e. migrations).
  405. The next line sets the Toaster root directory
  406. <filename>TOASTER_DIR</filename> and the location
  407. of the Toaster configuration file
  408. <filename>TOASTER_CONF</filename>, which is relative to
  409. <filename>TOASTER_DIR</filename>.
  410. The <filename>TEMPLATECONF</filename> value reflects the
  411. contents of <filename>poky/.templateconf</filename>, and
  412. by default, should include the string "poky".
  413. For more information on the Toaster configuration
  414. file, see the
  415. "<link linkend='configuring-toaster'>Configuring Toaster</link>"
  416. section.</para>
  417. <para>This line also runs the <filename>checksettings</filename>
  418. command, which configures the location of the Toaster
  419. <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
  420. The Toaster root directory <filename>TOASTER_DIR</filename>
  421. determines where the Toaster build directory
  422. is created on the file system.
  423. In the example above,
  424. <filename>TOASTER_DIR</filename> is set as follows:
  425. <literallayout class="monospaced">
  426. /var/www/toaster/poky
  427. </literallayout>
  428. This setting causes the Toaster build directory to be:
  429. <literallayout class="monospaced">
  430. /var/www/toaster/poky/build
  431. </literallayout></para>
  432. <para>Finally, the <filename>collectstatic</filename> command
  433. is a Django framework command that collects all the
  434. statically served files into a designated directory to
  435. be served up by the Apache web server as defined by
  436. <filename>STATIC_ROOT</filename>.
  437. </para></listitem>
  438. <listitem><para>
  439. Test and/or use the Mysql integration with Toaster’s
  440. Django web server.
  441. At this point, you can start up the normal Toaster
  442. Django web server with the Toaster database in Mysql.
  443. You can use this web server to confirm that the database
  444. migration and data population from the Layer Index is
  445. complete.</para>
  446. <para>To start the default Toaster Django web server with
  447. the Toaster database now in Mysql, use the standard
  448. start commands:
  449. <literallayout class='monospaced'>
  450. $ source oe-init-build-env
  451. $ source toaster start
  452. </literallayout>
  453. Additionally, if Django is sufficient for your requirements,
  454. you can use it for your release system and migrate later
  455. to Apache as your requirements change.
  456. </para></listitem>
  457. <listitem><para>
  458. Add an Apache configuration file for Toaster to your Apache web
  459. server's configuration directory.
  460. If you are using Ubuntu or Debian, put the file here:
  461. <literallayout class='monospaced'>
  462. /etc/apache2/conf-available/toaster.conf
  463. </literallayout>
  464. If you are using Fedora or RedHat, put it here:
  465. <literallayout class='monospaced'>
  466. /etc/httpd/conf.d/toaster.conf
  467. </literallayout>
  468. If you are using OpenSUSE, put it here:
  469. <literallayout class='monospaced'>
  470. /etc/apache2/conf.d/toaster.conf
  471. </literallayout>
  472. Following is a sample Apache configuration for Toaster
  473. you can follow:
  474. <literallayout class='monospaced'>
  475. Alias /static /var/www/toaster/static_files
  476. &lt;Directory /var/www/toaster/static_files&gt;
  477. &lt;IfModule mod_access_compat.c&gt;
  478. Order allow,deny
  479. Allow from all
  480. &lt;/IfModule&gt;
  481. &lt;IfModule !mod_access_compat.c&gt;
  482. Require all granted
  483. &lt;/IfModule&gt;
  484. &lt;/Directory&gt;
  485. &lt;Directory /var/www/toaster/poky/bitbake/lib/toaster/toastermain&gt;
  486. &lt;Files "wsgi.py"&gt;
  487. Require all granted
  488. &lt;/Files&gt;
  489. &lt;/Directory&gt;
  490. WSGIDaemonProcess toaster_wsgi python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/.local/lib/python3.4/site-packages
  491. WSGIScriptAlias / "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
  492. &lt;Location /&gt;
  493. WSGIProcessGroup toaster_wsgi
  494. &lt;/Location&gt;
  495. </literallayout>
  496. If you are using Ubuntu or Debian,
  497. you will need to enable the config and module for Apache:
  498. <literallayout class='monospaced'>
  499. $ sudo a2enmod wsgi
  500. $ sudo a2enconf toaster
  501. $ chmod +x bitbake/lib/toaster/toastermain/wsgi.py
  502. </literallayout>
  503. Finally, restart Apache to make sure all new configuration
  504. is loaded.
  505. For Ubuntu, Debian, and OpenSUSE use:
  506. <literallayout class='monospaced'>
  507. $ sudo service apache2 restart
  508. </literallayout>
  509. For Fedora and RedHat use:
  510. <literallayout class='monospaced'>
  511. $ sudo service httpd restart
  512. </literallayout>
  513. </para></listitem>
  514. <listitem><para>
  515. Prepare the systemd service to run Toaster builds.
  516. Here is a sample configuration file for the service:
  517. <literallayout class='monospaced'>
  518. [Unit]
  519. Description=Toaster runbuilds
  520. [Service]
  521. Type=forking
  522. User=toaster
  523. ExecStart=/usr/bin/screen -d -m -S runbuilds /var/www/toaster/poky/bitbake/lib/toaster/runbuilds-service.sh start
  524. ExecStop=/usr/bin/screen -S runbuilds -X quit
  525. WorkingDirectory=/var/www/toaster/poky
  526. [Install]
  527. WantedBy=multi-user.target
  528. </literallayout>
  529. Prepare the <filename>runbuilds-service.sh</filename>
  530. script that you need to place in the
  531. <filename>/var/www/toaster/poky/bitbake/lib/toaster/</filename>
  532. directory by setting up executable permissions:
  533. <literallayout class='monospaced'>
  534. #!/bin/bash
  535. #export http_proxy=http://proxy.host.com:8080
  536. #export https_proxy=http://proxy.host.com:8080
  537. #export GIT_PROXY_COMMAND=$HOME/bin/gitproxy
  538. cd ~/poky/
  539. source ./oe-init-build-env build
  540. source ../bitbake/bin/toaster $1 noweb
  541. [ "$1" == 'start' ] &amp;&amp; /bin/bash
  542. </literallayout>
  543. </para></listitem>
  544. <listitem><para>
  545. Run the service:
  546. <literallayout class='monospaced'>
  547. # service runbuilds start
  548. </literallayout>
  549. Since the service is running in a detached screen
  550. session, you can attach to it using this command:
  551. <literallayout class='monospaced'>
  552. $ sudo su - toaster
  553. $ screen -rS runbuilds
  554. </literallayout>
  555. You can detach from the service again using "Ctrl-a"
  556. followed by "d" key combination.
  557. </para></listitem>
  558. </orderedlist>
  559. You can now open up a browser and start using Toaster.
  560. </para>
  561. </section>
  562. </section>
  563. <section id='using-the-toaster-web-interface'>
  564. <title>Using the Toaster Web Interface</title>
  565. <para>
  566. The Toaster web interface allows you to do the following:
  567. <itemizedlist>
  568. <listitem><para>
  569. Browse published layers in the
  570. <ulink url='http://layers.openembedded.org'>OpenEmbedded Layer Index</ulink>
  571. that are available for your selected version of the build
  572. system.
  573. </para></listitem>
  574. <listitem><para>
  575. Import your own layers for building.
  576. </para></listitem>
  577. <listitem><para>
  578. Add and remove layers from your configuration.
  579. </para></listitem>
  580. <listitem><para>
  581. Set configuration variables.
  582. </para></listitem>
  583. <listitem><para>
  584. Select a target or multiple targets to build.
  585. </para></listitem>
  586. <listitem><para>
  587. Start your builds.
  588. </para></listitem>
  589. <listitem><para>
  590. See what was built (recipes and packages) and what
  591. packages were installed into your final image.
  592. </para></listitem>
  593. <listitem><para>
  594. Browse the directory structure of your image.
  595. </para></listitem>
  596. <listitem><para>
  597. See the value of all variables in your build configuration,
  598. and which files set each value.
  599. </para></listitem>
  600. <listitem><para>
  601. Examine error, warning and trace messages to aid in
  602. debugging.
  603. </para></listitem>
  604. <listitem><para>
  605. See information about the BitBake tasks executed and
  606. reused during your build, including those that used
  607. shared state.
  608. </para></listitem>
  609. <listitem><para>
  610. See dependency relationships between recipes, packages
  611. and tasks.
  612. </para></listitem>
  613. <listitem><para>
  614. See performance information such as build time, task time,
  615. CPU usage, and disk I/O.
  616. </para></listitem>
  617. </itemizedlist>
  618. </para>
  619. <section id='web-interface-videos'>
  620. <title>Toaster Web Interface Videos</title>
  621. <para>
  622. Following are several videos that show how to use the Toaster GUI:
  623. <itemizedlist>
  624. <listitem><para><emphasis>Build Configuration:</emphasis>
  625. This
  626. <ulink url='https://www.youtube.com/watch?v=qYgDZ8YzV6w'>video</ulink>
  627. overviews and demonstrates build configuration for Toaster.
  628. </para></listitem>
  629. <listitem><para><emphasis>Build Custom Layers:</emphasis>
  630. This
  631. <ulink url='https://www.youtube.com/watch?v=QJzaE_XjX5c'>video</ulink>
  632. shows you how to build custom layers that are used with
  633. Toaster.
  634. </para></listitem>
  635. <listitem><para><emphasis>Toaster Homepage and Table Controls:</emphasis>
  636. This
  637. <ulink url='https://www.youtube.com/watch?v=QEARDnrR1Xw'>video</ulink>
  638. goes over the Toaster entry page, and provides
  639. an overview of the data manipulation capabilities of
  640. Toaster, which include search, sorting and filtering by
  641. different criteria.
  642. </para></listitem>
  643. <listitem><para><emphasis>Build Dashboard:</emphasis>
  644. This
  645. <ulink url='https://www.youtube.com/watch?v=KKqHYcnp2gE'>video</ulink>
  646. shows you the build dashboard, a page providing an
  647. overview of the information available for a selected build.
  648. </para></listitem>
  649. <listitem><para><emphasis>Image Information:</emphasis>
  650. This
  651. <ulink url='https://www.youtube.com/watch?v=XqYGFsmA0Rw'>video</ulink>
  652. walks through the information Toaster provides
  653. about images: packages installed and root file system.
  654. </para></listitem>
  655. <listitem><para><emphasis>Configuration:</emphasis>
  656. This
  657. <ulink url='https://www.youtube.com/watch?v=UW-j-T2TzIg'>video</ulink>
  658. provides Toaster build configuration information.
  659. </para></listitem>
  660. <listitem><para><emphasis>Tasks:</emphasis>
  661. This
  662. <ulink url='https://www.youtube.com/watch?v=D4-9vGSxQtw'>video</ulink>
  663. shows the information Toaster provides about the
  664. tasks run by the build system.
  665. </para></listitem>
  666. <listitem><para><emphasis>Recipes and Packages Built:</emphasis>
  667. This
  668. <ulink url='https://www.youtube.com/watch?v=x-6dx4huNnw'>video</ulink>
  669. shows the information Toaster provides about recipes
  670. and packages built.
  671. </para></listitem>
  672. <listitem><para><emphasis>Performance Data:</emphasis>
  673. This
  674. <ulink url='https://www.youtube.com/watch?v=qWGMrJoqusQ'>video</ulink>
  675. shows the build performance data provided by
  676. Toaster.
  677. </para></listitem>
  678. </itemizedlist>
  679. </para>
  680. </section>
  681. <section id='a-note-on-the-local-yocto-project-release'>
  682. <title>Additional Information About the Local Yocto Project Release</title>
  683. <para>
  684. This section only applies if you have set up Toaster
  685. for local development, as explained in the
  686. "<link linkend='starting-toaster-for-local-development'>Starting Toaster for Local Development</link>"
  687. section.
  688. </para>
  689. <para>
  690. When you create a project in Toaster, you will be asked to
  691. provide a name and to select a Yocto Project release.
  692. One of the release options you will find is called
  693. "Local Yocto Project".
  694. <imagedata fileref="figures/new-project.png" align="center" width="9in" />
  695. </para>
  696. <para>
  697. When you select the "Local Yocto Project" release, Toaster
  698. will run your builds using the local Yocto
  699. Project clone you have in your computer: the same clone
  700. you are using to run Toaster.
  701. Unless you manually update
  702. this clone, your builds will always use the same Git revision.
  703. </para>
  704. <para>
  705. If you select any of the other release options, Toaster
  706. will fetch the tip of your selected release from the upstream
  707. <ulink url='https://git.yoctoproject.org'>Yocto Project repository</ulink>
  708. every time you run a build.
  709. Fetching this tip effectively
  710. means that if your selected release is updated upstream, the
  711. Git revision you are using for your builds will change.
  712. If you are doing development locally, you might not want this
  713. change to happen.
  714. In that case, the "Local Yocto Project"
  715. release might be the right choice.
  716. </para>
  717. <para>
  718. However, the "Local Yocto Project" release
  719. will not provide you with any compatible layers, other than the
  720. three core layers that come with the Yocto Project:
  721. <itemizedlist>
  722. <listitem><para>
  723. <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/openembedded-core/'>openembedded-core</ulink>
  724. </para></listitem>
  725. <listitem><para>
  726. <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-poky/'>meta-poky</ulink>
  727. </para></listitem>
  728. <listitem><para>
  729. <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-yocto-bsp/'>meta-yocto-bsp</ulink>
  730. </para></listitem>
  731. </itemizedlist>
  732. <imagedata fileref="figures/compatible-layers.png" align="center" width="9in" />
  733. </para>
  734. <para>
  735. If you want to build any other layers, you will need to
  736. manually import them into your Toaster project, using the
  737. "Import layer" page.
  738. <imagedata fileref="figures/import-layer.png" align="center" width="9in" />
  739. </para>
  740. </section>
  741. <section id='toaster-web-interface-preferred-version'>
  742. <title>Building a Specific Recipe Given Multiple Versions</title>
  743. <para>
  744. Occasionally, a layer might provide more than one version of
  745. the same recipe.
  746. For example, the <filename>openembedded-core</filename> layer
  747. provides two versions of the <filename>bash</filename> recipe
  748. (i.e. 3.2.48 and 4.3.30-r0) and two versions of the
  749. <filename>which</filename> recipe (i.e. 2.21 and 2.18).
  750. The following figure shows this exact scenario:
  751. <imagedata fileref="figures/bash-oecore.png" align="center" width="9in" depth="6in" />
  752. </para>
  753. <para>
  754. By default, the OpenEmbedded build system builds one of the
  755. two recipes.
  756. For the <filename>bash</filename> case, version 4.3.30-r0 is
  757. built by default.
  758. Unfortunately, Toaster as it exists, is not able to override
  759. the default recipe version.
  760. If you would like to build bash 3.2.48, you need to set the
  761. <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink>
  762. variable.
  763. You can do so from Toaster, using the "Add variable" form,
  764. which is available in the "BitBake variables" page of the
  765. project configuration section as shown in the following screen:
  766. <imagedata fileref="figures/add-variable.png" align="center" width="9in" depth="6in" />
  767. </para>
  768. <para>
  769. To specify <filename>bash</filename> 3.2.48 as the version to build,
  770. enter "PREFERRED_VERSION_bash" in the "Variable" field, and "3.2.48"
  771. in the "Value" field.
  772. Next, click the "Add variable" button:
  773. <imagedata fileref="figures/set-variable.png" align="center" width="9in" depth="6in" />
  774. </para>
  775. <para>
  776. After clicking the "Add variable" button, the settings for
  777. <filename>PREFERRED_VERSION</filename> are added to the bottom
  778. of the BitBake variables list.
  779. With these settings, the OpenEmbedded build system builds the
  780. desired version of the recipe rather than the default version:
  781. <imagedata fileref="figures/variable-added.png" align="center" width="9in" depth="6in" />
  782. </para>
  783. </section>
  784. </section>
  785. </chapter>