Here is a Short Guide on How To Access OpenStack Swift via FTP. We Have Used HP Cloud as an Example Setup. This Method Can Be Used On Own Setup. We have other OpenStack Swift related guide like using a Python Script to upload the static objects to linked CDN. This Guide on How To Access OpenStack Swift via FTP is Intended For The Advanced Users. You must have basic understanding of OpenStack Swift and other related things. You can perform a search on our (this) website to get more guides on OpenStack, which might help you if you are relatively new to OpenStack. This method might not work on Rackspace installation of OpenStack.
Access OpenStack Swift via FTP (HP Cloud)
We are assuming that python-pip and Python Swift Agent are installed on the client side. Use the default Terminal (not iTerm2) for OS X to force sudo
:
1 | sudo pip install ftp-cloudfs python-keystoneclient |
For our setup, the openstackrc file’s [read this guide for OpenStack RC] credentials are added in .zshrc
. So, if we cd to $HOME
and do a cat
:
---
1 | cd ~ && cat .zshrc |
we will get the export OS_AUTH_URL
. For HP Cloud, that is –
1 | https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/ |
Access OpenStack Swift via FTP : Having Fun on HP Cloud
For HP Cloud, we will run this command :
1 | ftpcloudfs --foreground --keystone-auth --auth-url https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/ |
You should be able to access :
1 | http://127.0.0.1:2021 |
You can run cURL to troubleshoot :
1 | curl -I http://127.0.0.1:2021 |
It might give you 500 error. Try to get the error by running this command :
1 | curl -i 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/' -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"auth": {"tenantName": "xxxxxxxxxx", "passwordCredentials": {"username": "yourusername", "password": "yourpassword"}}}' |
If you are getting :
1 2 3 4 5 | HTTP/1.1 405 Method Not Allowed Content-Type: application/json ALLOW: GET Content-Length: 45 Connection: keep-alive |
Ask HP Cloud’s Support. I expect this :
1 2 3 4 5 | HTTP/1.1 200 OK Vary: X-Auth-Token Content-Type: application/json Content-Length: 543 Connection: close |
Cloud FS project is here :
1 | https://github.com/cloudfs/ftp-cloudfs |
Most errors are related to Memcached. By the way, you should kill the pid manually.
Tagged With openstack swift mount ftp