pai
pai copied to clipboard
Team wise storage for NFS data storage
Rescoping For time and effort limitations, the belowing features will be limited in the context of NFS storage in v0.11.0
What would you like to be added:
- PAI supports to set up multiple storage;
- PAI admin can set up users default and accessible storage;
- Storage between different teams can be isolated through settings;
Why is this needed:
- security considerations: data isolation;
Without this feature, how does the current module work: all the teams are share one single storage set up
Components that may involve changes: storage_plugin
PR created: https://github.com/Microsoft/pai/pull/2346
Test Case:
Prerequisites:
- Set up nfs server, e.g: 10.0.0.1:/share/teamA with settings: (rw, sync, no_root_squash)
- Install PAI plugin submit-nfs-job [https://github.com/Microsoft/pai/tree/master/contrib/submit-nfs-job] #2358
- Start PAI dev-box
Steps:
- In dev-box, go to pai/contrib/storage_plugin, install jsonschema pip install jsonschema
- Create server config: python storagectl.py server set teamA 10.0.0.1 /share/teamA --sharedfolders data --privatefolders users
- Create user config: python storagectl.py user setdefault user1 teamA
- Go to nfs server, check if /share/teamA/data and /share/teamA/users/user1 folder was created
- Login with user1 in PAI, go to submit-nfs-job page, check if nfs mount section filled with right information
- Submit a job and check if the job files was created on nfs
@wangdian When in steps2, come across this error.
root@xxxxxx:/pai/contrib/storage_plugin# python storagectl.py storage set default x.x.x.x /share/default --sharedfolders data --privatefolders user
/usr/local/lib/python2.7/dist-packages/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
usage: storagectl.py [-h] {init,server,user,push} ...
storagectl.py: error: invalid choice: 'storage' (choose from 'init', 'server', 'user', 'push')