summaryrefslogtreecommitdiff
path: root/docker/base/Dockerfile.j2
AgeCommit message (Collapse)AuthorFilesLines
2020-09-03Fix ironic build issues - LANG relatedMichal Nasiadka1-0/+9
ironic drivers-requirements installation fails with: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 2: ordinal not in range(128) Squashed ,,cherry-pick'' from stable/train - adding LANG block and locale-gen for Ubuntu family in base Dockerfile: https://review.opendev.org/#/c/684808/ https://review.opendev.org/#/c/691835/ https://review.opendev.org/#/c/694099/ Temporarily blocks bifrost building as well - to revert! Change-Id: I79ee884ad35bf5166c9ea303d73416271ff5f637
2020-07-06Drop systemd support from nsswitch.conf on RHEL-based distros8.0.4Michele Baldessari1-1/+2
A bit like we did for I3e0e86026f5a4a78473bed824cd1682d3a020cd5 we should remove the nss-systemd lookup from containers. The reasons for this are as follows: 1) Just like for I3e0e86026f5a4a78473bed824cd1682d3a020cd5 when this nss module is triggered it tries to talk to dbus. It triggers a bunch of selinux denials and it makes little sense to open all containers to talk to dbus. In particular, if a container is run as non-privileged and bind-mounts /run from the host, we will hit selinux denials like the following: type=USER_AVC msg=audit(1592337775.860:74119): pid=1284 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc: denied { send_msg } for msgtype=method_call interface=org.freedesktop.DBus member=Hello dest=org.freedesktop.DBus spid=406228 scontext=system_u:system_r:container_t:s0:c162,c886 tcontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tclass=dbus permissive=0 exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'UID="dbus" AUID="unset" SAUID="dbus" 2) It just makes little sense in a kolla-world to have containers talk to dbus/systemd and it saves us some time when a lookup triggers the systemd module for whatever reason. Especially because the nss-systemd module does a few things which are not useful in a container (ensures that the root and nobody users and groups remain resolvable, SystemD's DynamicUser= feature, provide Lookup API via Varlink) The sed regex gives us the wanted results: $ diff -u /etc/nsswitch.conf.orig /etc/nsswitch.conf --- /etc/nsswitch.conf.orig 2020-06-19 07:18:10.974580755 +0000 +++ /etc/nsswitch.conf 2020-06-19 07:20:12.260230103 +0000 @@ -53,9 +53,9 @@ # group: db files # In order of likelihood of use to accelerate lookup. -passwd: sss files systemd +passwd: sss files shadow: files sss -group: sss files systemd +group: sss files hosts: files dns myhostname services: files sss netgroup: sss Related-Bug: #1883849 Change-Id: I81e5b7abf4571fece13a029e25911e9e4dece673 (cherry picked from commit dc2ddfa9750f94430a5b04b62fc1fa6adcb234f8)
2019-11-05get 'apt_*' options of kolla-build.conf working againMarcin Juszkiewicz1-0/+2
We broke 'apt_sources_list' and 'apt_preferences' options quite a while ago. Turned out that fix is quite simple. This change adds empty sources.list and apt-preferences files which are always added into images. If kolla-build.conf will use any of APT related options then those files will be replaced with provided ones. Change-Id: I7bbdcbd5c60f654a484a872209e0537e3950346c Closes-bug: #1706549 (cherry picked from commit bf20b41e7dea702b693fa98ea27822c8a33a5591)
2019-10-01Fluentd: td-agent repository for DebianViktor Michalek1-0/+1
Change-Id: I0f05183889971dcc014663a849d3fc1d87a19e8e (manual picked from commit 2131ef9875efd67a9dd45dc3329df8de16cacff1)
2019-10-01Add Debian Buster Stein backports APT repositoryViktor Michalek1-1/+2
Change-Id: Ie140cf0d6308a5ee3c09f06ddfcf63be2e1cec64 (manual picked from commit c08a4b5a6352f3d1ebf640687d68d00aabc11ff6)
2019-09-18base: fix OracleLinux buildMarcin Juszkiewicz1-1/+1
Change-Id: I7603ed700abd2d6ce3ac0f301dc433ed1ed11e64 Closes-Bug: #1844484
2019-06-26Move back to CentOS StorageSIG repos for Ceph and GaneshaGiulio Fidente1-9/+4
Recently a new repo was created in CentOS to distribute Ganesha, and the repo made a dependency of the Ceph Nautilus repo package [1] When centos-release-ceph-nautilus 1.2-1 will go out, it should not be necessary to disable the CentOS Ceph repos pulled in by dependency of the RDO repositories, as done in [2] 1. https://github.com/CentOS-Storage-SIG/centos-release-ceph/commit/f1a17c9d145cabfa1dfd3102fe7e2fc584f6a907 2. https://review.opendev.org/#/c/651601/ Change-Id: I6bf0cbfaffc22147c5bec03b5897719de53366ed (cherry picked from commit cf47864ab1e4fa6192ea96727d01b3e935b7a1fc)
2019-06-14Fix issues with Percona in Zuul and clean up a little bitRadosław Piliszek1-6/+1
Percona site has connectivity issues from OVH hosts (of Zuul). This patch makes it so that: - the internal repo is actually used - RPM GPG keys are downloaded from the actually used repo - Ubuntu mimics the RHEL behavior (i.e. the Percona repo is enabled only in the xtrabackup image) extra benefit: no need for APT preferences for Percona repo to spare MariaDB deps Change-Id: Id27831f6b404762f9e44fd6bd1c4702bf06b05f8 Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com> (cherry picked from commit de58339a0e1704ae1ade4e032a73bb4708ecfaf1)
2019-06-06Switch to RDO Stein release on CentOS & OracleMark Goddard1-6/+12
This change switches from the Delorean yum repositories to the RDO Stein release repository. centos-release-openstack-stein pulls in centos-release-ceph-nautilus, which conflicts with upstream ceph packages. Disable the CentOS Ceph repo to work around this. Change-Id: I1df5dd28adc65ff461a893b60c57d7b5da96d653
2019-06-06Ceph: Update to Nautilus on CentOS and OracleLinuxMark Goddard1-4/+5
The CentOS Stein OpenStack distribution depends on the Ceph Nautilus release, while Kolla currently deploys Luminous on CentOS. This change switches CentOS and OracleLinux builds to use Ceph Nautilus. Support for auth UID has been removed in the Nautilus release [1][2], so we have removed the --set-uid argument from calls to ceph-authtool. Also ceph-osd bootstrap mode fails when no mon config is provided, so we added --no-mon-config (mon config is injected later after bootstrap). Due to ceph-nfs build issues (ceph upstream nfs-ganesha rpms relied on older version of userspace-rcu, than CentOS Storage SIG packages) we need to move to ceph upstream rpm repos. [1] https://github.com/ceph/ceph/commit/d6def8ba1126209f8dcb40e296977dc2b09a376e [2] http://docs.ceph.com/docs/master/releases/nautilus/ Co-Authored-By: Michal Nasiadka <michal.nasiadka@nokia.com> Change-Id: I000398f587c5f4d6cc8995e34e162eebc77bc3e3 Implements: blueprint centos-ceph-nautilus (cherry picked from commit e0cae62c4aab001fa7b5cc324f178793f4e88f3c)
2019-05-08Drop systemd support from PAMCédric Jeanneret1-0/+4
The line being removed is the cause of audit.log spam with a SELinux enforcing (and permissive) system. They are due to the fact we're calling "sudo" from within some containers, and PAM wants to connect to the host "dbus" socket (mounted in /run). This action is obviously denied by SELinux. The "-" prefix makes this module optional anyway, but apparently PAM does see it and tries to use it. Dropping this module has no consequences other than preventing log spamming. Change-Id: I3e0e86026f5a4a78473bed824cd1682d3a020cd5 Co-Authored-By: Michele Baldessari <mbaldess@redhat.com> Resolves-Bug: #1819461 (cherry picked from commit c4b62490714ea849cedfe07d4b9a6aebf1f815c0)
2019-04-13Add config option use_dumb_init to add it to container imagesRabi Mishra1-2/+4
Usage of dumb-init can also be disabled from cli with `--nouse-dumb-init` when building images. Also moves ENTRYPOINT outside of dumb_init_installation block. Change-Id: Id32d54fc9913b83cf121ede5a5e265e0772062ae Related-Bug: #1821970 (cherry picked from commit fb4cb9efda5a522ba0d837047385b61275d09150)
2019-04-10Install "procps(-ng)" in the base imageCédric Jeanneret1-0/+3
Providing tools like "ps", "pgrep" and related is interesting since it helps debugging a container in some cases. It is also useful for healthchecks in case we want to fetch running service PID and use it in another command, like "lsof". Change-Id: I91b1c407caa6b03ae522e649592300f9eddfc07e (cherry picked from commit 9616f49964439966ac8689345b52f4cfc0924258)
2019-03-21cleanup in base for yum install entriesJon Schlueter1-10/+4
- 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-21Fixup whitespace issue in chainingJon Schlueter1-2/+2
base_rhel_package_installation block had whitespace isses depending on which branch of the if statement you had. this resulted in a blank line in the continued "\ \n &&" rendered Dockerfile Change-Id: I634f1bc01806e2606d611b3697e84b43278c4a9b
2019-03-21refactor to pull out rpm_security_update macroJon Schlueter1-11/+4
- 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-21Merge "Introduce clean_package_cache"Zuul1-6/+6
2019-03-20install ncurses explicitly for tput for rpm distroJon Schlueter1-0/+2
tput is used in PS1 env, but nothing explicitly makes sure that it is installed. Red Hat's ubi8 base image only contains ncurses-base and ncurses-libs but not ncurses rpm which provides the tput cli Change-Id: I4f6b101195d245e14f6600b1edd9caafd25dcaac
2019-03-17Introduce clean_package_cacheEmilien Macchi1-6/+6
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-15Merge "Move to Debian 'buster'"Zuul1-4/+0
2019-03-15Fix lower-constraints and kolla CI jobsMark Goddard1-3/+2
Multiple fixes to fix multiple problems. 1. Bump setuptools requirement to 21.0.0 The 16.0.0 requirement breaks the lower-constraints job on Ubuntu bionic. We see the following error: AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader' 2. ubuntu-binary horizon image needs to use python3 for django manage.py 3. ubuntu-binary nova-placement-api image needs to use python3 for apache mod wsgi. 4. nova-libvirt needs exact qemu dependencies due to packaging change 5. OracleLinux repos definition was changed in official image. 6. Fetch InfluxDB gpg key for Ubuntu base image from influx server. Change-Id: Ic797d41f53a5f146d112619f1683cbfbf3a85dc2
2019-03-14Move to Debian 'buster'Marcin Juszkiewicz1-4/+0
Buster is at freeze phase so safe to update and use. Will give us Python 3 based OpenStack packages (usually release delayed). Change-Id: I48c2d252a834716f1bcf10b18f2d32fe541e8137
2019-03-12Add distro_package_manager configurationAlex Schultz1-1/+5
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-1/+11
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/+2
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-02-25base: update to dumb-init 1.2.2Marcin Juszkiewicz1-6/+9
This version allows us to use Debian binaries for non-x86 architectures instead of building 'dumb-init'. 'base_compiler_packages' are installed as they will be needed anyway to build other Python packages (no binary wheels for !x86). We also need 'binutils' to be installed for 'ar' command. Change-Id: I53ad946ead4f0b485d8c7e8a91ac2ef5d7735c5a
2019-01-30Fix broken xtrabackup and monasca-grafana imagesMartin André1-0/+6
Percona started signing packages with a new public GPG key, without providing it via HTTPS. Ship the PERCONA-PACKAGING-KEY extracted from the percona-release package. https://jira.percona.com/browse/PT-1685 monasca-grafana broken by 'rake' missing when trying to install the 'fpm' gem. Co-Authored-By: Mark Goddard <mark@stackhpc.com> Change-Id: Ica9867448dc20864f2fd4614a295a23a4a625af4 Closes-Bug: #1813906 Closes-Bug: #1813927
2019-01-23Guard adding contentdir RUN in base templateJon Schlueter1-1/+1
As a follow up to I402cff1ac86a2ba108f2f5378cc98db5f6ecc673 only add the echo command if there is a value in centos_contentdir Change-Id: Ie5144ee3b8bdb2535a32cfb43c43dfc1bb556ac8
2019-01-17Use base_package_typeAlex Schultz1-5/+5
This change updates the docker files to use base_package_type instead of doing specific distro checks for the rhel/deb generic cases. The base_distro is still available and is used when a specific distro needs a customization but if the differences are purely rpm vs deb, then the base_package_type can be used. Change-Id: I8d720bb185df65a0178061ccf20b1ab2265da2c5
2019-01-09Fix grafana repoJeffrey Zhang1-5/+4
Grafana repository is moved from packagecloud to packages.grafana.com[0]. Based on new grafana install guide[1], update the grafana.repo [0] https://grafana.com/blog/2019/01/05/moving-to-packages.grafana.com/ [1] http://docs.grafana.org/installation/rpm/#install-via-yum-repository Closes-Bug: #1810867 Change-Id: Ib065fdc561b72fc013b952b3df41ee83b083194e
2018-12-18Merge "base/debian: add Percona repo key"Zuul1-0/+1
2018-12-05Fix Oraclelinux build, disable collectd in gateEduardo Gonzalez1-4/+14
Oraclelinux repositories has been upgraded and previous file removed, this change update repos to new URLs. Disable collectd in gate as is currently broken and blocks mergingin voting jobs. Change-Id: I402cff1ac86a2ba108f2f5378cc98db5f6ecc673
2018-12-01Merge "base: tell gnupg to not use TTY when we import APT keys"Zuul1-1/+1
2018-11-27Merge "Use dumb-init with --single-child"Zuul1-4/+5
2018-11-21base/debian: add Percona repo keyMarcin Juszkiewicz1-0/+1
Change-Id: I8a70690d081e2ce1284cae60179ce0598a28a393
2018-11-21base: tell gnupg to not use TTY when we import APT keysMarcin Juszkiewicz1-1/+1
Debian builds fail with gnupg error: INFO:kolla.common.utils.base:Executing: /tmp/apt-key-gpghome.utZMwIQ8EO/gpg.1.sh --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 418A7F2FB0E1E6E7EABF6FE8C2E73424D59097AB INFO:kolla.common.utils.base:gpg: cannot open '/dev/tty': No such device or address This change stops GnuPG from using tty. Change-Id: I4a9f2fb2c9fdd21430ce3a9bd02999ae21e1847a
2018-11-20Use dumb-init with --single-childRabi Mishra1-4/+5
We would probably like to forward signals only to the direct child which in turn takes care its children and not to all worker child processes. Change-Id: Id91ebb8b0ecc43946845de386350af0536dd661f Related-Bug: #1799642
2018-11-08base debian/ubuntu: drop not needed APT keysMarcin Juszkiewicz1-8/+1
Ubuntu: we dropped external MySQL repo months ago. Debian: we dropped most of external repos when we moved to 'stretch'. Also replaced Elasticsearch repo key with full id. Change-Id: I679bd814b143d128f334c76d5ec7cc2dbe06543d
2018-11-06Introduce Percona XtraBackup imageNick Jones1-3/+5
blueprint database-backup-recovery Implements an image suitable for taking MariaDB backups via Percona's XtraBackup tool. Install XtraBackup from Percona's repos, ensuring that packages from this source aren't used for any other purpose. Include a script which invokes XtraBackup with the appropriate options for either a full or incremental backup. Change-Id: Ifebe2045e5815c573c0a2ae05951c428c3f06a92
2018-10-28Disable init lastlog and faillog database for created userJeffrey Zhang1-1/+1
These two files are useless in container, and disable them will save about 18MB size for image. More info please check[1]. [1] https://github.com/sagemathinc/cocalc/issues/2287#issue-249824529 Change-Id: I1bba59260043782fd7c9306b194d144d027a29e0
2018-10-11Merge "Add crane docker image"Zuul1-0/+1
2018-09-27grafana: on aarch64 use 5.2.4 version from upstreamMarcin Juszkiewicz1-1/+0
Upstream started building Grafana for arm64 a while ago. So let's use it instead of someone's build. Change-Id: Ia5359cd86022f2475301407d62a5ad4e1b275c13
2018-09-21Add crane docker imageDan Prince1-0/+1
Crane is a lightweight 'pull only' container registry implementation. TripleO is aiming to replace our use of docker-distribution with crane for the Undercloud. Co-Authored-By: Martin André <m.andre@redhat.com> Change-Id: I59d9521f99243401d7703a3dedc26b5baed2d595
2018-09-11Move to the latest rabbitmqPaul Bourke1-3/+6
This allows us to use the new simpler style conf format, as well as drop the dependency on the deprecated clusterer plugin. Depends-On: I921459f3e40b9e0d4af9497384e49aabf0abe79b Change-Id: I75e00312b36e1678b90a42cf58d24652323eff27
2018-08-14Merge "base: do not set $contentdir for CentOS"Zuul1-11/+0
2018-08-10base/centos: stop treating AArch64 in special wayMarcin Juszkiewicz1-18/+5
All repositories we depend on got synced to mirrors. So we no longer need to fetch ceph-luminous or opstools from buildlogs.centos.org server. Change-Id: Ie7b54d20f98d26d3e086bbbfcda289c2677a008a
2018-08-10base: do not set $contentdir for CentOSMarcin Juszkiewicz1-11/+0
We no longer have to set $contentdir for CentOS as it is set in centos:7 images now. This code was required when Docker hub had 7.4 images while 7.5 packages were already in repositories. Change-Id: I69d1b87ffb3af1dea2f8cf93a2264df93356e9ed
2018-08-07Merge "centos: clean altarch repositories situation a bit"Zuul1-4/+4
2018-07-26add additional Remove yum cacheJon Schlueter1-3/+6
as a followup to https://review.openstack.org/#/c/505143/ "Remove yum cache" Change-Id: Ifaaead6f6efe35808ebf79ea0d4474fbb60c8994
2018-07-10centos: clean altarch repositories situation a bitMarcin Juszkiewicz1-4/+4
CentOS team synced virt/kvm-common repository for alternate archs. We can just install 'centos-release-qemu-ev' package like it is done on x86-64. Change-Id: Ie45a0b83fc4460d5dfce82efca061272db974ead