Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
notebooks-operations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
702
Projekty
notebooks-operations
Commits
4735ad1c
Commit
4735ad1c
authored
1 year ago
by
František Dvořák
Browse files
Options
Downloads
Patches
Plain Diff
Integration of ownCloud WebDAV using OIDC
parent
81937821
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cesnet-central/deployments/fullhub.yaml
+44
-2
44 additions, 2 deletions
cesnet-central/deployments/fullhub.yaml
with
44 additions
and
2 deletions
cesnet-central/deployments/fullhub.yaml
+
44
−
2
View file @
4735ad1c
...
@@ -35,14 +35,20 @@ singleuser:
...
@@ -35,14 +35,20 @@ singleuser:
# sizeLimit problematic in this environment,
# sizeLimit problematic in this environment,
# not needed for remote mounts
# not needed for remote mounts
empty_dir
:
empty_dir
:
-
name
:
owncloud
# sizeLimit problematic in this environment,
# not needed for remote mounts
empty_dir
:
extraVolumeMounts
:
extraVolumeMounts
:
-
name
:
cvmfs-host
-
name
:
cvmfs-host
mountPath
:
"
/cvmfs:shared"
mountPath
:
"
/cvmfs:shared"
-
name
:
b2drop
-
name
:
b2drop
mountPath
:
'
/mnt/b2drop:shared'
mountPath
:
'
/mnt/b2drop:shared'
-
name
:
owncloud
mountPath
:
'
/mnt/owncloud:shared'
lifecycleHooks
:
lifecycleHooks
:
postStart
:
postStart
:
exec
:
{
"
command"
:
[
"
/bin/sh"
,
"
-c"
,
"
ln
-snf
/mnt/b2drop
$HOME/b2drop;
ln
-snf
/cvmfs
$HOME/cvmfs;
mkdir
-p
/home/jovyan/.notebookCheckpoints"
]
}
exec
:
{
"
command"
:
[
"
/bin/sh"
,
"
-c"
,
"
ln
-snf
/mnt/b2drop
$HOME/b2drop;
ln
-snf
/mnt/owncloud
$HOME/owncloud;
ln
-snf
/cvmfs
$HOME/cvmfs;
mkdir
-p
/home/jovyan/.notebookCheckpoints"
]
}
memory
:
memory
:
limit
:
6G
limit
:
6G
guarantee
:
128M
guarantee
:
128M
...
@@ -202,7 +208,43 @@ hub:
...
@@ -202,7 +208,43 @@ hub:
'b2drop-pwd'
:
formdata.get('b2drop-pwd', [None])[0]})
'b2drop-pwd'
:
formdata.get('b2drop-pwd', [None])[0]})
return data
return data
c.JupyterHub.spawner_class = B2DropSpawner
class WebDavOIDCSpawner(B2DropSpawner)
:
async def pre_spawn_hook(self, spawner)
:
await super(WebDavOIDCSpawner, self).pre_spawn_hook(spawner)
auth_state = await self.user.get_auth_state()
if "access_token" in auth_state
:
volume_mounts = [
{"mountPath"
:
"
/owncloud:shared"
,
"
name"
:
"
owncloud"
},
]
spawner.extra_containers.append(
{
"name"
:
"
owncloud"
,
"
image"
:
"
valtri/webdav-oidc-sidecar:unpriv3"
,
"
env"
:
[
{
"
name"
:
"
WEBDAV_URL"
,
"
value"
:
"
https://webdav.egi.zcu.cz/webdav-oidc"
},
{
"
name"
:
"
WEBDAV_TOKEN"
,
"
value"
:
auth_state
[
"
access_token"
]},
{
"
name"
:
"
MOUNT_PATH"
,
"
value"
:
"
/owncloud"
},
]
,
"
resources"
:
self.sidecar_resources,
# "command"
:
cmd,
"securityContext"
:
{
"
runAsUser"
:
1000
,
"
fsUser"
:
1000
,
"
fsGroup"
:
100
,
"
privileged"
:
True
,
"
capabilities"
:
{
"
add"
:
[
"
SYS_ADMIN"
]},
}
,
"
volumeMounts"
:
volume_mounts,
"lifecycle"
:
{
"
preStop"
:
{
"
exec"
:
{
"
command"
:
[
"
umount"
,
"
-l"
,
"
/owncloud"
]}
},
}
,
}
)
c.JupyterHub.spawner_class = WebDavOIDCSpawner
c.B2DropSpawner.http_timeout =
60
c.B2DropSpawner.http_timeout =
60
c.B2DropSpawner.args = ["--FileCheckpoints.checkpoint_dir='/home/jovyan/.notebookCheckpoints'"]
c.B2DropSpawner.args = ["--FileCheckpoints.checkpoint_dir='/home/jovyan/.notebookCheckpoints'"]
c.B2DropSpawner.profile_form_template = """
c.B2DropSpawner.profile_form_template = """
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment