Commit Graph

186 Commits

Author SHA1 Message Date
Pierre Riteau fa3e5f444a Stop removing missing /run/nologin in RPM images
This code was valid for centos:8 and centos:stream8, but is not required
for centos:stream9 or rockylinux:9 which do not include this file.

Change-Id: I50f78d73afe0944dd91998ab9799fa2f36cc46a3
2024-01-08 22:39:33 +01:00
Rafal Lewandowski 2050aa35db keystone: Fix for missing libldap-common package for debian
Closes-Bug: #2009484
Change-Id: I01578289e65010748bfaf6d6b81861764aa62368
2023-03-29 11:44:58 +02:00
Radosław Piliszek 2daf4331a6 Fix writable rootwrap/privsep config
Fixes a hypothetical security issue related to privilege escalation via
rootwrap/privsep. A potential vulnerable service could previously allow
writes to its rootwrap/privsep config and thus allow for more commands
to be run with root privileges via rootwrap/privsep. For a succesful
attack, this would also require the service to allow to run arbitrary
commands via rootwrap/privsep. Thus far, no such vulnerabilities have
been reported and thus this fix is simply strengthening the container
images against such an issue in the future.

Change-Id: I92c81c77e6a16570a108cde8031f7977930fb02a
Closes-Bug: #1874298
2022-10-10 15:06:05 +00:00
Marcin Juszkiewicz 878b00013b Move to CentOS Stream 9
OpenStack 'zed' requires Python 3.8+ so RHEL 8 family has to go.

This changeset moves to CentOS Stream 9 while move to RockyLinux 9 is
planned as final solution.

CI moved to CentOS Stream 9 nodes.

Depends-on: https://review.opendev.org/c/openstack/kolla-ansible/+/839715

Change-Id: I113b9984294cf8663d3fc0c8840320e1d40ea731
2022-09-27 07:40:06 +00:00
Radosław Piliszek e5748194b2 Make keystone_bootstrap accept no ADMIN_URL too
To be able to drop the dummy arg.

Change-Id: Ibcc3e6b4e6015604c218e384d87de7b9e9aed4c8
2022-08-26 21:31:29 +02:00
Radosław Piliszek 8a84479778 Remove Keystone admin endpoint
It can still be optionally enabled in Kolla Ansible.

Change-Id: I34ec4a2e9505e9b4c1b8306b87fcd7242a0da227
2022-08-09 14:51:13 +02:00
Marcin Juszkiewicz e21aeb5ae9 flatten images a bit
As we have one type of images now some RUN calls could be merged so we
will have less layers in resulting images.

Change-Id: I5178c58fbd8c65efe825dc249c0f1368ef0fe8e0
2022-04-21 18:53:14 +00:00
Tim Shearer 1d96a2bbe1 Adjust permissions on _extend_start files.
Explicitly set the permissions on the kolla-toolbox kolla_extend_start
file. Also, since all extend_start files are sourced rather than
executed, the executable bits are now cleared throughout the project.

Change-Id: I5c2deb4a2e33575d57c852089f856a9acc6818d0
2022-04-11 17:22:24 +02:00
Marcin Juszkiewicz 1749da2fbf docker: drop binary parts
Big patch drops all mentions of binary images support. Suggestions are
welcome how to split it into parts or handle better.

Change-Id: I5d5a46c6ce7734ceb8b844e17b43e359d7cac6e3
2022-04-09 17:44:26 +02:00
Radosław Piliszek 6319bc6f55 Remove weird deps
This is a follow-up on "Refactor httpd install to base image"
[1].

It seems a copy-paste algorithm was used to craft Dockerfiles
for some httpd-enabled services which resulted in an abundance of
ldappool packages getting installed, even in the 'source' case.
This seems to have also kept ldappool at a lower version because
it did not get updated via pip later.
This patch deals with that and also moves ldap deps for Keystone
to their proper place in 'source' case (extras).
Note Keystone client gets installed in openstack-base.

Cinder does not need to include Keystone either.

[1] https://review.opendev.org/744037

Change-Id: I017d7a6a5d2b1ae6c04556dcf172453a36de5be7
2020-08-11 19:07:09 +02:00
James Kirsch 5bdf514645 Refactor httpd install to base image
Refactor installing and initial setup of httpd and mod wsgi from
individual services to base image.

