summaryrefslogtreecommitdiff
path: root/docker/macros.j2
AgeCommit message (Collapse)AuthorFilesLines
2021-03-19Fix url for get_pip macrostein-eolDincer Celik1-1/+1
Stein only. Change-Id: I1d175b603bbc3adbd371a2d66401ed380378ea9e
2021-01-27CI: Use Docker proxy for pulls + Ruby fixes + get_pipMark Goddard1-1/+1
For Stein (due to CentOS 7) includes as well: - get_pip macro: fix for Python 2.7 - sensu-client: Pin simpleidn Ruby gem simpleidn Ruby gem started requiring Ruby 2.2. - monasca-grafana: Pin git Ruby gem fpm Ruby gem started requiring git Ruby gem git Ruby gem started requiring Ruby 2.3 - mark helm-repository as unbuildable It no longer builds, it's not used, it's been removed... Change-Id: I0c4d5e1ea16c6677813a334b38b3a22ad811531d Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com> Depends-On: https://review.opendev.org/772501 (cherry picked from commit a8c12def858b57349207cab5fa8dabb3c23bdfa0)
2019-06-18Use td-agent-gem to install fluentd monasca plugin on ubuntuMark Goddard1-4/+5
If monasca is enabled on ubuntu, we see the following error in fluentd: [error]: config error file="/etc/td-agent/td-agent.conf" error_class=Fluent::ConfigError error="Unknown output plugin 'monasca'. Run 'gem search -rd fluent-plugin' to find plugins" This is because we use 'fluent-gem install' to install the gem, which works on CentOS but on Ubuntu it is necessary to use 'td-agent-gem install'. Change-Id: I515f9764ca93a41a871e520696193a9298856d08 Closes-Bug: #1830147 (cherry picked from commit c585ca5055c7a92fdbe5826030d3529e5c397540)
2019-03-21cleanup in base for yum install entriesJon Schlueter1-6/+7
- introduce install_packages(..., chain=True) to allow chaining on onto existing RUN commands - introduce install_packages(..., clean) which defaults correctly but allows you to override if you want to avoid doing extra package manager cleanup - refactored several calls in base to make use of these new features In general this allows for macros.install_packages to be chained after other calls for example RUN foo && {{ macros.install_packages(..., chain=True) }} Change-Id: I4b2fe8e13ee3c0fffe77a1179a7af5b534496996
2019-03-21refactor to pull out rpm_security_update macroJon Schlueter1-0/+8
- pulled out the repeated code from 3 paths in base and moved it into docker/macros - created macros.rpm_security_update - made sure the new macro could be customized for cleanup caches - update macro to use distro_package_manager Change-Id: Ic79ff42d913e1cbb68be66743e4f79f0bcff47f5
2019-03-17Introduce clean_package_cacheEmilien Macchi1-2/+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
2019-03-12Add distro_package_manager configurationAlex Schultz1-1/+1
Add configuration to allow the switch between dnf/yum or provide an alternative package manager. Change-Id: I913769fcf5875a12b4561958cf7c90b74cd116ea
2019-03-12Add python3 packages for RHEL systemsAlex Schultz1-2/+2
RDO is currently working on python3 support for the next version of CentOS/RHEL based systems. This package uses the distro_python3 flag that was added as part of I4028991bad92c0e8e21066cc4173c06ce5eba393 to use the python3 specific package names. This change only adds python3 package names for RHEL systems. Conflicts-With: https://review.openstack.org/#/c/636457/ Change-Id: Iad6b70b433a0dd1b0f8ae6790fd280594517661a Related-Blueprint: python3-support
2019-03-12replace 'distro_python3' variable with 'distro_python_version'Marcin Juszkiewicz1-1/+6
RHEL7 derived distros use Python 2.7 RHEL8 uses Python 3.6 Ubuntu 18.04 uses Python 3.6, but we haven't enabled it yet. Debian:buster uses Python 3.7, but we haven't enabled it yet. We have several places in code where "/lib/pythonX.Y/site-packages" is used so we need to know value of X.Y rather than py2/py3 switch. How to check for Python 2: {% if distro_python_version == '2.7' %} Breaks: Iad6b70b433a0dd1b0f8ae6790fd280594517661a Change-Id: Ie24f109af19ae0438c21e0d43cb3cc947812b4ce
2019-03-11Introduce 'get_pip' macroMarcin Juszkiewicz1-0/+6
We have code for it in four places so it is a good candidate for macro. Change-Id: Icadcbbe5b386bdf688fd67e8160b40974f047377
2019-02-28debian/ubuntu: make use of Python3 based packagesMarcin Juszkiewicz1-2/+5
Both Ubuntu Stein UCA and Debian 'buster' migrated their OpenStack packages to Python 3. Note that Debian 'buster' is not released yet and contains Rocky packages. Stein ones will be available later. Co-Authored-By: Lee Yarwood <lyarwood@redhat.com> Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com> Change-Id: I160f79cc57f54ec3eac857c5babd1a6e2656d228
2019-02-19debian/ubuntu: introduce 'debian_arch' variableMarcin Juszkiewicz1-11/+1
Many images have 'if x86_64 then amd64 elif aarch64 then arm64' check to comply with Debian like architecture names in several projects. This patch creates 'debian_arch' variable which can be used in all Docker files (similar to 'base_arch' one). All required images got converted to use it. Change-Id: I9c5e6f13d6c9b24fe323408512bd5aef290111ad
2019-01-04Add support rabbitmq promethues pluginzhubingbing1-0/+9
Change-Id: I1b2b3d6708bfcd58864e26e6c1fc618fb421e9a2
2018-09-10Download binaries more securelyMartin André1-1/+2
Obtain binaries from encrypted source when we're unable to check for their signatures. This should provide better security than downloading the files over HTTP but does not replace signature verification or file integrity check. Related-Bug: #1791674 Change-Id: I7d6eed9ab14ceb130ea4f5f03d893ddaaa0a7acd
2018-02-01Use absolute path in install_pip macroMartin André1-1/+1
This lets us use the macro in the case there was a WORKDIR instruction that changed the working directory from / earlier in the dockerfile. Change-Id: I2369c9997ef189e7084fac7b5ace014f6f76d698 Closes-Bug: #1746682
2017-12-14mongodb: handle "user already exists" error on DebianMarcin Juszkiewicz1-11/+18
When we install 'mongodb-server' package in Debian/stable it errors out because 'mongodb' user already exists. It was reported [1] and got resolved in Debian/testing. 1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858903 Change-Id: Iabfcbf68a3aea9d7b09b72eb3e8325f09c2f9d31
2017-11-24Clean fluentd_plugins_install blockMartin Mágr1-0/+11
fluentd_plugins_install should contain only plugin installation operations, so that the override does not have to handle irrelevant operations Change-Id: I8f810d194a1e638683df1f445c187b8d98629730
2017-11-02Cleanup APT lists after installing packagesChristian Berendt1-3/+6
/var/lib/apt/lists/ can take several MBs so get rid of them after packages are installed. Change-Id: Icfff55d92fa5c865f09db5112da28bf452a5a221
2017-09-19Remove yum cacheEduardo Gonzalez1-1/+1
Change-Id: I92c8626b8ee4d5d3dd102a9fe378c4f41a7f2154
2017-07-05introduces support for the OVS DPDK dataplaneSean Mooney1-1/+7
- DPDK is a userspace library for high-performance networking. - This change enable support of Open vSwitch with the DPDK accelerated netdev datapath. - This change provided binary and source support via a template-override. - This change provides an example template override file and corresponding documentation. Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com> Partial-Implements: blueprint ovs-dpdk Change-Id: I7c3a5dddeca1886fe1c7681ce8d5bebde08f3102
2017-06-27Add opendaylight install fixEduardo Gonzalez1-0/+9
Opendaylight package fails to install with existing odl user. This change adds a macro to fix the package install. Similar to haproxy install fix. Change-Id: Ie646769fe12b8f3f4c758b678b23c2d98c2e8027 Closes-Bug: #1700502
2017-06-15Permit changing yum configuration in the base imageMartin André1-1/+1
This commit allows to configure yum settings via a yum.conf file that is shipped in the base image and make it overridable with the base_yum_conf jinja2 block. Change-Id: I76a84ec008fec5696cadefdbdeb4204a32421c4b Closes-Bug: #1698134
2017-05-29Remove all Heka related remaining stuffBertrand Lallau1-1/+1
Heka has been removed and replaced by fluentd. Refer to https://review.openstack.org/#/c/437874/ Change-Id: I989e5d71b5ba4d036dd45c02b3923c5bf27a04ed
2017-05-12introduce 'install_kubectl' macroMarcin Juszkiewicz1-0/+14
Both kubetoolbox and magnum-conductor install 'kubectl'. In different versions. And only for x86-64. New macro knows how to handle other architectures. AArch64 binary is fetched properly, other architectures (ppc64le for now) gets info that there is no binary upstream. Also updated to v1.5.4 as this one is used by kube/* images. Change-Id: Ia491d6ec7156201742f28b5d1018f2794529b5b4 Partially-Implements: blueprint multiarch-and-arm64-containers
2017-04-06Remove Ubuntu Trove postinst script hackBertrand Lallau1-11/+0
trove-common version 1:7.0.0-0ubuntu1~cloud0 coming from the following repo https://github.com/openstack/kolla/blob/master/docker/base/sources.list.ubuntu#L11 has been fixed. Temporary hack must be removed. Change-Id: I19ce6f0a5d5f0fe0d390fcb05f775f860abd146c
2017-04-04debian: enable all images enabled for UbuntuMarcin Juszkiewicz1-1/+1
Debian support is not maintained in Kolla so it got a bit behind Ubuntu one. This changeset enables Debian for all images. Jessie (even with backports) may be too old for some images though. Also unify distro check to ['debian', 'ubuntu'] to keep alphabetical order like it is done for RPM distributions. Partially-Implements: blueprint multiarch-and-arm64-containers Change-Id: I056233fbfa277e0e2360c07c3f80d9558c554357
2017-03-29make yum fail on missing packagesMarcin Juszkiewicz1-1/+1
By default yum skips missing packages. As a result built images may not contain what we expect them to have (often found on non-x86 architectures). There is an option to make it fail in same way as APT does in Debian world. And this patch makes use of it so broken images just fail: INFO:kolla.image.build.openstack-base:No package Percona-Server-shared-56 available. INFO:kolla.image.build.openstack-base:Error: Not tolerating missing names on install, stopping. INFO:kolla.image.build.openstack-base: INFO:kolla.image.build.openstack-base:Removing intermediate container d5e506330b08 ERROR:kolla.image.build.openstack-base:Error'd with the following message Closes-Bug: #1675401 Change-Id: Ib6b9e6b8cc216ce283cd043fa3600db7c0cc2a98
2017-02-17Use install-pip macro in most source imagesChao Guo1-2/+8
1. Enable customization of pip packages in source branch of most images 2. All pip packages install uniformly through install-pip macro, user can easily customize his own pip command (For example using a mirror) Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com> Change-Id: If09582039f690fa4136e8f33200d5da15e092da7
2017-01-17use static uid/gid in imagesSam Yaple1-0/+36
This centralizes all user and group creation into a single source. This will fix any current and furture uid/gid mismatches (such as with nova-libvirt). In the process, we also unify users between the distros in a standard way. The users in the following containers change from thier defaults: Ubuntu: _chrony user is now chrony Ubuntu: memcache user is now memcached All: qemu user is used for ownership and socket permissions All uid and gid numbers are customizable via kolla-build.conf Co-Authored-By: Kris Lindgren <klindgren@godaddy.com> Change-Id: I120f26ab0683dc87d69727c3df8d4707e52a4543 Partially-Implements: blueprint static-uid-gid
2016-11-03Remove Fedora supportChristian Berendt1-1/+1
Closes-bug: #1616387 Change-Id: Id97f88b9baa3d48d33ce120962450a374282d044
2016-10-04Revert "Fix pycparser wheel package issue"Jeffrey Zhang1-5/+1
the bad pycparser wheel package has beed removed. This reverts commit 195bcd0f4323462b77d025936b898c85ddd8fdb3. Change-Id: I4669a627b68c4bd7534288c4a594a49226db3832
2016-10-03Fix pycparser wheel package issueJeffrey Zhang1-1/+5
pycparser-2.14-py2.py3-none-any.whl is broken or something misconfigured, while pycparser-2.14.tar.gz is ok. Revert this PS when the bug is fixed[0] [0] https://github.com/eliben/pycparser/issues/147 TrivialFix Change-Id: If719a5fdfbcedfe4770354b18dc47cc94e90dc3d
2016-09-13Allow customizations of pip packagesMichal (inc0) Jastrzebski1-0/+5
Customizations of packages for source builds Closes-Bug: #1623083 Change-Id: I99263af53c8f9830bcf0c6fec78194c8f7cd88c5
2016-08-19Handle empty package list for install_packagesShaun Smekel1-9/+11
Currently if the install_packages macro is run with an empty package list, it will add a yum or apt-get command with no packages listed. This bug fix aims to omit this line when no packages have been given, or, the operator wants to use the "_override" / "_remove" functionality to disable all packages being installed in a Dockerfile. Co-Authored-By: Paul Bourke <paul.bourke@oracle.com> Change-Id: Ifaaaebfccc3adb0f2f68a35ac08e59378bc87fdb Closes-bug: 1612446
2016-08-15enhancements to install_packages macroAbe Music1-2/+7
- 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
2016-08-10Revert "Remove files from /var/lib/apt/lists when cleaning up on Ubuntu/Debian"Paul Bourke1-1/+1
This reverts commit 4e8bf3f90da2b1b36575528a30926a575bfc4095. It seems removing /var/lib/apt/lists is having some unintended side effects causing apt to not find packages [0] [0] http://logs.openstack.org/87/350587/10/check/gate-kolla-dsvm-build-ubuntu-source/c0a22a3/console.html#_2016-08-09_13_41_14_477480 Change-Id: I89042e5883f19fddbae11d75b788f87ad5d871a1
2016-08-07Remove files from /var/lib/apt/lists when cleaning up on Ubuntu/DebianChristian Berendt1-1/+1
The files inside /var/lib/apt/lists are not needed and should be removed when cleaning up after a package installation. TrivialFix Change-Id: I80e2a11e05739f3dd5bcc3bb8564d8a73ec1ab17
2016-06-15Macro install packagesMichal (inc0) Jastrzebski1-0/+7
Simplification of package installations Change-Id: I78c0a84c55e891dec7c9bd21bc61700dba244526 Partially-implements: blueprint third-party-plugin-support