Create a FUSE driver so that it is possible to manipulate remote files and directories from Amazon AWS S3 buckets using regular Linux commands over files from a mount point. The mount point must be capable of being used by a Samba share.
Constraints:
- The project name is 'stutz-s3fs'
- The bridge must be implemented as a FUSE extension
- Tutorial: [login to view URL]~pfeiffer/fuse-tutorial/
- Example: [login to view URL]
- All calls to Amazon S3 must be performed using Amazon AWS CLI. Don't use any direct HTTP calls
- Documentation: [login to view URL]
- Recommendations
- Use as much caching as possible
- Avoid all unnecessary network calls
- Perform automatic work_dir cleanups
- Don't create artificial files (for internal logic) on S3 bucket
- The Amazon AWS keys used during calls must be mapped to the local Linux user executing the command
- File /etc/stutz-s3fs-users will contain a mapping. E.g:
#Linux PAM TO AWS mapping file
root=AKIAIDEAA7YWDZWS2MD2:3Cgmd2FOKyjisuM4aaa/7rKc19zJisdr5A4SwQc5
flaviostutz=BKIAIDEAA7YWDAWS2MD3:4Cgmd2FOKyjisuM4aaa37rKc19zJisdr5A4SwQc4
- The same S3 bucket may be mounted (and used) on multiple points at the same time
- Apply the optimistic locking strategy
- During file upload, check for remote file timestamp:
- If it is equals to the last downloaded file, overwrite it (no one has changed it since it was downloaded to the mount point)
- If it is different (another mount point have changed it in the meanwhile), upload the file with the sufix '-CONFLICTn'
- 'n' is the conflict number. Look for files whose timestamp matches the file being uploaded among those CONFLICT files and overwrite the file that is related to your baseline
- Fuse options
- loglevel=<debug, info, warning>: defaults to info
- -f: work on foreground. log messages to screen
- work_dir=<path>: cache and upload queue files. defaults to '/var/cache/stutz-s3fs'
- each mount point must point to a different dir inside work_dir to avoid conflicts
- Logging
- All logging must be sent to syslog
- Things to be logged using level 'debug':
- All calls to Amazon AWS CLI with all parameters
- Internal checks
- Resources retrieved from local cache
- Things to be logged using level 'info'
- File uploads start/finish
- File downloads start/finish
- AWS permission denied conditions
- Things to be logged using level 'warning'
- System exceptions (disk write/read errors etc)
Acceptance tests: (SEE ATTACHED FILE)
#BASIC READING TESTS
#CONTENTS READING TESTS
#READ CACHING TESTS
#WRITE QUEUE TESTS
#SECURITY TESTS
#SAMBA COMPATIBILITY TESTS