How to auth knife openstack with rackspace openstack

Hello all.

I’m a little confused from the README from knife-openstack:

I’m tripped up on the authentication piece and I’m not sure what auth items
these refer to:
knife[:openstack_access_key_id]
knife[:openstack_secret_access_key]
knife[:openstack_api_endpoint]

This is the data I get back from my auth post to
https://identity.api.rackspacecloud.com/v2.0/tokens
I’ve excerpted what I thought was relevant, and changed the names to
protect the innocent.

{
“endpoints”: [
{
“publicURL”: “https://dfw.servers.api.rackspacecloud.com/v2/123456”,
“region”: “DFW”,
“tenantId”: “123456”,
“versionId”: “2”,
“versionInfo”: “https://dfw.servers.api.rackspacecloud.com/v2”,
“versionList”: “https://dfw.servers.api.rackspacecloud.com/
}
],
“name”: “cloudServersOpenStack”,
“type”: “compute”
}

“token”: {
“expires”: “2012-05-31T21:18:57.000-05:00”,
“id”: “fe8a9999-999a-99b1-9abc-99e9cd95682c”,
“tenant”: {
“id”: “id9999”,
“name”: “name99”
}
},
“user”: {
“id”: “654321”,
“name”: “myname”,
“roles”: [
{
“description”: “User Admin Role.”,
“id”: “3”,
“name”: “identity:user-admin”
}
]
}

This is the data I think is relevant but I’ve tried various combinations of
these and always get:
ERROR: Excon::Errors::Unauthorized: Expected(200) <=> Actual(401
Unauthorized)

I’m assuming
knife[:openstack_api_endpoint] = "
https://dfw.servers.api.rackspacecloud.com/v2/123456"
I was also assuming openstack_secret_access_key is my API key which is not
listed above.

Any info appreciated.
Thanks!

I've done a bit of work on the new Rackspace API (and a lot on
knife-openstack), it's a little bit different from the OpenStack API.
I was waiting on one of your fellow Rackers to help me on adding the
v2 Rackspace API to fog, but I haven't heard back. If you're
interested in working on this, contact me off list and we'll start a
conversation about building this.

Thanks,
Matt Ray
Senior Technical Evangelist | Opscode Inc.
matt@opscode.com | (512) 731-2218
Twitter, IRC, GitHub: mattray

On Wed, May 30, 2012 at 11:15 PM, Cooper Simmons
cooper.simmons@gmail.com wrote:

Hello all.

I'm a little confused from the README from
knife-openstack: knife-openstack/README.md at main · chef/knife-openstack · GitHub

I'm tripped up on the authentication piece and I'm not sure what auth items
these refer to:
knife[:openstack_access_key_id]
knife[:openstack_secret_access_key]
knife[:openstack_api_endpoint]

This is the data I get back from my auth post to
https://identity.api.rackspacecloud.com/v2.0/tokens
I've excerpted what I thought was relevant, and changed the names to protect
the innocent.

{
"endpoints": [
{
"publicURL": "https://dfw.servers.api.rackspacecloud.com/v2/123456",
"region": "DFW",
"tenantId": "123456",
"versionId": "2",
"versionInfo": "https://dfw.servers.api.rackspacecloud.com/v2",
"versionList": "https://dfw.servers.api.rackspacecloud.com/"
}
],
"name": "cloudServersOpenStack",
"type": "compute"
}

"token": {
"expires": "2012-05-31T21:18:57.000-05:00",
"id": "fe8a9999-999a-99b1-9abc-99e9cd95682c",
"tenant": {
"id": "id9999",
"name": "name99"
}
},
"user": {
"id": "654321",
"name": "myname",
"roles": [
{
"description": "User Admin Role.",
"id": "3",
"name": "identity:user-admin"
}
]
}

This is the data I think is relevant but I've tried various combinations of
these and always get:
ERROR: Excon::Errors::Unauthorized: Expected(200) <=> Actual(401
Unauthorized)

I'm assuming
knife[:openstack_api_endpoint] =
"https://dfw.servers.api.rackspacecloud.com/v2/123456"
I was also assuming openstack_secret_access_key is my API key which is not
listed above.

Any info appreciated.
Thanks!