I am using Vagrant(1.4.3version) ,Virtualbox(4.3) and vagrant-openstack-provider plugin(0.6.1) working on Ubuntu 14.04 to provision instances with Openstack provider using puppet.With all these installed in the fresh environment, when i run "vagrant up --provider=openstack" it launches the instance, but puppet provisioning is not happening in the instance.
Once after destroying the box with the command "vagrant destroy", and if i tried to launch an instance again, i got the below errors.
/usr/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from extconf.rb:1:in `<main>'
Gem files will remain installed in > /home/onecloud/.vagrant.d/gems/gems/json-1.7.7 > for inspection. Results logged to > /home/onecloud/.vagrant.d/gems/gems/json-1.7.7/ext/json/ext/generator/gem_make.out > from > /usr/lib/ruby/1.9.1/rubygems/installer.rb:540:in >
block in build_extensions' from > /usr/lib/ruby/1.9.1/rubygems/installer.rb:515:in >
each' from > /usr/lib/ruby/1.9.1/rubygems/installer.rb:515:in >build_extensions' from > /usr/lib/ruby/1.9.1/rubygems/installer.rb:180:in >
install' from > /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in >block in install' from > /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in >
each' from > /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in >each_with_index' from > /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in >
install' from > /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:65:in >block in call' from > /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:42:in >
block in with_environment' from > /usr/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:inuse_ui' from > /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:41:in >
with_environment' from > /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:52:in >call' from > /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in >
call' from > /usr/share/vagrant/plugins/commands/plugin/action/bundler_check.rb:20:in >call' from > /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in >
call' from > /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:incall' from > /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:69:in >
block in run' from > /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in >busy' from > /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:69:in >
run' from > /usr/share/vagrant/plugins/commands/plugin/command/base.rb:17:in >action' from > /usr/share/vagrant/plugins/commands/plugin/command/install.rb:27:in >
execute' from > /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:in >execute' from > /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:38:in >
execute' from > /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:484:in >cli' from /usr/bin/vagrant:127:in >
<main>'
========================================
After Google'g to fix this issue, i found to have ruby1.9.1 specifically installed and bindler needs to be uninstalled as per the below commands.
$sudo apt-get install ruby1.9.1-dev
$sudo apt-get install ruby1.9.1
$vagrant plugin uninstall bindler .
Also this worked for first time only,again the same issue persists even after running above commands.
I tried by uninstalling and re installing vagrant, but all in vain.
The Vagrantfile configurations used are as below,
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "dummy"
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "site.pp"
end
require 'vagrant-openstack-provider'
#Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.username ='ubuntu'
# SSH
config.ssh.private_key_path = "~/.ssh/id_rsa"
# Basic OpenStack options
# Note that an openrc file needs sourced before using
config.ssh.private_key_path = "~/.ssh/id_rsa"
# Basic OpenStack options
config.vm.provider :openstack do |os|
os.openstack_auth_url ='http://a.b.c.d:5000/v2.0/tokens'
os.username= 'admin'
os.password='password'
os.tenant_name='admin'
os.flavor='m1.small'
os.image='Ubuntutrusty'
os.keypair_name='vagrantkey'
os.ssh_username='ubuntu'
os.security_groups=["default"]
os.floating_ip_pool='public'
os.networks= ['private']
end
config.vm.define "Openstack"
end
I need to deploy an python/flask application on openstack instance through vagrant automated provisioning by puppet.
All kinds of INPUTS/FEEDBACK are appreciable. Looking for WORKABLE SOLUTION...!!!