Ask Your Question
0

Quering Keystone with Curl does not return the URLs for the swift service, just the access token [closed]

asked 2013-05-01 17:02:57 -0500

adriand gravatar image

updated 2013-05-01 18:42:53 -0500

Hello,

I'm trying to get Swift working with Keystone on Ubuntu 12.04 (Folsom, MySQL and sql.Catalog driver).

The main issue seems to be that I don't manage to bind the endpoint with the swift user; basically when I test with curl I do not get the URLs for swift service:

curl -d '{"auth": {"service": "swift", "passwordCredentials":{"username": "swift", "password": "12345"}}}' -H "Content-type: application/json" http://1.1.1.1:35357/v2.0/tokens | python -mjson.tool

Result:

{ "access": { "serviceCatalog": {}, "token": { "expires": "2013-05-02T21:31:56Z", "id": "e5bd250266344b538ddb7fa08903b203" }, "user": { "id": "c704727aa89447d09df2aa2d5b2dbf92", "name": "swift", "roles": [], "roles_links": [], "username": "swift" } } }

This is how I configured Keystone (I believe I did create the needed tenants/users/roles/services/endpoints):

export SERVICE_TOKEN="mytoken"
export SERVICE_ENDPOINT="http://1.1.1.1:35357/v2.0"
keystone tenant-create --name=demo -> c3afdf01c7654a45b266c1de17022795
keystone tenant-create --name=service -> 47a7ff75d2ea462a96150a1958fc0089
keystone user-create --tenant-id c3afdf01c7654a45b266c1de17022795 --name=admin --pass=abcde --email=me@test.net -> 257765a224d942969e5bcedb5321d36b
keystone user-create --tenant-id 47a7ff75d2ea462a96150a1958fc0089 --name=swift --pass=12345 --email=me@test.net -> c704727aa89447d09df2aa2d5b2dbf92
keystone role-create --name=admin -> 216c30ca75c74e9db3d8a62c3e210726
keystone user-role-add --user-id 257765a224d942969e5bcedb5321d36b --tenant_id c3afdf01c7654a45b266c1de17022795 --role-id 216c30ca75c74e9db3d8a62c3e210726
keystone user-role-add --user-id b204727aa89447d09df2aa2d5b2dbf92 --tenant_id 47a7ff75d2ea462a96150a1958fc0089 --role-id 216c30ca75c74e9db3d8a62c3e210726
keystone service-create --name swift --type object-store --description 'OpenStack Storage Service' -> d19523af421e4c23a6df4034ff033bba
keystone service-create --name keystone --type identity --description 'OpenStack Identity' -> 671c1bb272f640eca7f84132450d58da
keystone endpoint-create --region RegionOne --service_id d19523af421e4c23a6df4034ff033bba --publicurl 'http://1.1.1.2:8080/v1/AUTH_%(tenant_id)s' --adminurl 'http://1.1.1.2:8080/v1' --internalurl 'http://1.1.1.2:8080/v1/AUTH_%(tenant_id)s'
keystone endpoint-create --region RegionOne --service_id 671c1bb272f640eca7f84132450d58da --publicurl 'http://1.1.1.1:5000/v2.0' --adminurl 'http://1.1.1.1:35357/v2.0' --internalurl 'http://1.1.1.1:5000/v2.0'

Thanks, Adrian

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by koolhead17
close date 2013-11-19 20:08:36.213724

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-05-01 18:36:50 -0500

adriand gravatar image

Seems I was querying it wrong; like this I get the needed info:

curl -d '{"auth": {"tenantName": "service", "passwordCredentials":{"username": "swift", "password": "12345"}}}' -H "Content-type: application/json" http://1.1.1.2:35357/v2.0/tokens | python -mjson.tool

Thanks,

Adrian

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2013-05-01 17:02:57 -0500

Seen: 592 times

Last updated: May 01 '13