first share

This commit is contained in:
dcore94 2021-01-12 17:01:58 +01:00
commit 1475dd1839
6 changed files with 92 additions and 0 deletions

20
README.md Normal file
View File

@ -0,0 +1,20 @@
# ansible-playbooks-keycloak
The playbooks for managing Keycloak setup. Currently the following playbooks are supported:
1. inject-theme: an action to generate a theme for a typical D4Science gateway. This playbook depends on the Ansible role ansible-role-keycloak-theme.
Examples:
`inject-test-theme.sh` and `inject-production-themes.sh` contain example calls to the playbook with different customizations.
The following example generates an example theme that overrides most of the customizable fields.
`./keycloak-action.sh inject-theme -e 'favicon_url="https://aginfra.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="aginfra.d4science.org"' -e 'project_url="http://plus.aginfra.eu/"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="AGINFRAPlus Gateway"' -e 'logo_alt="AGINFRAPlus Gateway"' -e 'project_description=""' -e 'terms_url="https://aginfra.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://aginfra.d4science.org/image/layout_set_logo?img_id=26845094&t=1610441736518"' -e 'footer="AGINFRA PLUS receives funding from the European Union''s Horizon 2020 research and innovation programme under grant agreement No. 731001 <br/> The views and opinions expressed in this website are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://aginfra.d4science.org/cookie-policy"'`
This call translates to the following calls:
`ansible-galaxy install --force-with-deps -r inject-theme/requirements.yaml`
`ansible-playbook inject-theme/playbook.yaml -e 'favicon_url="https://aginfra.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="aginfra.d4science.org"' -e 'project_url="http://plus.aginfra.eu/"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="AGINFRAPlus Gateway"' -e 'logo_alt="AGINFRAPlus Gateway"' -e 'project_description=""' -e 'terms_url="https://aginfra.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://aginfra.d4science.org/image/layout_set_logo?img_id=26845094&t=1610441736518"' -e 'footer="AGINFRA PLUS receives funding from the European Union''s Horizon 2020 research and innovation programme under grant agreement No. 731001 <br/> The views and opinions expressed in this website are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://aginfra.d4science.org/cookie-policy"'`

View File

