{% extends parent_template %}

# Disable external repos
{% set base_yum_repo_files_override = [] %}
{% set base_yum_url_packages_override = [] %}
{% set base_yum_repo_keys_override = [] %}

# Enable ODL repo in ODL Dockerfile
{% block opendaylight_header %}
RUN echo $'[opendaylight-8-devel]\n\
name=OpenDaylight Oxygen repository\n\
baseurl=https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel/\n\
enabled=1\n\
gpgcheck=0' >> /etc/yum.repos.d/opendaylight.repo
{% endblock %}

# Remove EPEL and the dependencies requiring it
{% set base_centos_yum_repo_packages_remove = ['epel-release', 'centos-release-ceph-jewel'] %}
{% set base_centos_yum_repo_packages_append = ['centos-release-ceph-luminous', 'centos-release-opstools'] %}
{% set base_centos_binary_packages_remove = ['scsi-target-utils'] %}
{% set cinder_volume_packages_remove = ['scsi-target-utils'] %}
{% set ironic_conductor_packages_remove = ['shellinabox'] %}
{% set barbican_api_packages_remove = ['uwsgi-plugin-python'] %}
{% block cinder_volume_redhat_setup %}
# RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf
{% endblock %}

# This installs the puppet dependency in the base container and includes helper scripts
# Rsync is required for docker-puppet.py to move the generated config to /var/lib/config-data
# Cron is required by multiple services
{% set base_centos_binary_packages_append = ['openstack-tripleo-common-container-base', 'rsync', 'cronie', 'crudini', 'openstack-selinux', 'ansible', 'python-shade', 'puppet-tripleo', 'python2-kubernetes'] %}
{% set nova_scheduler_packages_append = ['openstack-tripleo-common'] %}

# Required for mistral-db-populate to load tripleo custom actions on
# the undercloud
{% set mistral_base_packages_append = ['openstack-tripleo-common'] %}

# NOTE: Mistral executor needs to run nova-manage cells_v2 commands on
# the undercloud baremetal workflows.
{% set mistral_executor_packages_append = ['openstack-nova-common'] %}

# FIXME (kolla review to add ceilometer to swift proxy image)
# NOTE (jaosorior): swift proxy with TLS everywhere needs these packages.
# NOTE(mandre) Apache cleanup done below in swift_proxy_server_footer block
{% set swift_proxy_server_packages_append = ['openstack-ceilometer-common', 'httpd', 'mod_ssl'] %}

# NOTE (jaosorior): glance-api with TLS everywhere needs these packages.
# NOTE(mandre) Apache cleanup done below in glance_api_footer block
{% set glance_api_packages_append = ['httpd', 'mod_ssl'] %}

# NOTE (ratailor): ec2-api with TLS needs these packages.
{% set ec2_api_packages_append = ['httpd', 'mod_ssl'] %}
{% block ec2_api_footer %}
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 \
    && echo "if [[ "\$\(whoami\)" == 'root' ]]; then rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*; fi" >> /usr/local/bin/kolla_extend_start
{% endblock %}

# NOTE (jaosorior): neutron-server with TLS everywhere needs httpd and mod_ssl packages.
# NOTE (hjensas): python2-networking-baremetal ML2 plug-in for ironic neutron integration.
{% set neutron_server_packages_append = ['httpd',
                                         'mod_ssl',
                                         'python2-networking-baremetal'] %}
{% block neutron_server_footer %}
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 \
    && echo "if [[ "\$\(whoami\)" == 'root' ]]; then rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*; fi" >> /usr/local/bin/kolla_neutron_extend_start; \
    mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/neutron-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% set neutron_l3_agent_packages = ['docker'] %}
{% set neutron_dhcp_agent_packages = ['docker'] %}

# NOTE (jaosorior): redis with TLS everywhere needs these packages.
# redis resource-agent requires pidof
{% set redis_packages_append = ['stunnel', 'sysvinit-tools',
    'pacemaker', 'pacemaker-remote', 'pcs', 'libqb', 'resource-agents'] %}

