kolla-ansible/ansible/roles/placement/templates/placement-api.json.j2
James Kirsch e3d5a91a90 Add support for encrypting Horizon and Placement API
This patch introduces an optional backend encryption for Horizon and
Placement services. When used in conjunction with enabling TLS for
service API endpoints, network communcation will be encrypted end to
end, from client through HAProxy to the Horizon and Placement services.

Change-Id: I9cb274141c95aea20e733baa623da071b30acf2d
Partially-Implements: blueprint add-ssl-internal-network
2020-04-30 20:55:07 +01:00

55 lines
2.0 KiB
Django/Jinja

{% set apache_binary = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set apache_conf_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{
"command": "/usr/sbin/{{ apache_binary }} -DFOREGROUND",
"config_files": [
{
"source": "{{ container_config_directory }}/placement.conf",
"dest": "/etc/placement/placement.conf",
"owner": "placement",
"perm": "0600"
}{% if placement_policy_file is defined %},
{
"source": "{{ container_config_directory }}/{{ placement_policy_file }}",
"dest": "/etc/placement/{{ placement_policy_file }}",
"owner": "placement",
"perm": "0600"
}{% endif %},
{
"source": "{{ container_config_directory }}/placement-api-wsgi.conf",
"dest": "/etc/{{ apache_conf_dir }}/00-placement-api.conf",
"owner": "placement",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/migrate-db.rc",
"dest": "/etc/placement/migrate-db.rc",
"owner": "placement",
"perm": "0600"
}{% if placement_enable_tls_backend | bool %},
{
"source": "{{ container_config_directory }}/placement-cert.pem",
"dest": "/etc/placement/certs/placement-cert.pem",
"owner": "placement",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/placement-key.pem",
"dest": "/etc/placement/certs/placement-key.pem",
"owner": "placement",
"perm": "0600"
}{% endif %}
],
"permissions": [
{
"path": "/var/log/kolla/placement",
"owner": "placement:kolla",
"recurse": true
},
{
"path": "/var/log/kolla/placement/placement-api.log",
"owner": "placement:placement"
}
]
}