summaryrefslogtreecommitdiff
path: root/kolla/template/methods.py
AgeCommit message (Collapse)AuthorFilesLines
2023-09-29rabbitmq: Use novemberain repos for Debian/UbuntuMichal Nasiadka1-0/+4
CloudSmith is over budget, see [1]. As mentionedin in [2] - we're using amd64 packages on aarch64, since the community mirror does not mirror aarch64 - and the packages should be really marked as noarch. [3] has also been incorporated in this backport [1]: https://github.com/rabbitmq/rabbitmq-server/discussions/9526 [2]: https://github.com/rabbitmq/rabbitmq-server/discussions/9553 [3]: https://review.opendev.org/c/openstack/kolla/+/896927 Closes-Bug: #2037469 Change-Id: I83179ce5d53fed6cfe7f5fcbf6fdecd7199baa36 (cherry picked from commit 47b593d1e5531c693dde3e111ed3be91c60c41be)
2022-10-06drop shebang from Python filesMarcin Juszkiewicz1-2/+0
Only kolla/cmd/build.py is an executable script used by user (either as 'kolla-build' or 'tools/build.py' or directly). Change-Id: Ia1ba2699f425749f9d4f2cdba27caeb97bc3d668
2022-06-08Don't ignore errors of 'apt-get update' commandMaksim Malchuk1-1/+1
This change fixes an issue with 'apt-get update' command and stop container building with erroneous source repositories. Change-Id: I5ce2eb66a647e1805f086aa37942bf5d13eb4106 Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2022-06-02Allow to provide own repos.yaml fileMarcin Juszkiewicz1-1/+5
Several people use Kolla behind firewall/proxy. Internal mirrors are often in use then. We do not provide a way to replace repos.yaml file in an easy way which may lead to complicated solutions or template overrides. This patch adds a way to provide own copy of repos.yaml file. Change-Id: I0b07da22fea27e0ff4e90aaad19e50d84ff9a121
2022-03-28Merge "Revert "Revert "Update code to Jinja 3.0 style"""Zuul1-2/+2
2022-03-28Revert "Revert "Update code to Jinja 3.0 style""Marcin Juszkiewicz1-2/+2
This reverts commit 25e9602845fca7ca5b7a5c55fe5b71be0b137f04. Reason for revert: we updated to newer Jinja. Change-Id: If666bb4aedd7bb4e3041f0672c3b70e1bb5d36b6
2021-09-03ceph: Update CentOS packages to PacificMark Goddard1-1/+1
Updates the CentOS images to use centos-release-ceph-pacific. This is in line with Ubuntu which gets Pacific from UCA. Debian remains on Nautilus. Change-Id: Ie1e77f9c7d83538c051362a8972745f184c72019
2021-08-25Merge "Debian/Ubuntu: handle APT keys in proper way"Zuul1-2/+10
2021-08-25Revert "Update code to Jinja 3.0 style"Alfredo Moralejo1-2/+2
This reverts commit 383364e671fb82e3c0ddca37a4690a1a33be3b54. Reason for revert: Xena stay in jinja 3.0.1 which still provides contextfilter. In RDO, jinja is consumed from CentOS repo which still provides version 2.11, so this change is causing problems. I'm proposing to revert this change and retake it Y release when jinja is updated to 3.1 which will not provide contextfilter. Change-Id: I19c2a15fb0917d2a81daf706a4e02fd377e53b3d
2021-08-24Debian/Ubuntu: handle APT keys in proper wayMarcin Juszkiewicz1-2/+10
apt-key is deprecated and in Debian 'bullseye' it complain when we use it the way we did. The right way is to store key files in separate directory and then, for each repo source file, point to proper key. And this is what this patch does. Both distros use the same keys now. More info: https://michael-prokop.at/blog/2021/02/16/how-to-properly-use-3rd-party-debian-repository-signing-keys-with-apt/ Change-Id: Ie19bf46236907d79cb42a5e94cd1067e952b8cbb
2021-07-29Update code to Jinja 3.0 styleMarcin Juszkiewicz1-2/+2
Xena cycle uses Jinja 3.0 so let update Kolla's code for it. From Jinja2 documentation: jinja2.contextfunction(f: F) → F Pass the context as the first argument to the decorated function. Deprecated since version 3.0: Will be removed in Jinja 3.1. Use pass_context() instead. jinja2.contextfilter(f) Pass the context as the first argument to the decorated function. Deprecated since version 3.0: Will be removed in Jinja 3.1. Use pass_context() instead. Also bumped version in requirements.txt to same as in openstack/requirements Change-Id: I51fbb7b9ff7c29cb355437efa4576be9bc035699
2020-04-15Remove support for CentOS 7Marcin Juszkiewicz1-10/+2
With the move to RHEL/CentOS 8 we no longer have Python 2 in our images so there is no need for checking which Python version (2.x or 3.x) is used inside of containers. We also no longer have to support yum as a value for distro_package_manager. Partially-Implements: blueprint centos-rhel-8 Change-Id: Ie45cf3465fedddbde7856961527421883ba3d5c9
2020-02-26Throw TypeError in repository enable/disable macrosMark Goddard1-0/+3
Currently we do not validate the type of the reponames argument to the enable_extra_repos and disable_extra_repos macros. It should be a list, but we merged a call where the argument was a string, which interpreted as a list of single characters ('e', 'p', 'e', 'l'), and silently ignored. This change validates that the reponames argument is a list to avoid this issue. Change-Id: I497c8b2c1dc548e678698474d3604664cf8eeb07
2020-01-30Merge "CentOS 8: Update packages in images"Zuul1-0/+4
2020-01-29CentOS 8: Update packages in imagesMark Goddard1-0/+4
* Some further changes for python2 vs python3 packages * Allow rabbitmq 3.7.*, since a newer erlang is available * Switch from qemu-img-ev to qemu-img on CentOS 8 * bridge-utils no longer available on CentOS 8 * libvirt-daemon-driver-lxc no longer available on CentOS 8 * Mark some more images buildable for CentOS 8 Change-Id: Iaf5b68ff6d944ae730ca0b1d5832172c106a6c08 Partially-Implements: blueprint centos-rhel-8 Partially-Implements: blueprint centos-rhel-python-3
2020-01-02centos: disable EPEL by defaultMarcin Juszkiewicz1-4/+13
Our images use 'scsi-target-utils' from EPEL and then can be built without it. So let's disable this repository right after installing package from it. Images can enable EPEL with 'enable_extra_repos' macro. Also added 'disable_extra_repos' macro as we have some images in a need. Change-Id: Id70474e7602b531b63fdc11ae690fd9ed33def74
2019-12-17add more tests for enable_repos template methodMarcin Juszkiewicz1-16/+16
- CentOS single, multiple and one with missing repo - Debian single, multiple and one with missing repo - TripleO Change-Id: Ide4868d031bd84b1a6935aada7d0e7627f11bf37
2019-11-29Enable repos only when neededMarcin Juszkiewicz1-0/+63
Disable external repositories by default and enable only when needed. Depends-on: https://review.opendev.org/696480 Implements: blueprint repos-off-by-default Change-Id: Icf2a8397a8349e0fe849d88d160409fd234480a9
2019-03-17Introduce clean_package_cacheEmilien Macchi1-3/+4
Default to true (to maintain backward compatibility), this parameter will allow to disable the Package cache cleaning when building the Kolla images. In TripleO, we are investigating how we can accelerate the builds by not cleaning the Yum cache and this patch will help us to do so. Also included same for deb package_install method. Co-Authored-By: Jon Schlueter <jschluet@redhat.com> Change-Id: I0adc85302dfe0411d362c899f3e0d6a0019680d4
2017-11-02Cleanup APT lists after installing packagesChristian Berendt1-0/+1
/var/lib/apt/lists/ can take several MBs so get rid of them after packages are installed. Change-Id: Icfff55d92fa5c865f09db5112da28bf452a5a221
2017-06-04Merge "Add dots at first line in docstring"Jenkins1-1/+1
2017-05-08always update APT lists when install packagesMarcin Juszkiewicz1-0/+1
Normally we update APT lists when 'base' image is built. But when some time pass those lists get out-of-date and images can not be built. CentOS based images handle that without issues because YUM updates repository data whenever they are out-of-date. Change-Id: I5ba5b2067566639b399329b878027d4513567f71
2017-05-04Add dots at first line in docstringEduardo Gonzalez1-1/+1
Running flake tests raises warning for: "First line should end with a period" Change-Id: I9714b350900500c997ef0e54e9830e232fcd6ce7
2017-02-15Fix some typosyuhui_inspur1-2/+2
Fix the word 'contruct' -> 'construct'. Change-Id: Ib5da7897a423eb225fb67d0e0d1e31b20e6961e2
2016-08-15enhancements to install_packages macroAbe Music1-0/+63
- Adds debian_package_install method to the jinja environment that will return the necessary set of commands needed to install packages via apt-get and/or URLs to .deb packages - Updates install_packages macro to make use of the method above Change-Id: Ie9318a7def54b5034ba91375fd8fd3b589d18349 Partially-implements: blueprint third-party-plugin-support