# Remove packages not present in repos
#
{# 'libtomcrypt',    # EPEL, Unknown use
   'libtommath',     # EPEL, Unknown use
   'python2-crypto', # EPEL, RDO is python-crypto
   'python2-msgpack' # EPEL, RDO is python-msgpack
#}
{% set openstack_base_packages_remove = [
    'libtomcrypt',
    'libtommath',
    'python2-crypto',
    'python2-msgpack'
] %}
# Pick up the proper packages for python2-crypto and python2-msgpack
{% set openstack_base_packages_append = ['python-crypto', 'python-msgpack'] %}

# Use mariadb-server-galera and xinetd for galera and clustercheck
{#  'percona-xtrabackup', # EPEL
    'pv'                  # EPEL
#}
{% set mariadb_packages_remove = [
    'percona-xtrabackup',
    'pv'
] %}
{% set mariadb_packages_append = ['xinetd', 'pacemaker', 'pacemaker-remote',
    'pcs', 'libqb', 'resource-agents'] %}
{% set sensu_client_packages_remove = [
    'ceph-common',
    'cyrus-sasl-devel',
    'gcc-c++',
    'make',
    'ntp',
    'python-pymongo',
    'ruby-devel'
] %}

# Required for nova migration
{% set nova_compute_packages_append = ['openstack-nova-migration', 'openssh-server'] %}
{% set nova_libvirt_packages_append = ['openstack-nova-migration'] %}

############################ service container footers #########################

{% block aodh_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/aodh-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block aodh_evaluator_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/aodh-evaluator /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block aodh_listener_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/aodh-listener /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block aodh_notifier_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/aodh-notifier /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block barbican_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/barbican-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block barbican_keystone_listener_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/barbican-keystone-listener /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block barbican_worker_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/barbican-worker /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block ceilometer_central_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/ceilometer-agent-central /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block ceilometer_compute_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/ceilometer-agent-compute /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block ceilometer_ipmi_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/ceilometer-agent-ipmi /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block ceilometer_notification_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/ceilometer-agent-notification /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block cinder_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/cinder-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% set cinder_backup_packages_append = [
    'pacemaker', 'pacemaker-remote', 'pcs', 'libqb', 'resource-agents'] %}
{% block cinder_backup_footer %}
RUN mkdir -p /etc/libqb /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/cinder-backup /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block cinder_scheduler_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/cinder-scheduler /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% set cinder_volume_packages_append = [
    'pacemaker', 'pacemaker-remote', 'pcs', 'libqb', 'resource-agents'] %}
{% block cinder_volume_footer %}
RUN mkdir -p /etc/libqb /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/cinder-volume /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block collectd_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/collectd /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block etcd_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/etcd /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block glance_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/glance-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck && \
    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 && \
    echo "if [[ "\$\(whoami\)" == 'root' ]]; then rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*; fi" >> /usr/local/bin/kolla_glance_extend_start
{% endblock %}

{% block gnocchi_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/gnocchi-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block gnocchi_metricd_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/gnocchi-metricd /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block gnocchi_statsd_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/gnocchi-statsd /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block heat_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/heat-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block heat_api_cfn_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/heat-api-cfn /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block heat_engine_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/heat-engine /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% set haproxy_packages_append = [
    'pacemaker', 'pacemaker-remote', 'pcs', 'libqb', 'resource-agents'] %}
{% block haproxy_footer %}
RUN mkdir /etc/libqb
{% endblock %}

{% block ironic_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/ironic-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block ironic_conductor_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/ironic-conductor /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block ironic_pxe_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/ironic-pxe /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block iscsid_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/iscsid /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block keystone_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/keystone-public /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block manila_scheduler_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/manila-scheduler /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% set manila_share_packages_append = [
    'pacemaker', 'pacemaker-remote', 'pcs', 'libqb', 'resource-agents'] %}
{% block manila_share_footer %}
RUN mkdir /etc/libqb
{% endblock %}

{% block mariadb_footer %}
# We'll configure mariadb with galera.cnf
RUN rm /etc/my.cnf.d/mariadb-server.cnf /etc/my.cnf.d/auth_gssapi.cnf

RUN mkdir -p /etc/libqb /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/mariadb /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block memcached_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/memcached /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block mistral_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/mistral-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block mistral_engine_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/mistral-engine /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block mistral_executor_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/mistral-executor /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block multipathd_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/multipathd /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block neutron_dhcp_agent_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/neutron-dhcp /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block neutron_l3_agent_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/neutron-l3 /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block neutron_metadata_agent_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/neutron-metadata /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block neutron_openvswitch_agent_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/neutron-ovs-agent /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block neutron_sriov_agent_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/neutron-sriov-agent /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block nova_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block nova_compute_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-compute /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block nova_compute_ironic_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-ironic /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block nova_consoleauth_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-consoleauth /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block nova_libvirt_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-libvirt /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block nova_novncproxy_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-vnc-proxy /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}]

{% block nova_scheduler_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-scheduler /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block nova_conductor_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-conductor /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block nova_placement_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-placement /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block octavia_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/octavia-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block octavia_health_manager_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/octavia-health-manager /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block octavia_housekeeping_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/octavia-housekeeping /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block octavia_worker_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/octavia-worker /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block opendaylight_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/opendaylight-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block panko_api_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/panko-api /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% set rabbitmq_packages_append = [
    'pacemaker', 'pacemaker-remote', 'pcs', 'libqb', 'resource-agents'] %}
{% block rabbitmq_footer %}
RUN mkdir -p /etc/libqb /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/rabbitmq /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block redis_footer %}
RUN mkdir /etc/libqb; mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/redis /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block sahara_engine_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/sahara-engine /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block sensu_clients_install %}
{% endblock %}

{% block sensu_client_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/sensu-client /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block swift_account_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/swift-account-server /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block swift_container_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/swift-container-server /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block swift_object_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/swift-object-server /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block swift_proxy_server_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/swift-proxy /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck && \
    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 && \
    echo "if [[ "\$\(whoami\)" == 'root' ]]; then rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*; fi" >> /usr/local/bin/kolla_extend_start
{% endblock %}

{% block tacker_server_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/tacker /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% set ovn_northd_packages_append = [
    'pacemaker', 'pacemaker-remote', 'pcs', 'libqb', 'resource-agents'] %}
{% block ovn_northd_footer %}
RUN mkdir /etc/libqb
{% endblock %}

{% block neutron_metadata_agent_ovn_footer %}
RUN mkdir -p /openstack && \
    ln -s /usr/share/openstack-tripleo-common/healthcheck/ovn-metadata /openstack/healthcheck && \
    chmod a+rx /openstack/healthcheck
{% endblock %}

{% block base_footer %}
# workaround LP1696283
RUN mkdir -p /etc/ssh && touch /etc/ssh/ssh_known_hosts
{% endblock %}
