You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@submarine.apache.org by GitBox <gi...@apache.org> on 2021/01/26 06:45:34 UTC
[GitHub] [submarine] ByronHsu opened a new pull request #498: SUBMARINE-717. Add NFS support for persistent volume
ByronHsu opened a new pull request #498:
URL: https://github.com/apache/submarine/pull/498
### What is this PR for?
1. User can use their own NFS server to store persistent storage data.
2. For developers, who might not have an existing nfs server, they can create an nfs server in kubernetes cluster by the script provided in `dev-support/`.
3. Added the guidance of nfs usage in docs.
### What type of PR is it?
[Feature]
### Todos
* [ ] - Store notebook data in nfs
* [ ] - Store tensorboard data in nfs
### What is the Jira issue?
* Open an issue on Jira https://issues.apache.org/jira/browse/SUBMARINE/
* Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg. `SUBMARINE-23. PR title`
### How should this be tested?
https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-717
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [submarine] ByronHsu commented on pull request #498: SUBMARINE-717. Add NFS support for persistent volume
Posted by GitBox <gi...@apache.org>.
ByronHsu commented on pull request #498:
URL: https://github.com/apache/submarine/pull/498#issuecomment-772631783
@tangzhankun I have tested it with kind and minikube. They both work fine :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [submarine] asfgit closed pull request #498: SUBMARINE-717. Add NFS support for persistent volume
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #498:
URL: https://github.com/apache/submarine/pull/498
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [submarine] pingsutw commented on a change in pull request #498: SUBMARINE-717. Add NFS support for persistent volume
Posted by GitBox <gi...@apache.org>.
pingsutw commented on a change in pull request #498:
URL: https://github.com/apache/submarine/pull/498#discussion_r564540341
##########
File path: docs/userdocs/k8s/helm.md
##########
@@ -78,6 +78,56 @@ submarine-traefik-9bb6f8577-66sx6 1/1 Running 0 5
tf-job-operator-7844656dd-lfgmd 1/1 Running 0 5s
```
+### Configure volume type
+Submarine can support various [volume types](https://kubernetes.io/docs/concepts/storage/volumes/#nfs), currently including hostPath (default) and NFS. It can be easily configured in the `./helm-charts/submarine/values.yaml`, or you can override the default values in `values.yaml` by [helm CLI](https://helm.sh/docs/helm/helm_install/).
+
+#### hostPath
+- In hostPath, you can store data directly in your node.
+- Usage:
+ 1. Configure setting in `./helm-charts/submarine/values.yaml`.
+ 2. To enable hostPath storage, set `.storage.type` to `host`.
+ 3. To set the root path for your storage, set `.storage.host.root` to `<any-path>`
+- Example:
+ ```yaml
+ # ./helm-charts/submarine/values.yaml
+ storage:
+ type: host
+ host:
+ root: /tmp
Review comment:
Same here.
```suggestion
root: ~/.submarine
```
##########
File path: dev-support/nfs-server/nfs-server.yaml
##########
@@ -0,0 +1,68 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+---
+kind: Service
+apiVersion: v1
+metadata:
+ name: nfs-server
+spec:
+ type: ClusterIP
+ clusterIP: 10.96.0.2
+ ports:
+ - name: nfs
+ port: 2049
+ - name: mountd
+ port: 20048
+ - name: rpcbind
+ port: 111
+ selector:
+ role: nfs-server
+---
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+ name: nfs-server
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ role: nfs-server
+ template:
+ metadata:
+ name: nfs-server
+ labels:
+ role: nfs-server
+ spec:
+ containers:
+ - name: nfs-server
+ image: k8s.gcr.io/volume-nfs:0.8
+ ports:
+ - name: nfs
+ containerPort: 2049
+ - name: mountd
+ containerPort: 20048
+ - name: rpcbind
+ containerPort: 111
+ securityContext:
+ privileged: true
+ volumeMounts:
+ - mountPath: /exports
+ name: nfs-vol
+ volumes:
+ - name: nfs-vol
+ hostPath:
+ path: /tmp/nfs-vol
Review comment:
I think it's better to store data in `~/.submarine/nfs-vol` instead of `/tmp`
##########
File path: helm-charts/submarine/values.yaml
##########
@@ -31,3 +31,9 @@ submarine:
mysqlRootPassword: password
traefik:
enabled: true
+ storage:
+ type: host # "host" or "nfs"
+ host:
+ root: /tmp
Review comment:
```suggestion
root: ~/.submarine
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [submarine] ByronHsu commented on pull request #498: SUBMARINE-717. Add NFS support for persistent volume
Posted by GitBox <gi...@apache.org>.
ByronHsu commented on pull request #498:
URL: https://github.com/apache/submarine/pull/498#issuecomment-767340236
@tangzhankun help me review this PR. Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [submarine] pingsutw commented on pull request #498: SUBMARINE-717. Add NFS support for persistent volume
Posted by GitBox <gi...@apache.org>.
pingsutw commented on pull request #498:
URL: https://github.com/apache/submarine/pull/498#issuecomment-774487268
Will merge if no more comment
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org