reference.rst 24 KB

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