Monday, July 10, 2017

How to mount OpenStack Swift as a attached Drive in your OS

For allowing me to mount Swift as a drive in OS, I leverage goofys. It's a great tools to allow you mount an S3 bucket as a file system.

However since goofys works with S3 API only, I have to turn on Swift S3 ( S3 emulation layer ) to make it work.

Moreover, I double check aws golang sdk, the endpoint have to be setup with region and no https.

Thus I setup swiftstack on my local virtualbox non-ssl and it's working for me.

1. ~/.aws/credentail
```
$ cat credentials
[default]
aws_access_key_id = s3
aws_secret_access_key = 52b1fb2e26e97010be092f815db87f26
```



2. $ goofys --endpoint http://ss02.swiftstack.idv/ --region US jwangtest ~/goofys

goofsy --endpoint <your swift endpoint> --region <default is US> <container/bucket> <mount point>

3. drag and drop file and it will sync from your local FUSE drive with swift


PS: I tested on both ends. goofys can sync both ( from swift to local FUSE goofys drive or from local FUSE goofys drive to swift ).

Reference:

No comments:

Post a Comment