Skip to content
Snippets Groups Projects
Commit 050a1dc7 authored by Martin van Es's avatar Martin van Es
Browse files

Improved README and removed tld configuration duplication

parent 9d295727
No related branches found
No related tags found
No related merge requests found
...@@ -13,4 +13,15 @@ Configuration repository for MDX as a service pilot ...@@ -13,4 +13,15 @@ Configuration repository for MDX as a service pilot
```files/[tld].yaml``` ```files/[tld].yaml```
* contains the GeoDNS configuration for [tld] as a yaml file. * contains the geoDNS configuration for [tld] as a yaml file.
During deploy, (Apache) virtualhost ServerNames will be generated by the following guidelines, based on the configuration in inventory/group_vars/all.yaml.
### Signing servers
* [hostname]-signer.[tld]
### Proxies
* [hostname]-proxy.[tld]
* proxy-[realm].
Make sure you have DNS entries for those hostnames in geoDNS configuration.
\ No newline at end of file
--- ---
tld: srv.mdx.incubator.geant.org tld: srv.mdx.incubator.geant.org
hosts: hosts:
et2.gndev.hexaa.eu: et2.gndev.hexaa.eu:
hostname: srv1 hostname: srv1
tld: srv.mdx.incubator.geant.org
altname: 'server-md2.et2.com' altname: 'server-md2.et2.com'
mdserver: mdserver:
test: test:
signer: hsm_signer signer: hsm_signer
metadir: metadata/test metadir: metadata/test
mdproxy: mdproxy:
test: test:
signer: 'http://localhost:5001' signer: 'http://localhost:5001'
...@@ -16,37 +19,42 @@ hosts: ...@@ -16,37 +19,42 @@ hosts:
edugain: edugain:
signer: 'http://srv2-signer.srv.mdx.incubator.geant.org' signer: 'http://srv2-signer.srv.mdx.incubator.geant.org'
altname: 'edugain-md.et2.com' altname: 'edugain-md.et2.com'
mdxcdn.pt-38.utr.surfcloud.nl: mdxcdn.pt-38.utr.surfcloud.nl:
hostname: srv2 hostname: srv2
tld: srv.mdx.incubator.geant.org
altname: 'server-md2.et2.com' altname: 'server-md2.et2.com'
mdserver: mdserver:
edugain: edugain:
signer: hsm_signer signer: hsm_signer
metadir: metadata/edugain metadir: metadata/edugain
mdproxy: mdproxy:
test: test:
signer: 'http://srv1-signer.srv.mdx.incubator.geant.org' signer: 'http://srv1-signer.srv.mdx.incubator.geant.org'
altname: 'test-md.foobar.com' altname: 'test-md.foobar.com'
edugain: edugain:
signer: 'http://localhost:5001' signer: 'http://localhost:5001'
62.217.72.109: 62.217.72.109:
hostname: srv3 hostname: srv3
tld: srv.mdx.incubator.geant.org
mdproxy: mdproxy:
test: test:
signer: 'http://srv1-signer.srv.mdx.incubator.geant.org' signer: 'http://srv1-signer.srv.mdx.incubator.geant.org'
altname: 'test-md.barfoo.com' altname: 'test-md.barfoo.com'
edugain: edugain:
signer: 'http://srv2-signer.srv.mdx.incubator.geant.org' signer: 'http://srv2-signer.srv.mdx.incubator.geant.org'
alternative-mdx.pt-76.utr.surfcloud.nl: alternative-mdx.pt-76.utr.surfcloud.nl:
hostname: srv4 hostname: srv4
tld: srv.mdx.incubator.geant.org
altname: 'server-md.example.com' altname: 'server-md.example.com'
mdserver: mdserver:
foobar: foobar:
signer: normal_signer signer: normal_signer
metadir: metadata/test metadir: metadata/test
mdproxy: mdproxy:
edugain: edugain:
signer: 'http://srv2-signer.srv.mdx.incubator.geant.org' signer: 'http://srv2-signer.srv.mdx.incubator.geant.org'
......
{% if hosts[inventory_hostname].get('mdserver') %} {% if hosts[inventory_hostname].get('mdserver') %}
<VirtualHost *:80> <VirtualHost *:80>
ServerName {{ hosts[inventory_hostname]['hostname'] }}-signer.{{ hosts[inventory_hostname]['tld'] }} ServerName {{ hosts[inventory_hostname]['hostname'] }}-signer.{{ tld }}
{% if hosts[inventory_hostname].get('altname') %} {% if hosts[inventory_hostname].get('altname') %}
ServerAlias {{ hosts[inventory_hostname]['altname'] }} ServerAlias {{ hosts[inventory_hostname]['altname'] }}
{% endif %} {% endif %}
...@@ -13,19 +13,17 @@ ...@@ -13,19 +13,17 @@
{% if hosts[inventory_hostname].get('mdproxy') %} {% if hosts[inventory_hostname].get('mdproxy') %}
<VirtualHost *:80> <VirtualHost *:80>
ServerName {{ hosts[inventory_hostname]['hostname'] }}-proxy.{{ hosts[inventory_hostname]['tld'] }} ServerName {{ hosts[inventory_hostname]['hostname'] }}-proxy.{{ tld }}
DocumentRoot /var/www/html DocumentRoot /var/www/html
AllowEncodedSlashes NoDecode AllowEncodedSlashes NoDecode
ProxyPass "/" "http://127.0.0.1:5002/" nocanon ProxyPass "/" "http://127.0.0.1:5002/" nocanon
ProxyPassReverse "/" "http://127.0.0.1:5002/" ProxyPassReverse "/" "http://127.0.0.1:5002/"
</VirtualHost> </VirtualHost>
{% endif %}
{% if hosts[inventory_hostname].get('mdproxy') %}
{% set mdproxy = hosts[inventory_hostname]['mdproxy'] %} {% set mdproxy = hosts[inventory_hostname]['mdproxy'] %}
{% for realm, values in mdproxy.items() %} {% for realm, values in mdproxy.items() %}
<VirtualHost *:80> <VirtualHost *:80>
ServerName proxy-{{ realm }}.{{ hosts[inventory_hostname]['tld'] }} ServerName proxy-{{ realm }}.{{ tld }}
{% if values.get('altname') %} {% if values.get('altname') %}
ServerAlias {{ values['altname'] }} ServerAlias {{ values['altname'] }}
{% endif %} {% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment