Skip to content
Snippets Groups Projects
Commit 77aca4d4 authored by Martin Bergemann's avatar Martin Bergemann :speech_balloon:
Browse files

Merge branch 'fub_ldap' into 'master'

Fix typos

See merge request !31
parents 1f05e92e fabc9570
No related branches found
No related tags found
1 merge request!31Fix typos
Pipeline #20092 passed
...@@ -158,10 +158,13 @@ border_color = "#6c2e1f" ...@@ -158,10 +158,13 @@ border_color = "#6c2e1f"
hover_color = "#d0513a" hover_color = "#d0513a"
## The about us text is a small blurb about freva within the project ## The about us text is a small blurb about freva within the project
about_us_text = "" about_us_text = ""
## Set the path to the institution logo, this should be the path to the logo
## as seen by the target system
institution_logo = "/path/to/logo/on/target/machine"
## Set a list of email addresses for contacts ## Set a list of email addresses for contacts
contacts = "" contacts = [""]
## Now set postal address ## Now set postal address
address = "Project name, German Climate Computing Centre (DKRZ), Bundesstr. 45a, 20146 Hamburg, Germany." imprint = "Project name, German Climate Computing Centre (DKRZ), Bundesstr. 45a, 20146 Hamburg, Germany."
## Here you can set a lengthy project description. ## Here you can set a lengthy project description.
## You can also set a path to a filename that contains the information. ## You can also set a path to a filename that contains the information.
## Instead of text you can set a path to a file containing the text, like a html file. ## Instead of text you can set a path to a file containing the text, like a html file.
......
...@@ -36,20 +36,19 @@ ...@@ -36,20 +36,19 @@
- docker_web_cmd: > - docker_web_cmd: >
-p 8000:8000 -p 8000:8000
-v {{ core_root_dir }}:{{ core_root_dir }}:ro -v {{ core_root_dir }}:{{ core_root_dir }}:ro
-v {{ core_preview_path }}:/opt/freva_web/static/preview:ro
-v {{ core_scheduler_output_dir}}:{{ core_scheduler_output_dir }}:ro -v {{ core_scheduler_output_dir}}:{{ core_scheduler_output_dir }}:ro
-v /opt/freva/{{project_name}}/web_service/static:/opt/freva_web/static:z -v /opt/freva/{{project_name}}/web_service/static:/opt/freva_web/static:z
-v {{core_base_dir_location}}:{{core_base_dir_location}}:ro
-e EVALUATION_SYSTEM_CONFIG_FILE={{core_root_dir}}/freva/evaluation_system.conf -e EVALUATION_SYSTEM_CONFIG_FILE={{core_root_dir}}/freva/evaluation_system.conf
--name {{web_name}} --name {{web_name}}
-t registry.gitlab.dkrz.de/freva/freva_web/freva_web:main -t registry.gitlab.dkrz.de/freva/freva_web/freva_web:update_urls
- docker_apache_cmd: > - docker_apache_cmd: >
-v /opt/freva/{{project_name}}/web_service/freva_web.conf:/usr/local/apache2/conf/httpd.conf:z -v /opt/freva/{{project_name}}/web_service/freva_web.conf:/usr/local/apache2/conf/httpd.conf:z
-v /opt/freva/{{project_name}}/web_service/server-cert.crt:/etc/ssl/certs/server-cert.crt:z -v /opt/freva/{{project_name}}/web_service/server-cert.crt:/etc/ssl/certs/server-cert.crt:z
-v /opt/freva/{{project_name}}/web_service/server-key.key:/etc/ssl/private/server-key.key:z -v /opt/freva/{{project_name}}/web_service/server-key.key:/etc/ssl/private/server-key.key:z
-v /opt/freva/{{project_name}}/web_service/cacert.pem:/etc/ssl/certs/cacert.pem:z -v /opt/freva/{{project_name}}/web_service/cacert.pem:/etc/ssl/certs/cacert.pem:z
-v {{ core_scheduler_output_dir }}:{{ core_scheduler_output_dir }}:ro
-v /opt/freva/{{project_name}}/web_service/static:/srv/static:z -v /opt/freva/{{project_name}}/web_service/static:/srv/static:z
-v {{ core_preview_path }}:/srv/preview:ro -v {{ core_preview_path }}:/srv/static/preview:ro
-e SCHEDULER_DIR={{core_scheduler_output_dir}} -e SCHEDULER_DIR={{core_scheduler_output_dir}}
-e FREVA_HOST={{web_server_name}} -p 80:80 -p 443:443 httpd:latest -e FREVA_HOST={{web_server_name}} -p 80:80 -p 443:443 httpd:latest
- redis_name: "{{ project_name }}-redis" - redis_name: "{{ project_name }}-redis"
......
...@@ -61,7 +61,9 @@ essential setup steps: ...@@ -61,7 +61,9 @@ essential setup steps:
6. Set the preview path mentioned in the 6. Set the preview path mentioned in the
[basic configuration section](Folders.html#configuring-the-evaluation-system-section). [basic configuration section](Folders.html#configuring-the-evaluation-system-section).
7. Set the workload manager system from the dropdown menu. 7. Set the workload manager system from the dropdown menu.
8. Set the output directory of the stdout of the workload manger. 8. Set the output directory of the stdout of the workload manger. Note:
the workload manager type, like pbs, will be automatically appended to this
directory.
9. Set the user names (comma separated) of the Freva admins of this project. 9. Set the user names (comma separated) of the Freva admins of this project.
10. If you have a special user group for Freva admins you can set this this key 10. If you have a special user group for Freva admins you can set this this key
here. This will cause the creation of folders with permissions suitable here. This will cause the creation of folders with permissions suitable
...@@ -110,32 +112,41 @@ essential setup steps: ...@@ -110,32 +112,41 @@ essential setup steps:
3. Main html color scheme. 3. Main html color scheme.
4. Html color for borders. 4. Html color for borders.
5. Html color for hover mode boxes. 5. Html color for hover mode boxes.
6. A short text about the Freva admin team/group. This text will go to the 6. Set the path to the institution logo. This should be the path to the logo
on the machine that runs the web.
7. A short text about the Freva admin team/group. This text will go to the
header of the web page. header of the web page.
7. Contact email address of the admin(s). 8. Contact email address of the admin(s).
8. Address of the institute, will be appearing in the footer of the website. 9. Address of the institute, will be appearing in the footer of the website.
9. Detailed overview over the project, this text will go into the left central 10. Detailed overview over the project, this text will go into the left central
box in the Freva main page. It should describe the purpose of this project box in the Freva main page. It should describe the purpose of this project
10. The header for the detailed overview mentioned in 9. 11. The header for the detailed overview mentioned in 9.
11. Host name(s) - usually HPC login node(s) - the web backend code submits 12. Host name(s) - usually HPC login node(s) - the web backend code submits
plugin jobs from. The backend will logon to this host name and submit a plugin jobs from. The backend will logon to this host name and submit a
plugin job. plugin job.
12. String of ldap server uri(s) (comma separated). The ldap server uris are 13. String of ldap server uri(s) (comma separated). The ldap server uris are
used to make authentication requests via the web side. used to make authentication requests via the web side.
13. Tick this box (`<SPACE>`) to enable TLS encrypted connection from the django 14. Tick this box (`<SPACE>`) to enable TLS encrypted connection from the django
web application to the ldap server. web application to the ldap server.
[See also django ldap tls config](https://django-auth-ldap.readthedocs.io/en/latest/authentication.html#notes) [See also django ldap tls config](https://django-auth-ldap.readthedocs.io/en/latest/authentication.html#notes)
14. Set the user group name that is allowed to logon to the web ui. 15. Set the user group name that is allowed to logon to the web ui.
15. Set the ldap user base filters. See also the 16. Set the ldap user base filters. See also the
[djanog ldap authentication for user](https://django-auth-ldap.readthedocs.io/en/latest/users.html) [djanog ldap authentication for user](https://django-auth-ldap.readthedocs.io/en/latest/users.html)
16. Set the ldap group base filters. See also the 17. Set the ldap group base filters. See also the
[django ldap authentication for groups](https://django-auth-ldap.readthedocs.io/en/latest/groups.html#finding-groups) [django ldap authentication for groups](https://django-auth-ldap.readthedocs.io/en/latest/groups.html#finding-groups)
17. Set the distinguished name of the ldap user. This setting is used to make 18. Set the distinguished name of the ldap user. This setting is used to make
queries to the ldap server. TODO: [this might not be necessary](https://django-auth-ldap.readthedocs.io/en/latest/authentication.html#search-bind) queries to the ldap server. TODO: [this might not be necessary](https://django-auth-ldap.readthedocs.io/en/latest/authentication.html#search-bind)
18. Set the password for the ldap user. 19. Set the password for the ldap user.
19. Set the path to the `python3.4+` binary, this should be set if the python 20. Set the ldap search key for finding the first name entries
21. Set the ldap search key for finding the last name entries
22. Set the ldap search key for finding email addresses
23. Set the type of ldap object class name
24. Set the type of ldap group type (nested or posix). Note: This is a
dropdown menu, hit enter to select the options.
25. Set the evaluation_system ldap class that handles the ldap connections
26. Set the path to the `python3.4+` binary, this should be set if the python
binary is not part of the `$PATH` variable. binary is not part of the `$PATH` variable.
20. Set the login user name for the remote machine. 27. Set the login user name for the remote machine.
### Notes on the web ui setup ### Notes on the web ui setup
Currently there are ties between the core running on the HPC machine and Currently there are ties between the core running on the HPC machine and
......
...@@ -216,7 +216,7 @@ class DeployFactory: ...@@ -216,7 +216,7 @@ class DeployFactory:
if web_host == "127.0.0.1": if web_host == "127.0.0.1":
web_host = "localhost" web_host = "localhost"
self.cfg["web"]["config"]["host"] = web_host self.cfg["web"]["config"]["host"] = web_host
_webserver_items["INSTITUTION_LOGO"] = "/path/to/your/logo" # _webserver_items["INSTITUTION_LOGO"] = "/path/to/your/logo"
trusted_origin = urlparse(server_name) trusted_origin = urlparse(server_name)
if trusted_origin.scheme: if trusted_origin.scheme:
_webserver_items["CSRF_TRUSTED_ORIGINS"] = [ _webserver_items["CSRF_TRUSTED_ORIGINS"] = [
...@@ -235,7 +235,7 @@ class DeployFactory: ...@@ -235,7 +235,7 @@ class DeployFactory:
except (FileNotFoundError, IOError, KeyError): except (FileNotFoundError, IOError, KeyError):
pass pass
try: try:
_webserver_items["IMPRINT"] = _webserver_items["ADDRESS"].split(",") _webserver_items["IMPRINT"] = _webserver_items["IMPRINT"].split(",")
except AttributeError: except AttributeError:
pass pass
with self.web_conf_file.open("w") as f_obj: with self.web_conf_file.open("w") as f_obj:
......
...@@ -228,7 +228,7 @@ class WebScreen(BaseForm): ...@@ -228,7 +228,7 @@ class WebScreen(BaseForm):
def _add_widgets(self) -> None: def _add_widgets(self) -> None:
"""Add widgets to the screen.""" """Add widgets to the screen."""
self.list_keys = "contacts", "address", "scheduler_host" self.list_keys = "contacts", "imprint", "scheduler_host"
cfg = self.get_config(self.step) cfg = self.get_config(self.step)
for key in self.list_keys: for key in self.list_keys:
if key in cfg and isinstance(cfg[key], str): if key in cfg and isinstance(cfg[key], str):
...@@ -276,11 +276,21 @@ class WebScreen(BaseForm): ...@@ -276,11 +276,21 @@ class WebScreen(BaseForm):
), ),
True, True,
), ),
institution_logo=(
self.add_widget_intelligent(
npyscreen.TitleText,
name=f"{self.num}Path to the institution logo.",
value=cfg.get(
"institution_logo", "/path/to/logo/on/target/machine"
),
),
True,
),
about_us_text=( about_us_text=(
self.add_widget_intelligent( self.add_widget_intelligent(
npyscreen.TitleText, npyscreen.TitleText,
name=f"{self.num}About us text - short blurb about Freva:", name=f"{self.num}About us text - short blurb about Freva:",
value=cfg.get("about_us_test", "Testing"), value=cfg.get("about_us_text", "Testing"),
), ),
True, True,
), ),
...@@ -288,11 +298,13 @@ class WebScreen(BaseForm): ...@@ -288,11 +298,13 @@ class WebScreen(BaseForm):
self.add_widget_intelligent( self.add_widget_intelligent(
npyscreen.TitleText, npyscreen.TitleText,
name=f"{self.num}Contact email address:", name=f"{self.num}Contact email address:",
value=cfg.get("contatcs", "admin@freva.dkrz.de"), value=",".join(
cast(List[str], cfg.get("contacts", "admin@freva.dkrz.de"))
),
), ),
True, True,
), ),
address=( imprint=(
self.add_widget_intelligent( self.add_widget_intelligent(
npyscreen.TitleText, npyscreen.TitleText,
name=f"{self.num}Institution address - comma separated:", name=f"{self.num}Institution address - comma separated:",
...@@ -300,7 +312,7 @@ class WebScreen(BaseForm): ...@@ -300,7 +312,7 @@ class WebScreen(BaseForm):
cast( cast(
List[str], List[str],
cfg.get( cfg.get(
"address", "imprint",
[ [
"freva", "freva",
"German Climate Computing Centre (DKRZ)", "German Climate Computing Centre (DKRZ)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment