From 918cd10bb06964d067a2afdcd6d13c3aa4b2ae7f Mon Sep 17 00:00:00 2001 From: Artur Zarzycki Date: Mon, 28 Dec 2015 11:47:27 +0100 Subject: [PATCH] Base and openstack-base ubuntu binary containers. Change-Id: I93d7f4227f6b4ac04e1af5afd5e46bdbaba84b4f Partially-Implements: blueprint binary-ubuntu --- docker/base/Dockerfile.j2 | 2 +- docker/openstack-base/Dockerfile.j2 | 35 ++++++++++++++++++- .../openstack-base/oslo-log-bug1499620.patch | 18 ++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 docker/openstack-base/oslo-log-bug1499620.patch diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 20669a86df..6cf31a7968 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -12,7 +12,7 @@ RUN echo 'ERROR: {{ install_type }} is unavailable for {{ base_distro }}' \ {% endif %} {% elif base_distro in ['ubuntu', 'debian'] %} - {% if install_type not in ['source'] %} + {% if install_type not in ['source','binary'] %} RUN echo 'ERROR: {{ install_type }} is unavailable for {{ base_distro }}' \ && /bin/false diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 7d87a4bd2f..35880a36b3 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -10,8 +10,8 @@ RUN yum -y install \ MariaDB-shared \ openssl \ && yum clean all -{% endif %} +{% endif %} {% if install_type == 'binary' %} {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} @@ -37,6 +37,39 @@ RUN yum -y install \ python-keystoneauth1 \ && yum clean all + {% elif base_distro in ['ubuntu'] %} + +# This will prevent questions from being asked during the install +ENV DEBIAN_FRONTEND noninteractive +COPY oslo-log-bug1499620.patch /var/lib/kolla/oslo-log-bug1499620.patch +# There is no python-tuskarclient in ubuntu 14.04 +RUN apt-get install -y --no-install-recommends \ + python-barbicanclient \ + python-ceilometerclient \ + python-congressclient \ + python-designateclient \ + python-heatclient \ + python-ironicclient \ + python-magnumclient \ + python-manilaclient \ + python-mistralclient \ + python-muranoclient \ + python-pip \ + python-saharaclient \ + python-swiftclient \ + python-troveclient \ + python-zaqarclient \ + python-openstackclient \ + python-pymysql \ + python-keystoneclient \ + python-oslo.log \ + openssl \ + patch \ + && apt-get clean + +# python-oslo-log patch to bug 1499620 (it fixed in python-oslo-log 1.11.1) +RUN patch -d /usr/lib/python2.7/site-packages -p1 < /var/lib/kolla/oslo-log-bug1499620.patch + {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} diff --git a/docker/openstack-base/oslo-log-bug1499620.patch b/docker/openstack-base/oslo-log-bug1499620.patch new file mode 100644 index 0000000000..7a6867dfbe --- /dev/null +++ b/docker/openstack-base/oslo-log-bug1499620.patch @@ -0,0 +1,18 @@ +diff --git a/oslo_log/log.py b/oslo_log/log.py +index 8d8c240..1b19072 100644 +--- a/oslo_log/log.py ++++ b/oslo_log/log.py +@@ -285,10 +285,10 @@ def _setup_logging_from_conf(conf, project, version): + facility = _find_facility(conf.syslog_log_facility) + # TODO(bogdando) use the format provided by RFCSysLogHandler after + # existing syslog format deprecation in J +- syslog = handlers.OSSysLogHandler( ++ syslog_handler = handlers.OSSysLogHandler( + facility=facility, + use_syslog_rfc_format=conf.use_syslog_rfc_format) +- log_root.addHandler(syslog) ++ log_root.addHandler(syslog_handler) + + datefmt = conf.log_date_format + for handler in log_root.handlers: +