Revision history [back]

click to hide/show revision 1
initial version

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

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": "b204727aa89447d09df2aa2d5b2dbf92", "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 -> b8afdf01c7654a45b266c1de17022795
keystone tenant-create --name=service -> 82a7ff75d2ea462a96150a1958fc0089
keystone user-create --tenant-id b8afdf01c7654a45b266c1de17022795 --name=admin --pass=abcde --email=me@test.net -> 347765a224d942969e5bcedb5321d36b
keystone user-create --tenant-id 82a7ff75d2ea462a96150a1958fc0089 --name=swift --pass=12345 --email=me@test.net -> b204727aa89447d09df2aa2d5b2dbf92
keystone role-create --name=admin -> 976c30ca75c74e9db3d8a62c3e210726
keystone user-role-add --user-id 347765a224d942969e5bcedb5321d36b --tenant_id b8afdf01c7654a45b266c1de17022795 --role-id 976c30ca75c74e9db3d8a62c3e210726
keystone user-role-add --user-id b204727aa89447d09df2aa2d5b2dbf92 --tenant_id 82a7ff75d2ea462a96150a1958fc0089 --role-id 976c30ca75c74e9db3d8a62c3e210726
keystone service-create --name swift --type object-store --description 'OpenStack Storage Service' -> f09523af421e4c23a6df4034ff033bba
keystone service-create --name keystone --type identity --description 'OpenStack Identity' -> 801c1bb272f640eca7f84132450d58da
keystone endpoint-create --region RegionOne --service_id f09523af421e4c23a6df4034ff033bba --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 801c1bb272f640eca7f84132450d58da --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

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

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": "b204727aa89447d09df2aa2d5b2dbf92", "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 -> b8afdf01c7654a45b266c1de17022795
keystone tenant-create --name=service -> 82a7ff75d2ea462a96150a1958fc0089
keystone user-create --tenant-id b8afdf01c7654a45b266c1de17022795 --name=admin --pass=abcde --email=me@test.net -> 347765a224d942969e5bcedb5321d36b
keystone user-create --tenant-id 82a7ff75d2ea462a96150a1958fc0089 --name=swift --pass=12345 --email=me@test.net -> b204727aa89447d09df2aa2d5b2dbf92
keystone role-create --name=admin -> 976c30ca75c74e9db3d8a62c3e210726
keystone user-role-add --user-id 347765a224d942969e5bcedb5321d36b --tenant_id b8afdf01c7654a45b266c1de17022795 --role-id 976c30ca75c74e9db3d8a62c3e210726
keystone user-role-add --user-id b204727aa89447d09df2aa2d5b2dbf92 --tenant_id 82a7ff75d2ea462a96150a1958fc0089 --role-id 976c30ca75c74e9db3d8a62c3e210726
keystone service-create --name swift --type object-store --description 'OpenStack Storage Service' -> f09523af421e4c23a6df4034ff033bba
keystone service-create --name keystone --type identity --description 'OpenStack Identity' -> 801c1bb272f640eca7f84132450d58da
keystone endpoint-create --region RegionOne --service_id f09523af421e4c23a6df4034ff033bba --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 801c1bb272f640eca7f84132450d58da --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

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

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": "b204727aa89447d09df2aa2d5b2dbf92", "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 -> b8afdf01c7654a45b266c1de17022795c3afdf01c7654a45b266c1de17022795
keystone tenant-create --name=service -> 82a7ff75d2ea462a96150a1958fc008947a7ff75d2ea462a96150a1958fc0089
keystone user-create --tenant-id b8afdf01c7654a45b266c1de17022795 c3afdf01c7654a45b266c1de17022795 --name=admin --pass=abcde --email=me@test.net -> 347765a224d942969e5bcedb5321d36b257765a224d942969e5bcedb5321d36b
keystone user-create --tenant-id 82a7ff75d2ea462a96150a1958fc0089 47a7ff75d2ea462a96150a1958fc0089 --name=swift --pass=12345 --email=me@test.net -> b204727aa89447d09df2aa2d5b2dbf92c704727aa89447d09df2aa2d5b2dbf92
keystone role-create --name=admin -> 976c30ca75c74e9db3d8a62c3e210726216c30ca75c74e9db3d8a62c3e210726
keystone user-role-add --user-id 347765a224d942969e5bcedb5321d36b 257765a224d942969e5bcedb5321d36b --tenant_id b8afdf01c7654a45b266c1de17022795 c3afdf01c7654a45b266c1de17022795 --role-id 976c30ca75c74e9db3d8a62c3e210726216c30ca75c74e9db3d8a62c3e210726
keystone user-role-add --user-id b204727aa89447d09df2aa2d5b2dbf92 --tenant_id 82a7ff75d2ea462a96150a1958fc0089 47a7ff75d2ea462a96150a1958fc0089 --role-id 976c30ca75c74e9db3d8a62c3e210726216c30ca75c74e9db3d8a62c3e210726
keystone service-create --name swift --type object-store --description 'OpenStack Storage Service' -> f09523af421e4c23a6df4034ff033bbad19523af421e4c23a6df4034ff033bba
keystone service-create --name keystone --type identity --description 'OpenStack Identity' -> 801c1bb272f640eca7f84132450d58da671c1bb272f640eca7f84132450d58da
keystone endpoint-create --region RegionOne --service_id f09523af421e4c23a6df4034ff033bba 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 801c1bb272f640eca7f84132450d58da 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