Skip to content

Commit

Permalink
mount nfs into pods
Browse files Browse the repository at this point in the history
Bug: T321886
  • Loading branch information
vivian-rook committed Oct 28, 2022
1 parent 68e093c commit 9f28716
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 61 deletions.
23 changes: 0 additions & 23 deletions paws/nfs.yaml

This file was deleted.

39 changes: 17 additions & 22 deletions paws/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,23 @@ dbProxy:
jupyterhub:
hub:
extraVolumes:
- name: homes
nfs:
server: nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud
#server: nfs-tools-project.svc.eqiad.wmnet
path: /mnt/project
#path: /srv/misc/shared/paws/project
- name: dumps
nfs:
server: nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud
#server: labstore1007.wikimedia.org
path: /
# Without this, dumps becomes inaccessible and can hang the host
- name: dumps-src1
nfs:
server: nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud
#server: labstore1007.wikimedia.org
path: /
- name: dumps-src2
nfs:
server: nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud
#server: labstore1006.wikimedia.org
path: /
- name: homes
nfs:
server: nfs-tools-project.svc.eqiad.wmnet
path: /srv/misc/shared/paws/project
- name: dumps
nfs:
server: labstore1007.wikimedia.org
path: /
# Without this, dumps becomes inaccessible and can hang the host
- name: dumps-src1
nfs:
server: labstore1007.wikimedia.org
path: /
- name: dumps-src2
nfs:
server: labstore1006.wikimedia.org
path: /
extraConfig:
00-myConfig: |
localdev = False
Expand Down
6 changes: 2 additions & 4 deletions paws/templates/public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ spec:
path: /mnt/project/paws/userhomes
{{ else }}
- nfs:
server: nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud
#server: nfs-tools-project.svc.eqiad.wmnet
server: nfs-tools-project.svc.eqiad.wmnet
path: /srv/misc/shared/paws/project/paws/userhomes
{{ end }}
name: pawshomes
Expand Down Expand Up @@ -95,8 +94,7 @@ spec:
path: /mnt/project/paws/userhomes
{{ else }}
- nfs:
server: nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud
#server: nfs-tools-project.svc.eqiad.wmnet
server: nfs-tools-project.svc.eqiad.wmnet
path: /srv/misc/shared/paws/project/paws/userhomes
{{ end }}
name: pawshomes
Expand Down
21 changes: 9 additions & 12 deletions paws/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,16 @@ jupyterhub:
# Set rather than use .extend!
# Since otherwise the volumes list will grow each time
# the spawner stops and starts!
homedir = '/data/project/paws/userhomes/{}'.format(identity['sub'])
homenfs = '/mnt/project/paws/userhomes/{}'.format(identity['sub'])
# Create the homedir so docker doesn't do it as root
os.makedirs(homedir, mode=0o755, exist_ok=True)
if localdev == True:
spawner.volumes = [
{
'name': 'home',
'hostPath': { 'path': homedir }
'hostPath': { 'path': homenfs }
},
{
'name': 'dumps',
Expand All @@ -189,27 +191,22 @@ jupyterhub:
}
]
else:
homenfs = '/mnt/project/paws/userhomes/{}'.format(identity['sub'])
spawner.volumes = [
{
'name': 'home',
'nfs': { 'server': 'nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud', 'path': homenfs }
#'nfs': { 'server': 'nfs-tools-project.svc.eqiad.wmnet', 'path': homenfs }
'nfs': { 'server': 'nfs-tools-project.svc.eqiad.wmnet', 'path': homenfs }
},
{
'name': 'dumps',
'nfs': { 'server': 'nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud', 'path': '/' }
#'nfs': { 'server': 'labstore1007.wikimedia.org', 'path': '/' }
'nfs': { 'server': 'clouddumps1001.wikimedia.org', 'path': '/' }
},
{
'name': 'dumps-src1',
'nfs': { 'server': 'nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud', 'path': '/' }
#'nfs': { 'server': 'clouddumps1002.wikimedia.org', 'path': '/' }
'nfs': { 'server': 'clouddumps1002.wikimedia.org', 'path': '/' }
},
{
'name': 'dumps-src2',
'nfs': { 'server': 'nfs-for-test-paws.admin.codfw1dev.wikimedia.cloud', 'path': '/' }
#'nfs': { 'server': 'clouddumps1002.wikimedia.org', 'path': '/' }
'nfs': { 'server': 'clouddumps1001.wikimedia.org', 'path': '/' }
}
]
Expand Down Expand Up @@ -284,10 +281,10 @@ jupyterhub:
tag: pr-222 # singleuser tag managed by github actions
pullPolicy: Always
memory:
guarantee: .1G
guarantee: 1G
limit: 3G
cpu:
guarantee: .1
guarantee: .5
limit: 1
storage:
type: none
Expand Down

0 comments on commit 9f28716

Please sign in to comment.