Change-Id: I651a55a9ebe258ef403d33de010a4dfb368a4021
2020-08-10 09:51:07 +00:00
Hervé Beraud 24e42fc12b Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Ie97dcb610b6c723ba08a84ad79763bbbd4af20d9
2020-06-02 20:21:11 +02:00
Zuul 2f66efdf5e Merge "Remove support for CentOS 7" 2020-04-15 14:02:57 +00:00
Marcin Juszkiewicz 53443c5c71 Remove support for CentOS 7
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-04-15 09:32:06 +00:00
Radosław Piliszek 33d184a731 Ensure proper JSON in keystone bootstrap
This fixes the issue when keystone-manage output included
backslashes and/or double quotation marks which broke JSON string.

Change-Id: Ifae18c407210c12745d29fc4c95dca69aeafe6a8
Closes-bug: #1866017
2020-03-04 10:25:54 +01:00
Christian Berendt 861f55fbfd Add block labels to all Dockerfiles
Change-Id: I9692dda817ef134d647247431565e1b58cf9da41
2020-03-01 17:25:58 +00:00
Zuul a0058693f1 Merge "CentOS 8: Allow SSH access to keystone_ssh and nova_ssh" 2020-02-01 15:43:39 +00:00
Zuul e97239f03e Merge "CentOS 8: Update packages in images" 2020-01-30 20:13:03 +00:00
Mark Goddard 892ae92d97 CentOS 8: Allow SSH access to keystone_ssh and nova_ssh
The centos:8 image contains a /run/nologin file, which prevents SSH
access to it. Remove this file in the keystone_ssh and nova_ssh images
to allow login via SSH.

Change-Id: I59dc2c4207af6812501b6c6acdb34e51a3e848c4
Partially-Implements: blueprint centos-rhel-8
2020-01-30 11:23:48 +00:00
Mark Goddard 4b4e26262b CentOS 8: Update packages in images
* 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-29 11:41:38 +00:00
Michal Nasiadka 267cb8b14a Change fetch_fernet_tokens.py behaviour to check for minimum number of tokens
Change is required to properly implement logic in fernet-node-sync.sh on
kolla-ansible side - to add a check if fernet key store is populated with
required number of tokens.

Change-Id: I51ed61e34a1dd79532b4528e56a9cd9011d46e6d
Related-Bug: #1846789
2020-01-22 08:45:36 +01:00
Michal Nasiadka f284b6852f Adapt fetch-fernet-tokens script to Python 3
Backport: train
Closes-Bug: #1859047
Change-Id: I9032e43bffa3a3de6c33a4ab59f65bafb0129dd5
2020-01-13 13:08:39 +00:00
Mark Goddard 8484190e77 Refactor Apache httpd setup
All Apache httpd setup has been moved to a new helper script,
kolla_httpd_setup. This includes the existing clean of /run/httpd,
/var/run/httpd, /tmp/httpd etc.

Horizon has an additional bit of Apache config for Debian/binary, which
has been kept in extend_start.sh for horizon.

Change-Id: Ia2af74b69c151db0bd7e452460b0babcee50b282
Related: blueprint centos-rhel-8
2019-12-11 11:38:46 +00:00
Mark Goddard bcca3fabe3 Fix keystone bootstrap error message display
In some situations, Keystone bootstrap can fail, and then unhelpfully
fails displaying the error message output by the 'keystone-manage
bootstrap' command. This appears to be due to unprintable control
characters in the error message which prevent the output of the script
from being valid JSON.

This change fixes the issue by piping the output through 'cat -v', which
replaces unprintable characters with control codes.

Change-Id: I82444bc2272311023cc9e92c5a298d1c4c87483b
Closes-Bug: #1855701
2019-12-09 11:14:36 +00:00
Mark Goddard fa8e174be6 Remove support for OracleLinux
We have agreed to remove support for Oracle Linux.

http://lists.openstack.org/pipermail/openstack-discuss/2019-June/006896.html

