From eec38cbccd8728306bdec498160f6b875b937063 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Mon, 27 May 2024 17:01:05 +0200 Subject: [PATCH 1/4] Add Theia config to prod and env --- roles/artemis/defaults/main.yml | 2 ++ roles/artemis/templates/application-prod.yml.j2 | 7 +++++++ roles/artemis/templates/artemis.env.j2 | 3 +++ 3 files changed, 12 insertions(+) diff --git a/roles/artemis/defaults/main.yml b/roles/artemis/defaults/main.yml index c7f99a7..3047025 100644 --- a/roles/artemis/defaults/main.yml +++ b/roles/artemis/defaults/main.yml @@ -105,6 +105,8 @@ artemis_version_control_default_branch_name: main enable_science_event_logging: false +artemis_theia_base_url: https://theia-yannik.k8s.ase.cit.tum.de + # If the password of some users is stored externally, you need to provide a name and the reset links. They will be displayed as a hint in the reset form of Artemis. # You need to at least provide the provider and the English reset link. artemis_external_password_provider: TUMonline diff --git a/roles/artemis/templates/application-prod.yml.j2 b/roles/artemis/templates/application-prod.yml.j2 index c7413db..3f6819b 100644 --- a/roles/artemis/templates/application-prod.yml.j2 +++ b/roles/artemis/templates/application-prod.yml.j2 @@ -291,6 +291,11 @@ artemis: {% endif %} {% endif %} +{% if artemis_theia_base_url is defined and artemis_theia_base_url is not none %} + theia: + portal-url: {{ artemis_theia_base_url }} +{% endif %} + {% if aeolus.url is defined and aeolus.url is not none %} aeolus: url: {{ aeolus.url }} @@ -299,6 +304,8 @@ aeolus: {% endif %} {% endif %} + + jhipster: {% if artemis_jhipster_jwt is not none %} diff --git a/roles/artemis/templates/artemis.env.j2 b/roles/artemis/templates/artemis.env.j2 index bfe4149..d23e7e3 100644 --- a/roles/artemis/templates/artemis.env.j2 +++ b/roles/artemis/templates/artemis.env.j2 @@ -192,6 +192,9 @@ ARTEMIS_IRIS_SECRETTOKEN='{{ iris.secret }}' {% if enable_science_event_logging is defined %} ARTEMIS_SCIENCE_EVENTLOGGING_ENABLE='{{ enable_science_event_logging | lower }}' {% endif %} +{% if artemis_theia_base_url is defined and artemis_theia_base_url is not none %} +ARTEMIS_THEIA_BASE_URL='{{ artemis_theia_base_url }}' +{% endif %} {% if aeolus.url is defined and aeolus.url is not none %} AEOLUS_URL='{{ aeolus.url }}' {% if aeolus.token is defined and aeolus.token is not none %} From fad745db500784778210f002fab14a8d5afeafa2 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Wed, 29 May 2024 13:20:13 +0200 Subject: [PATCH 2/4] Clean up varying Theia names and add profile --- roles/artemis/defaults/main.yml | 6 ++++-- roles/artemis/templates/application-prod.yml.j2 | 8 +++----- roles/artemis/templates/artemis.env.j2 | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/artemis/defaults/main.yml b/roles/artemis/defaults/main.yml index 3047025..aca4773 100644 --- a/roles/artemis/defaults/main.yml +++ b/roles/artemis/defaults/main.yml @@ -105,7 +105,8 @@ artemis_version_control_default_branch_name: main enable_science_event_logging: false -artemis_theia_base_url: https://theia-yannik.k8s.ase.cit.tum.de +theia: + portal_url: https://theia-yannik.k8s.ase.cit.tum.de # If the password of some users is stored externally, you need to provide a name and the reset links. They will be displayed as a hint in the reset form of Artemis. # You need to at least provide the provider and the English reset link. @@ -248,10 +249,11 @@ artemis_spring_profile_apollon: "{% if apollon_url is defined and apollon_url is artemis_spring_profile_scheduling: "{% if node_id is defined and node_id == 1 %},scheduling{% endif %}" artemis_spring_profile_docker: "{% if use_docker %},docker{% endif %}" artemis_spring_profile_iris: "{% if iris is defined and iris is not none %},iris{% endif %}" +artemis_spring_profile_theia: "{% if theia is defined and theia is not none %},theia{% endif %}" artemis_spring_profile_aeolus: "{% if aeolus is defined and aeolus is not none %},aeolus{% endif %}" artemis_spring_profile_lti: "{% if lti.oauth_secret is defined and lti.oauth_secret is not none %},lti{% endif %}" -artemis_spring_profile_core: "{% if artemis_computed_is_core_node %},core{{ artemis_spring_profile_user_management }}{{ artemis_spring_profile_ldap }}{{ artemis_spring_profile_version_control }}{{ artemis_spring_profile_continuous_integration }}{{ artemis_spring_profile_athena }}{{ artemis_spring_profile_scheduling }}{{ artemis_spring_profile_docker }}{{ artemis_spring_profile_iris }}{{ artemis_spring_profile_aeolus }}{{ artemis_spring_profile_lti }}{% endif %}" +artemis_spring_profile_core: "{% if artemis_computed_is_core_node %},core{{ artemis_spring_profile_user_management }}{{ artemis_spring_profile_ldap }}{{ artemis_spring_profile_version_control }}{{ artemis_spring_profile_continuous_integration }}{{ artemis_spring_profile_athena }}{{ artemis_spring_profile_scheduling }}{{ artemis_spring_profile_docker }}{{ artemis_spring_profile_iris }}{{ artemis_spring_profile_theia }}{{ artemis_spring_profile_aeolus }}{{ artemis_spring_profile_lti }}{% endif %}" artemis_spring_profile_buildagent: "{% if continuous_integration.localci is defined and continuous_integration.localci is not none %}{% if continuous_integration.localci.is_build_agent is defined and continuous_integration.localci.is_build_agent is not none and continuous_integration.localci.is_build_agent %},buildagent{% endif %}{% endif %}" artemis_spring_profiles: "{{ artemis_spring_profile_env }}{{ artemis_spring_profile_buildagent }}{{ artemis_spring_profile_core }}" diff --git a/roles/artemis/templates/application-prod.yml.j2 b/roles/artemis/templates/application-prod.yml.j2 index 3f6819b..ffb202e 100644 --- a/roles/artemis/templates/application-prod.yml.j2 +++ b/roles/artemis/templates/application-prod.yml.j2 @@ -291,9 +291,9 @@ artemis: {% endif %} {% endif %} -{% if artemis_theia_base_url is defined and artemis_theia_base_url is not none %} - theia: - portal-url: {{ artemis_theia_base_url }} +{% if theia.portal_url is defined and theia.portal_url is not none %} +theia: + portal-url: {{ theia.portal_url }} {% endif %} {% if aeolus.url is defined and aeolus.url is not none %} @@ -304,8 +304,6 @@ aeolus: {% endif %} {% endif %} - - jhipster: {% if artemis_jhipster_jwt is not none %} diff --git a/roles/artemis/templates/artemis.env.j2 b/roles/artemis/templates/artemis.env.j2 index d23e7e3..5c0320e 100644 --- a/roles/artemis/templates/artemis.env.j2 +++ b/roles/artemis/templates/artemis.env.j2 @@ -192,8 +192,8 @@ ARTEMIS_IRIS_SECRETTOKEN='{{ iris.secret }}' {% if enable_science_event_logging is defined %} ARTEMIS_SCIENCE_EVENTLOGGING_ENABLE='{{ enable_science_event_logging | lower }}' {% endif %} -{% if artemis_theia_base_url is defined and artemis_theia_base_url is not none %} -ARTEMIS_THEIA_BASE_URL='{{ artemis_theia_base_url }}' +{% if theia.portal_url is defined and theia.portal_url is not none %} +THEIA_PORTALURL='{{ theia.portal_url }}' {% endif %} {% if aeolus.url is defined and aeolus.url is not none %} AEOLUS_URL='{{ aeolus.url }}' From bd258f9d70ad2e8a162e2b92a65770b1407eab1e Mon Sep 17 00:00:00 2001 From: Benjamin Schmitz Date: Thu, 13 Jun 2024 08:07:00 +0200 Subject: [PATCH 3/4] Comment out theia config in defaults --- roles/artemis/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/artemis/defaults/main.yml b/roles/artemis/defaults/main.yml index cfbe56a..f4fc621 100644 --- a/roles/artemis/defaults/main.yml +++ b/roles/artemis/defaults/main.yml @@ -105,8 +105,8 @@ artemis_version_control_default_branch_name: main enable_science_event_logging: false -theia: - portal_url: https://theia-yannik.k8s.ase.cit.tum.de +#theia: +# portal_url: https://theia-yannik.k8s.ase.cit.tum.de # If the password of some users is stored externally, you need to provide a name and the reset links. They will be displayed as a hint in the reset form of Artemis. # You need to at least provide the provider and the English reset link. From e236bd88b4b346adb8550590e000a7d0897461ff Mon Sep 17 00:00:00 2001 From: Benjamin Schmitz Date: Thu, 13 Jun 2024 08:10:02 +0200 Subject: [PATCH 4/4] Wrap theia configuration in check whether theia is defined --- roles/artemis/templates/application-prod.yml.j2 | 4 +++- roles/artemis/templates/artemis.env.j2 | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/artemis/templates/application-prod.yml.j2 b/roles/artemis/templates/application-prod.yml.j2 index 91256e5..c89acfc 100644 --- a/roles/artemis/templates/application-prod.yml.j2 +++ b/roles/artemis/templates/application-prod.yml.j2 @@ -297,10 +297,12 @@ artemis: {% endif %} {% endif %} -{% if theia.portal_url is defined and theia.portal_url is not none %} +{% if theia is defined and theia is not none %} theia: +{% if theia.portal_url is defined and theia.portal_url is not none %} portal-url: {{ theia.portal_url }} {% endif %} +{% endif %} {% if aeolus.url is defined and aeolus.url is not none %} aeolus: diff --git a/roles/artemis/templates/artemis.env.j2 b/roles/artemis/templates/artemis.env.j2 index 726b3fd..90d9457 100644 --- a/roles/artemis/templates/artemis.env.j2 +++ b/roles/artemis/templates/artemis.env.j2 @@ -198,9 +198,11 @@ ARTEMIS_IRIS_SECRETTOKEN='{{ iris.secret }}' {% if enable_science_event_logging is defined %} ARTEMIS_SCIENCE_EVENTLOGGING_ENABLE='{{ enable_science_event_logging | lower }}' {% endif %} +{% if theia is defined and theia is not none %} {% if theia.portal_url is defined and theia.portal_url is not none %} THEIA_PORTALURL='{{ theia.portal_url }}' {% endif %} +{% endif %} {% if aeolus.url is defined and aeolus.url is not none %} AEOLUS_URL='{{ aeolus.url }}' {% if aeolus.token is defined and aeolus.token is not none %}