Commit Graph

43 Commits

Author SHA1 Message Date
Pierre Riteau 33c988a6ce Update Ceph repo name for dnf config-manager command
Since change I1bc19f8198da3f9ab2ae2a8864c3349b21b0249e we install the
centos-release-ceph-reef package as a dependency, but some code was
still expecting the quincy package.

Change-Id: I8ebcf815d80f3bead25e0078d69b34e17ad013bd
2023-11-22 10:06:39 +00:00
renliang 0eed86bb02 Fix an issue with zun-cni-daemon building images in aarch64
In the aarch64 image build,
use debian_arch to determine packages of different architectures.

Closes-Bug: #2036874
Change-Id: Ic86e6c22840f658bb68387aac688918d4db1f766
2023-09-21 06:45:47 +00: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 016c5ed30c adjust permissions on _extend_start files (part II)
Tim Shearer started it in 1d96a2bbe1.

Since all extend_start files are sourced rather than executed, the executable
bits are now cleared throughout the project.

Change-Id: Ia1797c32fc6a35f9f077c673abf4d8e16e51a760
2022-04-22 11:34:55 +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
Maksim Malchuk 83efe32546 Unify curl use (customisation options)
This change adds and unifies an ability to override hardcoded URLs for
air-gapped environments via the usual blocks mechanism. Also, this
change replaces ENV with ARG instruction for the variables used only
in building images, and uses bash variable expansion where it possible.

This change is a continuation of the I46b77978926fc2b578a68d1aaa944b2198af0685

Change-Id: I1fbad333b1bc95484e6f4c5145d5936a0e2db84f
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2022-03-11 15:58:05 +03:00
Marcin Juszkiewicz 38fcd184e8 centos: enable repos where needed
With RDO use we did not disabled some repositories. This patch disable
them and enable where needed.

Change-Id: Ia9d537fe9c1ad54789d2bfb4027254fbb3defe7e
2021-04-13 11:21:39 +00:00
Michal Nasiadka ec358f4cf7 Revert "Fix error when github return 302"
This reverts commit 61def281d0.

Reason for revert: --location was already in curlrc and it was unified in change I46b77978926fc2b578a68d1aaa944b2198af0685

Change-Id: I066d747400ede30037ff324ad55430af7c35dc18
2021-03-04 14:51:08 +00:00
Sergei Chekanov 61def281d0 Fix error when github return 302
-L for curl: If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place

