Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Document container build using kolla config file"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Nov 16, 2017
2 parents a39fa88 + 578fc8a commit 9e6170f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 34 deletions.
43 changes: 30 additions & 13 deletions doc/source/install/containers_deployment/3rd_party.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,48 @@ Building new containers with kolla-build
To create new containers, or modify existing ones, you can use ``kolla-build``
from the `Kolla`_ project to build and push the images yourself. The command
to build a new containers is below. Note that this assumes you are on an
undercloud host where the registry IP address is 192.168.24.1::
undercloud host where the registry IP address is 192.168.24.1.

kolla-build --base centos --type binary --namespace master --registry 192.168.24.1:8787 --tag latest --template-override /usr/share/tripleo-common/container-images/tripleo_kolla_template_overrides.j2 --push
Configure Kolla to build images for TripleO, in `/etc/kolla/kolla-build.conf`::

Notice that TripleO already uses the
``/usr/share/tripleo-common/container-images/tripleo_kolla_template_overrides.j2``
to add or change specific aspects of the containers. This file can be copied
and modified to create custom containers. The original copy of this file can
be found in the `tripleo-common`_ repository.
[DEFAULT]
base=centos
type=binary
namespace=master
registry=192.168.24.1:8787
tag=latest
template_override=/usr/share/tripleo-common/container-images/tripleo_kolla_template_overrides.j2
rpm_setup_config=http://trunk.rdoproject.org/centos7/current-tripleo/delorean.repo,http://trunk.rdoproject.org/centos7/delorean-deps.repo
push=True

Use the following command to build all of the container images used in TripleO::

openstack overcloud container image build \
--config-file /usr/share/tripleo-common/container-images/overcloud_images.yaml

To build specific containers you can add a `custom` section to the kolla
configuration. For example, to build the cron containers you would add::
Or use `kolla-build` to build the images yourself, which provides more
flexibility and allows you to rebuild selectively just the images matching
a given name, for example to build only the heat images with the TripleO
customization::

[profiles]
custom=cron
kolla-build heat

Notice that TripleO already uses the
``/usr/share/tripleo-common/container-images/tripleo_kolla_template_overrides.j2``
to add or change specific aspects of the containers using the `kolla template
override mechanism`_. This file can be copied and modified to create custom
containers. The original copy of this file can be found in the
`tripleo-common`_ repository.

The following template is an example of the template used for building the base
images that are consumed by TripleO. In this case we are adding the `puppet`
RPM to the base image::

{% extends parent_template %}
{% set base_centos_binary_packages_append = ['puppet'] %}
{% set nova_scheduler_packages_append = ['openstack-tripleo-common'] %}

.. _Kolla: https://docs.openstack.org/developer/kolla/image-building.html#dockerfile-customisation
.. _Kolla: https://github.com/openstack/kolla
.. _kolla template override mechanism: https://docs.openstack.org/kolla/latest/admin/image-building.html#dockerfile-customisation
.. _tripleo-common: https://github.com/openstack/tripleo-common/blob/master/container-images/tripleo_kolla_template_overrides.j2


Expand Down
22 changes: 1 addition & 21 deletions doc/source/install/containers_deployment/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,10 @@ TripleO consumes these images and takes advantage of the customization
capabilities provided by the `Kolla`_ build tool to install some packages that
are required by other parts of TripleO.

The following template is an example of the template used for building the base
images that are consumed by TripleO. Further customization is required for some
of the services, like mariadb::


{% extends parent_template %}
{% set base_centos_binary_packages_append = ['puppet'] %}
{% set nova_scheduler_packages_append = ['openstack-tripleo-common'] %}


.. note:: `parent_template` is the literal string to include. No need to replace
it.

Use the following command to build an image using kolla-build and the template
above (`template-overrides.j2`)::

$ kolla-build --base centos \
--template-override /usr/share/tripleo-common/container-images/tripleo_kolla_template_overrides.j2 \
--template-override template-overrides.j2

TripleO maintains its complete list of kolla customization in the
`tripleo-common`_ project.

.. _Kolla: https://docs.openstack.org/developer/kolla/image-building.html#dockerfile-customisation
.. _Kolla: https://docs.openstack.org/kolla/latest/admin/image-building.html#dockerfile-customisation
.. _tripleo-common: https://github.com/openstack/tripleo-common/blob/master/container-images/tripleo_kolla_template_overrides.j2


Expand Down

0 comments on commit 9e6170f

Please sign in to comment.