diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index a3dae428a731b2d507ff290fe2c2f236b227d706..362387247595f774096b89c0ba2694d6ba9729b7 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -1,6 +1,29 @@ FROM {{ base_distro }}:{{ base_distro_tag }} MAINTAINER Kolla Project (https://launchpad.net/kolla) +# Early failure for bases and types +{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} + {% if install_type not in ['source', 'binary', 'rdo', 'rhel'] %} + +RUN echo 'ERROR: {{ install_type }} is unavailable for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif base_distro in ['ubuntu', 'debian'] %} + {% if install_type not in ['source'] %} + +RUN echo 'ERROR: {{ install_type }} is unavailable for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% else %} + +RUN echo 'ERROR: The specified distro has no Kolla images to build: "{{ base_distro }}"' \ + && /bin/false + +{% endif %} + + {{ include_header }} ENV KOLLA_BASE_DISTRO {{ base_distro }} diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 index 8a469d43fc1d5f7edaed3ed88db84b5a433bf8e8..43c399a8d9acd497c1ed76de39cb8deecdb7a6e2 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -1,14 +1,7 @@ FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }} MAINTAINER Kolla Project (https://launchpad.net/kolla) -{% if install_type == 'binary' %} - {% if base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} +{% if install_type == 'source' %} ADD ceilometer-base-archive /ceilometer-base-source RUN ln -s ceilometer-base-source/* ceilometer \ diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 index d33d1c01f2efae1f145b4b6fb931cd15466e1726..1e2553f7983f35c99abaa9cec19e7661956b2762 100644 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ b/docker/cinder/cinder-base/Dockerfile.j2 @@ -14,11 +14,6 @@ RUN yum -y install openstack-cinder \ # NOTE(sdake): The sed operations make LVM tools work inside a container - see # https://groups.google.com/forum/#!topic/docker-user/n4Xtvsb4RAw - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} diff --git a/docker/designate/designate-base/Dockerfile.j2 b/docker/designate/designate-base/Dockerfile.j2 index 84e033c50a90bf17a2a53e2bc2d88663b21dc9c7..b12fa013be70320aaa0d0cb31288dc62cdf2d108 100644 --- a/docker/designate/designate-base/Dockerfile.j2 +++ b/docker/designate/designate-base/Dockerfile.j2 @@ -4,7 +4,6 @@ MAINTAINER Kolla Project (https://launchpad.net.kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - # Install designate-api because of /etc/designate/policy.json, which # is needed in all services. This is probably a packaging bug. We do # need the complete policy file because of some of the containers' @@ -18,11 +17,6 @@ RUN yum install -y \ && rpm -e openstack-designate-api \ && mv /tmp/policy.json /etc/designate/ - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% elif install_type == 'source' %} diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2 index ef5fcfb392f00c1b8079223b4bd94559626d9edd..cc628b88358874026023897b520fe633081972ea 100644 --- a/docker/glance/glance-base/Dockerfile.j2 +++ b/docker/glance/glance-base/Dockerfile.j2 @@ -4,7 +4,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - RUN yum -y install \ openstack-glance \ python-oslo-i18n \ @@ -12,11 +11,6 @@ RUN yum -y install \ python-cryptography \ && yum clean all - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['ubuntu', 'debian'] %} diff --git a/docker/heat/heat-api-cfn/Dockerfile.j2 b/docker/heat/heat-api-cfn/Dockerfile.j2 index 54457708f8d53984a5a51067fa3445406f8ee14c..7e8701eda7f23868a4b3ca7adb3b02772e9c3d2a 100644 --- a/docker/heat/heat-api-cfn/Dockerfile.j2 +++ b/docker/heat/heat-api-cfn/Dockerfile.j2 @@ -7,11 +7,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-heat-api-cfn \ && yum clean all - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% endif %} diff --git a/docker/heat/heat-api/Dockerfile.j2 b/docker/heat/heat-api/Dockerfile.j2 index 1f798e51de1fe7fd7e66a48d5ef00f5fbefc6e4e..48bbda15d9e6d677fed541b167dba464bb1f41bd 100644 --- a/docker/heat/heat-api/Dockerfile.j2 +++ b/docker/heat/heat-api/Dockerfile.j2 @@ -7,11 +7,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-heat-api \ && yum clean all - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% endif %} diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2 index 44f62e1f7318b338ef43b67c0d2b09851769e30d..0bbf3a53c6595c968994030ea0a4d0f02cf1d28b 100644 --- a/docker/heat/heat-base/Dockerfile.j2 +++ b/docker/heat/heat-base/Dockerfile.j2 @@ -4,15 +4,9 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} -RUN yum -y install \ - python-oslo-reports \ +RUN yum -y install python-oslo-reports \ && yum clean all - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% elif install_type == 'source' %} diff --git a/docker/heat/heat-engine/Dockerfile.j2 b/docker/heat/heat-engine/Dockerfile.j2 index a46fba490aa5f3261dc735030a1f0999a2612c4f..495d2b3754b3141548b09f6126419ec71eaf0ca1 100644 --- a/docker/heat/heat-engine/Dockerfile.j2 +++ b/docker/heat/heat-engine/Dockerfile.j2 @@ -4,19 +4,14 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} +# TODO(SamYaple): until packaging is fixed, all of the python clients below are required +# http://pkgs.fedoraproject.org/cgit/openstack-heat.git/tree/openstack-heat.spec#n248 RUN yum -y install \ - # until http://pkgs.fedoraproject.org/cgit/openstack-heat.git/tree/openstack-heat.spec#n248 \ - # is updated, the clients must remain here: \ - python-barbicanclient \ - python-zaqarclient \ - openstack-heat-engine \ + python-barbicanclient \ + python-zaqarclient \ + openstack-heat-engine \ && yum clean all - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% endif %} diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 index f9c341de2972d560e0cde55ce2e9c77fd57f6ee9..790bef89da5b76aaaa08473d08484c0d06c44afa 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/docker/horizon/Dockerfile.j2 @@ -21,14 +21,6 @@ RUN sed -i "s|WEBROOT = '/dashboard/'|WEBROOT = '/'|" /etc/openstack-dashboard/l && /usr/bin/python /usr/bin/manage.py collectstatic --noinput --clear \ && /usr/bin/python /usr/bin/manage.py compress --force -# djano-pyscss causes manage.py compress to fail as shipped with current -# RDO. Upgrading to latest version appears to get mange.py to work properly - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2 index a283721d6aedd445e51e7e5eb7645082770cbe9a..cf6b53b7d3130966f7815ed5789859b2d0d0d7b4 100644 --- a/docker/ironic/ironic-base/Dockerfile.j2 +++ b/docker/ironic/ironic-base/Dockerfile.j2 @@ -4,19 +4,14 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} -# until packaging is fixed, all of this is required -# api: policy +# TODO(SamYaple): until packaging is fixed, all of this is required +# http://pkgs.fedoraproject.org/cgit/openstack-ironic.git/tree/openstack-ironic.spec#n78 RUN yum -y install \ python-oslo-log \ python-oslo-concurrency \ python-oslo-policy \ && yum clean all - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% elif install_type == 'source' %} diff --git a/docker/keystone/Dockerfile.j2 b/docker/keystone/Dockerfile.j2 index 7d2aea70e0c66e6fb5dc179381b73b44cefe628a..067f16b899471ea15ebe6e4abc1549ce36464903 100644 --- a/docker/keystone/Dockerfile.j2 +++ b/docker/keystone/Dockerfile.j2 @@ -15,20 +15,6 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ && cp -a /usr/share/keystone/keystone.wsgi /var/www/cgi-bin/keystone/admin \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get install -y --no-install-recommends \ - apache2 \ - keystone \ - libapache2-mod-wsgi \ - python-keystoneclient \ - && apt-get clean - -RUN ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled \ - && mkdir -p /var/www/cgi-bin/keystone \ - && cp -a /usr/share/keystone/wsgi.py /var/www/cgi-bin/keystone/main \ - && cp -a /usr/share/keystone/wsgi.py /var/www/cgi-bin/keystone/admin - {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/docker/magnum/magnum-base/Dockerfile.j2 index aa81301b9245106705be68ecdca2d8d451912ebd..dc16cb447814c4974df6f7cf3302911695450700 100644 --- a/docker/magnum/magnum-base/Dockerfile.j2 +++ b/docker/magnum/magnum-base/Dockerfile.j2 @@ -10,10 +10,10 @@ RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7 RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/fedora-22/sdake-openstack-magnum-fedora-22.repo -o /etc/yum.repos.d/sdake-openstack-magnum-f22.repo - {% elif base_distro in ['ubuntu', 'debian', 'oraclelinux'] %} + {% elif base_distro in ['oraclelinux'] %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false + && /bin/false {% endif %} {% elif install_type == 'source' %} diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2 index 6564a876540c271245857ce9c10171092ae6b3d8..a05eb6fb8326a7f044efd308dc4f47074c27fa0c 100644 --- a/docker/murano/murano-base/Dockerfile.j2 +++ b/docker/murano/murano-base/Dockerfile.j2 @@ -1,12 +1,7 @@ FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }} MAINTAINER Kolla Project (https://launchpad.net/kolla) -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} +{% if install_type == 'source' %} ADD murano-base-archive /murano-base-source RUN ln -s murano-base-source/* murano \ diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 index e9a6ffb113d1a5a20fca4a5bf6c2d61fdc28bd76..826a0788e6a5c9094d44da5d67a19c58312980f6 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -4,20 +4,15 @@ MAINTAINER Kolla Project (https://launchpad.net.kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - -RUN yum -y install openstack-neutron \ - openstack-neutron-ml2 \ - openvswitch \ +RUN yum -y install \ + openstack-neutron \ + openstack-neutron-ml2 \ + openvswitch \ && yum clean all # TODO (sdake): remove once RDO adds to the openstack-neutron package RUN pip install oslo.versionedobjects - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['ubuntu', 'debian'] %} diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2 index 293cbaeeadb74d0947ad35ba970c529e6e0ad3dc..8032090aab4e617a8cfa72f97546e4a374aefae4 100644 --- a/docker/nova/nova-base/Dockerfile.j2 +++ b/docker/nova/nova-base/Dockerfile.j2 @@ -12,17 +12,11 @@ RUN yum -y install \ bridge-utils \ && yum clean all - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} -RUN yum -y install \ - bridge-utils \ +RUN yum -y install bridge-utils \ && yum clean all {% elif base_distro in ['ubuntu', 'debian'] %} diff --git a/docker/swift/swift-base/Dockerfile.j2 b/docker/swift/swift-base/Dockerfile.j2 index 03c41c2bd91b49e5e0ecfaf74991d7daf5d83c76..df1ed30c90a1834ea31aae88c3197ad6b40097b1 100644 --- a/docker/swift/swift-base/Dockerfile.j2 +++ b/docker/swift/swift-base/Dockerfile.j2 @@ -4,15 +4,10 @@ MAINTAINER Kolla Project (https://launchpad.net.kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} -RUN yum -y install openstack-swift && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ - && /bin/false +RUN yum -y install openstack-swift \ + && yum clean all {% endif %} - {% elif install_type == 'source' %} ADD swift-base-archive /swift-base-source diff --git a/docker/zaqar/Dockerfile.j2 b/docker/zaqar/Dockerfile.j2 index 5661744c2179ef64dea5fcaa0b08538eb19f05e1..2fe7766068d452f7b966ba85937f3b5249185412 100644 --- a/docker/zaqar/Dockerfile.j2 +++ b/docker/zaqar/Dockerfile.j2 @@ -4,13 +4,8 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - -RUN yum -y install openstack-zaqar && yum clean all - - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false +RUN yum -y install openstack-zaqar \ + && yum clean all {% endif %} {% elif install_type == 'source' %}