Tidy/Fix Apache template

Remove old template for apache pre-2.4 and update
openstack_https_frontend.conf to match adapter parameters

Add tox targets to placate CI

Change-Id: I03acf7e3e524b2a15756a07e0a2d13ed88eaefac
This commit is contained in:
Liam Young 2016-07-08 13:58:41 +00:00
parent 27d8c0a0ea
commit eb2f28539e
4 changed files with 49 additions and 27 deletions

View File

@ -1,24 +0,0 @@
{% if endpoints -%}
{% for ext_port in ext_ports -%}
Listen {{ ext_port }}
{% endfor -%}
{% for address, endpoint, ext, int in endpoints -%}
<VirtualHost {{ address }}:{{ ext }}>
ServerName {{ endpoint }}
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/{{ namespace }}/cert_{{ endpoint }}
SSLCertificateKeyFile /etc/apache2/ssl/{{ namespace }}/key_{{ endpoint }}
ProxyPass / http://localhost:{{ int }}/
ProxyPassReverse / http://localhost:{{ int }}/
ProxyPreserveHost on
</VirtualHost>
{% endfor -%}
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
Order allow,deny
Allow from all
</Location>
{% endif -%}

View File

@ -1 +0,0 @@
openstack_https_frontend

View File

@ -0,0 +1,26 @@
{% if options.endpoints -%}
{% for ext_port in options.ext_ports -%}
Listen {{ ext_port }}
{% endfor -%}
{% for address, endpoint, ext, int in options.endpoints -%}
<VirtualHost {{ address }}:{{ ext }}>
ServerName {{ endpoint }}
SSLEngine on
SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!EXP:!LOW:!MEDIUM
SSLCertificateFile /etc/apache2/ssl/{{ options.service_name }}/cert_{{ endpoint }}
SSLCertificateKeyFile /etc/apache2/ssl/{{ options.service_name }}/key_{{ endpoint }}
ProxyPass / http://localhost:{{ int }}/
ProxyPassReverse / http://localhost:{{ int }}/
ProxyPreserveHost on
</VirtualHost>
{% endfor -%}
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
Order allow,deny
Allow from all
</Location>
{% endif -%}

2
test-requirements.txt Normal file
View File

@ -0,0 +1,2 @@
flake8>=2.2.4,<=2.4.1
os-testr>=0.4.1

23
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
skipsdist = True
envlist = pep8,build
envlist = pep8
[testenv]
basepython = python2.7
@ -13,14 +13,33 @@ install_command =
pip install {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
whitelist_externals = /bin/true
whitelist_externals = /bin/true /bin/echo
[testenv:build]
commands =
/bin/echo 'WARNING: *build* target is for testing only.'
charm-build --log-level DEBUG -o {toxinidir}/build .
[testenv:venv]
commands = {posargs}
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
commands = /bin/true
[testenv:py34]
basepython = python3.4
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
commands = /bin/true
[testenv:py35]
basepython = python3.5
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
commands = /bin/true
[testenv:pep8]
commands = /bin/true