From 4ae790313b7b8d4fab1493cf6b4b8cc5be5ae215 Mon Sep 17 00:00:00 2001 From: Anh3h Date: Wed, 24 Jan 2018 04:52:34 +0100 Subject: [PATCH] Added more information on building images Added more information for building images on developement enviroment by adding location to the build file for each kolla-build and location to docker files for each image Partially-Implements: https://blueprints.launchpad.net/kolla/+spec/queens-doc-restructure Change-Id: I1d074070e76952ff7e015fed4b7c4dd81db228ac --- doc/source/admin/image-building.rst | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/doc/source/admin/image-building.rst b/doc/source/admin/image-building.rst index 6a0e3ab4a4..a2df8f1265 100644 --- a/doc/source/admin/image-building.rst +++ b/doc/source/admin/image-building.rst @@ -43,6 +43,14 @@ In general, images are built like this: .. end +* For developement, run: + +.. code-block:: console + + python tools/build.py + +.. end + By default, the above command would build all images based on CentOS image. The operator can change the base distro with the ``-b`` option: @@ -53,6 +61,14 @@ The operator can change the base distro with the ``-b`` option: .. end +* For developement, run: + +.. code-block:: console + + python tools/build.py -b ubuntu + +.. end + There are following distros available for building images: - centos @@ -74,6 +90,14 @@ command line: .. end +* For developement, run: + +.. code-block:: console + + python tools/build.py keystone + +.. end + In this case, the build script builds all images whose name contains the ``keystone`` string along with their dependencies. @@ -85,6 +109,14 @@ Multiple names may be specified on the command line: .. end +* For developement, run: + +.. code-block:: console + + python tools/build.py keystone nova + +.. end + The set of images built can be defined as a profile in the ``profiles`` section of ``kolla-build.conf``. Later, profile can be specified by ``--profile`` CLI argument or ``profile`` option in ``kolla-build.conf``. Kolla provides some @@ -157,6 +189,14 @@ installed from source code. The default method of the OpenStack install is .. end +* For developement, run: + +.. code-block:: console + + python tools/build.py -t source + +.. end + The locations of OpenStack source code are written in ``etc/kolla/kolla-build.conf``. Now the source type supports ``url``, ``git``, and ``local``. The location of @@ -212,6 +252,10 @@ installing extra packages as part of the build, tweaking settings, installing plugins, and numerous other capabilities. Some of these examples are described in more detail below. +.. note:: + + The docker file for each image is found in docker/ directory. + Generic Customisation --------------------- @@ -245,6 +289,14 @@ Then rebuild the horizon image, passing the ``--template-override`` argument: .. end +* For developement, run: + +.. code-block:: console + + python tools/build.py --template-override template-overrides.j2 horizon + +.. end + .. note:: The above example will replace all contents from the original block. Hence @@ -287,6 +339,14 @@ Then rebuild the horizon image, passing the ``--template-override`` argument: .. end +* For developement, run: + +.. code-block:: console + + python tools/build.py --template-override template-overrides.j2 horizon + +.. end + Alternatively ``template_override`` can be set in ``kolla-build.conf``. The ``append`` suffix in the above example carries special significance. It