It is also possible to control your rackspace cloud files using the openstack swift client, the first thing we need to do is install the package
[ nitin@nitin-ubuntu:~ ]# sudo spt-get install python-swiftclient keystone
Create the file rack.sh this file will be used to setup our environment anytime we want to use swift, it should look something like this
[ nitin@nitin-ubuntu:~ ]# sudo vim /etc/profile.s/rack.sh
export OS_USERNAME=MossoCloudFS_22321312740217423749237492:myusername
export OS_PASSWORD=mypassword
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
[ nitin@nitin-ubuntu:~ ]# keystone tenant-list
If you worked through my last post you’ll notice some differences about this file, two differences we
+---------------------------------------------------+---------------------------------------------------+---------+
| id | name | enabled |
+---------------------------------------------------+---------------------------------------------------+---------+
| MossoCloudFS_22321312740217423749237492 True |
+---------------------------------------------------+---------------------------------------------------+---------+
should note
OS_USERNAME : this contains the tenant name, in addition to the user name but it is not the same as the tenant name we used for nova. On rackspace a different tenant is used for cloud servers and cloud files. What we need to do is get the tenant name for our cloud files account. In order to get this you can run the command below (replace the username and password in the command)
[ nitin@nitin-ubuntu:~ ]# source /etc/profile
Now your ready, lets go
List all of container
[ nitin@nitin-ubuntu:~ ]# Swift list
No comments:
Post a Comment