I've used devstack to set up a simple OpenStack instance, and used its
web UI to successfully launch an instance that I can contact remotely.
Now I'm trying to use fog (installed from GitHub at 851e838d) to
manage instances, but I haven't gotten off the ground:
>> Compute.new({:provider => :openstack, :openstack_api_key => "123456", :openstack_username => "admin", :openstack_auth_url => "
http://10.117.0.24:5000/v2.0/tokens"})
Excon::Errors::InternalServerError: Expected([200, 204]) <=>
Actual(500 InternalServerError)
request => {:connect_timeout=>60,
:headers=>{"Content-Type"=>"application/json",
"Host"=>"
10.117.0.24:5000", "Content-Length"=>71},
:instrumentor_name=>"excon", :mock=>false, :read_timeout=>60,
:retry_limit=>4,
:ssl_ca_file=>"/usr/local/rvm/gems/ruby-1.9.3-p125@chef/gems/excon-0.13.4/data/cacert.pem",
:ssl_verify_peer=>true, :write_timeout=>60, :host=>"10.117.0.24",
:path=>"/v2.0/tokens", :port=>"5000", :query=>nil, :scheme=>"http",
:expects=>[200, 204],
:body=>"{\"auth\":{\"passwordCredentials\":{\"username\":\"admin\",\"password\":123456}}}",
:method=>"POST"}
response => #<Excon::Response:0x00000003367b28 @body="{\"error\":
{\"message\": \"An unexpected error prevented the server from
fulfilling your request. object of type 'int' has no len()\",
\"code\": 500, \"title\": \"Internal Server Error\"}}",
@headers={"Content-Type"=>"application/json", "Vary"=>"X-Auth-Token",
"Content-Length"=>"177", "Date"=>"Thu, 24 May 2012 22:39:55 GMT"},
@status=500>
I seem to be getting past authorization, because I got 401 Unuthorized
if I change the username or password.
I know that OpenStack is early and evolving, but is there a better
way? (Would I be better off trying to control it via its emulation of
the EC2 API?)
Any other suggestions?
Thanks,
...Bryan