Change-Id: I961dfba1aeef2c509ecdaf376dfe6928926ffb39
Depends-On: https://review.opendev.org/682858
2019-09-18 13:42:47 +01:00
Zuul 17ce7d4de6 Merge "Debian/Ubuntu: more python3 packages for binary" 2019-06-07 08:29:09 +00:00
Mark Goddard aa59f0db6f Debian/Ubuntu: more python3 packages for binary
backport: Stein

During the switch to Stein UCA, we did not switch all packages to python
3 for Debian/Ubuntu binary images. This change switches some more of
those packages.

Change-Id: I0bff21384d88ea678608392de2db1ba418c96665
Co-Authored-By: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
2019-06-06 11:06:58 +00:00
Marcin Juszkiewicz d436001b43 Debian/Ubuntu: move to Python 3 for source images
Commit 43b74ccc15 enabled use of Python 3
based packages but not switched to use Python 3.

Some of images still contain Python 2. There are two reasons:

- Ceph (ceph-common depends on Py2)
- python3-ldappool on Ubuntu 18.04

In Ceph situation Py3 packages were added. For second one we can not do
anything - Py2 dependency got dropped in Ubuntu 18.10 version.

Removed neutron-server-plugin-networking-infoblox due to being not
maintained. Once https://review.opendev.org/#/c/657578/ get merged
someone may revert that part.

Implements: blueprint debian-ubuntu-python3

Depends-on: Ie2a1077f7def0743f1403341985e2109aa490026

Change-Id: Ibfe0c2b8be98db56c61f74fb0247488ab3749ef4
2019-06-06 11:59:03 +01:00
Marcin Juszkiewicz 932f09bcd6 create missing apache2 directory on Debian/Ubuntu
Ubuntu/source deployment of several images (horizon, placement-api, zun)
failed with:

+ exec /usr/sbin/apache2 -DFOREGROUND
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

Change-Id: Ie2a1077f7def0743f1403341985e2109aa490026
2019-06-03 15:11:24 +02:00
Mark Goddard e6387634c6 Fix bandit failure B105 in keystone fernet
>> Issue: [B105:hardcoded_password_string] Possible hardcoded password: '/etc/keystone/fernet-keys'
   Severity: Low Confidence: Medium
      Location: docker/keystone/keystone-fernet/fetch_fernet_tokens.py:27
         More Info: https://bandit.readthedocs.io/en/latest/plugins/b105_hardcoded_password_string.html

Ignore bandit failures on this line.

Change-Id: I9828c23e4bcec7553a69aa5f20e990e0ef0538ea
Closes-Bug: #1828416
2019-05-09 15:18:17 +00:00
Alex Schultz 3e5d8e2653 Add python3 packages for RHEL systems
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-12 17:48:18 +00:00
Marcin Juszkiewicz 43b74ccc15 debian/ubuntu: make use of Python3 based packages
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-28 13:06:24 +01:00
Alex Schultz ae1322ec10 Use base_package_type
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-17 08:23:41 -07:00
Martin André 5951977eab Stop using deprecated rpm package names
These packages produce a warning during the installation, we should
switch to their new names, usually to be specific about their use of
python2.

