Remove Centos related code
We have not been testing this code for quite a some time and there has been little interest in maintaining it. The change removes all Centos related code to reduce the maintenance burden. See the related discussion [1]. [1] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/GWRYBFSYE3ZLW64WK2ECIOGN3QZYYLTD/ Change-Id: Id1c6bb5c9c486c62f28feb7ba429f7af84e88db0
This commit is contained in:
@@ -16,7 +16,6 @@ ARG PROJECT_REPO=https://opendev.org/openstack/${PROJECT}
|
|||||||
ARG PROJECT_REF=master
|
ARG PROJECT_REF=master
|
||||||
ARG PROJECT_RELEASE=master
|
ARG PROJECT_RELEASE=master
|
||||||
ARG EXTRA_PROJECTS=""
|
ARG EXTRA_PROJECTS=""
|
||||||
ARG DISTRO=""
|
|
||||||
ARG PROFILES=""
|
ARG PROFILES=""
|
||||||
ARG PIP_PACKAGES=""
|
ARG PIP_PACKAGES=""
|
||||||
ARG PIP_ARGS=""
|
ARG PIP_ARGS=""
|
||||||
|
@@ -16,11 +16,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
|
|||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
gnupg2 \
|
gnupg2 \
|
||||||
|
lsb-release \
|
||||||
wget && \
|
wget && \
|
||||||
wget -q -O- ${CEPH_KEY} | apt-key add - && \
|
wget -q -O- ${CEPH_KEY} | apt-key add - && \
|
||||||
if [ -n "${CEPH_REPO}" ]; then \
|
if [ -n "${CEPH_REPO}" ]; then \
|
||||||
echo "${CEPH_REPO}" | tee /etc/apt/sources.list.d/ceph.list; \
|
echo "${CEPH_REPO}" | tee /etc/apt/sources.list.d/ceph.list; \
|
||||||
fi && \
|
fi && \
|
||||||
apt-get remove -y wget gnupg2 && \
|
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
70
README.md
70
README.md
@@ -1,7 +1,7 @@
|
|||||||
# OpenStack LOCI
|
# OpenStack LOCI
|
||||||
|
|
||||||
OpenStack LOCI is a project designed to quickly build Lightweight OCI
|
OpenStack LOCI is a project designed to quickly build Lightweight OCI
|
||||||
compatible images of OpenStack services.
|
compatible images of OpenStack services based on Ubuntu.
|
||||||
|
|
||||||
Additionally, we produce a "wheels" image for
|
Additionally, we produce a "wheels" image for
|
||||||
[requirements](https://github.com/openstack/requirements) containing all of the
|
[requirements](https://github.com/openstack/requirements) containing all of the
|
||||||
@@ -14,6 +14,7 @@ by LOCI. For simplicity, we will continue to use Keystone as an example.
|
|||||||
|
|
||||||
Note: To build locally, you will need a version of docker >= 17.05.0.
|
Note: To build locally, you will need a version of docker >= 17.05.0.
|
||||||
|
|
||||||
|
#### Base image
|
||||||
You need to start by building a base image for your distribution that
|
You need to start by building a base image for your distribution that
|
||||||
included the required build dependencies. Loci has included a collection
|
included the required build dependencies. Loci has included a collection
|
||||||
of Dockerfiles to get you started with building a base image. These
|
of Dockerfiles to get you started with building a base image. These
|
||||||
@@ -21,34 +22,41 @@ are located in the dockerfiles directory.
|
|||||||
|
|
||||||
It's easy to build a base image:
|
It's easy to build a base image:
|
||||||
``` bash
|
``` bash
|
||||||
$ docker build dockerfiles/ubuntu \
|
$ docker build . \
|
||||||
|
-f Dockerfile.base \
|
||||||
--build-arg FROM=ubuntu:jammy \
|
--build-arg FROM=ubuntu:jammy \
|
||||||
--build-arg CEPH_REPO='deb https://download.ceph.com/debian-reef/ jammy main' \
|
--build-arg CEPH_REPO='deb https://download.ceph.com/debian-reef/ jammy main' \
|
||||||
--tag loci-base:ubuntu_jammy
|
--tag base:ubuntu_jammy
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you can build the rest of the service images locally:
|
#### Requirements image
|
||||||
|
The `requirements` image is where we put all the packages listed in the OpenStack
|
||||||
|
[upper constraints](https://opendev.org/openstack/requirements/src/branch/master/upper-constraints.txt)
|
||||||
|
together with their dependencies. This is a consistent set of packages so that if we install various
|
||||||
|
OpenStack components from this set of packages we can be sure they are compatible with each other.
|
||||||
|
In Loci we use multistage Dockerfile with the project image as a default target.
|
||||||
|
To build the `requirements` image use the following command
|
||||||
``` bash
|
``` bash
|
||||||
$ docker build . \
|
$ docker build . \
|
||||||
--build-arg FROM=loci-base:ubuntu_jammy \
|
-f Dockerfile \
|
||||||
--build-arg PROJECT=keystone \
|
--target requirements \
|
||||||
--tag loci-keystone:master-ubuntu_jammy
|
--build-arg FROM=base:ubuntu_jammy \
|
||||||
|
--build-arg PROJECT=requirements \
|
||||||
|
--tag requirements:master-ubuntu_jammy
|
||||||
```
|
```
|
||||||
|
|
||||||
The default base distro is Ubuntu Jammy, however, you can use the following form to build from a distro of your choice, in this case, CentOS:
|
#### Project image
|
||||||
|
Then you can build the rest of the service images using this requirements image:
|
||||||
``` bash
|
``` bash
|
||||||
$ docker build dockerfiles/centos \
|
|
||||||
--tag loci-base:centos
|
|
||||||
|
|
||||||
$ docker build . \
|
$ docker build . \
|
||||||
|
--build-arg FROM=base:ubuntu_jammy \
|
||||||
|
--build-arg WHEELS=requirements:master-ubuntu_jammy \
|
||||||
--build-arg PROJECT=keystone \
|
--build-arg PROJECT=keystone \
|
||||||
--build-arg WHEELS="loci/requirements:master-centos" \
|
--tag keystone:master-ubuntu_jammy
|
||||||
--build-arg FROM=loci-base:centos \
|
|
||||||
--tag loci-keystone:master-centos
|
|
||||||
```
|
```
|
||||||
|
Here you can specify the `requirements` (WHEELS) image which is mounted during the build and is used
|
||||||
Loci will detect which base OS you're using, so if you need to add additional
|
as a wheels repository. By default the `quay.io/airshipit/requirements:master-ubuntu_jammy`
|
||||||
features to your base image the Loci build will still run.
|
is used.
|
||||||
|
|
||||||
If building behind a proxy, remember to use build arguments to pass these
|
If building behind a proxy, remember to use build arguments to pass these
|
||||||
through to the build:
|
through to the build:
|
||||||
@@ -58,7 +66,7 @@ $ docker build . \
|
|||||||
--build-arg https_proxy=$https_proxy \
|
--build-arg https_proxy=$https_proxy \
|
||||||
--build-arg no_proxy=$no_proxy \
|
--build-arg no_proxy=$no_proxy \
|
||||||
--build-arg PROJECT=keystone \
|
--build-arg PROJECT=keystone \
|
||||||
--tag loci-keystone:master-ubuntu_jammy
|
--tag keystone:master-ubuntu_jammy
|
||||||
```
|
```
|
||||||
|
|
||||||
For more advanced building you can use docker build arguments to define:
|
For more advanced building you can use docker build arguments to define:
|
||||||
@@ -78,10 +86,6 @@ For more advanced building you can use docker build arguments to define:
|
|||||||
* `WHEELS` The location of the wheels Docker image. The image must contain
|
* `WHEELS` The location of the wheels Docker image. The image must contain
|
||||||
wheels in the root directory. It is mounted while building other images.
|
wheels in the root directory. It is mounted while building other images.
|
||||||
`[myregistry/]mydockernamespace/requirements[:tag]`
|
`[myregistry/]mydockernamespace/requirements[:tag]`
|
||||||
* `DISTRO` This is a helper variable used for scripts. It would primarily be
|
|
||||||
used in situations where the script would not detect the correct distro.
|
|
||||||
For example, you would set `DISTRO=centos` when running from an oraclelinux
|
|
||||||
base image.
|
|
||||||
* `PROFILES` The bindep profiles to specify to configure which packages get
|
* `PROFILES` The bindep profiles to specify to configure which packages get
|
||||||
installed. This is a space separated list.
|
installed. This is a space separated list.
|
||||||
* `PIP_PACKAGES` Specify additional python packages you would like installed.
|
* `PIP_PACKAGES` Specify additional python packages you would like installed.
|
||||||
@@ -89,17 +93,17 @@ For more advanced building you can use docker build arguments to define:
|
|||||||
you wanted to include rpdb, you would need to have built that into your
|
you wanted to include rpdb, you would need to have built that into your
|
||||||
WHEELS.
|
WHEELS.
|
||||||
* `KEEP_ALL_WHEELS` Set this to `True` if you want to keep all packages, even
|
* `KEEP_ALL_WHEELS` Set this to `True` if you want to keep all packages, even
|
||||||
not built ourselfs in the WHEEL image. Is useful for reproducible builts,
|
not built ourselfs in the WHEELS image. This is useful for reproducible builds,
|
||||||
as 3rd party libraries will be keept in WHEEL image.
|
as 3rd party libraries will be keept in the WHEELS image.
|
||||||
* `PIP_ARGS` Specify additional pip parameters you would like.
|
* `PIP_ARGS` Specify additional pip parameters you would like.
|
||||||
* `PIP_WHEEL_ARGS` Specify additional pip wheel parameters you would like.
|
* `PIP_WHEEL_ARGS` Specify additional pip wheel parameters you would like.
|
||||||
Default is PIP_ARGS.
|
Default is PIP_ARGS.
|
||||||
* `DIST_PACKAGES` Specify additional distribution packages you would like
|
* `DIST_PACKAGES` Specify additional distribution packages you would like
|
||||||
installed.
|
installed.
|
||||||
* `EXTRA_BINDEP` Specify a bindep-* file to add in the container. It would
|
* `EXTRA_BINDEP` Specify a bindep-* file to add in the container. It would
|
||||||
be considered next to the default bindep.txt.
|
be considered next to the default bindep.txt.
|
||||||
* `EXTRA_PYDEP` Specify a pydep-* file to add in the container. It would
|
* `EXTRA_PYDEP` Specify a pydep-* file to add in the container. It would
|
||||||
be considered next to the default pydep.txt.
|
be considered next to the default pydep.txt.
|
||||||
* `REGISTRY_PROTOCOL` Set this to `https` if you are running your own
|
* `REGISTRY_PROTOCOL` Set this to `https` if you are running your own
|
||||||
registry on https, `http` if you are running on http, or leave it as
|
registry on https, `http` if you are running on http, or leave it as
|
||||||
`detect` if you want to re-use existing protocol detection.
|
`detect` if you want to re-use existing protocol detection.
|
||||||
@@ -117,15 +121,7 @@ $ docker build . \
|
|||||||
--build-arg PROJECT=keystone \
|
--build-arg PROJECT=keystone \
|
||||||
--build-arg PROJECT_REPO=https://review.opendev.org/openstack/keystone \
|
--build-arg PROJECT_REPO=https://review.opendev.org/openstack/keystone \
|
||||||
--build-arg PROJECT_REF=refs/changes/24/923324/10 \
|
--build-arg PROJECT_REF=refs/changes/24/923324/10 \
|
||||||
--tag loci-keystone:923324-10
|
--tag keystone:923324-10
|
||||||
```
|
|
||||||
|
|
||||||
To build with the wheels from a private Docker registry rather than Docker Hub run:
|
|
||||||
``` bash
|
|
||||||
$ docker build . \
|
|
||||||
--build-arg PROJECT=keystone \
|
|
||||||
--build-arg WHEELS=172.17.0.1:5000/mydockernamespace/requirements:master-ubuntu_jammy \
|
|
||||||
--tag loci-keystone:master-ubuntu_jammy
|
|
||||||
```
|
```
|
||||||
|
|
||||||
To build cinder with lvm and ceph support you would run:
|
To build cinder with lvm and ceph support you would run:
|
||||||
@@ -157,7 +153,7 @@ do this we recommend that you perform any required customization in a child
|
|||||||
image using a pattern similar to:
|
image using a pattern similar to:
|
||||||
|
|
||||||
``` Dockerfile
|
``` Dockerfile
|
||||||
FROM loci/keystone:master-ubuntu_jammy
|
FROM quay.io/airshipit/keystone:master-ubuntu_jammy
|
||||||
MAINTAINER you@example.com
|
MAINTAINER you@example.com
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
|
50
bindep.txt
50
bindep.txt
@@ -1,47 +1,30 @@
|
|||||||
apache2 [platform:dpkg platform:suse apache]
|
apache2 [platform:dpkg platform:suse apache]
|
||||||
blas-devel [platform:rpm requirements]
|
|
||||||
bridge-utils [(neutron linuxbridge) (nova linuxbridge)]
|
bridge-utils [(neutron linuxbridge) (nova linuxbridge)]
|
||||||
build-essential [platform:dpkg requirements]
|
build-essential [platform:dpkg requirements]
|
||||||
bzip2 [platform:rpm requirements]
|
|
||||||
ceph-common [(ceph cinder) (ceph glance) (ceph nova) (ceph manila)]
|
ceph-common [(ceph cinder) (ceph glance) (ceph nova) (ceph manila)]
|
||||||
conntrack [platform:dpkg neutron]
|
conntrack [platform:dpkg neutron]
|
||||||
conntrack-tools [platform:rpm neutron]
|
|
||||||
cyrus-sasl-devel [platform:rpm requirements]
|
|
||||||
device-mapper-multipath [platform:rpm (cinder purestorage) (nova purestorage)]
|
|
||||||
dhclient [platform:rpm octavia]
|
|
||||||
dnsmasq [neutron]
|
dnsmasq [neutron]
|
||||||
dnsmasq-utils [neutron]
|
dnsmasq-utils [neutron]
|
||||||
ebtables [neutron]
|
ebtables [neutron]
|
||||||
gcc [platform:rpm requirements]
|
|
||||||
gcc-c++ [platform:rpm requirements]
|
|
||||||
genisoimage [(nova configdrive)]
|
genisoimage [(nova configdrive)]
|
||||||
gettext [horizon]
|
gettext [horizon]
|
||||||
git [requirements]
|
git [requirements]
|
||||||
haproxy [neutron]
|
haproxy [neutron]
|
||||||
httpd [platform:rpm apache]
|
|
||||||
ipmitool [(ironic ipmi)]
|
ipmitool [(ironic ipmi)]
|
||||||
iproute2 [platform:dpkg neutron nova]
|
iproute2 [platform:dpkg neutron nova]
|
||||||
ipset [neutron]
|
ipset [neutron]
|
||||||
iptables [neutron (nova linuxbridge)]
|
iptables [neutron (nova linuxbridge)]
|
||||||
iputils-arping [platform:dpkg neutron]
|
iputils-arping [platform:dpkg neutron]
|
||||||
ipxe [platform:dpkg (ironic ipxe)]
|
ipxe [platform:dpkg (ironic ipxe)]
|
||||||
ipxe-bootimgs [platform:rpm (ironic ipxe)]
|
|
||||||
isc-dhcp-client [platform:dpkg octavia]
|
isc-dhcp-client [platform:dpkg octavia]
|
||||||
iscsi-initiator-utils [platform:rpm (cinder purestorage) (nova purestorage)]
|
|
||||||
keepalived [neutron]
|
keepalived [neutron]
|
||||||
kvm [platform:rpm]
|
|
||||||
lapack-devel [platform:rpm requirements]
|
|
||||||
libapache2-mod-auth-mellon [platform:dpkg (keystone apache mellon)]
|
libapache2-mod-auth-mellon [platform:dpkg (keystone apache mellon)]
|
||||||
libapache2-mod-auth-openidc [platform:dpkg (keystone apache openidc)]
|
libapache2-mod-auth-openidc [platform:dpkg (keystone apache openidc)]
|
||||||
libapache2-mod-wsgi-py3 [platform:dpkg apache]
|
libapache2-mod-wsgi-py3 [platform:dpkg apache]
|
||||||
libblas-dev [platform:dpkg requirements]
|
libblas-dev [platform:dpkg requirements]
|
||||||
liberasurecode-dev [platform:dpkg requirements]
|
liberasurecode-dev [platform:dpkg requirements]
|
||||||
liberasurecode-devel [platform:rpm requirements]
|
|
||||||
libffi-dev [platform:dpkg requirements]
|
libffi-dev [platform:dpkg requirements]
|
||||||
libffi-devel [platform:rpm requirements]
|
|
||||||
libgcrypt [platform:rpm requirements]
|
|
||||||
libjpeg-dev [platform:dpkg requirements]
|
libjpeg-dev [platform:dpkg requirements]
|
||||||
libjpeg-devel [platform:rpm requirements]
|
|
||||||
libkrb5-dev [platform:dpkg requirements]
|
libkrb5-dev [platform:dpkg requirements]
|
||||||
liblapack-dev [platform:dpkg requirements]
|
liblapack-dev [platform:dpkg requirements]
|
||||||
libldap-2.4-2 [platform:dpkg (keystone ldap !jammy !noble)]
|
libldap-2.4-2 [platform:dpkg (keystone ldap !jammy !noble)]
|
||||||
@@ -51,7 +34,6 @@ libldap2-dev [platform:dpkg requirements]
|
|||||||
libmariadbclient-dev [platform:debian requirements]
|
libmariadbclient-dev [platform:debian requirements]
|
||||||
libmysqlclient-dev [platform:ubuntu requirements]
|
libmysqlclient-dev [platform:ubuntu requirements]
|
||||||
libnss3-dev [platform:dpkg requirements]
|
libnss3-dev [platform:dpkg requirements]
|
||||||
libosinfo [platform:rpm nova]
|
|
||||||
libosinfo-bin [platform:dpkg nova]
|
libosinfo-bin [platform:dpkg nova]
|
||||||
libpcre3 [platform:ubuntu-noble]
|
libpcre3 [platform:ubuntu-noble]
|
||||||
libpcre3-dev [platform:dpkg requirements]
|
libpcre3-dev [platform:dpkg requirements]
|
||||||
@@ -59,65 +41,33 @@ libpq-dev [platform:dpkg requirements]
|
|||||||
# libpythonx.y installation logic is moved to scripts to be able to dynamically
|
# libpythonx.y installation logic is moved to scripts to be able to dynamically
|
||||||
# determine minor version from default python installed in a system.
|
# determine minor version from default python installed in a system.
|
||||||
librdkafka-dev [platform:dpkg requirements]
|
librdkafka-dev [platform:dpkg requirements]
|
||||||
libreswan [platform:rpm (neutron vpn)]
|
|
||||||
libsasl2-dev [platform:dpkg requirements]
|
libsasl2-dev [platform:dpkg requirements]
|
||||||
libssl-dev [platform:dpkg requirements]
|
libssl-dev [platform:dpkg requirements]
|
||||||
libsystemd-dev [platform:dpkg requirements]
|
libsystemd-dev [platform:dpkg requirements]
|
||||||
libvirt-dev [platform:dpkg requirements]
|
libvirt-dev [platform:dpkg requirements]
|
||||||
libvirt-devel [platform:rpm requirements]
|
|
||||||
libvirt0 [platform:dpkg nova]
|
libvirt0 [platform:dpkg nova]
|
||||||
libxml2 []
|
libxml2 []
|
||||||
libxml2-dev [platform:dpkg requirements]
|
libxml2-dev [platform:dpkg requirements]
|
||||||
libxml2-devel [platform:rpm requirements]
|
|
||||||
libxslt-devel [platform:rpm requirements]
|
|
||||||
libxslt1-dev [platform:dpkg requirements]
|
libxslt1-dev [platform:dpkg requirements]
|
||||||
libyaml-dev [platform:dpkg requirements]
|
libyaml-dev [platform:dpkg requirements]
|
||||||
libyaml-devel [platform:rpm requirements]
|
|
||||||
libz-dev [platform:dpkg requirements]
|
libz-dev [platform:dpkg requirements]
|
||||||
lvm2 [(cinder lvm) (manila lvm)]
|
lvm2 [(cinder lvm) (manila lvm)]
|
||||||
make [platform:rpm requirements]
|
|
||||||
mariadb-devel [platform:rpm requirements]
|
|
||||||
mod_auth_mellon [platform:rpm (keystone apache mellon)]
|
|
||||||
mod_auth_openidc [platform:rpm (keystone apache openidc)]
|
|
||||||
mod_ssl [platform:rpm apache]
|
|
||||||
mod_wsgi [platform:rpm apache]
|
|
||||||
multipath-tools [platform:dpkg (cinder purestorage) (nova purestorage)]
|
multipath-tools [platform:dpkg (cinder purestorage) (nova purestorage)]
|
||||||
mysql [platform:rpm placement]
|
|
||||||
mysql-client [platform:dpkg placement]
|
mysql-client [platform:dpkg placement]
|
||||||
nginx [nginx]
|
nginx [nginx]
|
||||||
# latest nss-devel breaks python-nss on centos:9
|
|
||||||
nss-devel-3.53.1-17.el8_3 [platform:rpm requirements]
|
|
||||||
nss-util [platform:rpm requirements]
|
|
||||||
open-iscsi [platform:dpkg (cinder purestorage) (nova purestorage)]
|
open-iscsi [platform:dpkg (cinder purestorage) (nova purestorage)]
|
||||||
openldap-devel [platform:rpm requirements]
|
|
||||||
openssh-client [platform:dpkg (nova migration)]
|
openssh-client [platform:dpkg (nova migration)]
|
||||||
openssh-clients [platform:rpm (nova migration)]
|
|
||||||
openssl-devel [platform:rpm requirements]
|
|
||||||
openvswitch [platform:rpm (neutron openvswitch) (nova openvswitch)]
|
|
||||||
openvswitch-switch [platform:dpkg (neutron openvswitch) (nova openvswitch)]
|
openvswitch-switch [platform:dpkg (neutron openvswitch) (nova openvswitch)]
|
||||||
pcre-devel [platform:rpm requirements]
|
|
||||||
pkg-config [platform:dpkg requirements]
|
pkg-config [platform:dpkg requirements]
|
||||||
pkgconfig [platform:rpm requirements]
|
|
||||||
postgresql-devel [platform:rpm requirements]
|
|
||||||
postgresql-server-devel [platform:suse requirements]
|
postgresql-server-devel [platform:suse requirements]
|
||||||
python-mysql [platform:rpm (monasca api)]
|
|
||||||
python3-dev [platform:dpkg requirements]
|
python3-dev [platform:dpkg requirements]
|
||||||
python3-devel [platform:rpm requirements]
|
|
||||||
python3-mysqldb [platform:dpkg (monasca api)]
|
python3-mysqldb [platform:dpkg (monasca api)]
|
||||||
python3-rados [platform:dpkg (glance ceph) (cinder ceph) (manila ceph) (nova ceph)]
|
python3-rados [platform:dpkg (glance ceph) (cinder ceph) (manila ceph) (nova ceph)]
|
||||||
python3-rbd [(glance ceph) (cinder ceph) (manila ceph) (nova ceph)]
|
python3-rbd [(glance ceph) (cinder ceph) (manila ceph) (nova ceph)]
|
||||||
qemu-img [platform:rpm (nova qemu) (ironic qemu) (cinder qemu) (glance qemu)]
|
|
||||||
qemu-utils [platform:dpkg (nova qemu) (ironic qemu) (cinder qemu) (glance qemu)]
|
qemu-utils [platform:dpkg (nova qemu) (ironic qemu) (cinder qemu) (glance qemu)]
|
||||||
sg3-utils [platform:dpkg (cinder purestorage) (nova purestorage)]
|
sg3-utils [platform:dpkg (cinder purestorage) (nova purestorage)]
|
||||||
sg3_utils [platform:rpm (cinder purestorage) (nova purestorage)]
|
|
||||||
strongswan [platform:dpkg (neutron vpn)]
|
strongswan [platform:dpkg (neutron vpn)]
|
||||||
syslinux-tftpboot [platform:rpm (ironic tftp)]
|
|
||||||
systemd-devel [platform:rpm requirements]
|
|
||||||
targetcli [platform:rpm (cinder lvm)]
|
|
||||||
tftp-server [platform:rpm (ironic tftp)]
|
|
||||||
tftpd-hpa [platform:dpkg (ironic tftp)]
|
tftpd-hpa [platform:dpkg (ironic tftp)]
|
||||||
tgt [platform:dpkg (cinder lvm)]
|
tgt [platform:dpkg (cinder lvm)]
|
||||||
thin-provisioning-tools [platform:dpkg (cinder lvm)]
|
thin-provisioning-tools [platform:dpkg (cinder lvm)]
|
||||||
uuid [platform:rpm neutron]
|
|
||||||
uuid-runtime [platform:dpkg neutron]
|
uuid-runtime [platform:dpkg neutron]
|
||||||
zlib-devel [platform:rpm requirements]
|
|
||||||
|
@@ -1,36 +0,0 @@
|
|||||||
[appstream]
|
|
||||||
name=CentOS Linux $releasever - AppStream
|
|
||||||
baseurl=http://%%PACKAGE_MIRROR%%/$contentdir/$releasever/AppStream/$basearch/os/
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
|
||||||
|
|
||||||
[baseos]
|
|
||||||
name=CentOS Linux $releasever - BaseOS
|
|
||||||
baseurl=http://%%PACKAGE_MIRROR%%/$contentdir/$releasever/BaseOS/$basearch/os/
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
|
||||||
|
|
||||||
[extras]
|
|
||||||
name=CentOS Linux $releasever - Extras
|
|
||||||
baseurl=http://%%PACKAGE_MIRROR%%/$contentdir/$releasever/extras/$basearch/os/
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
|
||||||
|
|
||||||
[powertools]
|
|
||||||
name=CentOS Linux $releasever - PowerTools
|
|
||||||
baseurl=http://%%PACKAGE_MIRROR%%/$contentdir/$releasever/PowerTools/$basearch/os/
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
|
||||||
|
|
||||||
[openstack]
|
|
||||||
name=CentOS-$releasever - OpenStack
|
|
||||||
baseurl=http://%%PACKAGE_MIRROR%%/centos/$releasever/cloud/$basearch/openstack-victoria/
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
|
|
||||||
|
|
||||||
[centos-9-stream-appstream]
|
|
||||||
includepkgs=nss*
|
|
||||||
name=CentOS Linux $releasever stream - AppStream
|
|
||||||
baseurl=http://%%PACKAGE_MIRROR%%/$contentdir/$releasever-stream/AppStream/$basearch/os/
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
|
@@ -1,16 +0,0 @@
|
|||||||
ARG FROM=centos:9-stream
|
|
||||||
FROM ${FROM}
|
|
||||||
|
|
||||||
ARG PACKAGE_MIRROR=mirror.centos.org
|
|
||||||
ARG PIP_INDEX_URL=https://pypi.python.org/simple/
|
|
||||||
ARG PIP_TRUSTED_HOST=pypi.python.org
|
|
||||||
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
|
|
||||||
ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}
|
|
||||||
|
|
||||||
RUN rm -rf /etc/yum.repos.d/*
|
|
||||||
COPY CentOS.repo /etc/yum.repos.d/
|
|
||||||
COPY RPM-GPG-KEY-CentOS-SIG-Cloud /etc/pki/rpm-gpg/
|
|
||||||
RUN sed -i "s|%%PACKAGE_MIRROR%%|${PACKAGE_MIRROR}|g" /etc/yum.repos.d/CentOS.repo \
|
|
||||||
&& yum update -y
|
|
||||||
# NOTE(aostapenko) repositories are restored on yum update, deleting them again
|
|
||||||
RUN find /etc/yum.repos.d/ -type f ! -name 'CentOS.repo' -delete
|
|
@@ -1,20 +0,0 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
Version: GnuPG v2.0.22 (GNU/Linux)
|
|
||||||
|
|
||||||
mQENBFVWcCcBCACfm3eQ0526/I0/p7HpR0NjK7K307XHhnbcbZv1sDUjQABDaqh0
|
|
||||||
N4gnZcovf+3fj6pcdOmeOpGI0cKE7Fh68RbEIqyjB7l7+j1grjewR0oCFFZ38KGm
|
|
||||||
j+DWQrj1IJW7JU5fH/G0Cu66ix+dJPcuTB3PJTqXN3ce+4TuG09D+epgwfbHlqaT
|
|
||||||
pH2qHCu2uiGj/AaRSM/ZZzcInMaeleHSB+NChvaQ0W/m+kK5d/20d7sfkaTfI/pY
|
|
||||||
SrodCfVTYxfKAd0TLW03kimHs5/Rdz+iZWecVKv6aFxzaywbrOjmOsy2q0kEWIwX
|
|
||||||
MTZrq6cBRRuWyiXsI2zT2YHQ4UK44IxINiaJABEBAAG0WkNlbnRPUyBDbG91ZCBT
|
|
||||||
SUcgKGh0dHA6Ly93aWtpLmNlbnRvcy5vcmcvU3BlY2lhbEludGVyZXN0R3JvdXAv
|
|
||||||
Q2xvdWQpIDxzZWN1cml0eUBjZW50b3Mub3JnPokBOQQTAQIAIwUCVVZwJwIbAwcL
|
|
||||||
CQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEPm5/ud2RCnmATUH/3HDtWxpFkmy
|
|
||||||
FiA3VGkMt5dp3bgCRSd84X6Orfx1LARowpI4LomCGglGBGXVJePBacwcclorbLaz
|
|
||||||
uWrW/wU0efz0aDB5c4NPg/yXfNvujvlda8ADJwZXVBQphzvaIKwl4PqBsEnxC10I
|
|
||||||
93T/0iyphAhfMRJ5R8AbEHMj7uF+TWTX/JoyQagllMqWTwoP4DFRutPdOmmjwvSV
|
|
||||||
kWItH7hq6z9+M4dhlqeoOvPbL5oCxX7TVmLck02Q5gI4syULOa7sqntzUQKFkhWp
|
|
||||||
9U0+5KrBQBKezrurrrkq/WZR3WNE1KQfNQ77f7S2JcXJdOaKgJ7xe7Y2flPq98Aq
|
|
||||||
wKXK7l1c3dc=
|
|
||||||
=W6yF
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@@ -9,8 +9,8 @@ apt_mirror: "[trusted=yes] https://{{ zuul_site_mirror_fqdn | default('archive.u
|
|||||||
|
|
||||||
base_image:
|
base_image:
|
||||||
context: "."
|
context: "."
|
||||||
dockerfile: "dockerfiles/ubuntu/Dockerfile"
|
dockerfile: "Dockerfile.base"
|
||||||
container_filename: "dockerfiles/ubuntu/Dockerfile"
|
container_filename: "Dockerfile.base"
|
||||||
repository: "base"
|
repository: "base"
|
||||||
tags: &tags
|
tags: &tags
|
||||||
- "{{ image_tag }}"
|
- "{{ image_tag }}"
|
||||||
|
@@ -2,32 +2,15 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
case ${distro} in
|
apt-get purge -y --auto-remove \
|
||||||
ubuntu)
|
git \
|
||||||
apt-get purge -y --auto-remove \
|
patch \
|
||||||
git \
|
python3-virtualenv \
|
||||||
patch \
|
virtualenv
|
||||||
python3-virtualenv \
|
if [ -f /etc/apt/sources.list.bak ]; then
|
||||||
virtualenv
|
mv /etc/apt/sources.list.bak /etc/apt/sources.list
|
||||||
if [ -f /etc/apt/sources.list.bak ]; then
|
fi
|
||||||
mv /etc/apt/sources.list.bak /etc/apt/sources.list
|
rm -rf /var/lib/apt/lists/*
|
||||||
fi
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
;;
|
|
||||||
centos)
|
|
||||||
# We should be removing 'patch' here, but that breaks
|
|
||||||
# centos as it tries to rip out systemd for some reason
|
|
||||||
yum -y autoremove \
|
|
||||||
git \
|
|
||||||
python-virtualenv \
|
|
||||||
python3-virtualenv
|
|
||||||
yum clean all
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown distro: ${distro}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Changing this option allows python to use libraries outside of the
|
# Changing this option allows python to use libraries outside of the
|
||||||
# virtualenv > 20 if they do not exist inside the venv. This is a requirement
|
# virtualenv > 20 if they do not exist inside the venv. This is a requirement
|
||||||
|
@@ -8,18 +8,7 @@ PACKAGES_INFO="${INFO_DIR}/packages.txt"
|
|||||||
PIP_INFO="${INFO_DIR}/pip.txt"
|
PIP_INFO="${INFO_DIR}/pip.txt"
|
||||||
PROJECT_INFO="${INFO_DIR}/project.txt"
|
PROJECT_INFO="${INFO_DIR}/project.txt"
|
||||||
|
|
||||||
case ${distro} in
|
dpkg -l > $PACKAGES_INFO
|
||||||
ubuntu)
|
|
||||||
dpkg -l > $PACKAGES_INFO
|
|
||||||
;;
|
|
||||||
centos)
|
|
||||||
yum list installed > $PACKAGES_INFO
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown distro: ${distro}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
pip freeze > $PIP_INFO
|
pip freeze > $PIP_INFO
|
||||||
cat > ${PROJECT_INFO} <<EOF
|
cat > ${PROJECT_INFO} <<EOF
|
||||||
|
@@ -4,7 +4,7 @@ set -ex
|
|||||||
|
|
||||||
: ${COPY_DEFAULT_CONFIG_FILES:="no"}
|
: ${COPY_DEFAULT_CONFIG_FILES:="no"}
|
||||||
|
|
||||||
if [[ $COPY_DEFAULT_CONFIG_FILES == "yes" ]] && [[ ! ${PROJECT} =~ ^(infra|requirements)$ ]]; then
|
if [[ $COPY_DEFAULT_CONFIG_FILES == "yes" ]] && [[ ! ${PROJECT} =~ ^requirements$ ]]; then
|
||||||
mkdir -p "/etc/${PROJECT}/"
|
mkdir -p "/etc/${PROJECT}/"
|
||||||
cp -r "/var/lib/openstack/etc/${PROJECT}"/* "/etc/${PROJECT}/" || true
|
cp -r "/var/lib/openstack/etc/${PROJECT}"/* "/etc/${PROJECT}/" || true
|
||||||
fi
|
fi
|
||||||
|
@@ -2,66 +2,33 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
distro=$(awk -F= '/^ID=/ {gsub(/\"/, "", $2); print $2}' /etc/*release)
|
source /etc/lsb-release
|
||||||
export distro=${DISTRO:=$distro}
|
|
||||||
|
|
||||||
if [[ ${distro} == "ubuntu" ]]; then
|
export LC_CTYPE=C.UTF-8
|
||||||
distro_version=$(awk -F= '/^UBUNTU_CODENAME=/ {gsub(/\"/, "", $2); print $2}' /etc/*release)
|
# This overrides the base image configuration
|
||||||
fi
|
echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated
|
||||||
export distro_version=${DISTRO_VERSION:=$distro_version}
|
mv /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||||
|
cat > /etc/apt/sources.list <<EOF
|
||||||
dpkg_python_packages=("python3" "python3-venv")
|
deb ${APT_MIRROR} ${DISTRIB_CODENAME} main universe
|
||||||
rpm_python_packages=("python3")
|
deb ${APT_MIRROR} ${DISTRIB_CODENAME}-updates main universe
|
||||||
|
deb ${APT_MIRROR} ${DISTRIB_CODENAME}-security main universe
|
||||||
case ${distro} in
|
deb ${APT_MIRROR} ${DISTRIB_CODENAME}-backports main universe
|
||||||
ubuntu)
|
|
||||||
export LC_CTYPE=C.UTF-8
|
|
||||||
# This overrides the base image configuration
|
|
||||||
echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated
|
|
||||||
mv /etc/apt/sources.list /etc/apt/sources.list.bak
|
|
||||||
cat > /etc/apt/sources.list <<EOF
|
|
||||||
deb ${APT_MIRROR} ${distro_version} main universe
|
|
||||||
deb ${APT_MIRROR} ${distro_version}-updates main universe
|
|
||||||
deb ${APT_MIRROR} ${distro_version}-security main universe
|
|
||||||
deb ${APT_MIRROR} ${distro_version}-backports main universe
|
|
||||||
EOF
|
EOF
|
||||||
apt-get update
|
apt-get update
|
||||||
if [[ ! -z "$(apt-cache search ^python3-distutils$)" ]]; then
|
apt-get upgrade -y
|
||||||
dpkg_python_packages+=("python3-distutils")
|
apt-get install -y --no-install-recommends \
|
||||||
fi
|
git \
|
||||||
apt-get upgrade -y
|
netbase \
|
||||||
apt-get install -y --no-install-recommends \
|
patch \
|
||||||
git \
|
sudo \
|
||||||
ca-certificates \
|
bind9-host \
|
||||||
netbase \
|
python3 \
|
||||||
lsb-release \
|
python3-venv
|
||||||
patch \
|
if [[ ! -z "$(apt-cache search ^python3-distutils$)" ]]; then
|
||||||
sudo \
|
apt-get install -y --no-install-recommends python3-distutils
|
||||||
wget \
|
fi
|
||||||
bind9-host \
|
apt-get install -y --no-install-recommends \
|
||||||
${dpkg_python_packages[@]}
|
libpython3.$(python3 -c 'import sys; print(sys.version_info.minor);')
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
libpython3.$(python3 -c 'import sys; print(sys.version_info.minor);')
|
|
||||||
;;
|
|
||||||
centos)
|
|
||||||
export LC_CTYPE=en_US.UTF-8
|
|
||||||
yum upgrade -y
|
|
||||||
yum install -y --setopt=skip_missing_names_on_install=False \
|
|
||||||
git \
|
|
||||||
patch \
|
|
||||||
redhat-lsb-core \
|
|
||||||
sudo \
|
|
||||||
bind-utils \
|
|
||||||
${rpm_python_packages[@]}
|
|
||||||
if [[ "${PYTHON3}" != "no" ]]; then
|
|
||||||
pip3 install virtualenv
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown distro: ${distro}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "${PROJECT}" == "requirements" ]]; then
|
if [[ "${PROJECT}" == "requirements" ]]; then
|
||||||
$(dirname $0)/requirements.sh
|
$(dirname $0)/requirements.sh
|
||||||
|
@@ -2,21 +2,12 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
source /etc/lsb-release
|
||||||
|
|
||||||
for file in /opt/loci/bindep*; do
|
for file in /opt/loci/bindep*; do
|
||||||
PACKAGES+=($(bindep -f $file -b -l newline ${PROJECT} ${PROFILES} ${distro_version} || :))
|
PACKAGES+=($(bindep -f $file -b -l newline ${PROJECT} ${PROFILES} ${DISTRIB_CODENAME} || :))
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ! -z ${PACKAGES} ]]; then
|
if [[ ! -z ${PACKAGES} ]]; then
|
||||||
case ${distro} in
|
apt-get install -y --no-install-recommends ${PACKAGES[@]} ${DIST_PACKAGES}
|
||||||
ubuntu)
|
|
||||||
apt-get install -y --no-install-recommends ${PACKAGES[@]} ${DIST_PACKAGES}
|
|
||||||
;;
|
|
||||||
centos)
|
|
||||||
yum -y --setopt=skip_missing_names_on_install=False install ${PACKAGES[@]} ${DIST_PACKAGES}
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown distro: ${distro}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
@@ -2,25 +2,23 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [[ ${distro} -eq "ubuntu" ]]; then
|
# NOTE: This doesn't belong here. This should be a user shim or a
|
||||||
# NOTE: This doesn't belong here. This should be a user shim or a
|
# custom base image configuration change to the apt sources
|
||||||
# custom base image configuration change to the apt sources
|
# "libapache2-mod-oauth2" package is available in Ubuntu 22.10
|
||||||
# "libapache2-mod-oauth2" package is available in Ubuntu 22.10
|
# NOTE(mnaser): mod_oauth2 is not available inside packaging repos, so we manually
|
||||||
# NOTE(mnaser): mod_oauth2 is not available inside packaging repos, so we manually
|
# install it here.
|
||||||
# install it here.
|
if [[ "${PROFILES[*]}" =~ "mod_oauth2" ]] && [[ ${PROJECT} == 'keystone' ]] && [[ $(uname -p) == "x86_64" ]]; then
|
||||||
if [[ "${PROFILES[*]}" =~ "mod_oauth2" ]] && [[ ${PROJECT} == 'keystone' ]] && [[ $(uname -p) == "x86_64" ]]; then
|
source /etc/lsb-release
|
||||||
source /etc/lsb-release
|
apt-get install -y --no-install-recommends wget apache2
|
||||||
apt-get install -y --no-install-recommends wget apache2
|
wget --no-check-certificate \
|
||||||
wget --no-check-certificate \
|
https://github.com/zmartzone/mod_oauth2/releases/download/v3.2.2/libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
|
||||||
https://github.com/zmartzone/mod_oauth2/releases/download/v3.2.2/libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
|
https://github.com/zmartzone/liboauth2/releases/download/v1.4.3/liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
|
||||||
https://github.com/zmartzone/liboauth2/releases/download/v1.4.3/liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
|
apt-get -y --no-install-recommends install \
|
||||||
apt-get -y --no-install-recommends install \
|
./libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
|
||||||
./libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
|
./liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
|
||||||
./liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
|
a2enmod oauth2
|
||||||
a2enmod oauth2
|
rm -rfv \
|
||||||
rm -rfv \
|
./libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
|
||||||
./libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
|
./liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
|
||||||
./liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
|
apt-get purge -y wget
|
||||||
apt-get purge -y wget
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user