It fixes build error for me:
INFO:kolla.common.utils.prometheus-v2-server: ---> Running in 693fd4095c77
INFO:kolla.common.utils.prometheus-v2-server:curl (https://github.com/prometheus/prometheus/releases/download/v2.23.0/prometheus-2.23.0.linux-amd64.tar.gz): response: 302, time: 0.166583, size: 640
INFO:kolla.common.utils.prometheus-v2-server:
INFO:kolla.common.utils.prometheus-v2-server:gzip: stdin: not in gzip format
INFO:kolla.common.utils.prometheus-v2-server:
INFO:kolla.common.utils.prometheus-v2-server:tar: Child returned status 1
INFO:kolla.common.utils.prometheus-v2-server:tar: Error is not recoverable: exiting now

Change-Id: I095ca6f34cc7c7bca485e9ec019cc52aeb8e3ff4
2021-03-02 17:28:59 +03:00
Michał Nasiadka 22c32a30e6 Unify curl options
Currently we use couple of curl options throughout Dockerfiles, this change
adds all common options to curlrc (-sSLf) and removes usage of those in
Dockerfiles.

Change-Id: I46b77978926fc2b578a68d1aaa944b2198af0685
2020-12-02 18:48:22 +01: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
Hongbin Lu 8c86f867db Zun: add CNI loopback binary to the image
Change-Id: I2d6165c4b7e934c3e6ad32b3de1060d07b792463
Needed-By: https://review.opendev.org/#/c/708213/
2020-04-18 23:09:09 +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
Hongbin Lu 39820c4abb Zun: add zun-cni-daemon image
Zun-cni-daemon is a new process for implementing CNI plugin for Zun.
It will be used by CRI runtime to connect podsandbox to neutron.
This image is based on the zun base image and includes additional
packages such as openvswitch.

Needed-By: https://review.opendev.org/#/c/708213/
Change-Id: Ic82c59a5e78078b4fea10df9d30b35da14cad922
2020-03-21 16:44:16 +00:00
Alfredo Moralejo 0c63129682 Use StorageSIG repos for Ceph in CentOS8
Storage SIG has built Ceph Nautilus and Ganesha for CentOS8 in CentOS
Build System.

Let's switch to use them in kolla.

Change-Id: Id37dca84c4eb918aaf2d3c036ef5387fe75988dd
2020-03-03 16:31:53 +05:30
Christian Berendt 861f55fbfd Add block labels to all Dockerfiles
Change-Id: I9692dda817ef134d647247431565e1b58cf9da41
2020-03-01 17:25:58 +00:00
Michal Nasiadka 70423f1959 CentOS 8: Use upstream Ceph/master
The only Ceph version that will support CentOS 8 is Octopus.
It will be released end of March 2020 - so for now let's use master.

Change-Id: I5955acb41e7346802d76f4f2b244cbf5c36f5bf2
Partially-Implements: blueprint centos-rhel-8
2020-01-30 10:35:50 +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
Marcin Juszkiewicz cf11cd6f3d Enable repos only when needed
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-11-29 11:38:06 +01:00
Radosław Piliszek ed29cb61b8 Add volume-related packages to zun-compute image
This lets Zun containers use Cinder volumes.

Zun-compute formats attached block devices.
ext* and xfs are the most common filesystems and have tools
included in other relevant images.

In case of Ceph ceph-common is required for rbd attachment.

iSCSI is supported via packages installed in base.

Change-Id: Ib094ae8fcc8468949b3cd162a1cedba3fdfd3a47
Related-bug: #1797448
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-09-18 15:29:42 +02:00
Radosław Piliszek c323c5be7f Add pciutils package to cyborg-agent and zun-compute
These run lspci and have this requirement in respective bindeps.

CentOS images seem to have it installed but Ubuntu not.
Ensure pciutils package is always installed.

zun-compute seemed to work nonetheless but generated errors
about being unable to take host inventory.

cyborg-agent is unknown to work at all and deb is unbuildable.

Change-Id: Iebc1f2c05c1f57c2b6f98ca9772f1ae9d9a420fa
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-08-16 16:07:28 +02: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
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
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
Hongbin Lu 8a157cbe03 Install numactl package for Zun images
The package numactl is required by this change:
https://review.openstack.org/#/c/617928/

Change-Id: I163d7aea0d47c229ce9ea33049d84fdf17641ef6
2018-12-15 16:41:17 +00:00
Hongbin Lu 0c8d3f0586 Add user 'zun' to group 'docker'
Zun compute needs to access the docker socket for API call.
The socket is owned by 'docker' group and the zun-compute process
is owned by 'zun' user. In order to allow the access, this commit
add zun user to docker group.

Change-Id: Ifa7d399242dddf8d07f8b495b344752131a0f110
2018-10-01 03:57:12 +00:00
Hongbin Lu 570a6120be Add /var/lib/kolla/venv/bin to Zun exec_dirs
This is necessary for rootwrap/privsep to work properly

Change-Id: I128fb04a5ddeb77428697d33e2015158bc74738f
2018-09-30 16:14:31 +00:00
Hongbin Lu d965ddf256 Run zun-api with 'root' user
It looks zun-api needs root permission to run under apache2.
Otherwise, the zun process will have problem to write to
apache2 logs.

Change-Id: I8b201fc70b8347be9869d7e6bf1eec00d8a32d6e
2018-09-10 20:53:06 +00:00
Hongbin Lu 0b2682e489 Configure sudoers for zun containers
Zun processes were run as user 'root' in before. This is undesirable
for several reasons (i.e. security, privsep). This patch make the
Zun processes run as 'zun' user, which aligns with the practice of
other containers.

Change-Id: I0d3111f0ca6301d6f22410fe5fd5a2dbf586e691
Closes-Bug: #1787760
2018-08-27 01:55:18 +00: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
jiangpch bedb106fad add zun-wsproxy image
zun needs to start zun-wsproxy service to provide the container attach
feature(the container console on horizon), so a standalone docker image
is required.

Change-Id: I24d1b4a7b63c3bc86705269bda50fa2e3bdb9fab
2017-09-27 04:23:32 -04:00
Eduardo Gonzalez bc52005ac0 Fix dind and zun images and oraclelinux build
- dind need setuptools to install docker
  through pip in binary install
- oraclelinux fails to install due opstools
  repo and openstack mitaka repos missing.
- zun removed moved nova out of etc because is not
  used. 6dc2866167

Change-Id: Ic4eb0f2e97a108be3c854c95eede27b5cd411b5c
Closes-Bug: #1716952
2017-09-18 10:24:19 +02:00
Eduardo Gonzalez 4de877d10c Fix zun log dir permissions
Change-Id: I9bc413d99953d93f8cd9bbcfcf74bd70c70c13ff
2017-07-06 11:23:56 +01:00
Jenkins 5bdd158767 Merge "Fix zun images" 2017-05-15 02:15:06 +00: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
Eduardo Gonzalez a159c686d7 Fix zun images
Zun uses wsgi to start process.
Rework zun-base image to make use of wsgi.
Create zun user with macros to maintain static uids.
Zun compute need root to connect docker

Change-Id: Idd417e1b804148543ee5f403a836fa1f3e6f7fb0
Closes-Bug: #1682142
2017-04-20 09:03:04 +01:00
Chen 8c463a47a9 Use LABEL instead of MAINTAINER (deprecated) in all Dockerfile.j2
Use LABEL instruction instead of MAINTAINER (deprecated) instruc-
tion as suggested by Docker's official dockerfile guide.
docs.docker.com/engine/reference/builder/#maintainer-deprecated

Closes-Bug: #1683652

Change-Id: Ie87a1ddf31aefcd0b623fd2837d78de420e76898
2017-04-20 16:50:05 +09:00
Chao Guo 961224c6cf Use install-pip macro in most source images
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-02-17 08:49:32 -03:00
jianyi 4c2156a45c Add zun container
Change-Id: Id11d00b8577f6c614b7001474d9a113ee6eca1fe
Partially-implements: bp add-zun-container-for-kolla
2016-12-29 08:09:28 +00:00