Merge pull request 'neoloc/jupyterhub' (#174) from neoloc/jupyterhub into develop

Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/174
This commit was merged in pull request #174.
This commit is contained in:
2024-11-16 20:20:16 +11:00
5 changed files with 69 additions and 20 deletions
+15 -12
View File
@@ -3,6 +3,7 @@ class profiles::jupyter::jupyterhub (
Stdlib::AbsolutePath $base_path = '/opt/jupyterhub',
Stdlib::AbsolutePath $venv_path = "${base_path}/venv",
Stdlib::AbsolutePath $config_path = "${base_path}/config.py",
Stdlib::AbsolutePath $notebook_path = '/home/jupyter/work',
Hash $vault_config = {},
String $owner = 'jupyterhub',
String $group = 'jupyterhub',
@@ -13,11 +14,19 @@ class profiles::jupyter::jupyterhub (
'dockerspawner',
'jupyterhub-ldapauthenticator',
],
String $ldap_server_address = 'ldap://ldap.service.consul',
String $ldap_bind_dn_template = 'cn={username},ou=people,ou=users,dc=main,dc=unkin,dc=net',
Boolean $ldap_use_ssl = false,
Array $ldap_allowed_groups = ['ou=jupyterhub_user,ou=groups,dc=main,dc=unkin,dc=net'],
Array $ldap_admin_groups = ['ou=jupyterhub_admin,ou=groups,dc=main,dc=unkin,dc=net'],
String $ldap_server_address = 'ldap://ldap.service.consul',
String $ldap_tls_strategy = 'insecure',
Array $ldap_allowed_groups = ['ou=jupyterhub_user,ou=groups,dc=main,dc=unkin,dc=net'],
Array $ldap_admin_users = [],
String $ldap_bind_user = 'cn=svc_jupyterhub,ou=services,ou=users,dc=main,dc=unkin,dc=net',
String $ldap_bind_pass = 'change-me',
String $ldap_user_search_base = 'ou=people,ou=users,dc=main,dc=unkin,dc=net',
String $ldap_user_search_filter = '({login_attr}={login})',
String $ldap_group_search_filter = '(uniqueMember={userdn})',
String $ldap_user_attribute = 'uid',
String $ldap_user_dn_attribute = 'cn',
String $docker_image = 'git.query.consul/unkin/almalinux8-jupyterinstance:latest',
String $docker_network = 'bridge',
){
# ensure nodejs:20 is installed
@@ -91,7 +100,7 @@ class profiles::jupyter::jupyterhub (
username => $owner,
uid => 1101,
gid => 1101,
groups => ['systemd-journal'],
groups => ['systemd-journal', 'docker'],
system => true,
}
@@ -105,11 +114,5 @@ class profiles::jupyter::jupyterhub (
],
}
## create symbolic link in $PATH
#file { "/usr/local/bin/${script_name}":
# ensure => 'link',
# target => "${base_path}/${script_name}",
# require => File["${base_path}/${script_name}"],
#}
}
}