From ae1322ec10861678abe1137f3013030b34335bc7 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 15 Jan 2019 16:58:25 -0700 Subject: [PATCH] Use base_package_type This change updates the docker files to use base_package_type instead of doing specific distro checks for the rhel/deb generic cases. The base_distro is still available and is used when a specific distro needs a customization but if the differences are purely rpm vs deb, then the base_package_type can be used. Change-Id: I8d720bb185df65a0178061ccf20b1ab2265da2c5 --- docker/aodh/aodh-api/Dockerfile.j2 | 4 ++-- docker/aodh/aodh-base/Dockerfile.j2 | 8 ++++---- docker/aodh/aodh-evaluator/Dockerfile.j2 | 4 ++-- docker/aodh/aodh-expirer/Dockerfile.j2 | 4 ++-- docker/aodh/aodh-listener/Dockerfile.j2 | 4 ++-- docker/aodh/aodh-notifier/Dockerfile.j2 | 4 ++-- docker/barbican/barbican-api/Dockerfile.j2 | 4 ++-- docker/barbican/barbican-base/Dockerfile.j2 | 8 ++++---- .../barbican-keystone-listener/Dockerfile.j2 | 4 ++-- docker/barbican/barbican-worker/Dockerfile.j2 | 4 ++-- docker/base/Dockerfile.j2 | 10 +++++----- docker/bifrost/bifrost-base/Dockerfile.j2 | 8 ++++---- docker/ceilometer/ceilometer-base/Dockerfile.j2 | 4 ++-- docker/ceilometer/ceilometer-central/Dockerfile.j2 | 4 ++-- docker/ceilometer/ceilometer-compute/Dockerfile.j2 | 8 ++++---- docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 | 8 ++++---- .../ceilometer-notification/Dockerfile.j2 | 4 ++-- docker/ceph/ceph-base/Dockerfile.j2 | 4 ++-- docker/ceph/ceph-nfs/Dockerfile.j2 | 4 ++-- docker/certmonger/Dockerfile.j2 | 4 ++-- docker/cinder/cinder-api/Dockerfile.j2 | 8 ++++---- docker/cinder/cinder-backup/Dockerfile.j2 | 8 ++++---- docker/cinder/cinder-base/Dockerfile.j2 | 8 ++++---- docker/cinder/cinder-scheduler/Dockerfile.j2 | 2 +- docker/cinder/cinder-volume/Dockerfile.j2 | 6 +++--- docker/cloudkitty/cloudkitty-api/Dockerfile.j2 | 8 ++++---- docker/cloudkitty/cloudkitty-base/Dockerfile.j2 | 4 ++-- .../cloudkitty/cloudkitty-processor/Dockerfile.j2 | 4 ++-- docker/collectd/Dockerfile.j2 | 2 +- docker/congress/congress-base/Dockerfile.j2 | 4 ++-- docker/crane/Dockerfile.j2 | 4 ++-- docker/cron/Dockerfile.j2 | 4 ++-- docker/designate/designate-api/Dockerfile.j2 | 4 ++-- .../designate-backend-bind9/Dockerfile.j2 | 6 +++--- docker/designate/designate-base/Dockerfile.j2 | 4 ++-- docker/designate/designate-central/Dockerfile.j2 | 4 ++-- docker/designate/designate-mdns/Dockerfile.j2 | 4 ++-- .../designate/designate-pool-manager/Dockerfile.j2 | 8 ++++---- docker/designate/designate-producer/Dockerfile.j2 | 4 ++-- docker/designate/designate-sink/Dockerfile.j2 | 4 ++-- docker/designate/designate-worker/Dockerfile.j2 | 8 ++++---- docker/dind/Dockerfile.j2 | 4 ++-- docker/dragonflow/dragonflow-base/Dockerfile.j2 | 4 ++-- docker/ec2-api/Dockerfile.j2 | 4 ++-- docker/elasticsearch/Dockerfile.j2 | 4 ++-- docker/etcd/Dockerfile.j2 | 4 ++-- docker/fluentd/Dockerfile.j2 | 14 +++++++------- docker/freezer/freezer-api/Dockerfile.j2 | 4 ++-- docker/glance/glance-api/Dockerfile.j2 | 2 +- docker/glance/glance-base/Dockerfile.j2 | 4 ++-- docker/gnocchi/gnocchi-api/Dockerfile.j2 | 4 ++-- docker/gnocchi/gnocchi-base/Dockerfile.j2 | 8 ++++---- docker/gnocchi/gnocchi-metricd/Dockerfile.j2 | 4 ++-- docker/gnocchi/gnocchi-statsd/Dockerfile.j2 | 2 +- docker/grafana/Dockerfile.j2 | 2 +- docker/haproxy/Dockerfile.j2 | 2 +- docker/heat/heat-all/Dockerfile.j2 | 4 ++-- docker/heat/heat-api-cfn/Dockerfile.j2 | 4 ++-- docker/heat/heat-api/Dockerfile.j2 | 4 ++-- docker/heat/heat-base/Dockerfile.j2 | 8 ++++---- docker/heat/heat-engine/Dockerfile.j2 | 4 ++-- docker/helm-repository/Dockerfile.j2 | 4 ++-- docker/horizon/Dockerfile.j2 | 8 ++++---- docker/ironic-inspector/Dockerfile.j2 | 6 +++--- docker/ironic/ironic-api/Dockerfile.j2 | 12 ++++++------ docker/ironic/ironic-base/Dockerfile.j2 | 4 ++-- docker/ironic/ironic-conductor/Dockerfile.j2 | 8 ++++---- docker/ironic/ironic-pxe/Dockerfile.j2 | 4 ++-- docker/iscsid/Dockerfile.j2 | 4 ++-- docker/kafka/Dockerfile.j2 | 4 ++-- docker/keepalived/Dockerfile.j2 | 4 ++-- docker/keystone/keystone-base/Dockerfile.j2 | 8 ++++---- docker/keystone/keystone-fernet/Dockerfile.j2 | 4 ++-- docker/keystone/keystone-ssh/Dockerfile.j2 | 4 ++-- docker/keystone/keystone/Dockerfile.j2 | 8 ++++---- docker/kolla-toolbox/Dockerfile.j2 | 4 ++-- docker/kube/kube-controller-manager/Dockerfile.j2 | 4 ++-- docker/kuryr/kuryr-libnetwork/Dockerfile.j2 | 4 ++-- docker/logstash/Dockerfile.j2 | 8 ++++---- docker/magnum/magnum-api/Dockerfile.j2 | 4 ++-- docker/magnum/magnum-base/Dockerfile.j2 | 4 ++-- docker/magnum/magnum-conductor/Dockerfile.j2 | 4 ++-- docker/manila/manila-api/Dockerfile.j2 | 8 ++++---- docker/manila/manila-base/Dockerfile.j2 | 8 ++++---- docker/manila/manila-data/Dockerfile.j2 | 6 +++--- docker/manila/manila-scheduler/Dockerfile.j2 | 2 +- docker/manila/manila-share/Dockerfile.j2 | 8 ++++---- docker/mariadb/Dockerfile.j2 | 6 +++--- docker/mistral/mistral-api/Dockerfile.j2 | 8 ++++---- docker/mistral/mistral-base/Dockerfile.j2 | 4 ++-- docker/mistral/mistral-engine/Dockerfile.j2 | 4 ++-- docker/mistral/mistral-event-engine/Dockerfile.j2 | 4 ++-- docker/mistral/mistral-executor/Dockerfile.j2 | 4 ++-- docker/monasca/monasca-api/Dockerfile.j2 | 4 ++-- docker/monasca/monasca-base/Dockerfile.j2 | 4 ++-- docker/monasca/monasca-grafana/Dockerfile.j2 | 8 ++++---- docker/monasca/monasca-thresh/Dockerfile.j2 | 4 ++-- docker/mongodb/Dockerfile.j2 | 4 ++-- docker/multipathd/Dockerfile.j2 | 4 ++-- docker/murano/murano-api/Dockerfile.j2 | 4 ++-- docker/murano/murano-base/Dockerfile.j2 | 4 ++-- docker/murano/murano-engine/Dockerfile.j2 | 4 ++-- .../ironic-neutron-agent/Dockerfile.j2 | 4 ++-- docker/neutron/neutron-base/Dockerfile.j2 | 12 ++++++------ docker/neutron/neutron-bgp-dragent/Dockerfile.j2 | 4 ++-- docker/neutron/neutron-dhcp-agent/Dockerfile.j2 | 2 +- docker/neutron/neutron-l3-agent/Dockerfile.j2 | 8 ++++---- docker/neutron/neutron-lbaas-agent/Dockerfile.j2 | 4 ++-- .../neutron-linuxbridge-agent/Dockerfile.j2 | 4 ++-- .../neutron-metadata-agent-ovn/Dockerfile.j2 | 4 ++-- .../neutron/neutron-metadata-agent/Dockerfile.j2 | 2 +- .../neutron/neutron-metering-agent/Dockerfile.j2 | 4 ++-- .../neutron-openvswitch-agent/Dockerfile.j2 | 4 ++-- .../neutron-server-opendaylight/Dockerfile.j2 | 4 ++-- docker/neutron/neutron-server/Dockerfile.j2 | 4 ++-- docker/neutron/neutron-sriov-agent/Dockerfile.j2 | 4 ++-- docker/nova/nova-api/Dockerfile.j2 | 8 ++++---- docker/nova/nova-base/Dockerfile.j2 | 10 +++++----- docker/nova/nova-compute-ironic/Dockerfile.j2 | 4 ++-- docker/nova/nova-compute/Dockerfile.j2 | 8 ++++---- docker/nova/nova-conductor/Dockerfile.j2 | 4 ++-- docker/nova/nova-consoleauth/Dockerfile.j2 | 4 ++-- docker/nova/nova-libvirt/Dockerfile.j2 | 6 +++--- docker/nova/nova-novncproxy/Dockerfile.j2 | 4 ++-- docker/nova/nova-placement-api/Dockerfile.j2 | 8 ++++---- docker/nova/nova-scheduler/Dockerfile.j2 | 4 ++-- docker/nova/nova-serialproxy/Dockerfile.j2 | 4 ++-- docker/nova/nova-spicehtml5proxy/Dockerfile.j2 | 8 ++++---- docker/nova/nova-ssh/Dockerfile.j2 | 2 +- docker/novajoin/novajoin-base/Dockerfile.j2 | 4 ++-- docker/novajoin/novajoin-notifier/Dockerfile.j2 | 2 +- docker/novajoin/novajoin-server/Dockerfile.j2 | 2 +- docker/octavia/octavia-api/Dockerfile.j2 | 4 ++-- docker/octavia/octavia-base/Dockerfile.j2 | 4 ++-- .../octavia/octavia-health-manager/Dockerfile.j2 | 4 ++-- docker/octavia/octavia-housekeeping/Dockerfile.j2 | 4 ++-- docker/octavia/octavia-worker/Dockerfile.j2 | 4 ++-- docker/opendaylight/Dockerfile.j2 | 4 ++-- docker/openstack-base/Dockerfile.j2 | 8 ++++---- docker/openvswitch/openvswitch-base/Dockerfile.j2 | 4 ++-- docker/ovn/ovn-base/Dockerfile.j2 | 4 ++-- docker/ovn/ovn-controller/Dockerfile.j2 | 4 ++-- docker/ovn/ovn-nb-db-server/Dockerfile.j2 | 4 ++-- docker/ovn/ovn-northd/Dockerfile.j2 | 4 ++-- docker/ovn/ovn-sb-db-server/Dockerfile.j2 | 4 ++-- docker/ovsdpdk/ovsdpdk/Dockerfile.j2 | 4 ++-- docker/panko/panko-api/Dockerfile.j2 | 4 ++-- docker/panko/panko-base/Dockerfile.j2 | 8 ++++---- docker/placement/placement-api/Dockerfile.j2 | 8 ++++---- docker/placement/placement-base/Dockerfile.j2 | 4 ++-- docker/qdrouterd/Dockerfile.j2 | 4 ++-- docker/rabbitmq/Dockerfile.j2 | 4 ++-- docker/rally/Dockerfile.j2 | 4 ++-- docker/redis/redis-sentinel/Dockerfile.j2 | 4 ++-- docker/redis/redis/Dockerfile.j2 | 4 ++-- docker/rsyslog/rsyslog/Dockerfile.j2 | 4 ++-- docker/sahara/sahara-api/Dockerfile.j2 | 4 ++-- docker/sahara/sahara-base/Dockerfile.j2 | 8 ++++---- docker/sahara/sahara-engine/Dockerfile.j2 | 8 ++++---- docker/senlin/senlin-api/Dockerfile.j2 | 4 ++-- docker/senlin/senlin-base/Dockerfile.j2 | 4 ++-- docker/senlin/senlin-engine/Dockerfile.j2 | 4 ++-- docker/sensu/sensu-base/Dockerfile.j2 | 2 +- docker/sensu/sensu-client/Dockerfile.j2 | 4 ++-- docker/sensu/sensu-server/Dockerfile.j2 | 4 ++-- docker/skydive/skydive-agent/Dockerfile.j2 | 4 ++-- docker/skydive/skydive-analyzer/Dockerfile.j2 | 2 +- docker/skydive/skydive-base/Dockerfile.j2 | 2 +- docker/storm/Dockerfile.j2 | 4 ++-- docker/swift/swift-account/Dockerfile.j2 | 4 ++-- docker/swift/swift-base/Dockerfile.j2 | 8 ++++---- docker/swift/swift-container/Dockerfile.j2 | 4 ++-- docker/swift/swift-object-expirer/Dockerfile.j2 | 4 ++-- docker/swift/swift-object/Dockerfile.j2 | 4 ++-- docker/swift/swift-proxy-server/Dockerfile.j2 | 4 ++-- docker/swift/swift-rsyncd/Dockerfile.j2 | 4 ++-- docker/tacker/tacker-base/Dockerfile.j2 | 4 ++-- docker/tacker/tacker-conductor/Dockerfile.j2 | 4 ++-- docker/tacker/tacker-server/Dockerfile.j2 | 4 ++-- docker/telegraf/Dockerfile.j2 | 4 ++-- docker/tempest/Dockerfile.j2 | 4 ++-- docker/tgtd/Dockerfile.j2 | 4 ++-- docker/tripleo-ui/Dockerfile.j2 | 6 +++--- docker/tripleoclient/Dockerfile.j2 | 2 +- docker/trove/trove-api/Dockerfile.j2 | 4 ++-- docker/trove/trove-base/Dockerfile.j2 | 4 ++-- docker/trove/trove-conductor/Dockerfile.j2 | 4 ++-- docker/trove/trove-guestagent/Dockerfile.j2 | 4 ++-- docker/trove/trove-taskmanager/Dockerfile.j2 | 4 ++-- docker/vitrage/vitrage-api/Dockerfile.j2 | 4 ++-- docker/vitrage/vitrage-base/Dockerfile.j2 | 8 ++++---- docker/vitrage/vitrage-graph/Dockerfile.j2 | 4 ++-- docker/vitrage/vitrage-ml/Dockerfile.j2 | 4 ++-- docker/vitrage/vitrage-notifier/Dockerfile.j2 | 4 ++-- docker/watcher/watcher-api/Dockerfile.j2 | 4 ++-- docker/watcher/watcher-applier/Dockerfile.j2 | 4 ++-- docker/watcher/watcher-base/Dockerfile.j2 | 4 ++-- docker/watcher/watcher-engine/Dockerfile.j2 | 4 ++-- docker/xtrabackup/Dockerfile.j2 | 4 ++-- docker/zaqar/zaqar-base/Dockerfile.j2 | 8 ++++---- docker/zaqar/zaqar-server/Dockerfile.j2 | 2 +- docker/zookeeper/Dockerfile.j2 | 4 ++-- docker/zun/zun-base/Dockerfile.j2 | 4 ++-- 203 files changed, 487 insertions(+), 487 deletions(-) diff --git a/docker/aodh/aodh-api/Dockerfile.j2 b/docker/aodh/aodh-api/Dockerfile.j2 index b85483fda6..abee6811ec 100644 --- a/docker/aodh/aodh-api/Dockerfile.j2 +++ b/docker/aodh/aodh-api/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_api_packages = ['openstack-aodh-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_api_packages = ['aodh-api'] %} {% endif %} {{ macros.install_packages(aodh_api_packages | customizable("packages")) }} diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 index 9ef1b11607..83d3d7ccfd 100644 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ b/docker/aodh/aodh-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='aodh') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_base_packages = [ 'httpd', @@ -23,7 +23,7 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ && cp -a /usr/lib/python2.7/site-packages/aodh/api/app.wsgi /var/www/cgi-bin/aodh/ \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_base_packages = [ 'aodh-common', @@ -40,7 +40,7 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_base_packages = [ 'httpd', @@ -53,7 +53,7 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ RUN mkdir -p /var/www/cgi-bin/aodh \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_base_packages = [ 'apache2', diff --git a/docker/aodh/aodh-evaluator/Dockerfile.j2 b/docker/aodh/aodh-evaluator/Dockerfile.j2 index 5b6d13086f..3e06be46a2 100644 --- a/docker/aodh/aodh-evaluator/Dockerfile.j2 +++ b/docker/aodh/aodh-evaluator/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_evaluator_packages = ['openstack-aodh-evaluator'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_evaluator_packages = ['aodh-evaluator'] %} {% endif %} {{ macros.install_packages(aodh_evaluator_packages | customizable("packages")) }} diff --git a/docker/aodh/aodh-expirer/Dockerfile.j2 b/docker/aodh/aodh-expirer/Dockerfile.j2 index 1ba8d93b6a..6b1d8400d9 100644 --- a/docker/aodh/aodh-expirer/Dockerfile.j2 +++ b/docker/aodh/aodh-expirer/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_expirer_packages = ['openstack-aodh-expirer'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_expirer_packages = ['aodh-expirer'] %} {% endif %} {{ macros.install_packages(aodh_expirer_packages | customizable("packages")) }} diff --git a/docker/aodh/aodh-listener/Dockerfile.j2 b/docker/aodh/aodh-listener/Dockerfile.j2 index 728fd97f48..fef7b81ce2 100644 --- a/docker/aodh/aodh-listener/Dockerfile.j2 +++ b/docker/aodh/aodh-listener/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_listener_packages = ['openstack-aodh-listener'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_listener_packages = ['aodh-listener'] %} {% endif %} {{ macros.install_packages(aodh_listener_packages | customizable("packages")) }} diff --git a/docker/aodh/aodh-notifier/Dockerfile.j2 b/docker/aodh/aodh-notifier/Dockerfile.j2 index 41a311e017..7ecdb64f59 100644 --- a/docker/aodh/aodh-notifier/Dockerfile.j2 +++ b/docker/aodh/aodh-notifier/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set aodh_notifier_packages = ['openstack-aodh-notifier'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set aodh_notifier_packages = ['aodh-notifier'] %} {% endif %} {{ macros.install_packages(aodh_notifier_packages | customizable("packages")) }} diff --git a/docker/barbican/barbican-api/Dockerfile.j2 b/docker/barbican/barbican-api/Dockerfile.j2 index 4a0d53faa8..f9f6b7afc4 100644 --- a/docker/barbican/barbican-api/Dockerfile.j2 +++ b/docker/barbican/barbican-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set barbican_api_packages = [ 'httpd', 'mod_ssl', @@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_api_packages = [ 'apache2', 'barbican-api', diff --git a/docker/barbican/barbican-base/Dockerfile.j2 b/docker/barbican/barbican-base/Dockerfile.j2 index 06700527cc..15ce1559a3 100644 --- a/docker/barbican/barbican-base/Dockerfile.j2 +++ b/docker/barbican/barbican-base/Dockerfile.j2 @@ -8,18 +8,18 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='barbican', groups='nfast') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set barbican_base_packages = ['openstack-barbican-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_base_packages = ['barbican-common'] %} {% endif %} {{ macros.install_packages(barbican_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set barbican_base_packages = ['uwsgi-plugin-python'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_base_packages = ['uwsgi-plugin-python'] %} {% endif %} diff --git a/docker/barbican/barbican-keystone-listener/Dockerfile.j2 b/docker/barbican/barbican-keystone-listener/Dockerfile.j2 index aee14d072f..11eeb41fc5 100644 --- a/docker/barbican/barbican-keystone-listener/Dockerfile.j2 +++ b/docker/barbican/barbican-keystone-listener/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set barbican_keystone_listener_packages = ['openstack-barbican-keystone-listener'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_keystone_listener_packages = ['barbican-keystone-listener'] %} {% endif %} diff --git a/docker/barbican/barbican-worker/Dockerfile.j2 b/docker/barbican/barbican-worker/Dockerfile.j2 index ae5e77cf0a..3d5cc148e2 100644 --- a/docker/barbican/barbican-worker/Dockerfile.j2 +++ b/docker/barbican/barbican-worker/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set barbican_worker_packages = ['openstack-barbican-worker'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set barbican_worker_packages = ['barbican-worker'] %} {% endif %} diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 5b21dd1c53..e8e6300b04 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -27,7 +27,7 @@ RUN cat /tmp/kolla_bashrc >> /etc/skel/.bashrc \ # PS1 var when used /bin/sh shell ENV PS1="$(tput bold)($(printenv KOLLA_SERVICE_NAME))$(tput sgr0)[$(id -un)@$(hostname -s) $(pwd)]$ " -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} # For RPM Variants, enable the correct repositories - this should all be done # in the base image so repos are consistent throughout the system. This also # enables to provide repo overrides at a later date in a simple fashion if we @@ -210,7 +210,7 @@ RUN yum -y install \ #### END REPO ENABLEMENT {# We are back to the basic if conditional here which is: - if base_distro in ['centos', 'oraclelinux', 'rhel'] #} + if base_package_type == 'rpm' #} {% set base_compiler_packages = [ 'gcc', @@ -252,8 +252,8 @@ RUN yum -y install \ {% endif %} {# endif for install type is source for RPM based distros #} -{# endif for base_distro centos,oraclelinux,rhel #} -{% elif base_distro in ['debian', 'ubuntu'] %} +{# endif for base_package_type rpm #} +{% elif base_package_type == 'deb' %} RUN if [ $(awk -F '=' '/DISTRIB_RELEASE/{print $2}' /etc/lsb-release) != "{{ supported_distro_release }}" ]; then \ echo "Only release '{{ supported_distro_release }}' is supported on {{ base_distro }}"; false; fi @@ -391,7 +391,7 @@ RUN sed -i \ && ln -s dist-packages /usr/lib/python2.7/site-packages {% endif %} -{# endif for base_distro debian, ubuntu #} +{# endif base_package_type deb #} {% endif %} COPY set_configs.py /usr/local/bin/kolla_set_configs diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/docker/bifrost/bifrost-base/Dockerfile.j2 index 4bd96f9771..6a96fdd457 100644 --- a/docker/bifrost/bifrost-base/Dockerfile.j2 +++ b/docker/bifrost/bifrost-base/Dockerfile.j2 @@ -26,17 +26,17 @@ RUN ln -s bifrost-base-source/* bifrost \ WORKDIR /bifrost -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {# Remove updated RabbitMQ packages since these are not supported by Bifrost yet. #} RUN rm -f /etc/yum.repos.d/rabbitmq_rabbitmq-server.repo \ && yum clean all && rm -rf /var/yum/cache -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} RUN sed -e "s/.*mariadb.*//Ig" -e "s/.*rabbitmq.*//Ig" -i /etc/apt/sources.list \ && apt-get purge -y mariadb* mysql* {% endif %} {% block bifrost_ansible_install %} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} RUN apt-get update && \ {% else %} RUN echo " " && \ @@ -44,7 +44,7 @@ RUN echo " " && \ bash -c './scripts/env-setup.sh && source ./env-vars && \ ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target /bifrost/playbooks/install.yaml \ -e @/tmp/build_arg.yml && \ -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} apt-get clean && rm -rf /var/lib/apt/lists/*' {% else %} yum clean all && rm -rf /var/yum/cache' diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 index a2ada08664..6e25b7c26d 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='ceilometer') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ceilometer_base_packages = [ 'openstack-ceilometer-common', 'python-panko', @@ -16,7 +16,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python-oslo-db', 'python-tooz' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ceilometer_base_packages = [ 'ceilometer-common', 'python-gnocchiclient', diff --git a/docker/ceilometer/ceilometer-central/Dockerfile.j2 b/docker/ceilometer/ceilometer-central/Dockerfile.j2 index f8c4599599..f0341ad883 100644 --- a/docker/ceilometer/ceilometer-central/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-central/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ceilometer_central_packages = ['openstack-ceilometer-central'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ceilometer_central_packages = ['ceilometer-agent-central'] %} {% endif %} diff --git a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 index f4b44b328b..e8ae32dcf6 100644 --- a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ceilometer_compute_packages = [ 'openstack-ceilometer-compute', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ceilometer_compute_packages = [ 'ceilometer-agent-compute', 'python-libvirt' @@ -19,11 +19,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(ceilometer_compute_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ceilometer_compute_packages = [ 'libvirt-python' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ceilometer_compute_packages = [ 'python-libvirt' ] %} diff --git a/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 b/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 index a1fa30c867..e67e320c0e 100644 --- a/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 @@ -6,22 +6,22 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ceilometer_ipmi_packages = [ 'openstack-ceilometer-ipmi' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ceilometer_ipmi_packages = [ 'ceilometer-agent-ipmi' ] %} {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ceilometer_ipmi_packages = [ 'ipmitool' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ceilometer_ipmi_packages = [ 'ipmitool' ] %} diff --git a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 b/docker/ceilometer/ceilometer-notification/Dockerfile.j2 index f6318104db..86fad1abfd 100644 --- a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-notification/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ceilometer_notification_packages = ['openstack-ceilometer-notification'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ceilometer_notification_packages = ['ceilometer-agent-notification'] %} {% endif %} diff --git a/docker/ceph/ceph-base/Dockerfile.j2 b/docker/ceph/ceph-base/Dockerfile.j2 index 084693a1dc..4aeaca4e4a 100644 --- a/docker/ceph/ceph-base/Dockerfile.j2 +++ b/docker/ceph/ceph-base/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='ceph') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ceph_base_packages = [ 'btrfs-progs', @@ -25,7 +25,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% endif %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ceph_base_packages = [ 'btrfs-progs', diff --git a/docker/ceph/ceph-nfs/Dockerfile.j2 b/docker/ceph/ceph-nfs/Dockerfile.j2 index 1ed1c5fe83..9ace5de525 100644 --- a/docker/ceph/ceph-nfs/Dockerfile.j2 +++ b/docker/ceph/ceph-nfs/Dockerfile.j2 @@ -5,13 +5,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ceph_nfs_packages = [ 'nfs-ganesha', 'nfs-ganesha-ceph' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ceph_nfs_packages = [ 'nfs-ganesha', 'nfs-ganesha-ceph' diff --git a/docker/certmonger/Dockerfile.j2 b/docker/certmonger/Dockerfile.j2 index ec260035f6..4b5833a208 100644 --- a/docker/certmonger/Dockerfile.j2 +++ b/docker/certmonger/Dockerfile.j2 @@ -5,11 +5,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set certmonger_packages = [ 'certmonger', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set certmonger_packages = [ 'certmonger' ] %} diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index ac9129eb5e..b0135b42d4 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cinder_api_packages = [ 'httpd', 'mod_ssl', @@ -19,7 +19,7 @@ RUN mkdir -p /var/www/cgi-bin/cinder \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set cinder_api_packages = [ 'apache2', 'cinder-api', @@ -33,7 +33,7 @@ RUN mkdir -p /var/www/cgi-bin/cinder \ {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cinder_api_packages = [ 'httpd', 'mod_ssl', @@ -43,7 +43,7 @@ RUN mkdir -p /var/www/cgi-bin/cinder \ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set cinder_api_packages = [ 'apache2', 'libapache2-mod-wsgi' diff --git a/docker/cinder/cinder-backup/Dockerfile.j2 b/docker/cinder/cinder-backup/Dockerfile.j2 index a4db1ae5e4..5e88f6a7d5 100644 --- a/docker/cinder/cinder-backup/Dockerfile.j2 +++ b/docker/cinder/cinder-backup/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cinder_backup_packages = [ 'nfs-utils' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set cinder_backup_packages = [ 'cinder-backup', 'nfs-common' @@ -18,11 +18,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cinder_backup_packages = [ 'nfs-utils' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set cinder_backup_packages = [ 'nfs-common' ] %} diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 index ab3109b6ba..d8becd4f63 100644 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ b/docker/cinder/cinder-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='cinder') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cinder_base_packages = [ 'ceph-common', 'lvm2', @@ -17,7 +17,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python-automaton', 'python-oslo-vmware' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set cinder_base_packages = [ 'ceph-common', 'cinder-common', @@ -29,7 +29,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(cinder_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cinder_base_packages = [ 'ceph-common', 'lvm2', @@ -44,7 +44,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'qemu-img' ] %} {% endif %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set cinder_base_packages = [ 'ceph-common', 'lvm2', diff --git a/docker/cinder/cinder-scheduler/Dockerfile.j2 b/docker/cinder/cinder-scheduler/Dockerfile.j2 index d15f7e850d..ca96ccb718 100644 --- a/docker/cinder/cinder-scheduler/Dockerfile.j2 +++ b/docker/cinder/cinder-scheduler/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['debian', 'ubuntu'] %} + {% if base_package_type == 'deb' %} {% set cinder_scheduler_packages = [ 'cinder-scheduler' ] %} diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 index f49109fa8d..dc505e5eb4 100644 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/docker/cinder/cinder-volume/Dockerfile.j2 @@ -5,7 +5,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set cinder_volume_packages = [ 'nfs-utils', 'nvmetcli', @@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf {% endblock %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set cinder_volume_packages = [ 'nfs-common', 'sysfsutils', @@ -39,7 +39,7 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf {% endif %} {% if install_type == 'binary' %} - {% if base_distro in ['debian', 'ubuntu'] %} + {% if base_package_type == 'deb' %} {% set cinder_volume_packages = [ 'cinder-volume', 'python-rtslib-fb', diff --git a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 index e8ff0700c3..148ce98716 100644 --- a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 +++ b/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cloudkitty_api_packages = [ 'httpd', @@ -18,7 +18,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false @@ -27,7 +27,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cloudkitty_api_packages = [ 'httpd', 'mod_ssl', @@ -37,7 +37,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['ubuntu', 'debian'] %} + {% elif base_package_type == 'deb' %} {% set cloudkitty_api_packages = [ 'apache2', 'libapache2-mod-wsgi' diff --git a/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 index a5b2d95238..86c56e2433 100644 --- a/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 +++ b/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 @@ -8,13 +8,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='cloudkitty') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cloudkitty_base_packages = [ 'openstack-cloudkitty-common', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 index 99d735096d..91ec9ad82f 100644 --- a/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 +++ b/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set cloudkitty_processor_packages = [ 'openstack-cloudkitty-processor', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/collectd/Dockerfile.j2 b/docker/collectd/Dockerfile.j2 index 63384ed910..3df7082ff0 100644 --- a/docker/collectd/Dockerfile.j2 +++ b/docker/collectd/Dockerfile.j2 @@ -11,7 +11,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'collectd' ] %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set collectd_packages = collectd_packages + [ 'collectd-amqp1', 'collectd-apache', diff --git a/docker/congress/congress-base/Dockerfile.j2 b/docker/congress/congress-base/Dockerfile.j2 index 7e62fd4d5c..a86ab796c7 100644 --- a/docker/congress/congress-base/Dockerfile.j2 +++ b/docker/congress/congress-base/Dockerfile.j2 @@ -8,12 +8,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='congress') }} {% if install_type == 'binary' %} - {% if base_distro in ['debian', 'ubuntu'] %} + {% if base_package_type == 'deb' %} {% set congress_base_packages = [ 'congress-common', 'congress-server'] %} - {% elif base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% elif base_package_type == 'rpm' %} {% set congress_base_packages = [ 'openstack-congress'] %} diff --git a/docker/crane/Dockerfile.j2 b/docker/crane/Dockerfile.j2 index c9fa12af2a..aea3f301f4 100644 --- a/docker/crane/Dockerfile.j2 +++ b/docker/crane/Dockerfile.j2 @@ -26,7 +26,7 @@ RUN echo 'crane not yet available for {{ base_distro }}' && /bin/false {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set crane_packages = [ 'httpd', 'mod_ssl', @@ -40,7 +40,7 @@ RUN echo 'crane not yet available for {{ base_distro }}' && /bin/false RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo 'crane not yet available for {{ base_distro }}' && /bin/false {% endif %} diff --git a/docker/cron/Dockerfile.j2 b/docker/cron/Dockerfile.j2 index 6243ada193..83c395b73f 100644 --- a/docker/cron/Dockerfile.j2 +++ b/docker/cron/Dockerfile.j2 @@ -5,12 +5,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set cron_packages = [ 'cronie', 'logrotate' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set cron_packages = [ 'cron', 'logrotate' diff --git a/docker/designate/designate-api/Dockerfile.j2 b/docker/designate/designate-api/Dockerfile.j2 index 7f67ecbe05..d138d48873 100644 --- a/docker/designate/designate-api/Dockerfile.j2 +++ b/docker/designate/designate-api/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_api_packages = ['openstack-designate-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_api_packages = ['designate-api'] %} {% endif %} {{ macros.install_packages(designate_api_packages | customizable("packages")) }} diff --git a/docker/designate/designate-backend-bind9/Dockerfile.j2 b/docker/designate/designate-backend-bind9/Dockerfile.j2 index df016a25dd..27e5ccdc35 100644 --- a/docker/designate/designate-backend-bind9/Dockerfile.j2 +++ b/docker/designate/designate-backend-bind9/Dockerfile.j2 @@ -5,19 +5,19 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set designate_backend_bind9_packages = ['bind'] %} {{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set designate_backend_bind9_packages = ['bind9'] %} {{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }} {% endif %} -{% set designate_backend_bind_name = 'bind' if base_distro in ['debian', 'ubuntu'] else 'named' %} +{% set designate_backend_bind_name = 'bind' if base_package_type == 'deb' else 'named' %} RUN mkdir -p /var/lib/kolla/ /var/lib/{{ designate_backend_bind_name }}/ /run/{{ designate_backend_bind_name }} \ && chown -R root: /var/lib/{{ designate_backend_bind_name }} /run/{{ designate_backend_bind_name }} \ diff --git a/docker/designate/designate-base/Dockerfile.j2 b/docker/designate/designate-base/Dockerfile.j2 index 7dabc71141..49fd8dfe4e 100644 --- a/docker/designate/designate-base/Dockerfile.j2 +++ b/docker/designate/designate-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='designate') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_base_packages = [ 'openstack-designate-common', 'python-tooz', @@ -17,7 +17,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {{ macros.install_packages(designate_base_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_base_packages = [ 'designate-common', 'python-tooz' diff --git a/docker/designate/designate-central/Dockerfile.j2 b/docker/designate/designate-central/Dockerfile.j2 index 849fe9d140..6fab7b7fc4 100644 --- a/docker/designate/designate-central/Dockerfile.j2 +++ b/docker/designate/designate-central/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_central_packages = ['openstack-designate-central'] %} - {% elif base_distro in ['debian', 'ubuntu']%} + {% elif base_package_type == 'deb'%} {% set designate_central_packages = ['designate-central'] %} {% endif %} {{ macros.install_packages(designate_central_packages | customizable("packages")) }} diff --git a/docker/designate/designate-mdns/Dockerfile.j2 b/docker/designate/designate-mdns/Dockerfile.j2 index ee919acde0..3a7133de4e 100644 --- a/docker/designate/designate-mdns/Dockerfile.j2 +++ b/docker/designate/designate-mdns/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_mdns_packages = ['openstack-designate-mdns'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_mdns_packages = ['designate-mdns'] %} {% endif %} {{ macros.install_packages(designate_mdns_packages | customizable("packages")) }} diff --git a/docker/designate/designate-pool-manager/Dockerfile.j2 b/docker/designate/designate-pool-manager/Dockerfile.j2 index 3ccd074b7e..2414b7e8c3 100644 --- a/docker/designate/designate-pool-manager/Dockerfile.j2 +++ b/docker/designate/designate-pool-manager/Dockerfile.j2 @@ -7,23 +7,23 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build # The bind9 package here is only to provide the rndc binary. {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_pool_manager_packages = [ 'bind', 'openstack-designate-pool-manager' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_pool_manager_packages = [ 'bind9', 'designate-pool-manager' ] %} {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_pool_manager_packages = [ 'bind' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_pool_manager_packages = [ 'bind9' ] %} diff --git a/docker/designate/designate-producer/Dockerfile.j2 b/docker/designate/designate-producer/Dockerfile.j2 index 28bbbad19a..21a60aea20 100644 --- a/docker/designate/designate-producer/Dockerfile.j2 +++ b/docker/designate/designate-producer/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_producer_packages = ['openstack-designate-producer'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_producer_packages = ['designate-producer'] %} {% endif %} {{ macros.install_packages(designate_producer_packages | customizable("packages")) }} diff --git a/docker/designate/designate-sink/Dockerfile.j2 b/docker/designate/designate-sink/Dockerfile.j2 index aaf86ffdde..0afbd1604c 100644 --- a/docker/designate/designate-sink/Dockerfile.j2 +++ b/docker/designate/designate-sink/Dockerfile.j2 @@ -6,12 +6,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_sink_packages = [ 'openstack-designate-sink', 'python-designateclient' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_sink_packages = [ 'designate-sink', 'python-designateclient' diff --git a/docker/designate/designate-worker/Dockerfile.j2 b/docker/designate/designate-worker/Dockerfile.j2 index 23bb1f0f57..23af7a6d0c 100644 --- a/docker/designate/designate-worker/Dockerfile.j2 +++ b/docker/designate/designate-worker/Dockerfile.j2 @@ -7,23 +7,23 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build # The bind9 package here is only to provide the rndc binary. {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_worker_packages = [ 'bind', 'openstack-designate-worker' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_worker_packages = [ 'bind9', 'designate-worker' ] %} {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set designate_worker_packages = [ 'bind' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set designate_worker_packages = [ 'bind9' ] %} diff --git a/docker/dind/Dockerfile.j2 b/docker/dind/Dockerfile.j2 index 791ba5b890..33b8fb8511 100644 --- a/docker/dind/Dockerfile.j2 +++ b/docker/dind/Dockerfile.j2 @@ -5,14 +5,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} # Since the gate cannot do DinD on centos due to the age of the kernel, we don't # build a true DinD image. Should the time come that we get a newer kernel in # the centos gate and we want to do multinode we can populate this container RUN /bin/true -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set dind_packages = [ 'btrfs-progs', 'openssh-server' diff --git a/docker/dragonflow/dragonflow-base/Dockerfile.j2 b/docker/dragonflow/dragonflow-base/Dockerfile.j2 index 466f1843ae..108bb86fb9 100644 --- a/docker/dragonflow/dragonflow-base/Dockerfile.j2 +++ b/docker/dragonflow/dragonflow-base/Dockerfile.j2 @@ -14,12 +14,12 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set dragonflow_base_packages = [ 'zeromq-devel' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set dragonflow_base_packages = [ 'libzmq3-dev' ] %} diff --git a/docker/ec2-api/Dockerfile.j2 b/docker/ec2-api/Dockerfile.j2 index c461af5265..fd8a1d560b 100644 --- a/docker/ec2-api/Dockerfile.j2 +++ b/docker/ec2-api/Dockerfile.j2 @@ -9,12 +9,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ec2_api_packages = [ 'openstack-ec2-api' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/elasticsearch/Dockerfile.j2 b/docker/elasticsearch/Dockerfile.j2 index b7b9845d43..b677f64c6c 100644 --- a/docker/elasticsearch/Dockerfile.j2 +++ b/docker/elasticsearch/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='elasticsearch', shell='/bin/bash', homedir='/usr/share/elasticsearch') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set elasticsearch_packages = [ 'elasticsearch', 'java-1.8.0-openjdk-headless', @@ -15,7 +15,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ENV JAVA_HOME /usr/lib/jvm/jre-1.8.0-openjdk/ -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set elasticsearch_packages = [ 'default-jre-headless', 'elasticsearch', diff --git a/docker/etcd/Dockerfile.j2 b/docker/etcd/Dockerfile.j2 index f844df8059..423fa82a3d 100644 --- a/docker/etcd/Dockerfile.j2 +++ b/docker/etcd/Dockerfile.j2 @@ -7,9 +7,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='etcd') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set etcd_packages = ['etcd'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set etcd_packages = ['etcd'] %} {% endif %} {{ macros.install_packages(etcd_packages | customizable("packages")) }} diff --git a/docker/fluentd/Dockerfile.j2 b/docker/fluentd/Dockerfile.j2 index a3641ace23..27dee33afd 100644 --- a/docker/fluentd/Dockerfile.j2 +++ b/docker/fluentd/Dockerfile.j2 @@ -5,7 +5,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {{ macros.configure_user(name='fluentd', groups='mysql') }} # TODO:remove hostname package as it should be installed by the @@ -26,7 +26,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'rubygem-fluent-plugin-secure-forward' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {{ macros.configure_user(name='td-agent', groups='mysql') }} {% set fluentd_packages = [ 'g++', @@ -41,12 +41,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(fluentd_packages | customizable("packages")) }} # Distro specific files and operations -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} COPY rpm_fluentd_sudoers /etc/sudoers.d/kolla_fluentd_sudoers RUN chmod 440 /etc/sudoers.d/kolla_fluentd_sudoers \ && mkdir -p /var/run/fluentd \ && chown -R fluentd: /etc/fluentd /var/run/fluentd -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} COPY fluentd_sudoers /etc/sudoers.d/kolla_fluentd_sudoers RUN chmod 440 /etc/sudoers.d/kolla_fluentd_sudoers \ && sed -i -e "s/USER=td-agent/USER=root/" -e "s/GROUP=td-agent/GROUP=root/" /etc/init.d/td-agent \ @@ -60,7 +60,7 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start {% block fluentd_plugins_install %} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} {% set fluentd_plugins = [ 'fluent-plugin-elasticsearch', 'fluent-plugin-grep', @@ -90,8 +90,8 @@ RUN tar -xvf /tmp/fluentd-monasca.tar.gz -C /tmp \ {% block fluentd_footer %}{% endblock %} {% block footer %}{% endblock %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} USER fluentd -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} USER td-agent {% endif %} diff --git a/docker/freezer/freezer-api/Dockerfile.j2 b/docker/freezer/freezer-api/Dockerfile.j2 index d536ef5d8a..964de809ee 100644 --- a/docker/freezer/freezer-api/Dockerfile.j2 +++ b/docker/freezer/freezer-api/Dockerfile.j2 @@ -12,7 +12,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set freezer_api_packages = [ 'httpd', 'mod_ssl', @@ -23,7 +23,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set freezer_api_packages = [ 'apache2', 'libapache2-mod-wsgi' diff --git a/docker/glance/glance-api/Dockerfile.j2 b/docker/glance/glance-api/Dockerfile.j2 index 200153f548..2eff6e383e 100644 --- a/docker/glance/glance-api/Dockerfile.j2 +++ b/docker/glance/glance-api/Dockerfile.j2 @@ -9,7 +9,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set glance_api_packages = ['qemu-img-ev'] %} {% elif base_distro == 'rhel' %} {% set glance_api_packages = ['qemu-img'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set glance_api_packages = ['qemu-utils'] %} {% endif %} diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2 index b379e4008a..06f8947c96 100644 --- a/docker/glance/glance-base/Dockerfile.j2 +++ b/docker/glance/glance-base/Dockerfile.j2 @@ -8,14 +8,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='glance') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set glance_base_packages = [ 'openstack-glance', 'python-oslo-vmware', 'python-rados', 'python-rbd' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set glance_base_packages = [ 'glance', 'python-os-brick', diff --git a/docker/gnocchi/gnocchi-api/Dockerfile.j2 b/docker/gnocchi/gnocchi-api/Dockerfile.j2 index 93cd2ce8ba..4ffc869a98 100644 --- a/docker/gnocchi/gnocchi-api/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-api/Dockerfile.j2 @@ -6,12 +6,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set gnocchi_api_packages = [ 'openstack-gnocchi-api', 'openstack-gnocchi-indexer-sqlalchemy' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set gnocchi_api_packages = ['gnocchi-api'] %} {% endif %} {{ macros.install_packages(gnocchi_api_packages | customizable("packages")) }} diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 index 52662dba6e..0724cb38c3 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='gnocchi') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set gnocchi_base_packages = [ 'httpd', @@ -22,7 +22,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set gnocchi_base_packages = [ 'apache2', @@ -45,7 +45,7 @@ RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set gnocchi_base_packages = [ 'httpd', @@ -69,7 +69,7 @@ RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages RUN mkdir -p /var/www/cgi-bin/gnocchi \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set gnocchi_base_packages = [ 'apache2', diff --git a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 b/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 index 0bab8ba066..cd517f9a9d 100644 --- a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set gnocchi_metricd_packages = ['openstack-gnocchi-metricd'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set gnocchi_metricd_packages = ['gnocchi-metricd'] %} {% endif %} {{ macros.install_packages(gnocchi_metricd_packages | customizable("packages")) }} diff --git a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 index b5c4bed7d4..dd1d940b29 100644 --- a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set gnocchi_statsd_packages = ['openstack-gnocchi-statsd'] %} {% elif base_distro in ['ubuntu'] %} {% set gnocchi_statsd_packages = ['gnocchi-statsd'] %} diff --git a/docker/grafana/Dockerfile.j2 b/docker/grafana/Dockerfile.j2 index 504a235633..a608ae1519 100644 --- a/docker/grafana/Dockerfile.j2 +++ b/docker/grafana/Dockerfile.j2 @@ -20,7 +20,7 @@ RUN echo 'There are no Grafana external repositories for {{ base_arch }}' \ 'https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.2.4-1.aarch64.rpm' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set grafana_packages = [ 'libfontconfig', diff --git a/docker/haproxy/Dockerfile.j2 b/docker/haproxy/Dockerfile.j2 index db232e0757..8615fdfae8 100644 --- a/docker/haproxy/Dockerfile.j2 +++ b/docker/haproxy/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='haproxy') }} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} {{ macros.debian_haproxy_existing_user_fix() }} {% endif %} diff --git a/docker/heat/heat-all/Dockerfile.j2 b/docker/heat/heat-all/Dockerfile.j2 index d20d5e4d20..b73956cea4 100644 --- a/docker/heat/heat-all/Dockerfile.j2 +++ b/docker/heat/heat-all/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set heat_all_packages = [ 'openstack-heat-api', 'openstack-heat-engine', 'openstack-heat-monolith' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo 'heat-all not yet available for {{ base_distro }}' && /bin/false {% endif %} {{ macros.install_packages(heat_all_packages | customizable("packages")) }} diff --git a/docker/heat/heat-api-cfn/Dockerfile.j2 b/docker/heat/heat-api-cfn/Dockerfile.j2 index 8fdb4bb7bf..5f25ab074e 100644 --- a/docker/heat/heat-api-cfn/Dockerfile.j2 +++ b/docker/heat/heat-api-cfn/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set heat_api_cfn_packages = ['openstack-heat-api-cfn'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set heat_api_cfn_packages = ['heat-api-cfn'] %} {% endif %} {{ macros.install_packages(heat_api_cfn_packages | customizable("packages")) }} diff --git a/docker/heat/heat-api/Dockerfile.j2 b/docker/heat/heat-api/Dockerfile.j2 index 40b06fb27b..6b1529d6e2 100644 --- a/docker/heat/heat-api/Dockerfile.j2 +++ b/docker/heat/heat-api/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set heat_api_packages = ['openstack-heat-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set heat_api_packages = ['heat-api'] %} {% endif %} {{ macros.install_packages(heat_api_packages | customizable("packages")) }} diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2 index f48d8281e3..a5e2405ac5 100644 --- a/docker/heat/heat-base/Dockerfile.j2 +++ b/docker/heat/heat-base/Dockerfile.j2 @@ -9,7 +9,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set heat_base_packages = [ 'httpd', 'mod_ssl', @@ -19,7 +19,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(heat_base_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set heat_base_packages = [ 'apache2', 'heat-common', @@ -31,7 +31,7 @@ RUN echo > /etc/apache2/ports.conf {% elif install_type == 'source' %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set heat_base_packages = [ 'httpd', @@ -42,7 +42,7 @@ RUN echo > /etc/apache2/ports.conf RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set heat_base_packages = [ 'apache2', diff --git a/docker/heat/heat-engine/Dockerfile.j2 b/docker/heat/heat-engine/Dockerfile.j2 index 64c642fa95..56e7b51441 100644 --- a/docker/heat/heat-engine/Dockerfile.j2 +++ b/docker/heat/heat-engine/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set heat_engine_packages = [ 'python-barbicanclient', 'python-zaqarclient', 'openstack-heat-engine' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set heat_engine_packages = ['heat-engine'] %} {% endif %} {{ macros.install_packages(heat_engine_packages | customizable("packages")) }} diff --git a/docker/helm-repository/Dockerfile.j2 b/docker/helm-repository/Dockerfile.j2 index 1b1acbb891..4faa76c31f 100644 --- a/docker/helm-repository/Dockerfile.j2 +++ b/docker/helm-repository/Dockerfile.j2 @@ -13,14 +13,14 @@ ENV helm_version=2.3.0 \ {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set helm_repo_packages = [ 'git', 'jq', 'python2-pip' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set helm_repo_packages = [ 'git', 'jq', diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 index aec738f05b..90b0f0b36c 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/docker/horizon/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='horizon') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set horizon_packages = [ 'gettext', 'httpd', @@ -48,7 +48,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ done {% endblock %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set horizon_packages = [ 'apache2', 'gettext', @@ -82,7 +82,7 @@ RUN echo > /etc/apache2/ports.conf \ {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set horizon_packages = [ 'gettext', @@ -98,7 +98,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf {% endblock %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set horizon_packages = [ 'apache2', diff --git a/docker/ironic-inspector/Dockerfile.j2 b/docker/ironic-inspector/Dockerfile.j2 index 884b4dd048..1adc917a7c 100644 --- a/docker/ironic-inspector/Dockerfile.j2 +++ b/docker/ironic-inspector/Dockerfile.j2 @@ -8,9 +8,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='ironic-inspector') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ironic_inspector_packages = ['openstack-ironic-inspector'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_inspector_packages = [ 'iptables', 'ironic-inspector' @@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(ironic_inspector_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['debian', 'ubuntu'] %} + {% if base_package_type == 'deb' %} {% set ironic_inspector_packages = ['iptables'] %} {% endif %} diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/docker/ironic/ironic-api/Dockerfile.j2 index 3aa5a0a4ab..f7d391cb29 100644 --- a/docker/ironic/ironic-api/Dockerfile.j2 +++ b/docker/ironic/ironic-api/Dockerfile.j2 @@ -6,14 +6,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ironic_api_packages = [ 'httpd', 'mod_ssl', 'mod_wsgi', 'openstack-ironic-api' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_api_packages = [ 'apache2', 'ironic-api', @@ -22,13 +22,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ironic_api_packages = [ 'httpd', 'mod_ssl', 'mod_wsgi' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_api_packages = [ 'apache2', 'libapache2-mod-wsgi' @@ -39,11 +39,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(ironic_api_packages | customizable("packages")) }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} RUN echo > /etc/apache2/ports.conf {% endif %} diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2 index dfd9317ca9..fac6acbc85 100644 --- a/docker/ironic/ironic-base/Dockerfile.j2 +++ b/docker/ironic/ironic-base/Dockerfile.j2 @@ -8,9 +8,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='ironic') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ironic_base_packages = ['openstack-ironic-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_base_packages = ['ironic-common'] %} {% endif %} diff --git a/docker/ironic/ironic-conductor/Dockerfile.j2 b/docker/ironic/ironic-conductor/Dockerfile.j2 index d81204e7be..a9c5854a43 100644 --- a/docker/ironic/ironic-conductor/Dockerfile.j2 +++ b/docker/ironic/ironic-conductor/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} # TODO(Jeffrey4l): no python-oneviewclient {% set ironic_conductor_packages = [ 'ansible', @@ -40,7 +40,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'qemu-img' ] %} {% endif %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} # TODO(jeffrey4l): no python-dracclient, python-oneviewclient, UcsSdk, # ImcSdk package, python-sushy, ironic-staging-drivers {% set ironic_conductor_packages = [ @@ -64,7 +64,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ironic_conductor_packages = [ 'dosfstools', 'e2fsprogs', @@ -78,7 +78,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'util-linux', 'xfsprogs', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set ironic_conductor_packages = [ 'bsdmainutils', 'dosfstools', diff --git a/docker/ironic/ironic-pxe/Dockerfile.j2 b/docker/ironic/ironic-pxe/Dockerfile.j2 index 28dcb5361e..3b6937917b 100644 --- a/docker/ironic/ironic-pxe/Dockerfile.j2 +++ b/docker/ironic/ironic-pxe/Dockerfile.j2 @@ -5,7 +5,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ironic_pxe_packages = [ 'httpd', 'ipxe-bootimgs', @@ -31,7 +31,7 @@ ENV ironic_arch=aarch64 {{ macros.install_packages(ironic_pxe_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ironic_pxe_packages = [ 'apache2', 'ipxe', diff --git a/docker/iscsid/Dockerfile.j2 b/docker/iscsid/Dockerfile.j2 index ebb5d985d5..174ee2f11f 100644 --- a/docker/iscsid/Dockerfile.j2 +++ b/docker/iscsid/Dockerfile.j2 @@ -5,14 +5,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set iscsid_packages = [ 'iscsi-initiator-utils', 'python-rtslib', 'targetcli' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set iscsid_packages = [ 'open-iscsi', 'python-rtslib-fb', diff --git a/docker/kafka/Dockerfile.j2 b/docker/kafka/Dockerfile.j2 index 62f82a4cf9..ca7f895e7c 100644 --- a/docker/kafka/Dockerfile.j2 +++ b/docker/kafka/Dockerfile.j2 @@ -7,11 +7,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='kafka', homedir='/opt/kafka') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set kafka_packages = [ 'java-1.8.0-openjdk-headless', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set kafka_packages = [ 'default-jre-headless', ] %} diff --git a/docker/keepalived/Dockerfile.j2 b/docker/keepalived/Dockerfile.j2 index 015e305b78..620526a0d3 100644 --- a/docker/keepalived/Dockerfile.j2 +++ b/docker/keepalived/Dockerfile.j2 @@ -5,12 +5,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set keepalived_packages = [ 'hostname', 'keepalived' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set keepalived_packages = [ 'keepalived' ] %} diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/docker/keystone/keystone-base/Dockerfile.j2 index 1c0bad8fd0..df11edaa81 100644 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ b/docker/keystone/keystone-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='keystone') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set keystone_base_packages = [ 'httpd', 'mod_auth_mellon', @@ -27,7 +27,7 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set keystone_base_packages = [ 'apache2', 'keystone', @@ -46,7 +46,7 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set keystone_base_packages = [ 'httpd', 'mod_auth_mellon', @@ -59,7 +59,7 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set keystone_base_packages = [ 'apache2', 'libapache2-mod-auth-mellon', diff --git a/docker/keystone/keystone-fernet/Dockerfile.j2 b/docker/keystone/keystone-fernet/Dockerfile.j2 index f067515098..07baba979a 100644 --- a/docker/keystone/keystone-fernet/Dockerfile.j2 +++ b/docker/keystone/keystone-fernet/Dockerfile.j2 @@ -5,13 +5,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set keystone_fernet_packages = [ 'cronie', 'openssh-clients', 'rsync' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set keystone_fernet_packages = [ 'cron', 'openssh-client', diff --git a/docker/keystone/keystone-ssh/Dockerfile.j2 b/docker/keystone/keystone-ssh/Dockerfile.j2 index 6898c2e6e0..233dedf7cd 100644 --- a/docker/keystone/keystone-ssh/Dockerfile.j2 +++ b/docker/keystone/keystone-ssh/Dockerfile.j2 @@ -7,12 +7,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='keystone', shell='/bin/bash') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set keystone_ssh_packages = [ 'openssh-server', 'rsync' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set keystone_ssh_packages = [ 'openssh-server', 'rsync' diff --git a/docker/keystone/keystone/Dockerfile.j2 b/docker/keystone/keystone/Dockerfile.j2 index 481892e814..bbcea3c630 100644 --- a/docker/keystone/keystone/Dockerfile.j2 +++ b/docker/keystone/keystone/Dockerfile.j2 @@ -11,12 +11,12 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_keystone_bo {% if install_type == 'binary' %} # TODO: oraclelinux fails to install these packages. Should be added when this is fixed. - {% if base_distro in ['centos', 'rhel'] %} + {% if base_package_type == 'rpm' and base_distro != 'oraclelinux' %} {% set keystone_packages = [ 'mod_auth_gssapi', 'python-requests-kerberos', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set keystone_packages = [ 'libapache2-mod-auth-gssapi', 'python-requests-kerberos', @@ -24,11 +24,11 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_keystone_bo {% endif %} {{ macros.install_packages(keystone_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'rhel'] %} + {% if base_package_type == 'rpm' and base_distro != 'oraclelinux' %} {% set keystone_packages = [ 'mod_auth_gssapi', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set keystone_packages = [ 'libapache2-mod-auth-gssapi', ] %} diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index 49cf839a7f..90bde2493e 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -10,7 +10,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='ansible') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set kolla_toolbox_packages = [ 'crudini', 'gcc', @@ -28,7 +28,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python-devel' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set kolla_toolbox_packages = [ 'build-essential', 'ca-certificates', diff --git a/docker/kube/kube-controller-manager/Dockerfile.j2 b/docker/kube/kube-controller-manager/Dockerfile.j2 index 6494bd0e87..d2487d5f71 100644 --- a/docker/kube/kube-controller-manager/Dockerfile.j2 +++ b/docker/kube/kube-controller-manager/Dockerfile.j2 @@ -7,11 +7,11 @@ ENV KUBERNETES_COMPONENT=kube-controller-manager {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ceph_support_packages = [ 'ceph-common' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ceph_support_packages = [ 'ceph-common' ] %} diff --git a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 b/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 index 7cd9aca247..ccfbf9ffb9 100644 --- a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 +++ b/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 @@ -11,14 +11,14 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set kuryr_libnetwork_packages = [ 'bridge-utils', 'openvswitch' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set kuryr_libnetwork_packages = [ 'bridge-utils', diff --git a/docker/logstash/Dockerfile.j2 b/docker/logstash/Dockerfile.j2 index 175537fbdd..61094da7ce 100644 --- a/docker/logstash/Dockerfile.j2 +++ b/docker/logstash/Dockerfile.j2 @@ -7,14 +7,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='logstash', shell='/bin/bash', homedir='/usr/share/logstash') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set logstash_packages = [ 'java-1.8.0-openjdk-headless' ] %} ENV JAVA_HOME /usr/lib/jvm/jre-1.8.0-openjdk/ -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set logstash_packages = [ 'openjdk-8-jre-headless', 'logrotate' @@ -40,7 +40,7 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start # work with Logstash 5.x or above. When Monasca is updated to use a more # recent messaging version this patch should be reverted and the Monasca # Logstash configuration files upgraded to use the new format. -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} ENV logstash_rpm_url=https://download.elastic.co/logstash/logstash/packages/centos/logstash-2.4.1.noarch.rpm ENV logstash_rpm_sha1sum=68c5e78c3d941f06f77d638c0756b6aea715bec5 @@ -49,7 +49,7 @@ RUN curl -sSL -o /tmp/logstash.rpm ${logstash_rpm_url} \ && yum -y install /tmp/logstash.rpm \ && rm -f /tmp/logstash.rpm -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} ENV logstash_deb_url=https://download.elastic.co/logstash/logstash/packages/debian/logstash-2.4.1_all.deb ENV logstash_deb_sha1sum=7ba3b174a3ef48a7d0945d9b5c7f12c5005abb47 diff --git a/docker/magnum/magnum-api/Dockerfile.j2 b/docker/magnum/magnum-api/Dockerfile.j2 index a799d2014d..a16bfe5396 100644 --- a/docker/magnum/magnum-api/Dockerfile.j2 +++ b/docker/magnum/magnum-api/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set magnum_api_packages = ['openstack-magnum-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set magnum_api_packages = ['magnum-api'] %} {% endif %} {{ macros.install_packages(magnum_api_packages | customizable("packages")) }} diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/docker/magnum/magnum-base/Dockerfile.j2 index bd86e95c97..9ae597a29f 100644 --- a/docker/magnum/magnum-base/Dockerfile.j2 +++ b/docker/magnum/magnum-base/Dockerfile.j2 @@ -8,9 +8,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='magnum') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux'] %} + {% if base_package_type == 'rpm' %} {% set magnum_base_packages = ['openstack-magnum-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set magnum_base_packages = ['magnum-common'] %} {% endif %} {{ macros.install_packages(magnum_base_packages | customizable("packages")) }} diff --git a/docker/magnum/magnum-conductor/Dockerfile.j2 b/docker/magnum/magnum-conductor/Dockerfile.j2 index e080e3b860..7946256cd7 100644 --- a/docker/magnum/magnum-conductor/Dockerfile.j2 +++ b/docker/magnum/magnum-conductor/Dockerfile.j2 @@ -6,12 +6,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set magnum_conductor_packages = [ 'openstack-magnum-conductor' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set magnum_conductor_packages = [ 'magnum-conductor' ] %} diff --git a/docker/manila/manila-api/Dockerfile.j2 b/docker/manila/manila-api/Dockerfile.j2 index 9ff1102830..c95d6eaeee 100644 --- a/docker/manila/manila-api/Dockerfile.j2 +++ b/docker/manila/manila-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set manila_api_packages = [ 'httpd', 'mod_ssl', @@ -18,7 +18,7 @@ RUN mkdir -p /var/www/cgi-bin/manila \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set manila_api_packages = [ 'apache2', 'libapache2-mod-wsgi', @@ -33,7 +33,7 @@ RUN mkdir -p /var/www/cgi-bin/manila \ {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set manila_api_packages = [ 'httpd', 'mod_ssl', @@ -43,7 +43,7 @@ RUN mkdir -p /var/www/cgi-bin/manila \ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set manila_api_packages = [ 'apache2', 'libapache2-mod-wsgi' diff --git a/docker/manila/manila-base/Dockerfile.j2 b/docker/manila/manila-base/Dockerfile.j2 index 98550e5f83..42bb189ab9 100644 --- a/docker/manila/manila-base/Dockerfile.j2 +++ b/docker/manila/manila-base/Dockerfile.j2 @@ -8,14 +8,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='manila') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set manila_base_packages = [ 'openstack-manila', 'openvswitch' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set manila_base_packages = [ 'manila-common', @@ -27,11 +27,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(manila_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set manila_base_packages = ['openvswitch'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set manila_base_packages = ['openvswitch-switch'] %} diff --git a/docker/manila/manila-data/Dockerfile.j2 b/docker/manila/manila-data/Dockerfile.j2 index eb8a9de9e7..33ac19aab8 100644 --- a/docker/manila/manila-data/Dockerfile.j2 +++ b/docker/manila/manila-data/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['debian', 'ubuntu'] %} + {% if base_package_type == 'deb' %} {% set manila_data_packages = [ 'manila-data' @@ -15,13 +15,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set manila_data_packages = [ 'nfs-utils' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set manila_data_packages = [ 'nfs-common' diff --git a/docker/manila/manila-scheduler/Dockerfile.j2 b/docker/manila/manila-scheduler/Dockerfile.j2 index 1643c02982..4757075f67 100644 --- a/docker/manila/manila-scheduler/Dockerfile.j2 +++ b/docker/manila/manila-scheduler/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['debian', 'ubuntu'] %} + {% if base_package_type == 'deb' %} {% set manila_scheduler_packages = [ 'manila-scheduler' diff --git a/docker/manila/manila-share/Dockerfile.j2 b/docker/manila/manila-share/Dockerfile.j2 index 1e4871297d..64f86ecbbb 100644 --- a/docker/manila/manila-share/Dockerfile.j2 +++ b/docker/manila/manila-share/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set manila_share_packages = [ 'openstack-manila-share', 'ceph-common' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set manila_share_packages = [ 'manila-share', 'ceph-common' @@ -23,11 +23,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(manila_share_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set manila_share_packages = [ 'ceph-common' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set manila_share_packages = [ 'ceph-common' ] %} diff --git a/docker/mariadb/Dockerfile.j2 b/docker/mariadb/Dockerfile.j2 index d63bcb83eb..67a1c1d604 100644 --- a/docker/mariadb/Dockerfile.j2 +++ b/docker/mariadb/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='mysql') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set mariadb_packages = [ 'expect', 'galera', @@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'tar' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set mariadb_packages = [ 'expect' ] %} @@ -47,7 +47,7 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start \ && chmod 440 /etc/sudoers.d/kolla_mariadb_sudoers \ && rm -rf /var/lib/mysql/* -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} RUN mkdir -p /var/run/mysqld && chown mysql /var/run/mysqld && chmod 755 /var/run/mysqld {% endif %} {% block mariadb_footer %}{% endblock %} diff --git a/docker/mistral/mistral-api/Dockerfile.j2 b/docker/mistral/mistral-api/Dockerfile.j2 index 2c8c76247c..d890e84a0f 100644 --- a/docker/mistral/mistral-api/Dockerfile.j2 +++ b/docker/mistral/mistral-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set mistral_api_packages = [ 'httpd', 'mod_ssl', @@ -17,7 +17,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set mistral_api_packages = [ 'apache2', 'libapache2-mod-wsgi', @@ -28,7 +28,7 @@ RUN echo > /etc/apache2/ports.conf {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set mistral_api_packages = [ 'httpd', 'mod_ssl', @@ -38,7 +38,7 @@ RUN echo > /etc/apache2/ports.conf RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set mistral_api_packages = [ 'apache2', 'libapache2-mod-wsgi' diff --git a/docker/mistral/mistral-base/Dockerfile.j2 b/docker/mistral/mistral-base/Dockerfile.j2 index 48f615aa3c..8bfbb25c8e 100644 --- a/docker/mistral/mistral-base/Dockerfile.j2 +++ b/docker/mistral/mistral-base/Dockerfile.j2 @@ -9,14 +9,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set mistral_base_packages = [ 'openstack-mistral-common', 'openstack-tacker', 'redis', ] %} # Note(egonzalez): Ubuntu does not have tacker packages yet. - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set mistral_base_packages = [ 'mistral-common', 'redis-server' diff --git a/docker/mistral/mistral-engine/Dockerfile.j2 b/docker/mistral/mistral-engine/Dockerfile.j2 index e3d9552803..498c6dd304 100644 --- a/docker/mistral/mistral-engine/Dockerfile.j2 +++ b/docker/mistral/mistral-engine/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set mistral_engine_packages = ['openstack-mistral-engine'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set mistral_engine_packages = ['mistral-engine'] %} {% endif %} {{ macros.install_packages(mistral_engine_packages | customizable("packages")) }} diff --git a/docker/mistral/mistral-event-engine/Dockerfile.j2 b/docker/mistral/mistral-event-engine/Dockerfile.j2 index 987c6cb93e..69b89cb4fd 100644 --- a/docker/mistral/mistral-event-engine/Dockerfile.j2 +++ b/docker/mistral/mistral-event-engine/Dockerfile.j2 @@ -6,10 +6,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set mistral_event_engine_packages = ['openstack-mistral-event-engine'] %} {{ macros.install_packages(mistral_event_engine_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} diff --git a/docker/mistral/mistral-executor/Dockerfile.j2 b/docker/mistral/mistral-executor/Dockerfile.j2 index b2b1d5ea6a..4180ed2844 100644 --- a/docker/mistral/mistral-executor/Dockerfile.j2 +++ b/docker/mistral/mistral-executor/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set mistral_executor_packages = ['openstack-mistral-executor'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set mistral_executor_packages = ['mistral-executor'] %} {% endif %} {{ macros.install_packages(mistral_executor_packages | customizable("packages")) }} diff --git a/docker/monasca/monasca-api/Dockerfile.j2 b/docker/monasca/monasca-api/Dockerfile.j2 index e9f7b5235e..97c96d95b0 100644 --- a/docker/monasca/monasca-api/Dockerfile.j2 +++ b/docker/monasca/monasca-api/Dockerfile.j2 @@ -12,11 +12,11 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set monasca_api_packages = [ 'mariadb', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set monasca_api_packages = [ 'mariadb-client', ] %} diff --git a/docker/monasca/monasca-base/Dockerfile.j2 b/docker/monasca/monasca-base/Dockerfile.j2 index bdf5e1475d..6adc1a91b5 100644 --- a/docker/monasca/monasca-base/Dockerfile.j2 +++ b/docker/monasca/monasca-base/Dockerfile.j2 @@ -14,7 +14,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set monasca_base_packages = [ 'httpd', 'mod_ssl', @@ -24,7 +24,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {{ macros.install_packages(monasca_base_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set monasca_base_packages = [ 'apache2', diff --git a/docker/monasca/monasca-grafana/Dockerfile.j2 b/docker/monasca/monasca-grafana/Dockerfile.j2 index df8bb8c35f..4a88bb0a27 100644 --- a/docker/monasca/monasca-grafana/Dockerfile.j2 +++ b/docker/monasca/monasca-grafana/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='monasca', homedir='/usr/share/grafana') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set monasca_grafana_build_packages = [ 'golang', 'git', @@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'fontconfig', 'rpm-build' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set monasca_grafana_build_packages = [ 'golang', 'git', @@ -60,9 +60,9 @@ RUN gem install fpm \ && mv ${monasca_grafana_build_path}/dist /grafana_pkgs \ && rm -rf /grafana -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set monasca_grafana_packages = ['/grafana_pkgs/grafana*.rpm'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set monasca_grafana_packages = ['/grafana_pkgs/grafana*.deb'] %} {% endif %} diff --git a/docker/monasca/monasca-thresh/Dockerfile.j2 b/docker/monasca/monasca-thresh/Dockerfile.j2 index 31c4abdd00..10170fb467 100644 --- a/docker/monasca/monasca-thresh/Dockerfile.j2 +++ b/docker/monasca/monasca-thresh/Dockerfile.j2 @@ -16,14 +16,14 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set monasca_thresh_packages = [ 'maven', ] %} ENV JAVA_HOME /usr/lib/jvm/jre-1.8.0-openjdk/ -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set monasca_thresh_packages = [ 'openjdk-8-jdk-headless', 'maven', diff --git a/docker/mongodb/Dockerfile.j2 b/docker/mongodb/Dockerfile.j2 index cf842f6152..ab32aa7e07 100644 --- a/docker/mongodb/Dockerfile.j2 +++ b/docker/mongodb/Dockerfile.j2 @@ -7,12 +7,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='mongodb') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set mongodb_packages = [ 'mongodb', 'mongodb-server' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set mongodb_packages = [ 'mongodb-server' ] %} diff --git a/docker/multipathd/Dockerfile.j2 b/docker/multipathd/Dockerfile.j2 index 60c8774c8c..0618930e57 100644 --- a/docker/multipathd/Dockerfile.j2 +++ b/docker/multipathd/Dockerfile.j2 @@ -5,9 +5,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set multipathd_packages = ['device-mapper-multipath'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set multipathd_packages = ['multipath-tools'] %} {% endif %} diff --git a/docker/murano/murano-api/Dockerfile.j2 b/docker/murano/murano-api/Dockerfile.j2 index e3712080fa..42323e7c3a 100644 --- a/docker/murano/murano-api/Dockerfile.j2 +++ b/docker/murano/murano-api/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} RUN ln -s /var/cache/murano/meta/io.murano.zip /io.murano.zip \ && ln -s /var/cache/murano/meta/io.murano.applications.zip /io.murano.applications.zip {% set murano_api_packages = ['openstack-murano-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN ln -s /usr/share/murano-common/io.murano.zip /io.murano.zip \ && ln -s /var/cache/murano/meta/io.murano.applications.zip /io.murano.applications.zip {% set murano_api_packages = ['murano-api'] %} diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2 index bacc403c9e..4be44f9bfa 100644 --- a/docker/murano/murano-base/Dockerfile.j2 +++ b/docker/murano/murano-base/Dockerfile.j2 @@ -9,9 +9,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set murano_base_packages = ['openstack-murano-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set murano_base_packages = ['murano-common'] %} {% endif %} diff --git a/docker/murano/murano-engine/Dockerfile.j2 b/docker/murano/murano-engine/Dockerfile.j2 index 2761f77d73..67a19d6e77 100644 --- a/docker/murano/murano-engine/Dockerfile.j2 +++ b/docker/murano/murano-engine/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set murano_engine_packages = ['openstack-murano-engine'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set murano_engine_packages = ['murano-engine'] %} {% endif %} diff --git a/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 b/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 index 1691320747..977e01b8d3 100644 --- a/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 +++ b/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 @@ -7,14 +7,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set ironic_neutron_agent_packages = [ 'python-networking-baremetal', 'python-ironic-neutron-agent' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 index 49f9750215..4faa65595e 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -7,12 +7,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='neutron') }} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} {{ macros.debian_haproxy_existing_user_fix() }} {% endif %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_base_packages = [ 'keepalived', @@ -30,7 +30,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python2-oslo-vmware' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_base_packages = [ 'iproute2', @@ -68,7 +68,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(neutron_base_packages | customizable("packages")) }} - {% if base_distro in ['debian', 'ubuntu'] %} + {% if base_package_type == 'deb' %} RUN mkdir -p /usr/share/neutron \ && ln -s /etc/neutron/api-paste.ini /usr/share/neutron/api-paste.ini @@ -76,7 +76,7 @@ RUN mkdir -p /usr/share/neutron \ {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_base_packages = [ 'conntrack-tools', @@ -92,7 +92,7 @@ RUN mkdir -p /usr/share/neutron \ 'uuid' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_base_packages = [ 'conntrack', diff --git a/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 b/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 index aee0c9b92e..c750625c83 100644 --- a/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 +++ b/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 @@ -6,12 +6,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_bgp_dragent_packages = [ 'openstack-neutron-bgp-dragent' ] %} - {% elif base_distro in ['ubuntu', 'debian'] %} + {% elif base_package_type == 'deb' %} {% set neutron_bgp_dragent_packages = [ 'neutron-bgp-dragent' ] %} diff --git a/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 b/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 index 271c99cd35..9a298baf31 100644 --- a/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 @@ -5,7 +5,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} {% if install_type == 'binary' %} {% set neutron_dhcp_agent_packages = [ 'neutron-dhcp-agent' diff --git a/docker/neutron/neutron-l3-agent/Dockerfile.j2 b/docker/neutron/neutron-l3-agent/Dockerfile.j2 index ac20115d72..0e9bdcd001 100644 --- a/docker/neutron/neutron-l3-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-l3-agent/Dockerfile.j2 @@ -6,14 +6,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_l3_agent_packages = [ 'openstack-neutron-vpn-agent', 'libreswan' ] %} # TODO(chenxing) Currently, there is no Ubuntu vpnaas package for Queens release. - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_l3_agent_packages = [ 'neutron-l3-agent', @@ -25,13 +25,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(neutron_l3_agent_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_l3_agent_packages = [ 'libreswan', 'radvd', 'dibbler-client' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_l3_agent_packages = [ 'strongswan', 'radvd', diff --git a/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 b/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 index 5d1fba741c..0ab48a89a9 100644 --- a/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 @@ -11,13 +11,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(neutron_lbaas_agent_packages | customizable("packages")) }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_lbaas_agent_packages = [ 'openstack-neutron-lbaas' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_lbaas_agent_packages = [ 'neutron-lbaas-common', diff --git a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 b/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 index 9470375cfe..a486fd5f9a 100644 --- a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 @@ -6,14 +6,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_linuxbridge_agent_packages = [ 'ebtables', 'openstack-neutron-linuxbridge' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_linuxbridge_agent_packages = [ 'ebtables', diff --git a/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 b/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 index 7c552ec9ff..1015f3b6ed 100644 --- a/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 +++ b/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 @@ -7,11 +7,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_metadata_agent_ovn_packages = [ 'python-networking-ovn-metadata-agent' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_metadata_agent_ovn_packages = [ 'python-networking-ovn' ] %} diff --git a/docker/neutron/neutron-metadata-agent/Dockerfile.j2 b/docker/neutron/neutron-metadata-agent/Dockerfile.j2 index e47abf3ceb..ef7e9453b4 100644 --- a/docker/neutron/neutron-metadata-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-metadata-agent/Dockerfile.j2 @@ -5,7 +5,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} {% if install_type == 'binary' %} {% set neutron_metadata_agent_packages = [ diff --git a/docker/neutron/neutron-metering-agent/Dockerfile.j2 b/docker/neutron/neutron-metering-agent/Dockerfile.j2 index fdd03b240e..84a9dc2769 100644 --- a/docker/neutron/neutron-metering-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-metering-agent/Dockerfile.j2 @@ -7,9 +7,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_metering_agent_packages = ['openstack-neutron-metering-agent'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_metering_agent_packages = ['neutron-metering-agent'] %} {% endif %} diff --git a/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 b/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 index 377f72e845..c62dce2f61 100644 --- a/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 @@ -6,14 +6,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_openvswitch_agent_packages = [ 'openstack-neutron-openvswitch', 'openvswitch' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_openvswitch_agent_packages = [ 'neutron-openvswitch-agent', diff --git a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 index 6b4f800827..35ddf01aaf 100644 --- a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 +++ b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 @@ -25,11 +25,11 @@ USER root {% elif install_type == 'source' %} {% if base_arch not in ['x86_64'] %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_server_opendaylight_packages = [ 'libjpeg-devel' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_server_opendaylight_packages = [ 'libjpeg-dev' ] %} diff --git a/docker/neutron/neutron-server/Dockerfile.j2 b/docker/neutron/neutron-server/Dockerfile.j2 index e236e2a37a..8d443bc9f4 100644 --- a/docker/neutron/neutron-server/Dockerfile.j2 +++ b/docker/neutron/neutron-server/Dockerfile.j2 @@ -6,14 +6,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_server_packages = [ 'openstack-neutron-vpnaas', 'python-networking-generic-switch', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_server_packages = [ 'neutron-lbaasv2-agent', diff --git a/docker/neutron/neutron-sriov-agent/Dockerfile.j2 b/docker/neutron/neutron-sriov-agent/Dockerfile.j2 index fd75e94b60..f60c2754b2 100644 --- a/docker/neutron/neutron-sriov-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-sriov-agent/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set neutron_sriov_agent_packages = [ 'openstack-neutron-sriov-nic-agent' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set neutron_sriov_agent_packages = [ 'neutron-sriov-agent' diff --git a/docker/nova/nova-api/Dockerfile.j2 b/docker/nova/nova-api/Dockerfile.j2 index 2effdb308b..2bd2a0cfbd 100644 --- a/docker/nova/nova-api/Dockerfile.j2 +++ b/docker/nova/nova-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_api_packages = [ 'httpd', @@ -18,7 +18,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_api_packages = [ 'apache2', @@ -33,7 +33,7 @@ RUN echo > /etc/apache2/ports.conf {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_api_packages = [ 'httpd', @@ -44,7 +44,7 @@ RUN echo > /etc/apache2/ports.conf RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_api_packages = [ 'apache2', diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2 index 73f3ca02e6..26f2cfdf6f 100644 --- a/docker/nova/nova-base/Dockerfile.j2 +++ b/docker/nova/nova-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='nova', groups='qemu') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_base_packages = [ 'bridge-utils', @@ -30,7 +30,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {# NOTE(Jeffrey4l): no packages for ppc64le #} {% endif %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_base_packages = [ 'bridge-utils', @@ -54,7 +54,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(nova_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_base_packages = [ 'bridge-utils', @@ -72,7 +72,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {# NOTE(Jeffrey4l): no packages for ppc64le #} {% endif %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_base_packages = [ 'bridge-utils', @@ -128,7 +128,7 @@ RUN chmod 750 /etc/sudoers.d \ {% endif %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% if base_arch == 'x86_64' %} # NOTE(jeffrey4l): for x86_64, nova will validate the existence of /usr/share/OVMF/OVMF_CODE.fd RUN ln -sf /usr/share/OVMF/OVMF_CODE.secboot.fd /usr/share/OVMF/OVMF_CODE.fd diff --git a/docker/nova/nova-compute-ironic/Dockerfile.j2 b/docker/nova/nova-compute-ironic/Dockerfile.j2 index bc387d0398..cf2d6738c2 100644 --- a/docker/nova/nova-compute-ironic/Dockerfile.j2 +++ b/docker/nova/nova-compute-ironic/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set nova_compute_ironic_packages = ['genisoimage'] %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_compute_ironic_packages = nova_compute_ironic_packages + [ 'nvme-cli', @@ -16,7 +16,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {{ macros.install_packages(nova_compute_ironic_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_compute_ironic_packages = nova_compute_ironic_packages + [ 'nova-compute' diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2 index 702d2cbbb5..03741d034d 100644 --- a/docker/nova/nova-compute/Dockerfile.j2 +++ b/docker/nova/nova-compute/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_compute_packages = [ 'ceph-common', @@ -28,7 +28,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(nova_compute_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} # ironic as workaround https://bugs.launchpad.net/packstack/+bug/1430388 {% set nova_compute_packages = [ @@ -63,7 +63,7 @@ RUN rm -f /etc/nova/nova-compute.conf {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_compute_packages = [ 'ceph-common', @@ -84,7 +84,7 @@ RUN rm -f /etc/nova/nova-compute.conf 'targetcli' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_compute_packages = [ 'ceph-common', diff --git a/docker/nova/nova-conductor/Dockerfile.j2 b/docker/nova/nova-conductor/Dockerfile.j2 index 8c238687f0..3f0dd9d76e 100644 --- a/docker/nova/nova-conductor/Dockerfile.j2 +++ b/docker/nova/nova-conductor/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_conductor_packages = [ 'openstack-nova-conductor' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_conductor_packages = [ 'nova-conductor' diff --git a/docker/nova/nova-consoleauth/Dockerfile.j2 b/docker/nova/nova-consoleauth/Dockerfile.j2 index 2c7835f9f1..9e8613f6c3 100644 --- a/docker/nova/nova-consoleauth/Dockerfile.j2 +++ b/docker/nova/nova-consoleauth/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_consoleauth_packages = [ 'openstack-nova-console' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_consoleauth_packages = [ 'nova-consoleauth', diff --git a/docker/nova/nova-libvirt/Dockerfile.j2 b/docker/nova/nova-libvirt/Dockerfile.j2 index f62fe90dc6..be503849e3 100644 --- a/docker/nova/nova-libvirt/Dockerfile.j2 +++ b/docker/nova/nova-libvirt/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='nova', groups='qemu') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set nova_libvirt_packages = [ 'ceph-common', @@ -30,7 +30,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% endif %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set nova_libvirt_packages = [ 'ceph-common', @@ -66,7 +66,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(nova_libvirt_packages | customizable("packages")) }} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} RUN rm -f /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml diff --git a/docker/nova/nova-novncproxy/Dockerfile.j2 b/docker/nova/nova-novncproxy/Dockerfile.j2 index 9f064c975d..b87c350f6d 100644 --- a/docker/nova/nova-novncproxy/Dockerfile.j2 +++ b/docker/nova/nova-novncproxy/Dockerfile.j2 @@ -6,14 +6,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_novncproxy_packages = [ 'novnc', 'openstack-nova-novncproxy' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_novncproxy_packages = [ 'nova-novncproxy' diff --git a/docker/nova/nova-placement-api/Dockerfile.j2 b/docker/nova/nova-placement-api/Dockerfile.j2 index f1ccac57c5..ef76e4fb98 100644 --- a/docker/nova/nova-placement-api/Dockerfile.j2 +++ b/docker/nova/nova-placement-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_placement_api_packages = [ 'httpd', @@ -19,7 +19,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_placement_api_packages = [ 'apache2', @@ -32,7 +32,7 @@ RUN truncate -s 0 /etc/apache2/ports.conf {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_placement_api_packages = [ 'httpd', @@ -43,7 +43,7 @@ RUN truncate -s 0 /etc/apache2/ports.conf {{ macros.install_packages(nova_placement_api_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_placement_api_packages = [ 'apache2', diff --git a/docker/nova/nova-scheduler/Dockerfile.j2 b/docker/nova/nova-scheduler/Dockerfile.j2 index d009e10726..0933e48d39 100644 --- a/docker/nova/nova-scheduler/Dockerfile.j2 +++ b/docker/nova/nova-scheduler/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_scheduler_packages = [ 'openstack-nova-scheduler' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_scheduler_packages = [ 'nova-scheduler' diff --git a/docker/nova/nova-serialproxy/Dockerfile.j2 b/docker/nova/nova-serialproxy/Dockerfile.j2 index 0b1450aed0..e3aa198bed 100644 --- a/docker/nova/nova-serialproxy/Dockerfile.j2 +++ b/docker/nova/nova-serialproxy/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_serialproxy_packages = [ 'openstack-nova-serialproxy' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_serialproxy_packages = [ 'nova-serialproxy' ] %} diff --git a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 index f630cb33fb..8003ac9b70 100644 --- a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 +++ b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_spicehtml5proxy_packages = [ 'numpy', @@ -14,7 +14,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'spice-html5' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_spicehtml5proxy_packages = [ 'nova-spiceproxy', @@ -24,14 +24,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set nova_spicehtml5proxy_packages = [ 'numpy', 'spice-html5' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set nova_spicehtml5proxy_packages = [ 'spice-html5', diff --git a/docker/nova/nova-ssh/Dockerfile.j2 b/docker/nova/nova-ssh/Dockerfile.j2 index f14f1068b7..a032cb6e7e 100644 --- a/docker/nova/nova-ssh/Dockerfile.j2 +++ b/docker/nova/nova-ssh/Dockerfile.j2 @@ -11,7 +11,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openssh-server' ] %} -{% if base_distro in ['debian', 'ubuntu'] %} +{% if base_package_type == 'deb' %} RUN mkdir -p /var/run/sshd \ && chmod 0755 /var/run/sshd diff --git a/docker/novajoin/novajoin-base/Dockerfile.j2 b/docker/novajoin/novajoin-base/Dockerfile.j2 index 2ac0c15f74..3495d0ef9c 100644 --- a/docker/novajoin/novajoin-base/Dockerfile.j2 +++ b/docker/novajoin/novajoin-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='novajoin') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set novajoin_base_packages = [ 'python-novajoin' @@ -22,7 +22,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {{ macros.install_packages(novajoin_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set novajoin_base_packages = [ 'ipa-admintools', ] %} diff --git a/docker/novajoin/novajoin-notifier/Dockerfile.j2 b/docker/novajoin/novajoin-notifier/Dockerfile.j2 index 9be1cdfbc4..e459a7fe14 100644 --- a/docker/novajoin/novajoin-notifier/Dockerfile.j2 +++ b/docker/novajoin/novajoin-notifier/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro not in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type != 'rpm' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} diff --git a/docker/novajoin/novajoin-server/Dockerfile.j2 b/docker/novajoin/novajoin-server/Dockerfile.j2 index 423aa5955a..4ffd665776 100644 --- a/docker/novajoin/novajoin-server/Dockerfile.j2 +++ b/docker/novajoin/novajoin-server/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro not in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type != 'rpm' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} diff --git a/docker/octavia/octavia-api/Dockerfile.j2 b/docker/octavia/octavia-api/Dockerfile.j2 index d1b9276aaa..65e2c03cec 100644 --- a/docker/octavia/octavia-api/Dockerfile.j2 +++ b/docker/octavia/octavia-api/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set octavia_api_packages = [ 'openstack-octavia-api' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} diff --git a/docker/octavia/octavia-base/Dockerfile.j2 b/docker/octavia/octavia-base/Dockerfile.j2 index b167904728..0efcc6db77 100644 --- a/docker/octavia/octavia-base/Dockerfile.j2 +++ b/docker/octavia/octavia-base/Dockerfile.j2 @@ -8,11 +8,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='octavia') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set octavia_base_packages = [ 'openstack-octavia-common' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} diff --git a/docker/octavia/octavia-health-manager/Dockerfile.j2 b/docker/octavia/octavia-health-manager/Dockerfile.j2 index 295eae1418..4dfcbe189c 100644 --- a/docker/octavia/octavia-health-manager/Dockerfile.j2 +++ b/docker/octavia/octavia-health-manager/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set octavia_health_manager_packages = [ 'openstack-octavia-health-manager' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} diff --git a/docker/octavia/octavia-housekeeping/Dockerfile.j2 b/docker/octavia/octavia-housekeeping/Dockerfile.j2 index ce73bbd202..c7a25cf7af 100644 --- a/docker/octavia/octavia-housekeeping/Dockerfile.j2 +++ b/docker/octavia/octavia-housekeeping/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set octavia_housekeeping_packages = [ 'openstack-octavia-housekeeping' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} diff --git a/docker/octavia/octavia-worker/Dockerfile.j2 b/docker/octavia/octavia-worker/Dockerfile.j2 index ad137f697f..2968524957 100644 --- a/docker/octavia/octavia-worker/Dockerfile.j2 +++ b/docker/octavia/octavia-worker/Dockerfile.j2 @@ -6,11 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set octavia_worker_packages = [ 'openstack-octavia-worker' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} diff --git a/docker/opendaylight/Dockerfile.j2 b/docker/opendaylight/Dockerfile.j2 index ed43d2e8e8..d71f586422 100644 --- a/docker/opendaylight/Dockerfile.j2 +++ b/docker/opendaylight/Dockerfile.j2 @@ -9,12 +9,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block opendaylight_install %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set opendaylight_packages = [ 'java-1.8.0-openjdk-headless', 'opendaylight', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set opendaylight_packages = [ 'opendaylight', 'openjdk-8-jre-headless', diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index f0d3e15baf..151bae8692 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} # TODO(Allen) Remove python-dogpile-cache after the requirement of # python-ironicclient is fixed. @@ -164,7 +164,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'tcp_wrappers-libs' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} # This will prevent questions from being asked during the install ENV DEBIAN_FRONTEND noninteractive @@ -208,7 +208,7 @@ ENV DEBIAN_FRONTEND noninteractive {{ macros.install_packages(openstack_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set openstack_base_packages = [ 'gcc', 'gcc-c++', @@ -229,7 +229,7 @@ ENV DEBIAN_FRONTEND noninteractive 'zip' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set openstack_base_packages = [ 'build-essential', 'ca-certificates', diff --git a/docker/openvswitch/openvswitch-base/Dockerfile.j2 b/docker/openvswitch/openvswitch-base/Dockerfile.j2 index f823dec06c..1b0a7c66c4 100644 --- a/docker/openvswitch/openvswitch-base/Dockerfile.j2 +++ b/docker/openvswitch/openvswitch-base/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block ovs_install %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set openvswitch_base_packages = [ 'openvswitch', 'python-netifaces', @@ -15,7 +15,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'tcpdump' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set openvswitch_base_packages = [ 'openvswitch-switch', 'python-openvswitch', diff --git a/docker/ovn/ovn-base/Dockerfile.j2 b/docker/ovn/ovn-base/Dockerfile.j2 index cb095d66be..b2fee7bcba 100644 --- a/docker/ovn/ovn-base/Dockerfile.j2 +++ b/docker/ovn/ovn-base/Dockerfile.j2 @@ -5,12 +5,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ovn_base_packages = [ 'openvswitch-ovn-common', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ovn_base_packages = [ 'ovn-common', ] %} diff --git a/docker/ovn/ovn-controller/Dockerfile.j2 b/docker/ovn/ovn-controller/Dockerfile.j2 index d22ae8ab5f..334a7f972e 100644 --- a/docker/ovn/ovn-controller/Dockerfile.j2 +++ b/docker/ovn/ovn-controller/Dockerfile.j2 @@ -5,12 +5,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ovn_controller_packages = [ 'openvswitch-ovn-host' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ovn_controller_packages = [ 'ovn-host' ] %} diff --git a/docker/ovn/ovn-nb-db-server/Dockerfile.j2 b/docker/ovn/ovn-nb-db-server/Dockerfile.j2 index a20b134660..75671f924e 100644 --- a/docker/ovn/ovn-nb-db-server/Dockerfile.j2 +++ b/docker/ovn/ovn-nb-db-server/Dockerfile.j2 @@ -5,12 +5,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ovn_nb_db_server_packages = [ 'openvswitch-ovn-central', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ovn_nb_db_server_packages = [ 'ovn-central', ] %} diff --git a/docker/ovn/ovn-northd/Dockerfile.j2 b/docker/ovn/ovn-northd/Dockerfile.j2 index 2f865ba879..a8af3f2093 100644 --- a/docker/ovn/ovn-northd/Dockerfile.j2 +++ b/docker/ovn/ovn-northd/Dockerfile.j2 @@ -5,12 +5,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ovn_northd_packages = [ 'openvswitch-ovn-central', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ovn_northd_packages = [ 'ovn-central', ] %} diff --git a/docker/ovn/ovn-sb-db-server/Dockerfile.j2 b/docker/ovn/ovn-sb-db-server/Dockerfile.j2 index 427c3d54e8..91adba8bd0 100644 --- a/docker/ovn/ovn-sb-db-server/Dockerfile.j2 +++ b/docker/ovn/ovn-sb-db-server/Dockerfile.j2 @@ -5,12 +5,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set ovn_sb_db_server_packages = [ 'openvswitch-ovn-central', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set ovn_sb_db_server_packages = [ 'ovn-central', ] %} diff --git a/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 b/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 index d64e667181..92f11947d7 100644 --- a/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 +++ b/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block ovsdpdk_install %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} #TODO(sean-k-mooney) create repo via open suse build system to package # for centos/oraclelinux/rhel distros. @@ -14,7 +14,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false -{% elif base_distro in ['ubuntu', 'debian'] %} +{% elif base_package_type == 'deb' %} {% set ovs_dpdk_packages = [ 'openvswitch-switch-dpdk' diff --git a/docker/panko/panko-api/Dockerfile.j2 b/docker/panko/panko-api/Dockerfile.j2 index 565df5679d..9e3a061672 100644 --- a/docker/panko/panko-api/Dockerfile.j2 +++ b/docker/panko/panko-api/Dockerfile.j2 @@ -6,13 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set panko_api_packages = [ 'openstack-panko-api', 'python-pymongo' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set panko_api_packages = [ 'panko-api', 'python-pymongo' diff --git a/docker/panko/panko-base/Dockerfile.j2 b/docker/panko/panko-base/Dockerfile.j2 index 7d5ac90d0d..1c8757f30b 100644 --- a/docker/panko/panko-base/Dockerfile.j2 +++ b/docker/panko/panko-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='panko') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set panko_base_packages = [ 'httpd', @@ -21,7 +21,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(panko_base_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set panko_base_packages = [ 'apache2', 'libapache2-mod-wsgi' @@ -30,7 +30,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ RUN echo > /etc/apache2/ports.conf {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set panko_base_packages = [ 'httpd', @@ -42,7 +42,7 @@ RUN echo > /etc/apache2/ports.conf RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set panko_base_packages = [ 'apache2', diff --git a/docker/placement/placement-api/Dockerfile.j2 b/docker/placement/placement-api/Dockerfile.j2 index 0ef86d6b21..7c84e42f8b 100644 --- a/docker/placement/placement-api/Dockerfile.j2 +++ b/docker/placement/placement-api/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set placement_api_packages = [ 'httpd', @@ -19,7 +19,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set placement_api_packages = [ 'apache2', @@ -32,7 +32,7 @@ RUN truncate -s 0 /etc/apache2/ports.conf {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set placement_api_packages = [ 'httpd', @@ -43,7 +43,7 @@ RUN truncate -s 0 /etc/apache2/ports.conf {{ macros.install_packages(placement_api_packages | customizable("packages")) }} RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set placement_api_packages = [ 'apache2', diff --git a/docker/placement/placement-base/Dockerfile.j2 b/docker/placement/placement-base/Dockerfile.j2 index e108944b4f..f24adcea18 100644 --- a/docker/placement/placement-base/Dockerfile.j2 +++ b/docker/placement/placement-base/Dockerfile.j2 @@ -8,13 +8,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='placement') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set placement_base_packages = [ 'openstack-placement-common', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set placement_base_packages = [] %} diff --git a/docker/qdrouterd/Dockerfile.j2 b/docker/qdrouterd/Dockerfile.j2 index 76137be9c1..d9071cdefe 100644 --- a/docker/qdrouterd/Dockerfile.j2 +++ b/docker/qdrouterd/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='qdrouterd') }} {% block qdrouterd_install %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set qdrouterd_packages = [ 'cyrus-sasl-lib', 'cyrus-sasl-plain', @@ -18,7 +18,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(qdrouterd_packages | customizable("packages")) }} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set qdrouterd_packages = [ 'sasl2-bin', 'libpython2.7', diff --git a/docker/rabbitmq/Dockerfile.j2 b/docker/rabbitmq/Dockerfile.j2 index 6326f108e1..55692f68b9 100644 --- a/docker/rabbitmq/Dockerfile.j2 +++ b/docker/rabbitmq/Dockerfile.j2 @@ -8,14 +8,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='rabbitmq') }} {% block rabbitmq_install %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set rabbitmq_packages = [ 'erlang-hipe', 'hostname', 'rabbitmq-server' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set rabbitmq_packages = [ 'erlang-nox', 'logrotate' diff --git a/docker/rally/Dockerfile.j2 b/docker/rally/Dockerfile.j2 index cbe7915459..2b6b6f8f07 100644 --- a/docker/rally/Dockerfile.j2 +++ b/docker/rally/Dockerfile.j2 @@ -9,12 +9,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set rally_packages = [ 'openstack-rally', 'python-os-testr' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set rally_packages = [ 'python-os-testr', 'rally' diff --git a/docker/redis/redis-sentinel/Dockerfile.j2 b/docker/redis/redis-sentinel/Dockerfile.j2 index e6ce0b6005..92e87db356 100644 --- a/docker/redis/redis-sentinel/Dockerfile.j2 +++ b/docker/redis/redis-sentinel/Dockerfile.j2 @@ -5,9 +5,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set redis_sentinel_packages = ['redis'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set redis_sentinel_packages = ['redis-sentinel'] %} {% endif %} {{ macros.install_packages(redis_sentinel_packages | customizable("packages")) }} diff --git a/docker/redis/redis/Dockerfile.j2 b/docker/redis/redis/Dockerfile.j2 index 0f81725f2c..7bc788c9dd 100644 --- a/docker/redis/redis/Dockerfile.j2 +++ b/docker/redis/redis/Dockerfile.j2 @@ -5,9 +5,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set redis_packages = ['redis'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set redis_packages = ['redis-server'] %} {% endif %} {{ macros.install_packages(redis_packages | customizable("packages")) }} diff --git a/docker/rsyslog/rsyslog/Dockerfile.j2 b/docker/rsyslog/rsyslog/Dockerfile.j2 index b65ae1a4d1..434dc107aa 100644 --- a/docker/rsyslog/rsyslog/Dockerfile.j2 +++ b/docker/rsyslog/rsyslog/Dockerfile.j2 @@ -5,14 +5,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set rsyslog_packages = [ 'rsyslog-elasticsearch', 'rsyslog-gnutls', 'rsyslog-mmjsonparse', 'rsyslog-mmnormalize' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set rsyslog_packages = [ 'rsyslog-gnutls' ] %} diff --git a/docker/sahara/sahara-api/Dockerfile.j2 b/docker/sahara/sahara-api/Dockerfile.j2 index a2af0fd6c4..bb756383fc 100644 --- a/docker/sahara/sahara-api/Dockerfile.j2 +++ b/docker/sahara/sahara-api/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set sahara_api_packages = ['openstack-sahara-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set sahara_api_packages = ['sahara-api'] %} {% endif %} {{ macros.install_packages(sahara_api_packages | customizable("packages")) }} diff --git a/docker/sahara/sahara-base/Dockerfile.j2 b/docker/sahara/sahara-base/Dockerfile.j2 index 4026a4da9d..50a10bd162 100644 --- a/docker/sahara/sahara-base/Dockerfile.j2 +++ b/docker/sahara/sahara-base/Dockerfile.j2 @@ -9,18 +9,18 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set sahara_base_packages = ['openstack-sahara-common'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set sahara_base_packages = ['sahara-common'] %} {% endif %} {{ macros.install_packages(sahara_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set sahara_base_packages = ['openssh'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set sahara_base_packages = ['openssh-client'] %} {% endif %} {{ macros.install_packages(sahara_base_packages | customizable("packages")) }} diff --git a/docker/sahara/sahara-engine/Dockerfile.j2 b/docker/sahara/sahara-engine/Dockerfile.j2 index a9cc0468a6..8c68117f6d 100644 --- a/docker/sahara/sahara-engine/Dockerfile.j2 +++ b/docker/sahara/sahara-engine/Dockerfile.j2 @@ -6,21 +6,21 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set sahara_engine_packages = [ 'nc', 'openstack-sahara-engine', ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set sahara_engine_packages = [ 'netcat', 'sahara-engine', ] %} {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set sahara_engine_packages = ['nc'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set sahara_engine_packages = ['netcat'] %} {% endif %} {% endif %} diff --git a/docker/senlin/senlin-api/Dockerfile.j2 b/docker/senlin/senlin-api/Dockerfile.j2 index ebc1453c7d..e60b77d355 100644 --- a/docker/senlin/senlin-api/Dockerfile.j2 +++ b/docker/senlin/senlin-api/Dockerfile.j2 @@ -6,10 +6,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set senlin_api_packages = ['openstack-senlin-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set senlin_api_packages = ['senlin-api'] %} {% endif %} diff --git a/docker/senlin/senlin-base/Dockerfile.j2 b/docker/senlin/senlin-base/Dockerfile.j2 index 46f9797d62..303de448a8 100644 --- a/docker/senlin/senlin-base/Dockerfile.j2 +++ b/docker/senlin/senlin-base/Dockerfile.j2 @@ -8,10 +8,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='senlin') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set senlin_base_packages = ['openstack-senlin-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set senlin_base_packages = ['senlin-common'] %} {% endif %} diff --git a/docker/senlin/senlin-engine/Dockerfile.j2 b/docker/senlin/senlin-engine/Dockerfile.j2 index a31a041461..17ec88da5d 100644 --- a/docker/senlin/senlin-engine/Dockerfile.j2 +++ b/docker/senlin/senlin-engine/Dockerfile.j2 @@ -6,10 +6,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set senlin_engine_packages = ['openstack-senlin-engine'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set senlin_engine_packages = ['senlin-engine'] %} {% endif %} diff --git a/docker/sensu/sensu-base/Dockerfile.j2 b/docker/sensu/sensu-base/Dockerfile.j2 index c816192beb..e182fd5faa 100644 --- a/docker/sensu/sensu-base/Dockerfile.j2 +++ b/docker/sensu/sensu-base/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='sensu') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set sensu_base_packages = ['sensu'] %} {% elif base_distro in ['ubuntu'] %} {% set sensu_base_packages = ['sensu'] %} diff --git a/docker/sensu/sensu-client/Dockerfile.j2 b/docker/sensu/sensu-client/Dockerfile.j2 index 718f05b0cb..dae01dcaa0 100644 --- a/docker/sensu/sensu-client/Dockerfile.j2 +++ b/docker/sensu/sensu-client/Dockerfile.j2 @@ -5,7 +5,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set sensu_client_packages = [ 'ceph-common', 'cyrus-sasl-devel', @@ -18,7 +18,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python-pymongo', 'ruby-devel' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set sensu_client_packages = [ 'build-essential', 'ceph-common', diff --git a/docker/sensu/sensu-server/Dockerfile.j2 b/docker/sensu/sensu-server/Dockerfile.j2 index e64640923f..53950c91ed 100644 --- a/docker/sensu/sensu-server/Dockerfile.j2 +++ b/docker/sensu/sensu-server/Dockerfile.j2 @@ -5,14 +5,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set sensu_server_packages = [ 'cyrus-sasl-devel', 'gcc-c++', 'make', 'ruby-devel' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set sensu_server_packages = [ 'build-essential', 'libsasl2-dev' diff --git a/docker/skydive/skydive-agent/Dockerfile.j2 b/docker/skydive/skydive-agent/Dockerfile.j2 index 35862deeeb..87a1729f92 100644 --- a/docker/skydive/skydive-agent/Dockerfile.j2 +++ b/docker/skydive/skydive-agent/Dockerfile.j2 @@ -6,12 +6,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% block skydive_agent_install %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set skydive_agent_packages = [ 'openvswitch', 'skydive-agent' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set skydive_agent_packages = ['openvswitch-common'] %} {% endif %} {{ macros.install_packages(skydive_agent_packages | customizable("packages")) }} diff --git a/docker/skydive/skydive-analyzer/Dockerfile.j2 b/docker/skydive/skydive-analyzer/Dockerfile.j2 index a81a92cfaf..776ddbca58 100644 --- a/docker/skydive/skydive-analyzer/Dockerfile.j2 +++ b/docker/skydive/skydive-analyzer/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% block skydive_analyzer_install %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set skydive_analyzer_packages = ['skydive-analyzer'] %} {{ macros.install_packages(skydive_analyzer_packages | customizable("packages")) }} {% endif %} diff --git a/docker/skydive/skydive-base/Dockerfile.j2 b/docker/skydive/skydive-base/Dockerfile.j2 index 814b1dde3f..9bd602d864 100644 --- a/docker/skydive/skydive-base/Dockerfile.j2 +++ b/docker/skydive/skydive-base/Dockerfile.j2 @@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='skydive') }} {% block skydive_install %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set skydive_base_packages = ['skydive'] %} {{ macros.install_packages(skydive_base_packages | customizable("packages")) }} {% else %} diff --git a/docker/storm/Dockerfile.j2 b/docker/storm/Dockerfile.j2 index 988ef3031f..aa3c13f5e6 100644 --- a/docker/storm/Dockerfile.j2 +++ b/docker/storm/Dockerfile.j2 @@ -7,11 +7,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='storm', homedir='/opt/storm') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set storm_packages = [ 'java-1.8.0-openjdk-headless', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set storm_packages = [ 'openjdk-8-jre-headless', ] %} diff --git a/docker/swift/swift-account/Dockerfile.j2 b/docker/swift/swift-account/Dockerfile.j2 index 1c09a5228c..dee2a1f7a5 100644 --- a/docker/swift/swift-account/Dockerfile.j2 +++ b/docker/swift/swift-account/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set swift_acount_packages = ['openstack-swift-account'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set swift_acount_packages = ['swift-account'] %} {% endif %} diff --git a/docker/swift/swift-base/Dockerfile.j2 b/docker/swift/swift-base/Dockerfile.j2 index 947a243f2e..c5b81d6570 100644 --- a/docker/swift/swift-base/Dockerfile.j2 +++ b/docker/swift/swift-base/Dockerfile.j2 @@ -8,13 +8,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='swift') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set swift_base_packages = [ 'openstack-swift', 'nmap-ncat' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set swift_base_packages = [ 'swift', 'netcat-openbsd' @@ -24,9 +24,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(swift_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set swift_base_packages = ['liberasurecode-devel','nmap-ncat'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set swift_base_packages = ['liberasurecode-dev','netcat-openbsd'] %} {% endif %} diff --git a/docker/swift/swift-container/Dockerfile.j2 b/docker/swift/swift-container/Dockerfile.j2 index 74ba261895..645660b813 100644 --- a/docker/swift/swift-container/Dockerfile.j2 +++ b/docker/swift/swift-container/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set swift_container_packages = ['openstack-swift-container'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set swift_container_packages = ['swift-container'] %} {% endif %} diff --git a/docker/swift/swift-object-expirer/Dockerfile.j2 b/docker/swift/swift-object-expirer/Dockerfile.j2 index 2e2b5c4203..82ae2249c0 100644 --- a/docker/swift/swift-object-expirer/Dockerfile.j2 +++ b/docker/swift/swift-object-expirer/Dockerfile.j2 @@ -6,10 +6,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} # RDO packages swift-object-expirer in openstack-swift-proxy {% set swift_object_expirer_packages = ['openstack-swift-proxy'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set swift_object_expirer_packages = ['swift-object'] %} {% endif %} diff --git a/docker/swift/swift-object/Dockerfile.j2 b/docker/swift/swift-object/Dockerfile.j2 index 796a1dcc47..8f0c5f0e09 100644 --- a/docker/swift/swift-object/Dockerfile.j2 +++ b/docker/swift/swift-object/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set swift_object_packages = ['openstack-swift-object'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set swift_object_packages = ['swift-object'] %} {% endif %} diff --git a/docker/swift/swift-proxy-server/Dockerfile.j2 b/docker/swift/swift-proxy-server/Dockerfile.j2 index 4e5aaf4d9c..4cfe18d2b0 100644 --- a/docker/swift/swift-proxy-server/Dockerfile.j2 +++ b/docker/swift/swift-proxy-server/Dockerfile.j2 @@ -6,12 +6,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set swift_proxy_server_packages = [ 'openstack-swift-proxy', 'python-ceilometermiddleware' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set swift_proxy_server_packages = [ 'swift-proxy', 'python-ceilometermiddleware' diff --git a/docker/swift/swift-rsyncd/Dockerfile.j2 b/docker/swift/swift-rsyncd/Dockerfile.j2 index cbbeb5d945..b4c49c85b5 100644 --- a/docker/swift/swift-rsyncd/Dockerfile.j2 +++ b/docker/swift/swift-rsyncd/Dockerfile.j2 @@ -5,9 +5,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set swift_rsyncd_packages = ['rsync'] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set swift_rsyncd_packages = ['rsync'] %} {% endif %} diff --git a/docker/tacker/tacker-base/Dockerfile.j2 b/docker/tacker/tacker-base/Dockerfile.j2 index 4bc277170f..5a3a8c8708 100644 --- a/docker/tacker/tacker-base/Dockerfile.j2 +++ b/docker/tacker/tacker-base/Dockerfile.j2 @@ -9,13 +9,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set tacker_base_packages = [ 'openstack-tacker-common', 'python-networking-sfc' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/tacker/tacker-conductor/Dockerfile.j2 b/docker/tacker/tacker-conductor/Dockerfile.j2 index 2fe717c019..c4cf2e78b8 100644 --- a/docker/tacker/tacker-conductor/Dockerfile.j2 +++ b/docker/tacker/tacker-conductor/Dockerfile.j2 @@ -7,12 +7,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set tacker_conductor_packages = [ 'openstack-tacker' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/tacker/tacker-server/Dockerfile.j2 b/docker/tacker/tacker-server/Dockerfile.j2 index 1e7bae11c7..79b6b52c89 100644 --- a/docker/tacker/tacker-server/Dockerfile.j2 +++ b/docker/tacker/tacker-server/Dockerfile.j2 @@ -7,12 +7,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set tacker_server_packages = [ 'openstack-tacker' ] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/telegraf/Dockerfile.j2 b/docker/telegraf/Dockerfile.j2 index b43f9fed4a..ded397ae1f 100644 --- a/docker/telegraf/Dockerfile.j2 +++ b/docker/telegraf/Dockerfile.j2 @@ -13,12 +13,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'telegraf' ] %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set telegraf_packages = telegraf_packages + [ 'collectd', 'python2-pip' ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set telegraf_packages = telegraf_packages + [ 'collectd-core', 'python-pip' diff --git a/docker/tempest/Dockerfile.j2 b/docker/tempest/Dockerfile.j2 index 8c01b70afb..b84841afb9 100644 --- a/docker/tempest/Dockerfile.j2 +++ b/docker/tempest/Dockerfile.j2 @@ -8,13 +8,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='tempest') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set tempest_packages = ['openstack-tempest-all'] %} {{ macros.install_packages(tempest_packages | customizable("packages")) }} RUN ln -sf /usr/share/openstack-tempest /tempest - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set tempest_packages = ['tempest'] %} {{ macros.install_packages(tempest_packages | customizable("packages")) }} diff --git a/docker/tgtd/Dockerfile.j2 b/docker/tgtd/Dockerfile.j2 index b15fc869b8..48f7dc4b18 100644 --- a/docker/tgtd/Dockerfile.j2 +++ b/docker/tgtd/Dockerfile.j2 @@ -5,13 +5,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set tgtd_packages = ['scsi-target-utils'] %} {{ macros.install_packages(tgtd_packages | customizable("packages")) }} RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set tgtd_packages = ['tgt'] %} {{ macros.install_packages(tgtd_packages | customizable("packages")) }} diff --git a/docker/tripleo-ui/Dockerfile.j2 b/docker/tripleo-ui/Dockerfile.j2 index 37f4eeda17..b14e4dcaff 100644 --- a/docker/tripleo-ui/Dockerfile.j2 +++ b/docker/tripleo-ui/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set tripleo_ui_packages = [ 'httpd', @@ -25,7 +25,7 @@ RUN echo 'tripleo-ui not yet available for {{ base_distro }}' && /bin/false {% endif %} {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set tripleo_ui_packages = [ 'httpd', 'mod_ssl', @@ -39,7 +39,7 @@ RUN echo 'tripleo-ui not yet available for {{ base_distro }}' && /bin/false RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo 'tripleo-ui not yet available for {{ base_distro }}' && /bin/false {% endif %} diff --git a/docker/tripleoclient/Dockerfile.j2 b/docker/tripleoclient/Dockerfile.j2 index ee9851e62b..f4ad80d008 100644 --- a/docker/tripleoclient/Dockerfile.j2 +++ b/docker/tripleoclient/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set tripleoclient_packages = [ 'python-ipaddr', diff --git a/docker/trove/trove-api/Dockerfile.j2 b/docker/trove/trove-api/Dockerfile.j2 index a10ec3613a..ce228bef95 100644 --- a/docker/trove/trove-api/Dockerfile.j2 +++ b/docker/trove/trove-api/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set trove_api_packages = ['openstack-trove-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set trove_api_packages = ['trove-api'] %} {% endif %} diff --git a/docker/trove/trove-base/Dockerfile.j2 b/docker/trove/trove-base/Dockerfile.j2 index 61356e7fb9..0212c9674f 100644 --- a/docker/trove/trove-base/Dockerfile.j2 +++ b/docker/trove/trove-base/Dockerfile.j2 @@ -9,9 +9,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set trove_base_packages = ['openstack-trove-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set trove_base_packages = ['trove-common'] %} {% endif %} diff --git a/docker/trove/trove-conductor/Dockerfile.j2 b/docker/trove/trove-conductor/Dockerfile.j2 index 0cc1241553..78cc2f5960 100644 --- a/docker/trove/trove-conductor/Dockerfile.j2 +++ b/docker/trove/trove-conductor/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set trove_conductor_packages = ['openstack-trove-conductor'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set trove_conductor_packages = ['trove-conductor'] %} {% endif %} diff --git a/docker/trove/trove-guestagent/Dockerfile.j2 b/docker/trove/trove-guestagent/Dockerfile.j2 index 1f59a1a49c..79bc577f73 100644 --- a/docker/trove/trove-guestagent/Dockerfile.j2 +++ b/docker/trove/trove-guestagent/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set trove_guestagent_packages = ['openstack-trove-guestagent'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set trove_guestagent_packages = ['trove-guestagent'] %} {% endif %} diff --git a/docker/trove/trove-taskmanager/Dockerfile.j2 b/docker/trove/trove-taskmanager/Dockerfile.j2 index 09e9eaa4f5..dfaae12e9d 100644 --- a/docker/trove/trove-taskmanager/Dockerfile.j2 +++ b/docker/trove/trove-taskmanager/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set trove_taskmanager_packages = ['openstack-trove-taskmanager'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set trove_taskmanager_packages = ['trove-taskmanager'] %} {% endif %} diff --git a/docker/vitrage/vitrage-api/Dockerfile.j2 b/docker/vitrage/vitrage-api/Dockerfile.j2 index 1d486e8fd1..e9b9a9fe97 100644 --- a/docker/vitrage/vitrage-api/Dockerfile.j2 +++ b/docker/vitrage/vitrage-api/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set vitrage_api_packages = [ 'httpd', @@ -21,7 +21,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/vitrage/vitrage-base/Dockerfile.j2 b/docker/vitrage/vitrage-base/Dockerfile.j2 index c5246a819e..fb9acf2ddb 100644 --- a/docker/vitrage/vitrage-base/Dockerfile.j2 +++ b/docker/vitrage/vitrage-base/Dockerfile.j2 @@ -9,7 +9,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set vitrage_base_packages = [ 'openstack-vitrage-common' @@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build && cp -a /usr/lib/python2.7/site-packages/vitrage/api/app.wsgi /var/www/cgi-bin/vitrage/ \ && chown -R vitrage: /var/www/cgi-bin/vitrage - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false @@ -29,7 +29,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set vitrage_base_packages = [ 'httpd', @@ -42,7 +42,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set vitrage_base_packages = [ 'apache2', diff --git a/docker/vitrage/vitrage-graph/Dockerfile.j2 b/docker/vitrage/vitrage-graph/Dockerfile.j2 index 983c39d881..1621a4d28c 100644 --- a/docker/vitrage/vitrage-graph/Dockerfile.j2 +++ b/docker/vitrage/vitrage-graph/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set vitrage_graph_packages = [ 'openstack-vitrage-graph' @@ -15,7 +15,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(vitrage_graph_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/vitrage/vitrage-ml/Dockerfile.j2 b/docker/vitrage/vitrage-ml/Dockerfile.j2 index 4fdc0ecbd6..45d6b1c47d 100644 --- a/docker/vitrage/vitrage-ml/Dockerfile.j2 +++ b/docker/vitrage/vitrage-ml/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set vitrage_ml_packages = [ 'openstack-vitrage-ml' @@ -15,7 +15,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(vitrage_ml_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/vitrage/vitrage-notifier/Dockerfile.j2 b/docker/vitrage/vitrage-notifier/Dockerfile.j2 index f3edaccb93..814507a3f8 100644 --- a/docker/vitrage/vitrage-notifier/Dockerfile.j2 +++ b/docker/vitrage/vitrage-notifier/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set vitrage_notifier_packages = [ 'openstack-vitrage-notifier' @@ -15,7 +15,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(vitrage_notifier_packages | customizable("packages")) }} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/watcher/watcher-api/Dockerfile.j2 b/docker/watcher/watcher-api/Dockerfile.j2 index 767b9595ce..7df63c0ea0 100644 --- a/docker/watcher/watcher-api/Dockerfile.j2 +++ b/docker/watcher/watcher-api/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set watcher_api_packages = ['openstack-watcher-api'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set watcher_api_packages = ['watcher-api'] %} {% endif %} {{ macros.install_packages(watcher_api_packages | customizable("packages")) }} diff --git a/docker/watcher/watcher-applier/Dockerfile.j2 b/docker/watcher/watcher-applier/Dockerfile.j2 index c67c772754..925ac2bbf9 100644 --- a/docker/watcher/watcher-applier/Dockerfile.j2 +++ b/docker/watcher/watcher-applier/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set watcher_applier_packages = ['openstack-watcher-applier'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set watcher_applier_packages = ['watcher-applier'] %} {% endif %} {{ macros.install_packages(watcher_applier_packages | customizable("packages")) }} diff --git a/docker/watcher/watcher-base/Dockerfile.j2 b/docker/watcher/watcher-base/Dockerfile.j2 index 7ad23c9bdd..33b1cc9628 100644 --- a/docker/watcher/watcher-base/Dockerfile.j2 +++ b/docker/watcher/watcher-base/Dockerfile.j2 @@ -8,9 +8,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='watcher') }} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set watcher_base_packages = ['openstack-watcher-common'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set watcher_base_packages = ['watcher-common'] %} {% endif %} {{ macros.install_packages(watcher_base_packages | customizable("packages")) }} diff --git a/docker/watcher/watcher-engine/Dockerfile.j2 b/docker/watcher/watcher-engine/Dockerfile.j2 index 79c422f42f..29a434d7b6 100644 --- a/docker/watcher/watcher-engine/Dockerfile.j2 +++ b/docker/watcher/watcher-engine/Dockerfile.j2 @@ -6,9 +6,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set watcher_engine_packages = ['openstack-watcher-decision-engine'] %} - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set watcher_engine_packages = ['watcher-decision-engine'] %} {% endif %} {{ macros.install_packages(watcher_engine_packages | customizable("packages")) }} diff --git a/docker/xtrabackup/Dockerfile.j2 b/docker/xtrabackup/Dockerfile.j2 index 72fd82288d..9c11c4ccba 100644 --- a/docker/xtrabackup/Dockerfile.j2 +++ b/docker/xtrabackup/Dockerfile.j2 @@ -5,11 +5,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} RUN yum-config-manager --enable percona\* {% endif %} -{% if base_distro in ['centos', 'oraclelinux', 'rhel', 'ubuntu', 'debian'] %} +{% if base_package_type in ['rpm', 'deb'] %} {% set xtrabackup_packages = ['percona-xtrabackup-24', 'qpress'] %} {% endif %} diff --git a/docker/zaqar/zaqar-base/Dockerfile.j2 b/docker/zaqar/zaqar-base/Dockerfile.j2 index 5c78b5b3d4..0255b4a317 100644 --- a/docker/zaqar/zaqar-base/Dockerfile.j2 +++ b/docker/zaqar/zaqar-base/Dockerfile.j2 @@ -9,7 +9,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set zaqar_base_packages = [ 'openstack-zaqar', 'httpd', @@ -25,7 +25,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set zaqar_base_packages = [ 'zaqar-common', 'apache2', @@ -42,7 +42,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set zaqar_base_packages = [ 'httpd', 'mod_ssl', @@ -54,7 +54,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set zaqar_base_packages = [ 'apache2', 'libapache2-mod-wsgi', diff --git a/docker/zaqar/zaqar-server/Dockerfile.j2 b/docker/zaqar/zaqar-server/Dockerfile.j2 index 72aeaed504..0c75be754b 100644 --- a/docker/zaqar/zaqar-server/Dockerfile.j2 +++ b/docker/zaqar/zaqar-server/Dockerfile.j2 @@ -6,7 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['debian', 'ubuntu'] %} + {% if base_package_type == 'deb' %} {% set zaqar_server_packages = ['zaqar-server'] %} {{ macros.install_packages(zaqar_server_packages | customizable("packages")) }} diff --git a/docker/zookeeper/Dockerfile.j2 b/docker/zookeeper/Dockerfile.j2 index da1205350d..28d21c477e 100644 --- a/docker/zookeeper/Dockerfile.j2 +++ b/docker/zookeeper/Dockerfile.j2 @@ -7,11 +7,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.configure_user(name='zookeeper', homedir='/opt/zookeeper') }} -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} {% set zookeeper_packages = [ 'java-1.8.0-openjdk-headless', ] %} -{% elif base_distro in ['debian', 'ubuntu'] %} +{% elif base_package_type == 'deb' %} {% set zookeeper_packages = [ 'default-jre-headless', ] %} diff --git a/docker/zun/zun-base/Dockerfile.j2 b/docker/zun/zun-base/Dockerfile.j2 index 81845b6036..f60ddb1b91 100644 --- a/docker/zun/zun-base/Dockerfile.j2 +++ b/docker/zun/zun-base/Dockerfile.j2 @@ -14,7 +14,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% if base_package_type == 'rpm' %} {% set zun_base_packages = [ 'httpd', @@ -29,7 +29,7 @@ RUN mkdir -p /var/www/cgi-bin/zun \ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - {% elif base_distro in ['debian', 'ubuntu'] %} + {% elif base_package_type == 'deb' %} {% set zun_base_packages = [ 'apache2',