Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions paws/codfw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jupyterhub:
00-myConfig: |
localdev = False
nfs_home = 'pawsdev-nfs.pawsdev.codfw1dev.wikimedia.cloud'
dumps_src1 = 'pawsdev-nfs.pawsdev.codfw1dev.wikimedia.cloud'
dumps_src2 = 'pawsdev-nfs.pawsdev.codfw1dev.wikimedia.cloud'
ingress:
enabled: true
hosts:
Expand All @@ -28,7 +26,7 @@ jupyterhub:
minesweeper:
enabled: true
maintainDumpsNfs:
enabled: false
enabled: true
server: pawsdev-nfs.pawsdev.codfw1dev.wikimedia.cloud
affinity:
nodeAffinity:
Expand Down
4 changes: 1 addition & 3 deletions paws/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jupyterhub:
00-myConfig: |
localdev = False
nfs_home = 'paws-nfs.svc.paws.eqiad1.wikimedia.cloud'
dumps_src1 = 'clouddumps1001.wikimedia.org'
dumps_src2 = 'clouddumps1002.wikimedia.org'
ingress:
enabled: true
hosts:
Expand All @@ -28,7 +26,7 @@ jupyterhub:
minesweeper:
enabled: true
maintainDumpsNfs:
enabled: false
enabled: true
server: dumps-nfs.wikimedia.org
affinity:
nodeAffinity:
Expand Down
62 changes: 26 additions & 36 deletions paws/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,63 +139,53 @@ jupyterhub:
homenfs = '/srv/paws/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': homenfs }
},

# Common spawner volumes from the host. Contents are managed
# by maintain-dumps-nfs:
# * mnt-nfs holds the nfs mount to dumps-nfs.w.o and gets
# re-mounted as needed, hence the mountPropagation option.
# * public-dumps is the public interface and holds a symlink to /mnt/nfs

spawner.volumes = [
{
'name': 'dumps',
'name': 'public-dumps',
'hostPath': { 'path': '/public/dumps' }
},
{
'name': 'dumps-src1',
'hostPath': { 'path': '/mnt/nfs/dumps-clouddumps1001.wikimedia.org' }
'name': 'mnt-nfs',
'hostPath': { 'path': '/mnt/nfs' }
},
]

if localdev == True:
spawner.volumes.extend([
{
'name': 'dumps-src2',
'hostPath': { 'path': '/mnt/nfs/dumps-clouddumps1002.wikimedia.org' }
}
]
'name': 'home',
'hostPath': { 'path': homenfs }
},
])
else:
spawner.volumes = [
spawner.volumes.extend([
{
'name': 'home',
'nfs': { 'server': nfs_home, 'path': homenfs }
},
{
'name': 'dumps',
'nfs': { 'server': dumps_src1, 'path': '/' }
},
{
'name': 'dumps-src1',
'nfs': { 'server': dumps_src1, 'path': '/' }
},
{
'name': 'dumps-src2',
'nfs': { 'server': dumps_src2, 'path': '/' }
}
]
])

spawner.volume_mounts = [
{
'name': 'home',
'mountPath': '/home/paws'
},
{
'name': 'dumps',
'mountPath': '/public/dumps/public',
'readOnly': True
},
{
'name': 'dumps-src1',
'mountPath': '/mnt/nfs/dumps-clouddumps1001.wikimedia.org',
'name': 'public-dumps',
'mountPath': '/public/dumps',
'readOnly': True
},
{
'name': 'dumps-src2',
'mountPath': '/mnt/nfs/dumps-clouddumps1002.wikimedia.org',
'name': 'mnt-nfs',
'mountPath': '/mnt/nfs',
'mountPropagation': 'HostToContainer',
'readOnly': True
},
]
Expand Down
Loading