Add Apache2 to Heat containers (#5)

* Add Apache2 to Heat containers

* Restore --no-cache-dir to pip command

* Fix Whitespace
This commit is contained in:
Pete Birley 2017-01-16 17:28:16 +00:00 committed by Sam Yaple
parent 24f397ab09
commit d27d31cc43
3 changed files with 36 additions and 10 deletions

View File

@ -11,7 +11,10 @@ ARG GIT_REF_REPO=https://git.openstack.org/openstack/${PROJECT}
RUN set -x \
&& yum install --setopt=tsflags=nodocs -y \
# Project specific packages start
python \
python \
httpd \
mod_ssl \
mod_wsgi \
# Project specific packages end
&& yum install --setopt=tsflags=nodocs -y git \
# common install start
@ -41,10 +44,21 @@ RUN set -x \
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
# common install end
# Project specific command block start
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt \
python-memcached \
pymysql \
&& cp -rfv /tmp/${PROJECT}/etc/heat/* /etc/${PROJECT}/ \
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
&& chown root:root /etc/${PROJECT}/policy.json \
&& sed -i 's/^Listen 80/#Listen 80/' /etc/httpd/conf/httpd.conf \
&& rm /etc/httpd/conf.d/* \
# Provide compatibility with ubuntu/debian apache:
&& ln -s /usr/sbin/httpd /usr/sbin/apache2 \
&& mkdir -p /etc/apache2/conf-enabled \
&& echo "IncludeOptional /etc/apache2/conf-enabled/*.conf" >> /etc/httpd/conf/httpd.conf \
&& mkdir -p /etc/apache2/mods-available \
&& echo "Include /etc/apache2/mods-available/*.conf" >> /etc/httpd/conf/httpd.conf \
&& touch /etc/apache2/envvars \
# Project specific command block end
&& yum history -y undo $(yum history list git | tail -2 | head -1 | awk '{ print $1}') \
&& yum clean all \

View File

@ -9,10 +9,12 @@ ARG GIT_REF
ARG GIT_REF_REPO=https://git.openstack.org/openstack/${PROJECT}
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
# Project specific packages start
python \
python \
apache2 \
libapache2-mod-wsgi \
# Project specific packages end
&& apt-get install -y --no-install-recommends ca-certificates curl git \
# common install start
@ -42,10 +44,14 @@ RUN set -x \
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
# common install end
# Project specific command block start
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt \
python-memcached \
pymysql \
&& cp -rfv /tmp/${PROJECT}/etc/heat/* /etc/${PROJECT}/ \
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
&& chown root:root /etc/${PROJECT}/policy.json \
&& rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/* /etc/apache2/sites-available/* \
&& touch /etc/apache2/ports.conf \
# Project specific command block end
&& apt-get purge -y --auto-remove ca-certificates curl git \
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.cache \

View File

@ -9,10 +9,12 @@ ARG GIT_REF
ARG GIT_REF_REPO=https://git.openstack.org/openstack/${PROJECT}
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
# Project specific packages start
python \
python \
apache2 \
libapache2-mod-wsgi \
# Project specific packages end
&& apt-get install -y --no-install-recommends ca-certificates curl git \
# common install start
@ -42,10 +44,14 @@ RUN set -x \
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
# common install end
# Project specific command block start
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt \
python-memcached \
pymysql \
&& cp -rfv /tmp/${PROJECT}/etc/heat/* /etc/${PROJECT}/ \
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
&& chown root:root /etc/${PROJECT}/policy.json \
&& rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/* /etc/apache2/sites-available/* \
&& touch /etc/apache2/ports.conf \
# Project specific command block end
&& apt-get purge -y --auto-remove ca-certificates curl git \
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.cache \