diff options
Diffstat (limited to 'documentation/toaster-manual/reference.rst')
-rw-r--r-- | documentation/toaster-manual/reference.rst | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/documentation/toaster-manual/reference.rst b/documentation/toaster-manual/reference.rst index d2ab14c8e6..755b895cee 100644 --- a/documentation/toaster-manual/reference.rst +++ b/documentation/toaster-manual/reference.rst | |||
@@ -9,8 +9,8 @@ concepts and have some basic command reference material available. This | |||
9 | final chapter provides conceptual information on layer sources, | 9 | final chapter provides conceptual information on layer sources, |
10 | releases, and JSON configuration files. Also provided is a quick look at | 10 | releases, and JSON configuration files. Also provided is a quick look at |
11 | some useful ``manage.py`` commands that are Toaster-specific. | 11 | some useful ``manage.py`` commands that are Toaster-specific. |
12 | Information on ``manage.py`` commands does exist across the Web and the | 12 | Information on ``manage.py`` commands is available across the Web and |
13 | information in this manual by no means attempts to provide a command | 13 | this manual by no means attempts to provide a command |
14 | comprehensive reference. | 14 | comprehensive reference. |
15 | 15 | ||
16 | Layer Source | 16 | Layer Source |
@@ -28,13 +28,11 @@ at :oe_layerindex:`/`. You can find the code for this | |||
28 | layer index's web application at :yocto_git:`/layerindex-web/`. | 28 | layer index's web application at :yocto_git:`/layerindex-web/`. |
29 | 29 | ||
30 | When you tie a layer source into Toaster, it can query the layer source | 30 | When you tie a layer source into Toaster, it can query the layer source |
31 | through a | 31 | through a :wikipedia:`REST <Representational_state_transfer>` |
32 | `REST <https://en.wikipedia.org/wiki/Representational_state_transfer>`__ | ||
33 | API, store the information about the layers in the Toaster database, and | 32 | API, store the information about the layers in the Toaster database, and |
34 | then show the information to users. Users are then able to view that | 33 | then show the information to users. Users are then able to view that |
35 | information and build layers from Toaster itself without worrying about | 34 | information and build layers from Toaster itself without having to |
36 | cloning or editing the BitBake layers configuration file | 35 | clone or edit the BitBake layers configuration file ``bblayers.conf``. |
37 | ``bblayers.conf``. | ||
38 | 36 | ||
39 | Tying a layer source into Toaster is convenient when you have many | 37 | Tying a layer source into Toaster is convenient when you have many |
40 | custom layers that need to be built on a regular basis by a community of | 38 | custom layers that need to be built on a regular basis by a community of |
@@ -67,7 +65,7 @@ layers. | |||
67 | For general information on layers, see the | 65 | For general information on layers, see the |
68 | ":ref:`overview-manual/yp-intro:the yocto project layer model`" | 66 | ":ref:`overview-manual/yp-intro:the yocto project layer model`" |
69 | section in the Yocto Project Overview and Concepts Manual. For information on how | 67 | section in the Yocto Project Overview and Concepts Manual. For information on how |
70 | to create layers, see the ":ref:`dev-manual/common-tasks:understanding and creating layers`" | 68 | to create layers, see the ":ref:`dev-manual/layers:understanding and creating layers`" |
71 | section in the Yocto Project Development Tasks Manual. | 69 | section in the Yocto Project Development Tasks Manual. |
72 | 70 | ||
73 | Configuring Toaster to Hook Into Your Layer Index | 71 | Configuring Toaster to Hook Into Your Layer Index |
@@ -187,20 +185,20 @@ Configuring the Workflow | |||
187 | ------------------------ | 185 | ------------------------ |
188 | 186 | ||
189 | The ``bldcontrol/management/commands/checksettings.py`` file controls | 187 | The ``bldcontrol/management/commands/checksettings.py`` file controls |
190 | workflow configuration. The following steps outline the process to | 188 | workflow configuration. Here is the process to |
191 | initially populate this database. | 189 | initially populate this database. |
192 | 190 | ||
193 | 1. The default project settings are set from | 191 | #. The default project settings are set from |
194 | ``orm/fixtures/settings.xml``. | 192 | ``orm/fixtures/settings.xml``. |
195 | 193 | ||
196 | 2. The default project distro and layers are added from | 194 | #. The default project distro and layers are added from |
197 | ``orm/fixtures/poky.xml`` if poky is installed. If poky is not | 195 | ``orm/fixtures/poky.xml`` if poky is installed. If poky is not |
198 | installed, they are added from ``orm/fixtures/oe-core.xml``. | 196 | installed, they are added from ``orm/fixtures/oe-core.xml``. |
199 | 197 | ||
200 | 3. If the ``orm/fixtures/custom.xml`` file exists, then its values are | 198 | #. If the ``orm/fixtures/custom.xml`` file exists, then its values are |
201 | added. | 199 | added. |
202 | 200 | ||
203 | 4. The layer index is then scanned and added to the database. | 201 | #. The layer index is then scanned and added to the database. |
204 | 202 | ||
205 | Once these steps complete, Toaster is set up and ready to use. | 203 | Once these steps complete, Toaster is set up and ready to use. |
206 | 204 | ||
@@ -208,7 +206,7 @@ Customizing Pre-Set Data | |||
208 | ------------------------ | 206 | ------------------------ |
209 | 207 | ||
210 | The pre-set data for Toaster is easily customizable. You can create the | 208 | The pre-set data for Toaster is easily customizable. You can create the |
211 | ``orm/fixtures/custom.xml`` file to customize the values that go into to | 209 | ``orm/fixtures/custom.xml`` file to customize the values that go into |
212 | the database. Customization is additive, and can either extend or | 210 | the database. Customization is additive, and can either extend or |
213 | completely replace the existing values. | 211 | completely replace the existing values. |
214 | 212 | ||
@@ -238,7 +236,7 @@ The following example sets "name" to "CUSTOM_XML_ONLY" and its value to | |||
238 | Understanding Fixture File Format | 236 | Understanding Fixture File Format |
239 | --------------------------------- | 237 | --------------------------------- |
240 | 238 | ||
241 | The following is an overview of the file format used by the | 239 | Here is an overview of the file format used by the |
242 | ``oe-core.xml``, ``poky.xml``, and ``custom.xml`` files. | 240 | ``oe-core.xml``, ``poky.xml``, and ``custom.xml`` files. |
243 | 241 | ||
244 | The following subsections describe each of the sections in the fixture | 242 | The following subsections describe each of the sections in the fixture |
@@ -297,7 +295,7 @@ The following defines the releases when you create a new project: | |||
297 | <field type="CharField" name="description">Yocto Project &DISTRO; "&DISTRO_NAME;"</field> | 295 | <field type="CharField" name="description">Yocto Project &DISTRO; "&DISTRO_NAME;"</field> |
298 | <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field> | 296 | <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field> |
299 | <field type="CharField" name="branch_name">&DISTRO_NAME_NO_CAP;</field> | 297 | <field type="CharField" name="branch_name">&DISTRO_NAME_NO_CAP;</field> |
300 | <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> | 298 | <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> |
301 | </object> | 299 | </object> |
302 | 300 | ||
303 | The "pk" value must match the above respective BitBake version record. | 301 | The "pk" value must match the above respective BitBake version record. |
@@ -334,9 +332,9 @@ that includes the layer. In general all releases include the layer. | |||
334 | <field type="CharField" name="name">openembedded-core</field> | 332 | <field type="CharField" name="name">openembedded-core</field> |
335 | <field type="CharField" name="layer_index_url"></field> | 333 | <field type="CharField" name="layer_index_url"></field> |
336 | <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field> | 334 | <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field> |
337 | <field type="CharField" name="vcs_web_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky</field> | 335 | <field type="CharField" name="vcs_web_url">https://git.yoctoproject.org/cgit/cgit.cgi/poky</field> |
338 | <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> | 336 | <field type="CharField" name="vcs_web_tree_base_url">https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> |
339 | <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> | 337 | <field type="CharField" name="vcs_web_file_base_url">https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> |
340 | </object> | 338 | </object> |
341 | <object model="orm.layer_version" pk="1"> | 339 | <object model="orm.layer_version" pk="1"> |
342 | <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> | 340 | <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> |
@@ -370,8 +368,8 @@ Remote Toaster Monitoring | |||
370 | Toaster has an API that allows remote management applications to | 368 | Toaster has an API that allows remote management applications to |
371 | directly query the state of the Toaster server and its builds in a | 369 | directly query the state of the Toaster server and its builds in a |
372 | machine-to-machine manner. This API uses the | 370 | machine-to-machine manner. This API uses the |
373 | `REST <https://en.wikipedia.org/wiki/Representational_state_transfer>`__ | 371 | :wikipedia:`REST <Representational_state_transfer>` interface and the |
374 | interface and the transfer of JSON files. For example, you might monitor | 372 | transfer of JSON files. For example, you might monitor |
375 | a build inside a container through well supported known HTTP ports in | 373 | a build inside a container through well supported known HTTP ports in |
376 | order to easily access a Toaster server inside the container. In this | 374 | order to easily access a Toaster server inside the container. In this |
377 | example, when you use this direct JSON API, you avoid having web page | 375 | example, when you use this direct JSON API, you avoid having web page |
@@ -408,7 +406,7 @@ To get the status of pending builds, use the following call:: | |||
408 | Be sure to provide values for host and port. The output is a JSON file that | 406 | Be sure to provide values for host and port. The output is a JSON file that |
409 | itemizes all builds in progress. This file includes the time in seconds since | 407 | itemizes all builds in progress. This file includes the time in seconds since |
410 | each respective build started as well as the progress of the cloning, parsing, | 408 | each respective build started as well as the progress of the cloning, parsing, |
411 | and task execution. The following is sample output for a build in progress: | 409 | and task execution. Here is sample output for a build in progress: |
412 | 410 | ||
413 | .. code-block:: JSON | 411 | .. code-block:: JSON |
414 | 412 | ||
@@ -441,8 +439,8 @@ call:: | |||
441 | http://host:port/toastergui/api/builds | 439 | http://host:port/toastergui/api/builds |
442 | 440 | ||
443 | Be sure to provide values for host and port. The output is a JSON file that | 441 | Be sure to provide values for host and port. The output is a JSON file that |
444 | itemizes all complete builds, and includes build summary information. The | 442 | itemizes all complete builds, and includes build summary information. Here |
445 | following is sample output for a completed build: | 443 | is sample output for a completed build: |
446 | 444 | ||
447 | .. code-block:: JSON | 445 | .. code-block:: JSON |
448 | 446 | ||
@@ -480,7 +478,7 @@ Completed query. See the ":ref:`toaster-manual/reference:checking status of buil | |||
480 | section for more information. | 478 | section for more information. |
481 | 479 | ||
482 | The output is a JSON file that itemizes the specific build and includes | 480 | The output is a JSON file that itemizes the specific build and includes |
483 | build summary information. The following is sample output for a specific | 481 | build summary information. Here is sample output for a specific |
484 | build: | 482 | build: |
485 | 483 | ||
486 | .. code-block:: JSON | 484 | .. code-block:: JSON |
@@ -509,7 +507,7 @@ Useful Commands | |||
509 | =============== | 507 | =============== |
510 | 508 | ||
511 | In addition to the web user interface and the scripts that start and | 509 | In addition to the web user interface and the scripts that start and |
512 | stop Toaster, command-line commands exist through the ``manage.py`` | 510 | stop Toaster, command-line commands are available through the ``manage.py`` |
513 | management script. You can find general documentation on ``manage.py`` | 511 | management script. You can find general documentation on ``manage.py`` |
514 | at the | 512 | at the |
515 | `Django <https://docs.djangoproject.com/en/2.2/topics/settings/>`__ | 513 | `Django <https://docs.djangoproject.com/en/2.2/topics/settings/>`__ |
@@ -523,14 +521,13 @@ tasks. You can locate these commands in the | |||
523 | 521 | ||
524 | - When using ``manage.py`` commands given a default configuration, | 522 | - When using ``manage.py`` commands given a default configuration, |
525 | you must be sure that your working directory is set to the | 523 | you must be sure that your working directory is set to the |
526 | :term:`Build Directory`. Using | 524 | :term:`Build Directory`. Using ``manage.py`` commands from the |
527 | ``manage.py`` commands from the Build Directory allows Toaster to | 525 | :term:`Build Directory` allows Toaster to find the ``toaster.sqlite`` |
528 | find the ``toaster.sqlite`` file, which is located in the Build | 526 | file, which is located in the :term:`Build Directory`. |
529 | Directory. | ||
530 | 527 | ||
531 | - For non-default database configurations, it is possible that you | 528 | - For non-default database configurations, it is possible that you |
532 | can use ``manage.py`` commands from a directory other than the | 529 | can use ``manage.py`` commands from a directory other than the |
533 | Build Directory. To do so, the ``toastermain/settings.py`` file | 530 | :term:`Build Directory`. To do so, the ``toastermain/settings.py`` file |
534 | must be configured to point to the correct database backend. | 531 | must be configured to point to the correct database backend. |
535 | 532 | ||
536 | ``buildslist`` | 533 | ``buildslist`` |
@@ -550,11 +547,11 @@ database. | |||
550 | You need to run the ``buildslist`` command first to identify existing | 547 | You need to run the ``buildslist`` command first to identify existing |
551 | builds in the database before using the | 548 | builds in the database before using the |
552 | :ref:`toaster-manual/reference:\`\`builddelete\`\`` command. Here is an | 549 | :ref:`toaster-manual/reference:\`\`builddelete\`\`` command. Here is an |
553 | example that assumes default repository and build directory names: | 550 | example that assumes default repository and :term:`Build Directory` names: |
554 | 551 | ||
555 | .. code-block:: shell | 552 | .. code-block:: shell |
556 | 553 | ||
557 | $ cd ~/poky/build | 554 | $ cd poky/build |
558 | $ python ../bitbake/lib/toaster/manage.py buildslist | 555 | $ python ../bitbake/lib/toaster/manage.py buildslist |
559 | 556 | ||
560 | If your Toaster database had only one build, the above | 557 | If your Toaster database had only one build, the above |