Change-Id: I0a80e822f64222d9a32aabd1fd834bcf794d6320
2018-07-10 16:32:18 +02:00
Zuul de476329fc Merge "add support for keystone federation" 2018-06-15 07:35:37 +00:00
Lars Kellogg-Stedman 52902434cd add support for keystone federation
This adds the Apache mod_auth_openidc and mod_auth_mellon packages to
the Keystone container to support Keystone federation (as described in
https://docs.openstack.org/keystone/9.3.0/configure_federation.html)

Change-Id: Ia32176eb33737e6f7425bd5e63b4f95eb595cd5f
2018-06-14 21:40:58 -04:00
zhulingjie 5404239dfc Remove the unused kolla_kubernetes script from keystone
Change-Id: I9eda6e6279ff70598d4d20487edcb682121fd54d
2018-06-08 12:04:28 -04:00
Joshua Harlow 3241012158 Stop showing passwords when bootstrap script is ran
Currently this causes bash to echo all lines parsed
and executed; which makes it not so nicely output the
bootstrapping password.

This is not something we should encourage and have show
up in peoples logs or other so stop doing that.

Change-Id: Iac963a5df393d0359b4c8f93b8756ca168f6f193
2018-05-29 15:56:39 -07:00
Juan Antonio Osorio Robles df05a8b793 keystone: Switch from mod_auth_kerb to mod_auth_gssapi
The packages needed for authentication using kerberos for keystone
landed in a recent patch [1]. Unfortunately, shortly after the patch
merging I was informed that the preferred module is mod_auth_gssapi
nowadays (given that there is a planned deprecation for mod_auth_kerb).

[1] I9ef972ea5a8e9cf4d1ed43ef27203576d9382822

Change-Id: I5f1aa4a959fd91b164a697e98e253fcab0fc1572
2018-05-24 14:52:35 +03:00
Juan Antonio Osorio Robles 107ca8ea08 Enable packages for kerberos authentication for keystone
This adds the packages required to do kerberos authentication with
keystone.

Change-Id: I9ef972ea5a8e9cf4d1ed43ef27203576d9382822
2018-05-23 09:41:52 +00:00
Zuul d99fde03e1 Merge "Do not require the bootstrap password to come in via arguments" 2018-04-18 07:27:03 +00:00
Joshua Harlow 556ea33076 Do not require the bootstrap password to come in via arguments
Currently when this is being ran, and say ara is being used to
capture the running of kolla-ansible ara will capture the full
command line ran (even if no_log is set); because by default these
modules do not hide what they are running.

So to avoid the situation where the command line shows the password
have this also be able to take in the password via an environment
variable as well (which ara will not capture).

Change-Id: I4d42d592d8031d0f3923bccc6b2db1149af08e75
2018-03-26 17:03:34 -07:00
Martin André 6b81f91c5e Remove customizable for plugins_pip_packages
The pip packages are normally already configurable with the
<image_name>_pip_packages variable. It doesn't make much sense to make
the list of packages installed with the plugins mechanism configurable
via the <image_name>_plugins_pip_packages variable too.

And even if we wanted to, the parameter to the `customizable()`
function should be 'plugins_pip_packages' and not 'pip_packages'.

This commit removes the customizable bits from the plugins install
macro, at least until we get a good use case for it.

Change-Id: I90dd28b8c5d981e6028af353e34645712ef09b0b
2018-01-23 14:15:51 +01:00
Martin André 93ed43818b Skip plugins install for keystone binary builds
There should be no pip install in binary builds, move the installation
of the downloaded bits where it belongs into the 'source' install_type
section.

Change-Id: I6d8609d072d18e635250df1c1e9aa687ce1f769d
2017-12-19 13:59:51 +01:00
Juan Antonio Osorio Robles defa2808e7 Allow passing extra parameters to keystone-manage in extend_start
This allows deployers to pass arbitrary parameters to the kesytone-manage
commands. Which can be useful to pass  the keystone log dir and file as an
empty environment variable, which, in turn, will allow us to make the db
sync command to log to stdout instead of the file.

Change-Id: Id9e8c641a6b00725d2f5c9623b05854a1b4e2af2
2017-10-31 09:12:23 +00:00
Jenkins 41c906adaa Merge "Remove all Heka related remaining stuff" 2017-06-02 21:30:38 +00:00
Bertrand Lallau c71e8ba8ff Remove all Heka related remaining stuff
Heka has been removed and replaced by fluentd.
Refer to https://review.openstack.org/#/c/437874/

Change-Id: I989e5d71b5ba4d036dd45c02b3923c5bf27a04ed
2017-05-29 01:42:20 +00:00
Martin André 15543949b1 Only copy plugin-archive into image for source builds
The plugin mechanism is meant to be for source install type only.

Change-Id: I1371a253236b09dc62ea91dce6d652e1c5603015
Closes-Bug: #1681345
2017-05-10 17:10:28 +02:00
Jawon Choo 31259fa595 Override image's meta info.
centos based images have wrong label info,
these changes fix own image's name and build-date.

Change-Id: I1d13f8f386c8db12b5fbe5f8ecbbf9e3fbb4ba1c
Closes-Bug: #1680341
2017-05-03 11:08:17 +09:00
Jenkins b9e320a7cd Merge "Use LABEL instead of MAINTAINER (deprecated) in all Dockerfile.j2" 2017-04-20 12:32:55 +00:00