toaster-manual-reference.rst 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. **********************
  3. Concepts and Reference
  4. **********************
  5. In order to configure and use Toaster, you should understand some
  6. concepts and have some basic command reference material available. This
  7. final chapter provides conceptual information on layer sources,
  8. releases, and JSON configuration files. Also provided is a quick look at
  9. some useful ``manage.py`` commands that are Toaster-specific.
  10. Information on ``manage.py`` commands does exist across the Web and the
  11. information in this manual by no means attempts to provide a command
  12. comprehensive reference.
  13. Layer Source
  14. ============
  15. In general, a "layer source" is a source of information about existing
  16. layers. In particular, we are concerned with layers that you can use
  17. with the Yocto Project and Toaster. This chapter describes a particular
  18. type of layer source called a "layer index."
  19. A layer index is a web application that contains information about a set
  20. of custom layers. A good example of an existing layer index is the
  21. OpenEmbedded Layer Index. A public instance of this layer index exists
  22. at http://layers.openembedded.org. You can find the code for this
  23. layer index's web application at
  24. http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/.
  25. When you tie a layer source into Toaster, it can query the layer source
  26. through a
  27. `REST <http://en.wikipedia.org/wiki/Representational_state_transfer>`__
  28. API, store the information about the layers in the Toaster database, and
  29. then show the information to users. Users are then able to view that
  30. information and build layers from Toaster itself without worrying about
  31. cloning or editing the BitBake layers configuration file
  32. ``bblayers.conf``.
  33. Tying a layer source into Toaster is convenient when you have many
  34. custom layers that need to be built on a regular basis by a community of
  35. developers. In fact, Toaster comes pre-configured with the OpenEmbedded
  36. Metadata Index.
  37. .. note::
  38. You do not have to use a layer source to use Toaster. Tying into a
  39. layer source is optional.
  40. .. _layer-source-using-with-toaster:
  41. Setting Up and Using a Layer Source
  42. -----------------------------------
  43. To use your own layer source, you need to set up the layer source and
  44. then tie it into Toaster. This section describes how to tie into a layer
  45. index in a manner similar to the way Toaster ties into the OpenEmbedded
  46. Metadata Index.
  47. Understanding Your Layers
  48. ~~~~~~~~~~~~~~~~~~~~~~~~~
  49. The obvious first step for using a layer index is to have several custom
  50. layers that developers build and access using the Yocto Project on a
  51. regular basis. This set of layers needs to exist and you need to be
  52. familiar with where they reside. You will need that information when you
  53. set up the code for the web application that "hooks" into your set of
  54. layers.
  55. For general information on layers, see the
  56. ":ref:`overview-manual/overview-manual-yp-intro:the yocto project layer model`"
  57. section in the Yocto Project Overview and Concepts Manual. For information on how
  58. to create layers, see the ":ref:`dev-manual/dev-manual-common-tasks:understanding and creating layers`"
  59. section in the Yocto Project Development Tasks Manual.
  60. .. _configuring-toaster-to-hook-into-your-layer-source:
  61. Configuring Toaster to Hook Into Your Layer Index
  62. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  63. If you want Toaster to use your layer index, you must host the web
  64. application in a server to which Toaster can connect. You also need to
  65. give Toaster the information about your layer index. In other words, you
  66. have to configure Toaster to use your layer index. This section
  67. describes two methods by which you can configure and use your layer
  68. index.
  69. In the previous section, the code for the OpenEmbedded Metadata Index
  70. (i.e. http://layers.openembedded.org) was referenced. You can use
  71. this code, which is at
  72. http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/, as a
  73. base to create your own layer index.
  74. Use the Administration Interface
  75. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  76. Access the administration interface through a browser by entering the
  77. URL of your Toaster instance and adding "``/admin``" to the end of the
  78. URL. As an example, if you are running Toaster locally, use the
  79. following URL::
  80. http://127.0.0.1:8000/admin
  81. The administration interface has a "Layer sources" section that includes
  82. an "Add layer source" button. Click that button and provide the required
  83. information. Make sure you select "layerindex" as the layer source type.
  84. Use the Fixture Feature
  85. ^^^^^^^^^^^^^^^^^^^^^^^
  86. The Django fixture feature overrides the default layer server when you
  87. use it to specify a custom URL. To use the fixture feature, create (or
  88. edit) the file ``bitbake/lib/toaster.orm/fixtures/custom.xml``, and then
  89. set the following Toaster setting to your custom URL:
  90. .. code-block:: xml
  91. <?xml version="1.0" ?>
  92. <django-objects version="1.0">
  93. <object model="orm.toastersetting" pk="100">
  94. <field name="name" type="CharField">CUSTOM_LAYERINDEX_SERVER</field>
  95. <field name="value" type="CharField">https://layers.my_organization.org/layerindex/branch/master/layers/</field>
  96. </object>
  97. <django-objects>
  98. When you start Toaster for the first time, or
  99. if you delete the file ``toaster.sqlite`` and restart, the database will
  100. populate cleanly from this layer index server.
  101. Once the information has been updated, verify the new layer information
  102. is available by using the Toaster web interface. To do that, visit the
  103. "All compatible layers" page inside a Toaster project. The layers from
  104. your layer source should be listed there.
  105. If you change the information in your layer index server, refresh the
  106. Toaster database by running the following command:
  107. .. code-block:: shell
  108. $ bitbake/lib/toaster/manage.py lsupdates
  109. If Toaster can reach the API URL, you should see a message telling you that
  110. Toaster is updating the layer source information.
  111. .. _toaster-releases:
  112. Releases
  113. ========
  114. When you create a Toaster project using the web interface, you are asked
  115. to choose a "Release." In the context of Toaster, the term "Release"
  116. refers to a set of layers and a BitBake version the OpenEmbedded build
  117. system uses to build something. As shipped, Toaster is pre-configured
  118. with releases that correspond to Yocto Project release branches.
  119. However, you can modify, delete, and create new releases according to
  120. your needs. This section provides some background information on
  121. releases.
  122. .. _toaster-releases-supported:
  123. Pre-Configured Releases
  124. -----------------------
  125. As shipped, Toaster is configured to use a specific set of releases. Of
  126. course, you can always configure Toaster to use any release. For
  127. example, you might want your project to build against a specific commit
  128. of any of the "out-of-the-box" releases. Or, you might want your project
  129. to build against different revisions of OpenEmbedded and BitBake.
  130. As shipped, Toaster is configured to work with the following releases:
  131. - *Yocto Project &DISTRO; "&DISTRO_NAME;" or OpenEmbedded "&DISTRO_NAME;":*
  132. This release causes your Toaster projects to build against the head
  133. of the &DISTRO_NAME_NO_CAP; branch at
  134. https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=&DISTRO_NAME_NO_CAP; or
  135. http://git.openembedded.org/openembedded-core/commit/?h=&DISTRO_NAME_NO_CAP;.
  136. - *Yocto Project "Master" or OpenEmbedded "Master":* This release
  137. causes your Toaster Projects to build against the head of the master
  138. branch, which is where active development takes place, at
  139. https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/ or
  140. http://git.openembedded.org/openembedded-core/log/.
  141. - *Local Yocto Project or Local OpenEmbedded:* This release causes your
  142. Toaster Projects to build against the head of the ``poky`` or
  143. ``openembedded-core`` clone you have local to the machine running
  144. Toaster.
  145. Configuring Toaster
  146. ===================
  147. In order to use Toaster, you must configure the database with the
  148. default content. The following subsections describe various aspects of
  149. Toaster configuration.
  150. Configuring the Workflow
  151. ------------------------
  152. The ``bldcontrol/management/commands/checksettings.py`` file controls
  153. workflow configuration. The following steps outline the process to
  154. initially populate this database.
  155. 1. The default project settings are set from
  156. ``orm/fixtures/settings.xml``.
  157. 2. The default project distro and layers are added from
  158. ``orm/fixtures/poky.xml`` if poky is installed. If poky is not
  159. installed, they are added from ``orm/fixtures/oe-core.xml``.
  160. 3. If the ``orm/fixtures/custom.xml`` file exists, then its values are
  161. added.
  162. 4. The layer index is then scanned and added to the database.
  163. Once these steps complete, Toaster is set up and ready to use.
  164. Customizing Pre-Set Data
  165. ------------------------
  166. The pre-set data for Toaster is easily customizable. You can create the
  167. ``orm/fixtures/custom.xml`` file to customize the values that go into to
  168. the database. Customization is additive, and can either extend or
  169. completely replace the existing values.
  170. You use the ``orm/fixtures/custom.xml`` file to change the default
  171. project settings for the machine, distro, file images, and layers. When
  172. creating a new project, you can use the file to define the offered
  173. alternate project release selections. For example, you can add one or
  174. more additional selections that present custom layer sets or distros,
  175. and any other local or proprietary content.
  176. Additionally, you can completely disable the content from the
  177. ``oe-core.xml`` and ``poky.xml`` files by defining the section shown
  178. below in the ``settings.xml`` file. For example, this option is
  179. particularly useful if your custom configuration defines fewer releases
  180. or layers than the default fixture files.
  181. The following example sets "name" to "CUSTOM_XML_ONLY" and its value to
  182. "True".
  183. .. code-block:: xml
  184. <object model="orm.toastersetting" pk="99">
  185. <field type="CharField" name="name">CUSTOM_XML_ONLY</field>
  186. <field type="CharField" name="value">True</field>
  187. </object>
  188. Understanding Fixture File Format
  189. ---------------------------------
  190. The following is an overview of the file format used by the
  191. ``oe-core.xml``, ``poky.xml``, and ``custom.xml`` files.
  192. The following subsections describe each of the sections in the fixture
  193. files, and outline an example section of the XML code. you can use to
  194. help understand this information and create a local ``custom.xml`` file.
  195. Defining the Default Distro and Other Values
  196. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  197. This section defines the default distro value for new projects. By
  198. default, it reserves the first Toaster Setting record "1". The following
  199. demonstrates how to set the project default value for
  200. :term:`DISTRO`:
  201. .. code-block:: xml
  202. <!-- Set the project default value for DISTRO -->
  203. <object model="orm.toastersetting" pk="1">
  204. <field type="CharField" name="name">DEFCONF_DISTRO</field>
  205. <field type="CharField" name="value">poky</field>
  206. </object>
  207. You can override
  208. other default project values by adding additional Toaster Setting
  209. sections such as any of the settings coming from the ``settings.xml``
  210. file. Also, you can add custom values that are included in the BitBake
  211. environment. The "pk" values must be unique. By convention, values that
  212. set default project values have a "DEFCONF" prefix.
  213. Defining BitBake Version
  214. ~~~~~~~~~~~~~~~~~~~~~~~~
  215. The following defines which version of BitBake is used for the following
  216. release selection:
  217. .. code-block:: xml
  218. <!-- Bitbake versions which correspond to the metadata release -->
  219. <object model="orm.bitbakeversion" pk="1">
  220. <field type="CharField" name="name">&DISTRO_NAME_NO_CAP;</field>
  221. <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
  222. <field type="CharField" name="branch">&DISTRO_NAME_NO_CAP;</field>
  223. <field type="CharField" name="dirpath">bitbake</field>
  224. </object>
  225. .. _defining-releases:
  226. Defining Release
  227. ~~~~~~~~~~~~~~~~
  228. The following defines the releases when you create a new project:
  229. .. code-block:: xml
  230. <!-- Releases available -->
  231. <object model="orm.release" pk="1">
  232. <field type="CharField" name="name">&DISTRO_NAME_NO_CAP;</field>
  233. <field type="CharField" name="description">Yocto Project &DISTRO; "&DISTRO_NAME;"</field>
  234. <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
  235. <field type="CharField" name="branch_name">&DISTRO_NAME_NO_CAP;</field>
  236. <field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=&DISTRO_NAME_NO_CAP;">Yocto Project &DISTRO_NAME; branch</a>.</field>
  237. </object>
  238. The "pk" value must match the above respective BitBake version record.
  239. Defining the Release Default Layer Names
  240. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  241. The following defines the default layers for each release:
  242. .. code-block:: xml
  243. <!-- Default project layers for each release -->
  244. <object model="orm.releasedefaultlayer" pk="1">
  245. <field rel="ManyToOneRel" to="orm.release" name="release">1</field>
  246. <field type="CharField" name="layer_name">openembedded-core</field>
  247. </object>
  248. The 'pk' values in the example above should start at "1" and increment
  249. uniquely. You can use the same layer name in multiple releases.
  250. Defining Layer Definitions
  251. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  252. Layer definitions are the most complex. The following defines each of
  253. the layers, and then defines the exact layer version of the layer used
  254. for each respective release. You must have one ``orm.layer`` entry for
  255. each layer. Then, with each entry you need a set of
  256. ``orm.layer_version`` entries that connects the layer with each release
  257. that includes the layer. In general all releases include the layer.
  258. .. code-block:: xml
  259. <object model="orm.layer" pk="1">
  260. <field type="CharField" name="name">openembedded-core</field>
  261. <field type="CharField" name="layer_index_url"></field>
  262. <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field>
  263. <field type="CharField" name="vcs_web_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky</field>
  264. <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
  265. <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
  266. </object>
  267. <object model="orm.layer_version" pk="1">
  268. <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
  269. <field type="IntegerField" name="layer_source">0</field>
  270. <field rel="ManyToOneRel" to="orm.release" name="release">1</field>
  271. <field type="CharField" name="branch">&DISTRO_NAME_NO_CAP;</field>
  272. <field type="CharField" name="dirpath">meta</field>
  273. </object> <object model="orm.layer_version" pk="2">
  274. <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
  275. <field type="IntegerField" name="layer_source">0</field>
  276. <field rel="ManyToOneRel" to="orm.release" name="release">2</field>
  277. <field type="CharField" name="branch">HEAD</field>
  278. <field type="CharField" name="commit">HEAD</field>
  279. <field type="CharField" name="dirpath">meta</field>
  280. </object>
  281. <object model="orm.layer_version" pk="3">
  282. <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
  283. <field type="IntegerField" name="layer_source">0</field>
  284. <field rel="ManyToOneRel" to="orm.release" name="release">3</field>
  285. <field type="CharField" name="branch">master</field>
  286. <field type="CharField" name="dirpath">meta</field>
  287. </object>
  288. The layer "pk" values above must be unique, and typically start at "1". The
  289. layer version "pk" values must also be unique across all layers, and typically
  290. start at "1".
  291. Remote Toaster Monitoring
  292. =========================
  293. Toaster has an API that allows remote management applications to
  294. directly query the state of the Toaster server and its builds in a
  295. machine-to-machine manner. This API uses the
  296. `REST <http://en.wikipedia.org/wiki/Representational_state_transfer>`__
  297. interface and the transfer of JSON files. For example, you might monitor
  298. a build inside a container through well supported known HTTP ports in
  299. order to easily access a Toaster server inside the container. In this
  300. example, when you use this direct JSON API, you avoid having web page
  301. parsing against the display the user sees.
  302. Checking Health
  303. ---------------
  304. Before you use remote Toaster monitoring, you should do a health check.
  305. To do this, ping the Toaster server using the following call to see if
  306. it is still alive::
  307. http://host:port/health
  308. Be sure to provide values for host and port. If the server is alive, you will
  309. get the response HTML:
  310. .. code-block:: html
  311. <!DOCTYPE html>
  312. <html lang="en">
  313. <head><title>Toaster Health</title></head>
  314. <body>Ok</body>
  315. </html>
  316. Determining Status of Builds in Progress
  317. ----------------------------------------
  318. Sometimes it is useful to determine the status of a build in progress.
  319. To get the status of pending builds, use the following call::
  320. http://host:port/toastergui/api/building
  321. Be sure to provide values for host and port. The output is a JSON file that
  322. itemizes all builds in progress. This file includes the time in seconds since
  323. each respective build started as well as the progress of the cloning, parsing,
  324. and task execution. The following is sample output for a build in progress:
  325. .. code-block:: JSON
  326. {"count": 1,
  327. "building": [
  328. {"machine": "beaglebone",
  329. "seconds": "463.869",
  330. "task": "927:2384",
  331. "distro": "poky",
  332. "clone": "1:1",
  333. "id": 2,
  334. "start": "2017-09-22T09:31:44.887Z",
  335. "name": "20170922093200",
  336. "parse": "818:818",
  337. "project": "my_rocko",
  338. "target": "core-image-minimal"
  339. }]
  340. }
  341. The JSON data for this query is returned in a
  342. single line. In the previous example the line has been artificially
  343. split for readability.
  344. Checking Status of Builds Completed
  345. -----------------------------------
  346. Once a build is completed, you get the status when you use the following
  347. call::
  348. http://host:port/toastergui/api/builds
  349. Be sure to provide values for host and port. The output is a JSON file that
  350. itemizes all complete builds, and includes build summary information. The
  351. following is sample output for a completed build:
  352. .. code-block:: JSON
  353. {"count": 1,
  354. "builds": [
  355. {"distro": "poky",
  356. "errors": 0,
  357. "machine": "beaglebone",
  358. "project": "my_rocko",
  359. "stop": "2017-09-22T09:26:36.017Z",
  360. "target": "quilt-native",
  361. "seconds": "78.193",
  362. "outcome": "Succeeded",
  363. "id": 1,
  364. "start": "2017-09-22T09:25:17.824Z",
  365. "warnings": 1,
  366. "name": "20170922092618"
  367. }]
  368. }
  369. The JSON data for this query is returned in a single line. In the
  370. previous example the line has been artificially split for readability.
  371. Determining Status of a Specific Build
  372. --------------------------------------
  373. Sometimes it is useful to determine the status of a specific build. To
  374. get the status of a specific build, use the following call::
  375. http://host:port/toastergui/api/build/ID
  376. Be sure to provide values for
  377. host, port, and ID. You can find the value for ID from the Builds
  378. Completed query. See the ":ref:`toaster-manual/toaster-manual-reference:checking status of builds completed`"
  379. section for more information.
  380. The output is a JSON file that itemizes the specific build and includes
  381. build summary information. The following is sample output for a specific
  382. build:
  383. .. code-block:: JSON
  384. {"build":
  385. {"distro": "poky",
  386. "errors": 0,
  387. "machine": "beaglebone",
  388. "project": "my_rocko",
  389. "stop": "2017-09-22T09:26:36.017Z",
  390. "target": "quilt-native",
  391. "seconds": "78.193",
  392. "outcome": "Succeeded",
  393. "id": 1,
  394. "start": "2017-09-22T09:25:17.824Z",
  395. "warnings": 1,
  396. "name": "20170922092618",
  397. "cooker_log": "/opt/user/poky/build-toaster-2/tmp/log/cooker/beaglebone/build_20170922_022607.991.log"
  398. }
  399. }
  400. The JSON data for this query is returned in a single line. In the
  401. previous example the line has been artificially split for readability.
  402. .. _toaster-useful-commands:
  403. Useful Commands
  404. ===============
  405. In addition to the web user interface and the scripts that start and
  406. stop Toaster, command-line commands exist through the ``manage.py``
  407. management script. You can find general documentation on ``manage.py``
  408. at the
  409. `Django <https://docs.djangoproject.com/en/2.2/topics/settings/>`__
  410. site. However, several ``manage.py`` commands have been created that are
  411. specific to Toaster and are used to control configuration and back-end
  412. tasks. You can locate these commands in the
  413. :term:`Source Directory` (e.g. ``poky``) at
  414. ``bitbake/lib/manage.py``. This section documents those commands.
  415. .. note::
  416. - When using ``manage.py`` commands given a default configuration,
  417. you must be sure that your working directory is set to the
  418. :term:`Build Directory`. Using
  419. ``manage.py`` commands from the Build Directory allows Toaster to
  420. find the ``toaster.sqlite`` file, which is located in the Build
  421. Directory.
  422. - For non-default database configurations, it is possible that you
  423. can use ``manage.py`` commands from a directory other than the
  424. Build Directory. To do so, the ``toastermain/settings.py`` file
  425. must be configured to point to the correct database backend.
  426. .. _toaster-command-buildslist:
  427. ``buildslist``
  428. --------------
  429. The ``buildslist`` command lists all builds that Toaster has recorded.
  430. Access the command as follows:
  431. .. code-block:: shell
  432. $ bitbake/lib/toaster/manage.py buildslist
  433. The command returns a list, which includes numeric
  434. identifications, of the builds that Toaster has recorded in the current
  435. database.
  436. You need to run the ``buildslist`` command first to identify existing
  437. builds in the database before using the
  438. :ref:`toaster-manual/toaster-manual-reference:\`\`builddelete\`\`` command. Here is an
  439. example that assumes default repository and build directory names:
  440. .. code-block:: shell
  441. $ cd ~/poky/build
  442. $ python ../bitbake/lib/toaster/manage.py buildslist
  443. If your Toaster database had only one build, the above
  444. :ref:`toaster-manual/toaster-manual-reference:\`\`buildslist\`\``
  445. command would return something like the following::
  446. 1: qemux86 poky core-image-minimal
  447. .. _toaster-command-builddelete:
  448. ``builddelete``
  449. ---------------
  450. The ``builddelete`` command deletes data associated with a build. Access
  451. the command as follows:
  452. .. code-block::
  453. $ bitbake/lib/toaster/manage.py builddelete build_id
  454. The command deletes all the build data for the specified
  455. build_id. This command is useful for removing old and unused data from
  456. the database.
  457. Prior to running the ``builddelete`` command, you need to get the ID
  458. associated with builds by using the
  459. :ref:`toaster-manual/toaster-manual-reference:\`\`buildslist\`\`` command.
  460. .. _toaster-command-perf:
  461. ``perf``
  462. --------
  463. The ``perf`` command measures Toaster performance. Access the command as
  464. follows:
  465. .. code-block:: shell
  466. $ bitbake/lib/toaster/manage.py perf
  467. The command is a sanity check that returns page loading times in order to
  468. identify performance problems.
  469. .. _toaster-command-checksettings:
  470. ``checksettings``
  471. -----------------
  472. The ``checksettings`` command verifies existing Toaster settings. Access
  473. the command as follows:
  474. .. code-block:: shell
  475. $ bitbake/lib/toaster/manage.py checksettings
  476. Toaster uses settings that are based on the database to configure the
  477. building tasks. The ``checksettings`` command verifies that the database
  478. settings are valid in the sense that they have the minimal information
  479. needed to start a build.
  480. In order for the ``checksettings`` command to work, the database must be
  481. correctly set up and not have existing data. To be sure the database is
  482. ready, you can run the following:
  483. .. code-block:: shell
  484. $ bitbake/lib/toaster/manage.py syncdb
  485. $ bitbake/lib/toaster/manage.py migrate orm
  486. $ bitbake/lib/toaster/manage.py migrate bldcontrol
  487. After running these commands, you can run the ``checksettings`` command.
  488. .. _toaster-command-runbuilds:
  489. ``runbuilds``
  490. -------------
  491. The ``runbuilds`` command launches scheduled builds. Access the command
  492. as follows:
  493. .. code-block:: shell
  494. $ bitbake/lib/toaster/manage.py runbuilds
  495. The ``runbuilds`` command checks if scheduled builds exist in the database
  496. and then launches them per schedule. The command returns after the builds
  497. start but before they complete. The Toaster Logging Interface records and
  498. updates the database when the builds complete.