Use new bindep syntax
With new bindep syntax we can AND together specific profiles. The most blatant need for this is with 'python-rbd'. We should only install python-rbd when both 'ceph' and 'glance' profiles are specified. The change is merged upstream, but a new version of bindep is not tagged yet, so we install from upstream temporarily. Using hte upstream package will not effect the output of the image. With this change we can use the same profiles across all projects when building, so the user only needs to set one list of profiles rather than profiles per project which could help pipelines keep images consistent. export PROFILES="ceph openvswitch nginx" docker build --build-arg PROFILES="${PROFILES}" --build-arg PROJECT=keystone . docker build --build-arg PROFILES="${PROFILES}" --build-arg PROJECT=glance . docker build --build-arg PROFILES="${PROFILES}" --build-arg PROJECT=nova . docker build --build-arg PROFILES="${PROFILES}" --build-arg PROJECT=neutron . Change-Id: I50a73bfab9c80c8650f5f59c4e16fdfd32fc9c47
This commit is contained in:
parent
ec71665e08
commit
bdb298f435
128
bindep.txt
128
bindep.txt
|
@ -1,55 +1,73 @@
|
|||
# Apache
|
||||
apache2 [platform:dpkg apache]
|
||||
libapache2-mod-wsgi [platform:dpkg apache]
|
||||
|
||||
httpd [platform:rpm apache]
|
||||
mod_ssl [platform:rpm apache]
|
||||
mod_wsgi [platform:rpm apache]
|
||||
|
||||
# Ceph
|
||||
ceph-common [ceph]
|
||||
# TODO(SamYaple): extend bindep to allow 'profile AND profile' rather than the
|
||||
# current 'profile OR profile' so we can set this to 'ceph AND glance' so this
|
||||
# would only get installed in glance container
|
||||
python-rbd [ceph]
|
||||
|
||||
# LVM
|
||||
lvm2 [lvm]
|
||||
|
||||
tgt [platform:dpkg lvm]
|
||||
thin-provisioning-tools [platform:dpkg lvm]
|
||||
|
||||
targetcli [platform:rpm lvm]
|
||||
|
||||
# QEMU
|
||||
qemu-utils [platform:dpkg qemu]
|
||||
qemu-img [platform:rpm qemu]
|
||||
|
||||
# Nova
|
||||
iproute2 [platform:dpkg nova]
|
||||
libpython2.7 [platform:dpkg nova]
|
||||
libvirt0 [platform:dpkg nova]
|
||||
openvswitch-switch [platform:dpkg nova]
|
||||
|
||||
libvirt-libs [platform:rpm nova]
|
||||
openvswitch [platform:rpm nova]
|
||||
|
||||
# Neutron
|
||||
bridge-utils [neutron]
|
||||
dnsmasq [neutron]
|
||||
dnsmasq-utils [neutron]
|
||||
ebtables [neutron]
|
||||
ipset [neutron]
|
||||
iptables [neutron]
|
||||
keepalived [neutron]
|
||||
|
||||
conntrack [platform:dpkg neutron]
|
||||
iproute2 [platform:dpkg neutron]
|
||||
iputils-arping [platform:dpkg neutron]
|
||||
libpython2.7 [platform:dpkg neutron]
|
||||
openvswitch-switch [platform:dpkg neutron]
|
||||
uuid-runtime [platform:dpkg neutron]
|
||||
|
||||
conntrack-tools [platform:rpm neutron]
|
||||
openvswitch [platform:rpm neutron]
|
||||
uuid [platform:rpm neutron]
|
||||
apache2 [platform:dpkg apache]
|
||||
bridge-utils [(neutron linuxbridge)]
|
||||
build-essential [platform:dpkg requirements]
|
||||
bzip2 [platform:rpm requirements]
|
||||
ceph-common [(ceph cinder) (ceph glance) (ceph nova)]
|
||||
conntrack [platform:dpkg neutron]
|
||||
conntrack-tools [platform:rpm neutron]
|
||||
cyrus-sasl-devel [platform:rpm requirements]
|
||||
dnsmasq [neutron]
|
||||
dnsmasq-utils [neutron]
|
||||
ebtables [neutron]
|
||||
gcc-c++ [platform:rpm requirements]
|
||||
gcc [platform:rpm requirements]
|
||||
git [requirements]
|
||||
httpd [platform:rpm apache]
|
||||
iproute2 [platform:dpkg neutron nova]
|
||||
ipset [neutron]
|
||||
iptables [neutron]
|
||||
iputils-arping [platform:dpkg neutron]
|
||||
keepalived [neutron]
|
||||
libapache2-mod-wsgi [platform:dpkg apache]
|
||||
liberasurecode-devel [platform:rpm requirements]
|
||||
liberasurecode-dev [platform:dpkg requirements]
|
||||
libffi-devel [platform:rpm requirements]
|
||||
libffi-dev [platform:dpkg requirements]
|
||||
libgcrypt [platform:rpm requirements]
|
||||
libkrb5-dev [platform:dpkg requirements]
|
||||
libldap2-dev [platform:dpkg requirements]
|
||||
libmariadbclient-dev [platform:debian requirements]
|
||||
libmysqlclient-dev [platform:ubuntu requirements]
|
||||
libnss3-dev [platform:dpkg requirements]
|
||||
libpq-dev [platform:dpkg requirements]
|
||||
libpython2.7 [platform:dpkg neutron nova]
|
||||
libsasl2-dev [platform:dpkg requirements]
|
||||
libssl-dev [platform:dpkg requirements]
|
||||
libsystemd-dev [platform:dpkg requirements]
|
||||
libvirt0 [platform:dpkg nova]
|
||||
libvirt-devel [platform:rpm requirements]
|
||||
libvirt-dev [platform:dpkg requirements]
|
||||
libxml2-devel [platform:rpm requirements]
|
||||
libxml2-dev [platform:dpkg requirements]
|
||||
libxslt1-dev [platform:dpkg requirements]
|
||||
libxslt-devel [platform:rpm requirements]
|
||||
libyaml-devel [platform:rpm requirements]
|
||||
libyaml-dev [platform:dpkg requirements]
|
||||
libz-dev [platform:dpkg requirements]
|
||||
lvm2 [(cinder lvm)]
|
||||
make [platform:rpm requirements]
|
||||
mariadb-devel [platform:rpm requirements]
|
||||
mod_ssl [platform:rpm apache]
|
||||
mod_wsgi [platform:rpm apache]
|
||||
nginx [nginx]
|
||||
nss-devel [platform:rpm requirements]
|
||||
nss-util [platform:rpm requirements]
|
||||
openldap-devel [platform:rpm requirements]
|
||||
openssl-devel [platform:rpm requirements]
|
||||
openvswitch [platform:rpm (neutron openvswitch) (nova openvswitch)]
|
||||
openvswitch-switch [platform:dpkg (neutron openvswitch) (nova openvswitch)]
|
||||
pkg-config [platform:dpkg requirements]
|
||||
pkgconfig [platform:rpm requirements]
|
||||
postgresql-devel [platform:rpm requirements]
|
||||
python-devel [platform:rpm requirements]
|
||||
python-dev [platform:dpkg requirements]
|
||||
python-rbd [(ceph glance)]
|
||||
qemu-img [platform:rpm (qemu nova)]
|
||||
qemu-utils [platform:dpkg (qemu nova)]
|
||||
systemd-devel [platform:rpm requirements]
|
||||
targetcli [platform:rpm (cinder lvm)]
|
||||
tgt [platform:dpkg (cinder lvm)]
|
||||
thin-provisioning-tools [platform:dpkg (cinder lvm)]
|
||||
uuid [platform:rpm neutron]
|
||||
uuid-runtime [platform:dpkg neutron]
|
||||
zlib-devel [platform:rpm requirements]
|
||||
|
|
|
@ -2,101 +2,9 @@
|
|||
|
||||
set -eux
|
||||
|
||||
# TODO(SamYaple): Switch all of this to bindep once syntax is supported better
|
||||
# NOTE(SamYaple): Ubuntu and Debian have slightly different package lists
|
||||
case ${distro} in
|
||||
debian)
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
git \
|
||||
liberasurecode-dev \
|
||||
libffi-dev \
|
||||
libkrb5-dev \
|
||||
libldap2-dev \
|
||||
libmariadbclient-dev \
|
||||
libnss3-dev \
|
||||
libpq-dev \
|
||||
libsasl2-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
libvirt-dev \
|
||||
libyaml-dev \
|
||||
libz-dev \
|
||||
pkg-config \
|
||||
python-dev \
|
||||
python-pip \
|
||||
python-virtualenv
|
||||
;;
|
||||
ubuntu)
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
git \
|
||||
liberasurecode-dev \
|
||||
libffi-dev \
|
||||
libkrb5-dev \
|
||||
libldap2-dev \
|
||||
libmysqlclient-dev \
|
||||
libnss3-dev \
|
||||
libpq-dev \
|
||||
libsasl2-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
libvirt-dev \
|
||||
libyaml-dev \
|
||||
libz-dev \
|
||||
pkg-config \
|
||||
python-dev \
|
||||
python-pip
|
||||
;;
|
||||
centos)
|
||||
yum upgrade -y
|
||||
# NOTE(SamYaple): https://bugs.centos.org/view.php?id=10750
|
||||
yum install -y --setopt=tsflags=docs --setopt=skip_missing_names_on_install=False libffi-devel
|
||||
yum install -y --setopt=skip_missing_names_on_install=False \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
make \
|
||||
openssl-devel \
|
||||
ca-certificates \
|
||||
git \
|
||||
bzip2 \
|
||||
liberasurecode-devel \
|
||||
openldap-devel \
|
||||
mariadb-devel \
|
||||
nss-devel \
|
||||
postgresql-devel \
|
||||
cyrus-sasl-devel \
|
||||
openssl-devel \
|
||||
libxml2-devel \
|
||||
libxslt-devel \
|
||||
libvirt-devel \
|
||||
libyaml-devel \
|
||||
zlib-devel \
|
||||
pkgconfig \
|
||||
python \
|
||||
python-devel \
|
||||
python-pip \
|
||||
libgcrypt \
|
||||
nss-util \
|
||||
systemd-devel
|
||||
;;
|
||||
*)
|
||||
echo "Unknown distro: ${distro}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
$(dirname $0)/setup_pip.sh
|
||||
pip install git+https://github.com/openstack-infra/bindep
|
||||
$(dirname $0)/install_packages.sh
|
||||
$(dirname $0)/clone_project.sh
|
||||
mv /tmp/requirements/{global-requirements.txt,upper-constraints.txt} /
|
||||
|
||||
|
@ -107,7 +15,7 @@ split -l1 /upper-constraints.txt
|
|||
ls -1 | xargs -n1 -P20 -t pip wheel --no-deps --wheel-dir / -c /upper-constraints.txt -r
|
||||
popd
|
||||
# NOTE(SamYaple): Handle packages not in global-requirements
|
||||
additional_packages=(argparse bindep==2.5.0 pip setuptools uwsgi wheel virtualenv)
|
||||
additional_packages=(argparse git+https://github.com/openstack-infra/bindep pip setuptools uwsgi wheel virtualenv)
|
||||
echo "${additional_packages[@]}" | xargs -n1 -P20 pip wheel --wheel-dir / -c /upper-constraints.txt
|
||||
|
||||
# NOTE(SamYaple): We want to purge all files that are not wheels or txt to
|
||||
|
|
Loading…
Reference in New Issue