Customizations for OpenStack Base

This patchset contains customization of Dockerfile of the
OpenStack Base container.

Change-Id: I20ce24a296ace45169131463c992f6f0e9b4d131
Partially-implements: blueprint third-party-plugin-support
This commit is contained in:
Shaun Smekel 2016-08-12 07:44:48 +10:00
parent e4259f805b
commit 9b265dd112

View File

@ -1,12 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \ {% set openstack_base_packages = [
git \ 'git',
iproute \ 'iproute',
openssl \ 'openssl'
&& yum clean all ] %}
RUN {{ macros.install_packages(openstack_base_packages) }}
{% endif %} {% endif %}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
@ -14,209 +18,207 @@ RUN yum -y install \
# TODO(Allen) Remove python-dogpile-cache after the requirement of # TODO(Allen) Remove python-dogpile-cache after the requirement of
# python-ironicclient is fixed. # python-ironicclient is fixed.
RUN yum -y install \ {% set openstack_base_packages = [
avahi-libs \ 'avahi-libs',
cups-libs \ 'cups-libs',
fontconfig \ 'fontconfig',
fontpackages-filesystem \ 'fontpackages-filesystem',
freetype \ 'freetype',
initscripts \ 'initscripts',
libjpeg-turbo \ 'libjpeg-turbo',
libpng \ 'libpng',
libtomcrypt \ 'libtomcrypt',
libtommath \ 'libtommath',
libX11 \ 'libX11',
libX11-common \ 'libX11-common',
libXau \ 'libXau',
libxcb \ 'libxcb',
libXext \ 'libXext',
libXi \ 'libXi',
libxslt \ 'libxslt',
libyaml \ 'libyaml',
MySQL-python \ 'MySQL-python',
Percona-Server-shared-56 \ 'Percona-Server-shared-56',
pyOpenSSL \ 'pyOpenSSL',
pyparsing \ 'pyparsing',
python2-cffi \ 'python2-cffi',
python2-crypto \ 'python2-crypto',
python2-cryptography \ 'python2-cryptography',
python2-debtcollector \ 'python2-debtcollector',
python2-eventlet \ 'python2-eventlet',
python2-fasteners \ 'python2-fasteners',
python2-funcsigs \ 'python2-funcsigs',
python2-futurist \ 'python2-futurist',
python2-greenlet \ 'python2-greenlet',
python2-iso8601 \ 'python2-iso8601',
python2-msgpack \ 'python2-msgpack',
python2-oslo-concurrency \ 'python2-oslo-concurrency',
python2-oslo-config \ 'python2-oslo-config',
python2-oslo-context \ 'python2-oslo-context',
python2-oslo-db \ 'python2-oslo-db',
python2-oslo-i18n \ 'python2-oslo-i18n',
python2-oslo-log \ 'python2-oslo-log',
python2-oslo-messaging \ 'python2-oslo-messaging',
python2-oslo-middleware \ 'python2-oslo-middleware',
python2-oslo-policy \ 'python2-oslo-policy',
python2-oslo-serialization \ 'python2-oslo-serialization',
python2-oslo-service \ 'python2-oslo-service',
python2-oslo-utils \ 'python2-oslo-utils',
python2-pika \ 'python2-pika',
python2-pika_pool \ 'python2-pika_pool',
python2-positional \ 'python2-positional',
python2-pyasn1 \ 'python2-pyasn1',
python2-PyMySQL \ 'python2-PyMySQL',
python-alembic \ 'python-alembic',
python-amqp \ 'python-amqp',
python-anyjson \ 'python-anyjson',
python-barbicanclient \ 'python-barbicanclient',
python-beaker \ 'python-beaker',
python-cachetools \ 'python-cachetools',
python-ceilometerclient \ 'python-ceilometerclient',
python-cliff \ 'python-cliff',
python-cmd2 \ 'python-cmd2',
python-congressclient \ 'python-congressclient',
python-contextlib2 \ 'python-contextlib2',
python-dateutil \ 'python-dateutil',
python-decorator \ 'python-decorator',
python-designateclient \ 'python-designateclient',
python-dogpile-cache \ 'python-dogpile-cache',
python-editor \ 'python-editor',
python-enum34 \ 'python-enum34',
python-extras \ 'python-extras',
python-fixtures \ 'python-fixtures',
python-futures \ 'python-futures',
python-glanceclient \ 'python-glanceclient',
python-heatclient \ 'python-heatclient',
python-httplib2 \ 'python-httplib2',
python-idna \ 'python-idna',
python-inotify \ 'python-inotify',
python-ipaddress \ 'python-ipaddress',
python-ironicclient \ 'python-ironicclient',
python-jsonpatch \ 'python-jsonpatch',
python-jsonpointer \ 'python-jsonpointer',
python-jsonschema \ 'python-jsonschema',
python-keyring \ 'python-keyring',
python-keystoneauth1 \ 'python-keystoneauth1',
python-keystoneclient \ 'python-keystoneclient',
python-keystonemiddleware \ 'python-keystonemiddleware',
python-kombu \ 'python-kombu',
python-linecache2 \ 'python-linecache2',
python-lxml \ 'python-lxml',
python-magnumclient \ 'python-magnumclient',
python-mako \ 'python-mako',
python-manilaclient \ 'python-manilaclient',
python-memcached \ 'python-memcached',
python-migrate \ 'python-migrate',
python-mimeparse \ 'python-mimeparse',
python-mistralclient \ 'python-mistralclient',
python-monotonic \ 'python-monotonic',
python-muranoclient \ 'python-muranoclient',
python-netaddr \ 'python-netaddr',
python-netifaces \ 'python-netifaces',
python-neutronclient \ 'python-neutronclient',
python-novaclient \ 'python-novaclient',
python-openstackclient \ 'python-openstackclient',
python-paste \ 'python-paste',
python-paste-deploy \ 'python-paste-deploy',
python-pbr \ 'python-pbr',
python-pip \ 'python-pip',
python-ply \ 'python-ply',
python-posix_ipc \ 'python-posix_ipc',
python-prettytable \ 'python-prettytable',
python-pycparser \ 'python-pycparser',
python-PyMySQL \ 'python-PyMySQL',
python-repoze-lru \ 'python-repoze-lru',
python-requests \ 'python-requests',
python-retrying \ 'python-retrying',
python-routes \ 'python-routes',
python-saharaclient \ 'python-saharaclient',
python-simplejson \ 'python-simplejson',
python-sqlalchemy \ 'python-sqlalchemy',
python-sqlparse \ 'python-sqlparse',
python-stevedore \ 'python-stevedore',
python-swiftclient \ 'python-swiftclient',
python-tempita \ 'python-tempita',
python-testtools \ 'python-testtools',
python-traceback2 \ 'python-traceback2',
python-troveclient \ 'python-troveclient',
python-unicodecsv \ 'python-unicodecsv',
python-unittest2 \ 'python-unittest2',
python-urllib3 \ 'python-urllib3',
python-warlock \ 'python-warlock',
python-webob \ 'python-webob',
python-wrapt \ 'python-wrapt',
python-zaqarclient \ 'python-zaqarclient',
PyYAML \ 'PyYAML',
systemd-sysv \ 'systemd-sysv',
sysvinit-tools \ 'sysvinit-tools',
tcp_wrappers-libs \ 'tcp_wrappers-libs'
&& yum clean all ] %}
{% elif base_distro in ['ubuntu'] %} {% elif base_distro in ['ubuntu'] %}
# This will prevent questions from being asked during the install # This will prevent questions from being asked during the install
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y install --no-install-recommends \ {% set openstack_base_packages = [
python-barbicanclient \ 'python-barbicanclient',
python-ceilometerclient \ 'python-ceilometerclient',
python-congressclient \ 'python-congressclient',
python-designateclient \ 'python-designateclient',
python-heatclient \ 'python-heatclient',
python-ironicclient \ 'python-ironicclient',
python-magnumclient \ 'python-magnumclient',
python-manilaclient \ 'python-manilaclient',
python-memcache \ 'python-memcache',
python-mistralclient \ 'python-mistralclient',
python-muranoclient \ 'python-muranoclient',
python-pip \ 'python-pip',
python-saharaclient \ 'python-saharaclient',
python-swiftclient \ 'python-swiftclient',
python-troveclient \ 'python-troveclient',
python-zaqarclient \ 'python-zaqarclient',
python-openstackclient \ 'python-openstackclient',
python-pymysql \ 'python-pymysql',
python-keystoneclient \ 'python-keystoneclient',
python-oslo.log \ 'python-oslo.log',
openssl \ 'openssl',
patch \ 'patch'
&& apt-get clean ] %}
{% endif %} {% endif %}
RUN {{ macros.install_packages(openstack_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %} {% elif install_type == 'source' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
{% set openstack_base_packages = [
RUN yum -y install \ 'gcc',
gcc \ 'gcc-c++',
gcc-c++ \ 'libffi-devel',
libffi-devel \ 'libxml2-devel',
libxml2-devel \ 'libxslt-devel',
libxslt-devel \ 'MariaDB-devel',
MariaDB-devel \ 'openldap-devel',
openldap-devel \ 'openssl-devel',
openssl-devel \ 'postgresql',
postgresql \ 'postgresql-devel',
postgresql-devel \ 'python-devel',
python-devel \ 'sqlite-devel'
sqlite-devel \ ] %}
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %} {% elif base_distro in ['ubuntu', 'debian'] %}
{% set openstack_base_packages = [
RUN apt-get -y install --no-install-recommends \ 'ca-certificates',
ca-certificates \ 'build-essential',
build-essential \ 'python-dev',
python-dev \ 'libssl-dev',
libssl-dev \ 'libmariadbclient-dev',
libmariadbclient-dev \ 'libxslt1-dev',
libxslt1-dev \ 'libffi-dev',
libffi-dev \ 'libyaml-dev',
libyaml-dev \ 'pkg-config',
pkg-config \ 'git'
git \ ] %}
&& apt-get clean
{% endif %} {% endif %}
RUN {{ macros.install_packages(openstack_base_packages | customizable("packages")) }}
ADD openstack-base-archive /openstack-base-source ADD openstack-base-archive /openstack-base-source
RUN ln -s openstack-base-source/* /requirements \ RUN ln -s openstack-base-source/* /requirements \
&& mkdir -p /var/lib/kolla \ && mkdir -p /var/lib/kolla \
@ -330,3 +332,6 @@ RUN ln -s openstack-base-source/* /requirements \
ENV PATH /var/lib/kolla/venv/bin:$PATH ENV PATH /var/lib/kolla/venv/bin:$PATH
{% endif %} {% endif %}
{% block openstack_base_footer %}{% endblock %}
{% block footer %}{% endblock %}