@ -0,0 +1,56 @@
#aginfra+
./keycloak-action.sh inject-theme -e 'favicon_url="https://aginfra.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="aginfra.d4science.org"' -e 'project_url="http://plus.aginfra.eu/"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="AGINFRAPlus Gateway"' -e 'logo_alt="AGINFRAPlus Gateway"' -e 'project_description=""' -e 'terms_url="https://aginfra.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://aginfra.d4science.org/image/layout_set_logo?img_id=26845094&t=1610441736518"' -e 'footer="AGINFRA PLUS receives funding from the European Union''s Horizon 2020 research and innovation programme under grant agreement No. 731001 <br/> The views and opinions expressed in this website are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://aginfra.d4science.org/cookie-policy"'
#ariadne
./keycloak-action.sh inject-theme -e 'favicon_url="https://ariadne.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="ariadne.d4science.org"' -e 'project_url="http://ariadne-infrastructure.eu"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="ARIADNEPlus Gateway"' -e 'logo_alt="ARIADNEPlus Gateway"' -e 'project_description=""' -e 'terms_url="https://ariadne.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://ariadne.d4science.org/image/layout_set_logo?img_id=164305244&t=1610441736528"' -e 'footer="ARIADNEplus is funded by the European Commission under the H2020 Programme, contract no. H2020-INFRAIA-2018-1-823914. <br/>The views and opinions expressed in this publication are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://ariadne.d4science.org/cookie-policy"'
#blue-cloud
./keycloak-action.sh inject-theme -e 'favicon_url="https://blue-cloud.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="blue-cloud.d4science.org"' -e 'project_url="https://www.blue-cloud.org"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="Blue-Cloud Gateway"' -e 'logo_alt="Blue-Cloud Gateway"' -e 'project_description=""' -e 'terms_url="https://blue-cloud.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://blue-cloud.d4science.org/image/layout_set_logo?img_id=199274286&t=1610441455783"' -e 'footer="Blue-Cloud has received funding from the European Union''s Horizon programme call BG-07-2019-2020, topic: [A] 2019 - Blue Cloud services, Grant Agreement n.862409"' -e 'cookie_policy_url="https://blue-cloud.d4science.org/cookie-policy"'
#D4Science Gateway
./keycloak-action.sh inject-theme -e 'favicon_url="https://services.d4science.org/d4science-site-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="services.d4science.org"' -e 'project_url="https://www.iubenda.com/privacy-policy/441050"' -e 'background_image=""' -e 'EC_logo="no"' -e 'title_tag="D4Science.org Gateway"' -e 'logo_alt="D4Science.org Gateway"' -e 'project_description=""' -e 'terms_url="https://services.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://services.d4science.org/image/layout_set_logo?img_id=32727&t=1610036023761"' -e 'footer=""' -e 'cookie_policy_url="https://services.d4science.org/cookie-policy"'
#desira
./keycloak-action.sh inject-theme -e 'favicon_url="https://desira.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="desira.d4science.org"' -e 'project_url=""' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="DESIRA Gateway"' -e 'logo_alt="DESIRA Gateway"' -e 'project_description=""' -e 'terms_url="https://desira.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://desira.d4science.org/image/layout_set_logo?img_id=186037762&t=1610442043621"' -e 'footer="DESIRA is a Horizon 2020 project funded by the European Commission. The views and opinions expressed in this publication are the sole responsibility of the author and do not necessarily reflect the views of the European Commission"' -e 'cookie_policy_url="https://desira.d4science.org/cookie-policy"'
#EOSC pillar
./keycloak-action.sh inject-theme -e 'favicon_url="https://eosc-pillar.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="eosc-pillar.d4science.org"' -e 'project_url="https://www.eosc-pillar.eu"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="EOSC-Pillar Gateway"' -e 'logo_alt="EOSC-Pillar Gateway"' -e 'project_description=""' -e 'terms_url="https://eosc-pillar.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://eosc-pillar.d4science.org/image/layout_set_logo?img_id=193750956&t=1610442043626"' -e 'footer="EOSC Pillar has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No. 857650. <br/>The views and opinions expressed in this publication are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://eosc-pillar.d4science.org/cookie-policy"'
#EOSC secretariat
./keycloak-action.sh inject-theme -e 'favicon_url="https://eoscsecretariat.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="eoscsecretariat.d4science.org"' -e 'project_url="https://www.eoscsecretariat.eu"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="EOSC-Secretariat Gateway"' -e 'logo_alt="EOSC-Secretariat Gateway"' -e 'project_description=""' -e 'terms_url="https://eoscsecretariat.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://eoscsecretariat.d4science.org/image/layout_set_logo?img_id=182778502&t=1610442043632"' -e 'footer="EOSCsecretariat.eu has received funding from the European Union''s Horizon Programme call H2020-INFRAEOSC-2018-4, grant Agreement number 831644. <br/>The views and opinions expressed in this publication are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://eoscsecretariat.d4science.org/cookie-policy"'
#gemex
./keycloak-action.sh inject-theme -e 'favicon_url="https://gemex.d4science.org/GEMex-site-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="gemex.d4science.org"' -e 'project_url="http://www.gemex.org"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="GEMex Gateway"' -e 'logo_alt="GEMex Gateway"' -e 'project_description=""' -e 'terms_url="https://gemex.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://gemex.d4science.org/image/layout_set_logo?img_id=14003058&t=1610442043637"' -e 'footer="This project has received funding from the European Unions Horizon 2020 Framework Programme for Research and Innovation (H2020-LCE-2016-23) under grant agreement No. 727550. This publication/multimedia product/presentation reflects the views of the author, and the European Union cannot be held responsible for any use which might be made of the information contained therein."' -e 'cookie_policy_url="https://gemex.d4science.org/cookie-policy"'
#HDN
./keycloak-action.sh inject-theme -e 'favicon_url="https://dante.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="dante.d4science.org"' -e 'project_url=""' -e 'background_image=""' -e 'EC_logo="no"' -e 'title_tag="HDN Gateway"' -e 'logo_alt="HDN Gateway"' -e 'project_description=""' -e 'terms_url="https://dante.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://dante.d4science.org/image/layout_set_logo?img_id=213136654&t=1610442043643"' -e 'footer="Hypermedia Dante Network (HDN) is a National Project funded by the Italian National Research project (PRIN) funded by the Italian Ministry of Education, University and Research (MIUR)"' -e 'cookie_policy_url="https://dante.d4science.org/cookie-policy"'
#i-gene
./keycloak-action.sh inject-theme -e 'favicon_url="https://i-gene.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="i-gene.d4science.org"' -e 'project_url="https://cordis.europa.eu/project/rcn/224947/factsheet/en?WT.mc_id=RSS-Feed&WT.rss_f=project&WT.rss_a=224947&WT.rss_ev=a"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="I-GENE Gateway"' -e 'logo_alt="I-GENE Gateway"' -e 'project_description=""' -e 'terms_url="https://i-gene.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://i-gene.d4science.org/image/layout_set_logo?img_id=210157026&t=1610442043648"' -e 'footer="In-vivo Gene Editing by NanotransducErs (I-GENE) has received funding from the European Union''s Horizon programme call H2020-EU.1.2.1, Grant Agreement n.862714<br/>The views and opinions expressed in this publication are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://i-gene.d4science.org/cookie-policy"'
#imarine
./keycloak-action.sh inject-theme -e 'favicon_url="https://i-marine.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="i-marine.d4science.org"' -e 'project_url=""' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="iMarine Gateway"' -e 'logo_alt="iMarine Gateway"' -e 'project_description=""' -e 'terms_url="https://i-marine.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://i-marine.d4science.org/image/layout_set_logo?img_id=42612&t=1610036038446"' -e 'footer="iMarine was supported by the European Unions research and innovation programmes. <br/> The views and opinions expressed in this website are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://i-marine.d4science.org/cookie-policy"'
#moving
./keycloak-action.sh inject-theme -e 'favicon_url="https://moving.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="moving.d4science.org"' -e 'project_url="https://www.moving-h2020.eu"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="MOVING Gateway"' -e 'logo_alt="MOVING Gateway"' -e 'project_description=""' -e 'terms_url="https://moving.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://moving.d4science.org/image/layout_set_logo?img_id=269577067&t=1610442043658"' -e 'footer="MOVING project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No. 862739. This website reflects only the author''s view and REA and the EC are not responsible for any use that may be made of the information it contains."' -e 'cookie_policy_url="https://moving.d4science.org/cookie-policy"'
#openaire-connect
./keycloak-action.sh inject-theme -e 'favicon_url="https://openaire-connect.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="openaire-connect.d4science.org"' -e 'project_url="https://www.openaire.eu/connect"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="OpenAIRE-Connect Gateway"' -e 'logo_alt="OpenAIRE-Connect Gateway"' -e 'project_description=""' -e 'terms_url="https://openaire-connect.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://openaire-connect.d4science.org/image/layout_set_logo?img_id=38064740&t=1610442043662"' -e 'footer="OpenAIRE Connect is a Horizon 2020 project (Project n°: 643410) funded by the European Commission. The views and opinions expressed in this publication are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://openaire-connect.d4science.org/cookie-policy"'
#parthenos
./keycloak-action.sh inject-theme -e 'favicon_url="https://parthenos.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="parthenos.d4science.org"' -e 'project_url="http://www.parthenos-project.eu"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="PARTHENOS Gateway"' -e 'logo_alt="PARTHENOS Gateway"' -e 'project_description=""' -e 'terms_url="https://parthenos.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://parthenos.d4science.org/image/layout_set_logo?img_id=29574462&t=1610442043668"' -e 'footer="PARTHENOS is a Horizon 2020 project funded by the European Commission. The views and opinions expressed in this publication are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://parthenos.d4science.org/cookie-policy"'
#performfish
./keycloak-action.sh inject-theme -e 'favicon_url="https://performfish.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="performfish.d4science.org"' -e 'project_url="https://performfish.eu"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="PerformFISH Gateway"' -e 'logo_alt="PerformFISH Gateway"' -e 'project_description=""' -e 'terms_url="https://performfish.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://performfish.d4science.org/image/layout_set_logo?img_id=129800238&t=1610442043674"' -e 'footer="PerformFISH has received funding from the European Unions Horizon 2020 research and innovation programme under Grant Agreement no 727610 (PerformFISH). This output reflects the views only of the author(s), and the European Union cannot be held responsible for any use which may be made of the information contained therein."' -e 'cookie_policy_url="https://performfish.d4science.org/cookie-policy"'
#risis2
./keycloak-action.sh inject-theme -e 'favicon_url="https://risis2.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="risis2.d4science.org"' -e 'project_url="https://risis2.eu"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="RISIS2 Gateway"' -e 'logo_alt="RISIS2 Gateway"' -e 'project_description=""' -e 'terms_url="https://risis2.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://risis2.d4science.org/image/layout_set_logo?img_id=221787428&t=1610442043680"' -e 'footer="RISIS2 has received funding by the European Union under Horizon2020 Research and Innovation Programme Grant Agreement n°824091 <br/> The views and opinions expressed in this publication are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://risis2.d4science.org/cookie-policy"'
#secomlab
./keycloak-action.sh inject-theme -e 'favicon_url="https://secomlab.d4science.org/generic-configurable-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="secomlab.d4science.org"' -e 'project_url=""' -e 'background_image=""' -e 'EC_logo="no"' -e 'title_tag="SEComLab Gateway"' -e 'logo_alt="SEComLab Gateway"' -e 'project_description=""' -e 'terms_url="https://secomlab.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://secomlab.d4science.org/image/layout_set_logo?img_id=176195124&t=1610442043685"' -e 'footer="This Gateway is an access point to the Virtual Research Environments (VREs) managed by INGV-Pisa (Istituto Nazionale di Geofisica e Vulcanologia) for promoting collaborative research in Computational Solid Earth Sciences."' -e 'cookie_policy_url="https://secomlab.d4science.org/cookie-policy"'
#sobigdata
./keycloak-action.sh inject-theme -e 'favicon_url="https://sobigdata.d4science.org/sobigdata-site-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="sobigdata.d4science.org"' -e 'project_url="http://www.sobigdata.eu"' -e 'background_image=""' -e 'EC_logo="yes"' -e 'title_tag="SoBigData Gateway"' -e 'logo_alt="SoBigData Gateway"' -e 'project_description=""' -e 'terms_url="https://sobigdata.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://sobigdata.d4science.org/image/layout_set_logo?img_id=63423&t=1610441683964"' -e 'footer="SoBigData.eu receives funding from the European Union''s Horizon 2020 research and innovation programme under grant agreements No. 654024 and 871042<br/>The views and opinions expressed in this website are the sole responsibility of the author and do not necessarily reflect the views of the European Commission."' -e 'cookie_policy_url="https://sobigdata.d4science.org/cookie-policy"'
#territoriaperti
./keycloak-action.sh inject-theme -e 'favicon_url="https://territoriaperti.d4science.org/territori-aperti-theme/images/favicon.ico"' -e 'infrastructure_logo="yes"' -e 'theme="territoriaperti.d4science.org"' -e 'project_url="http://territoriaperti.univaq.it"' -e 'background_image=""' -e 'EC_logo="no"' -e 'title_tag="TerritoriAperti Gateway"' -e 'logo_alt="TerritoriAperti Gateway"' -e 'project_description=""' -e 'terms_url="https://territoriaperti.d4science.org/terms-of-use"' -e 'privacy_policy_url="https://www.iubenda.com/privacy-policy/441050"' -e 'logo_url="https://territoriaperti.d4science.org/image/layout_set_logo?img_id=233557512&t=1610441217759"' -e 'footer="Interdisciplinary information system of Territori Aperti for the prevention and management of natural disasters, as well as for the improvement of the reconstruction and development processes of the affected areas.<br/> The system supports scientific research with the creation of new knowledge and skills through the management and enhancement of data and analytical processes."' -e 'cookie_policy_url="https://territoriaperti.d4science.org/cookie-policy"'

3
inject-test-theme-action.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
./keycloak-action.sh inject-theme -e theme=test-theme.d4science.org -e 'title_tag="test gateway"' -e logo_url=https://dev.d4science.org/image/layout_set_logo?img_id=36727858 -e logo_alt="test gateway" -e project_url=http://www.google.it -e project_description="A test project for a test theme" -e EC_logo=yes

View File

@ -0,0 +1,4 @@
---
- hosts: localhost
roles:
- keycloak-themes

View File

@ -0,0 +1,3 @@
---
- src: git+https://code-repo.d4science.org/gCubeSystem/ansible-role-keycloak-themes.git
name: keycloak-themes

6
keycloak-action.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# Remote ansible roles. First the ones globally used
ansible-galaxy install --force-with-deps -r "$1/requirements.yaml"
ansible-playbook "$1/playbook.yaml" "${@:2}"