From a796e0e9219da10f329e8288d8b7bc3aaf438d79 Mon Sep 17 00:00:00 2001 From: Alan Kyffin Date: Tue, 12 Sep 2023 16:13:38 +0100 Subject: [PATCH] Have *_url variables be URLs instead of hostnames --- README.md | 10 +++++----- group_vars/all/vars.yml | 14 +++++++------- .../templates/authn_ip_clf.properties.j2 | 2 +- .../templates/run.properties.j2 | 7 +++---- roles/dev_common/templates/settings.xml.j2 | 4 ++-- roles/icat_server/templates/run.properties.j2 | 10 +++++----- roles/icat_server_dev/templates/run.properties.j2 | 6 +++--- roles/ids_server/templates/run.properties.j2 | 2 +- 8 files changed, 27 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index c326910..d28da2f 100644 --- a/README.md +++ b/README.md @@ -184,11 +184,11 @@ Create a playbook file to hold the list of roles you wish to install and any var icat_server_authn_list: "db ldap" icat_server_authn_ldap_admin: "false" icat_server_lucene_populateBlockSize: "10000" - authn_db_url: "{{ ansible_fqdn }}" - authn_anon_url: "{{ ansible_fqdn }}" - authn_ldap_url: "{{ ansible_fqdn }}" - lucene_url: "{{ ansible_fqdn }}" - icat_url: "{{ ansible_fqdn }}" + authn_db_url: "https://{{ ansible_fqdn }}:8181" + authn_anon_url: "https://{{ ansible_fqdn }}:8181" + authn_ldap_url: "https://{{ ansible_fqdn }}:8181" + lucene_url: "https://{{ ansible_fqdn }}:8181" + icat_url: "https://{{ ansible_fqdn }}:8181" - role: 'dev_common' diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml index 85703a2..5b1a2a0 100644 --- a/group_vars/all/vars.yml +++ b/group_vars/all/vars.yml @@ -32,25 +32,25 @@ authn_reader_password: "{{ vault_authn_reader_password }}" authn_icatuser_password: "{{ vault_authn_icatuser_password }}" # Authn_simple server URL -authn_simple_url: "{{ ansible_fqdn }}" +authn_simple_url: "https://{{ ansible_fqdn }}:8181" # Authn_db server URL -authn_db_url: "{{ ansible_fqdn }}" +authn_db_url: "https://{{ ansible_fqdn }}:8181" # Authn_anon server URL -authn_anon_url: "{{ ansible_fqdn }}" +authn_anon_url: "https://{{ ansible_fqdn }}:8181" # Authn_ldap server URL -authn_ldap_url: "{{ ansible_fqdn }}" +authn_ldap_url: "https://{{ ansible_fqdn }}:8181" # ICAT Lucene server URL -lucene_url: "{{ ansible_fqdn }}" +lucene_url: "https://{{ ansible_fqdn }}:8181" # ICAT server URL -icat_url: "{{ ansible_fqdn }}" +icat_url: "https://{{ ansible_fqdn }}:8181" # IDS server URL -ids_url: "{{ ansible_fqdn }}" +ids_url: "https://{{ ansible_fqdn }}:8181" # DataGateway Download API database hostname, database name, username and password db_topcat_hostname: "localhost" diff --git a/roles/authn_ip_clf/templates/authn_ip_clf.properties.j2 b/roles/authn_ip_clf/templates/authn_ip_clf.properties.j2 index 4c47ccb..c62ec54 100644 --- a/roles/authn_ip_clf/templates/authn_ip_clf.properties.j2 +++ b/roles/authn_ip_clf/templates/authn_ip_clf.properties.j2 @@ -37,7 +37,7 @@ ip.readall.account = agcr ip.public.account = public # hostname (and port if not default) of the ICAT that this authenticator is used on -icat.server.url = https://{{ icat_url }}:8181 +icat.server.url = {{ icat_url }} # login details for an account on the ICAT that has read all access icat.authn_ip.login = simple username authn_ip password authnip14 diff --git a/roles/datagateway_download_api/templates/run.properties.j2 b/roles/datagateway_download_api/templates/run.properties.j2 index 1cb3ccb..aa2efdb 100644 --- a/roles/datagateway_download_api/templates/run.properties.j2 +++ b/roles/datagateway_download_api/templates/run.properties.j2 @@ -6,8 +6,8 @@ facility.list = LILS -facility.LILS.icatUrl = https://{{ icat_url }}:8181 -facility.LILS.idsUrl = https://{{ ids_url }}:8181 +facility.LILS.icatUrl = {{ icat_url }} +facility.LILS.idsUrl = {{ ids_url }} # Download transport URLs # topcat.json can specify one or more download transport types for each facility, egs "https", "globus"; @@ -19,8 +19,7 @@ facility.LILS.idsUrl = https://{{ ids_url }}:8181 # internal http URL. # If the property is not defined, Topcat will use the facility's idsUrl by default. -facility.LILS.downloadType.http = http://{{ ids_url }}:8080 -facility.LILS.downloadType.https = https://{{ ids_url }}:8181 +facility.LILS.downloadType.https = {{ ids_url }} # enable send email mail.enable = false diff --git a/roles/dev_common/templates/settings.xml.j2 b/roles/dev_common/templates/settings.xml.j2 index 03c281f..f6b96aa 100644 --- a/roles/dev_common/templates/settings.xml.j2 +++ b/roles/dev_common/templates/settings.xml.j2 @@ -5,9 +5,9 @@ true - https://{{ icat_url }}:8181 + {{ icat_url }} {% if lucene_url is defined and lucene_url %} - https://{{ lucene_url }}:8181 + {{ lucene_url }} {% endif %} {{ payara_domain_dir }}/config/cacerts.jks {{ payara_dir }} diff --git a/roles/icat_server/templates/run.properties.j2 b/roles/icat_server/templates/run.properties.j2 index c7f074a..1a68dcd 100644 --- a/roles/icat_server/templates/run.properties.j2 +++ b/roles/icat_server/templates/run.properties.j2 @@ -23,7 +23,7 @@ authn.list = {{ icat_server_authn_list }} # Parameters for each of the four plugins {% if ansible_local.local.instantiations.authn_db is defined and ansible_local.local.instantiations.authn_db == 'true' %} -authn.db.url = https://{{ authn_db_url }}:8181 +authn.db.url = {{ authn_db_url }} authn.db.friendly = DB authn.db.admin = {{ icat_server_authn_db_admin }} {% else %} @@ -31,7 +31,7 @@ authn.db.admin = {{ icat_server_authn_db_admin }} {% endif %} {% if ansible_local.local.instantiations.authn_ldap is defined and ansible_local.local.instantiations.authn_ldap == 'true' %} -authn.ldap.url = https://{{ authn_ldap_url }}:8181 +authn.ldap.url = {{ authn_ldap_url }} authn.ldap.admin = {{ icat_server_authn_ldap_admin }} authn.ldap.friendly = Federal Id {% else %} @@ -41,7 +41,7 @@ authn.ldap.friendly = Federal Id {% endif %} {% if ansible_local.local.instantiations.authn_simple is defined and ansible_local.local.instantiations.authn_simple == 'true' %} -authn.simple.url = https://{{ authn_simple_url }}:8181 +authn.simple.url = {{ authn_simple_url }} authn.simple.friendly = Simple {% else %} !authn.simple.url = https://localhost:8181 @@ -49,7 +49,7 @@ authn.simple.friendly = Simple {% endif %} {% if ansible_local.local.instantiations.authn_anon is defined and ansible_local.local.instantiations.authn_anon == 'true' %} -authn.anon.url = https://{{ authn_anon_url }}:8181 +authn.anon.url = {{ authn_anon_url }} authn.anon.friendly = Anonymous {% else %} !authn.anon.url = https://localhost:8181 @@ -76,7 +76,7 @@ log.list = SESSION WRITE READ INFO # Lucene {% if ansible_local.local.instantiations.icat_lucene is defined and ansible_local.local.instantiations.icat_lucene == 'true' %} -lucene.url = https://{{ lucene_url }}:8181 +lucene.url = {{ lucene_url }} lucene.populateBlockSize = {{ icat_server_lucene_populateBlockSize }} lucene.directory = /home/{{ payara_user }}/{{ icat_lucene_data_dir }} lucene.backlogHandlerIntervalSeconds = 60 diff --git a/roles/icat_server_dev/templates/run.properties.j2 b/roles/icat_server_dev/templates/run.properties.j2 index 7655cc1..c962f76 100644 --- a/roles/icat_server_dev/templates/run.properties.j2 +++ b/roles/icat_server_dev/templates/run.properties.j2 @@ -7,8 +7,8 @@ importCacheSize = 50 exportCacheSize = 50 authn.list = db simple -authn.db.url = https://{{ authn_db_url }}:8181 -authn.simple.url = https://{{ authn_simple_url }}:8181 +authn.db.url = {{ authn_db_url }} +authn.simple.url = {{ authn_simple_url }} notification.list = Dataset Datafile notification.Dataset = CU @@ -16,7 +16,7 @@ notification.Datafile = CU log.list = SESSION WRITE READ INFO -lucene.url = https://{{ lucene_url }}:8181 +lucene.url = {{ lucene_url }} lucene.populateBlockSize = 10000 lucene.directory = ${HOME}/data/lucene lucene.backlogHandlerIntervalSeconds = 60 diff --git a/roles/ids_server/templates/run.properties.j2 b/roles/ids_server/templates/run.properties.j2 index c3b940a..3872124 100644 --- a/roles/ids_server/templates/run.properties.j2 +++ b/roles/ids_server/templates/run.properties.j2 @@ -1,5 +1,5 @@ # General properties -icat.url = https://{{ icat_url }}:8181 +icat.url = {{ icat_url }} plugin.zipMapper.class = org.icatproject.ids.storage.ZipMapper