Unsolved
This post is more than 5 years old
10 Posts
0
1730
Swift test connection on ECS
Hi !
I installed ECS 2.2 with the docker single-node installation method. My goal is to find a way to provide swift access to my developpers on VNX. (They were using Isilon but this storage array is now out-of-maintenance). To be honest, I don't have any knowledge on Swift. I installed ECS, configure it following the community guide and now, I'd like to test myself if it's working before asking my developpers to test it.
How can I do a test connection to swift on ECS ?
Thanks for your help !
Xavier
JasonCwik
281 Posts
2
October 3rd, 2016 11:00
Hi Xavier,
Sorry for the late reply, for some reason I didn't get any notifications of your question. ECS runs Swift on ports 9024(HTTP) and 9025(HTTPS). What language are your developers working in? You will generally use some sort of SDK for developing your connector. For some basic testing, you should be able to configure something like Cyberduck to connect. Here's the configuration for ECS Test Drive: ECS Test Drive – Getting started with Swift and Cyberduck You would use port 9025 when connecting to a local ECS.
There's also some code examples for Java and Python: Getting Started with ECS SDKs
jenlain
10 Posts
0
October 4th, 2016 01:00
Thanks Jason for your answer. I will forward the SDKs to my developpers, I'm sure it will talk to them.
Finally, we successed to authenticate with the curl command :
$ curl -i -H "X-Storage-User: my_swift_user" -H "X-Storage-Pass: swift_user_password" http://my_ecs_appliance:9024/auth/v1.0
It's answering :
HTTP/1.1 204 No Content
X-Storage-Url: http://my_ecs_appliance:9024/v1/ns
X-Auth-Token: ECS_67ec90b938133e8b95a16a4313ed39bd
x-emc-request-id: 0a12dd35:15733bb238f:1464:8
Server: Jetty(7.6.4.v20120524)
Then test can be done with followin commands :
=== OBJECTS FOR THE ACCOUNT (ns)
curl -v -H "X-Auth-Token: ECS_67ec90b938133e8b95a16a4313ed39bd" http://my_ecs_appliance:9024/v1/ns?format=json GET
=== CONTAINER CREATION (container_test1)
curl -H "X-Auth-Token: ECS_67ec90b938133e8b95a16a4313ed39bd" -v "http://my_ecs_appliance:9024/v1/ns/container_test1" -X PUT
=== LISTING CONTAINER OBJECTS
curl -v -H "X-Auth-Token: ECS_67ec90b938133e8b95a16a4313ed39bd" http://my_ecs_appliance:9024/v1/ns/container_test1?format=json GET
=== CHANGING ACL
curl -v -H "X-Auth-Token: ECS_67ec90b938133e8b95a16a4313ed39bd" -H "X-Container-Read: *" http://my_ecs_appliance:9024/v1/ns/container_test1 -X POST
=== UPLOAD a file (text.txt)
curl -v -H "X-Auth-Token: ECS_67ec90b938133e8b95a16a4313ed39bd" http://my_ecs_appliance:9024/v1/ns/container_test1/test.txt -X PUT -T
/test.txt
=== DELETE a file
curl -v -H "X-Auth-Token: ECS_67ec90b938133e8b95a16a4313ed39bd" http://my_ecs_appliance:9024/v1/ns/container_test1/test.txt -X DELETE