Support for vagrant openstack provider

196 views
Skip to first unread message

fran

unread,
May 5, 2014, 8:04:05 AM5/5/14
to vagra...@googlegroups.com
Hi,

I am trying to create VM with vagrant openstack provider.
I have tried theses plugins :
 * https://github.com/cloudbau/vagrant-openstack-plugin
 * https://github.com/mat128/vagrant-openstack
but I did not succeed to create VM.
Perhaps, I could use rackspace plugin but I don't know if I can use it with a Openstack server.

I 've got this kind of error :
--
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x007f06986d56f0>
 INFO warden: Calling IN action: #<VagrantPlugins::OpenStack::Action::ConnectOpenStack:0x007f06986d56a0>
 INFO connect_openstack: Connecting to OpenStack...
ERROR warden: Error occurred: Expected([200, 204]) <=> Actual(404 Not Found)
  response => #<Excon::Response:0x007f0698b25868 @data={:body=>"{\"error\": {\"message\": \"The resource could not be found.\", \"code\": 404, \"title\": \"Not Found\"}}", :headers=>{"Vary"=>"X-Auth-Token", "Content-Type"=>"application/j
son", "Content-Length"=>"93", "Date"=>"Mon, 05 May 2014 11:49:37 GMT"}, :status=>404, :remote_ip=>"192.168.33.11", :local_port=>39152, :local_address=>"192.168.33.1"}, @body="{\"error\": {\"message\": \"The resource could not be found.\"
, \"code\": 404, \"title\": \"Not Found\"}}", @headers={"Vary"=>"X-Auth-Token", "Content-Type"=>"application/json", "Content-Length"=>"93", "Date"=>"Mon, 05 May 2014 11:49:37 GMT"}, @status=404, @remote_ip="192.168.33.11", @local_port=39
152, @local_address="192.168.33.1">
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
--
It seems that Vagrant did not succeed to authenticate.

My Vagrantfile :
--
Vagrant.configure("2") do |config|
  config.vm.box = "dummy"

  # Make sure the private key from the key pair is provided
  config.ssh.private_key_path = "~/.ssh/id_rsa"

  config.vm.provider :openstack do |os|
    os.username     = "admin"          # e.g. "#{ENV['OS_USERNAME']}"
    os.api_key      = "password"           # e.g. "#{ENV['OS_PASSWORD']}"
    os.flavor       = /m1.tiny/                # Regex or String
    os.image        = /cirros-0.3.1-x86_64-uec/                 # Regex or String
    os.endpoint     = "http://192.168.33.11:5000/v2/tokens"      # e.g. "#{ENV['OS_AUTH_URL']}/tokens"
    os.keypair_name = "key1"      # as stored in Nova
    os.ssh_username = "cirros"           # login for the VM
    #os.tenant = "admin"
    #os.region = "RegionOne"
  end
end
--

My openstack server is built via : https://github.com/franek/vagrant-devstack/blob/master/Vagrantfile
It is running. I am able to connect it and to create Instance.
Greystone is running and I am able to get token through :  curl -k -X 'POST' http://192.168.33.11:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "admin","password":"password"},"tenantName":"admin"}}' -H 'Content-type: application/json'

Have you got an idea how to fix this problem ?
Which plugin must be used ?

Thanks for your support,
Fran'

fran

unread,
May 5, 2014, 8:06:33 AM5/5/14
to vagra...@googlegroups.com
Sorry, I did not specify which versions I am using :

$ vagrant --version
Vagrant 1.5.2
$ vagrant plugin list
hostupdater (1.0.0)
vagrant-cachier (0.7.1)
vagrant-login (1.0.1, system)
vagrant-openstack-plugin (0.3.0)
vagrant-share (1.0.1, system)

Thanks,

fran

unread,
May 5, 2014, 9:55:45 AM5/5/14
to vagra...@googlegroups.com
I answer to myself:
The problem was an incorrect endpoint.
Corrrect Vagrantfile is :
--
Vagrant.configure("2") do |config|
  config.vm.box = "dummy"

  # Make sure the private key from the key pair is provided
  config.ssh.private_key_path = "~/.ssh/id_rsa"

  config.vm.provider :openstack do |os|
    os.username     = "admin"          # e.g. "#{ENV['OS_USERNAME']}"
    os.api_key      = "password"           # e.g. "#{ENV['OS_PASSWORD']}"
    os.flavor       = /m1.nano/                # Regex or String

    os.image        = /cirros-0.3.1-x86_64-uec/                 # Regex or String
    os.endpoint     = "http://192.168.33.11:5000/v2.0/tokens"      # e.g. "#{ENV['OS_AUTH_URL']}/tokens"

    os.keypair_name = "key1"      # as stored in Nova
    os.ssh_username = "cirros"           # login for the VM
    os.tenant = "admin"

    os.region = "RegionOne"
  end
end
--

I have got another problem (network routing problems) but Vagrant is not the problem...

Thanks,
Fran
Reply all
Reply to author
Forward
0 new messages