Two things broke in the related patches. This patch aims to fix that.
1) tools/build.py was no longer usable as it imported kolla from the
global pip install source. If that didnt exist (because kolla wasn't
installed with pip) then it breaks on import.
2) When kolla was installed globally it looked up the path that
matched the installation of docker-py instead of looking up a path
that had the stuff we wanted (kolla images directory)
Change-Id: I94f1856547ce54d506de72926b08c966a36ac608
Related-Id: I05f10d13e7ba1e2b985c2944aec71ce55630442b
Related-Bug: #1530256
Closes-Bug: #1531569
The try-except-finally block in push thread was catching only
ConnectionError and logging information about successful push
even if some other error occured during push.
TrivialFix
Change-Id: I94f5ed67237d291701469a65f76146881cd67a35
By using
./tools/build.py --save-dependency a.dot
to gen the Graphviz dot dependency file. Later, you can use the `dot`
to draw the picture.
dot -Tjpg -o a.jpg a.dot
Implements: blueprint images-dependency-tree
Depends-On: I8e07a1b69fab5f1c587470bfd2104aaba93f0050
Change-Id: If00f4f3fb9d0b10a07ab2abb7ffb1cd9d64902f2
* Use oslo.config library
* kolla-build section is deprecated in favor of DEFAULT section
* Remove the deprecated `--template` option
* `--no-cache` is deprecated in favor of `--cache` and `--nocache`
options, which are using oslo BoolOpt inverse feature[0]
[0] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L1074
Closes-Bug: #1528542
Change-Id: I62c5ca3c8e057917d2798256e9d9efc8f6578f60
- Removed hardcoded yum repository configuration in favor of
commands dynamically generated based on repo-url and repo-file
arguments. We maintain a sane default set of repositories.
- Added generic rpm_setup_config parameter to add support for
installing .rpm or .repo files before building containers.
Co-Authored-By: Ryan Hallisey <rhallise@redhat.com>
Implements: blueprint custom-repos
Change-Id: I1b3a7647a9e7239de3cd162cb6f464f05632bde1
We want to record kolla version of running containers to be able to
detect whether or not we need to perform certain downtime-causing
actions during upgrade.
Change-Id: Ie113029da98303e6809d56edbf6d8de37be128d7
Implements: blueprint record-version
This changes default behaviour of build.py to instad of putting latest
tag on it, it puts current kolla version as found in setup.cfg
Change-Id: I4d6e9a0159c6a5598abd58072594df4204427308
Partially-Implements: blueprint upgrade-nova
Partially-Implements: blueprint record-version
The build script now creates now creates a plugins directory for source
builds to store plugins required for the container, and creates a tar
of all plugins that is extracted at runtime.
However, the creation of the 'plugins' directory is not handled
correctly and generate an exception in the running thread if the
directory exists. This is the case for example if the build script
retries a failing image.
This commit fixes the timeout issues we've experienced with the gate.
Change-Id: Ic5d4fd1ddf71f01c547130518e311fded911c445
Closes-Bug: 1524897
This change allows additional archives to be fetched as part of the
build and added to images.
An example use case is the installation of plugins for neutron. For
example, to add the networking-arista plugin to neutron-server, one
would do the following in kolla-build.conf:
[neutron-server-plugin-networking-arista]
type = url
location = http://tarballs.openstack.org/networking-arista/networking-arista-master.tar.gz
The format for plugin sections is <image-name>-plugin-<plugin-name>
The required Dockerfile additions will be added in the next patchset.
Background to this change:
https://review.openstack.org/#/c/207545/3/docker_templates/neutron/neutron-server/Dockerfile.j2
Related: blueprint neutron-third-party-plugins
DocImpact
Change-Id: Idec2ca9fd06163c7d820e8c4bc9ebca8d9673856
Off by one error made the --retries option control the number of tries
rather than the number of retries.
Closes-Bug: #1514730
backport: Liberty
Change-Id: I976a8bb9e489d226f44926a6562d4d2af5de099c
pip install default prefix in Ubuntu is /usr/local, and Kolla tools scripts
didnt respect that. So I added few OS checks in this scripts.
I improve config path check in build.py. Added more verbose error if we can't
find config directory.
Change-Id: Ide521ed205b0dc1fc27e237a9a8f4da0168e664f
Closes-Bug: #1512302
build.py -b rhel -t [rdo|rhos|source|binary]
The last patch for this didn't quite fix the problem properly as
it only permitted RHOS builds.
backport: liberty
Change-Id: I27eed202560adce450c07d043cc224e7a6c6bbf6
Closes-Bug: #1513088
Use the absoluate path rather than that with `..`. This will be
helpfull for end-user to see where is the folder/file.
Closes-Bug: #1513726
Change-Id: I7169952d874ddf14469605444044de0163b033d3
Register with RHEL on the host machine and use yum to setup
the repos in the container.
Change-Id: I38aaf43fffaf7a235e69b330d5d9f0f1be31fe83
Backport: Liberty
Closes-Bug: #1513088
Add ability to define "profiles" in kolla-build.conf, which are
predefined sets of images to build at once.
The supplied profiles match what Steven defined in the
restructure-template bp, though others can easily be added by the user.
Multiple profiles can be supplied at once, as well as supplemented by
the existing regex mechanism, e.g. to build profiles infra, main, and
also ironic, one can use:
tools/build.py --profile infra --profile main ironic
Change-Id: I0c6f450152cb23dcfc58e0969669fcedf03fab01
Implements: bp restructure-template
Doc-Impact
With registry flag,
build image using `tools/build.py --registry 172.22.2.81:4000`
the image name looks like `172.22.2.81:4000/kollaglue/data`
When user use kolla-ansible,
user set `docker_registry` to `172.22.2.81:4000` in `/etc/kolla/globals.yml`.
Build image using `tools/build.py -n abcd`
the image name looks like `abcd/data`
When user use kolla-ansible,
user set `docker_namespace:` to `abcd` in `/etc/kolla/globals.yml`.
build image using `tools/build.py -n abcd --registry 172.22.2.81:4000`
the image name looks like `abcd/data`
When user use kolla-ansible,
user set `docker_namespace:` to `abcd` in `/etc/kolla/globals.yml`.
user set `docker_registry` to `172.22.2.81:4000` in `/etc/kolla/globals.yml`.
With the feature, it will reduce user confusing and mistaking.
Change-Id: I18ac7a3ccec032888e35f5e9a79fc190760cc8a0
Closes-Bug: #1505056
Add "--template-only" flag for tools/build.py
to generate dockerfile for read easily.
Change-Id: Ic4cf43d925b5f2d3dae809c11f3f95c51b4bbce2
Closes-Bug: #1501671
This prepares for the RHEL OSP implementation by making the build
tool convert all binary-* into an install_type of binary and * into
an install_metatype variable substitution inside the Dockerfiles.
Further binary-* is substituted as install_name to enable proper
building only.
Change-Id: Ib681b29176eb79a3cab12ec824313fdecb6e7a5f
Partially-Implements: blueprint rhel-based-image-support
The source location definition previously in build.ini was merged in
etc/kolla/kolla-build.conf since it is really configuration for the
kolla-build tool.
Change-Id: I7531af0029bdfeabbaefb8a6aa97b70bb12c021a
Closes-Bug: #1496702
Kolla build script configuration now lives in
/etc/kolla/kolla-build.conf.
This allows overriding configuration options without the need to pass
arguments on the command line.
Command line arguments still get precedence.
Closes-Bug: #1496185
Change-Id: I69482a11437087f19d7f76b379dca85b1f622268
If we have reference like stable/kilo name of source archive
will contain only last part of reference. We should replace '/'
with '-' to have full name. This is useful for correct
identification of source code afterwards.
Change-Id: I1ff1015e3f7926110d0fcb59504e58a5e80a75f9
Closes-Bug: #1492279
Currently we cannot import source archives with names different
than expected by hardcoded line in Dockerfiles. This worked well
for Openstack services' tarballs where we expected SERVICE-* root
folder after extraction or kanaka-noVNC for nova-novncproxy docker.
The latter fails if one tries to clone or get tarball under other
names. This fix allows any archive (tar,tgz,zip) or repo name to be
imported into dockerfile.
Change-Id: I869a6a19afaf0e93925572746c22b7589b6600c9
Closes-Bug: #1491415
We can, and should, figure out the filename dynamically rather than
hardcode that value in build.ini since it is not actually a
configurable paramater.
Change-Id: I496d6555e9fa356ab09e62063fd707f43ed08121
Closes-Bug: #1490386
Updated build.py to reflect this change.
Deprecate --template option and make it a noop.
Change-Id: I7cd98d1ee684a4c64984a49597159868152683b2
Partially-Implements: blueprint remove-docker-dir