Ask Your Question
2

How to access Devstack in my host machine?

asked 2013-09-15 08:40:51 -0500

geraldvillorente gravatar image

updated 2013-09-16 09:33:11 -0500

I recently installed Devstack inside Vagrant environment. My main OS is Linux Mint 14 while Vagrant is running Ubuntu Precise(12.04).

After running stack.sh here the last ouput in cli.

Horizon is now available at http://10.0.2.15/ Keystone is serving at http://10.0.2.15:5000/v2.0/ Examples on using novaclient command line is in exercise.sh The default users are: admin and demo The password: password This is your host ip: 10.0.2.15 stack.sh completed in 2979 seconds.

My problem is I can't access http://10.0.2.15/ in my main OS.

Update:

Vagrant.configure("2") do |config|
  config.vm.box = "devstack"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"

  #Horizon
  config.vm.network :forwarded_port, guest: 80, host: 8181
  #VNC
  config.vm.network :forwarded_port, guest: 6080, host: 6080
  #Keystone
  config.vm.network :forwarded_port, guest: 5000, host: 5000

  config.vm.network :private_network, ip: "192.168.56.102"
    config.ssh.forward_agent = true

  config.vm.provider :virtualbox do |v|
    v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    v.customize ["modifyvm", :id, "--memory", 1024]
    v.customize ["modifyvm", :id, "--name", "DevStack Challenge - Precise"]
  end

  config.vm.synced_folder "./", "/var/www/public_html/", id: "vagrant-root", :extra => "dmode=777,fmode=666"
  config.vm.provision :shell, :inline =>
    "if [[ ! -f /apt-get-run ]]; then sudo apt-get update && sudo touch /apt-get-run; fi"


  config.vm.provision :shell, :inline => 'echo -e "mysql_root_password=password
controluser_password=awesome" > /etc/phpmyadmin.facts;'

  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = "manifests"
    puppet.module_path = "modules"
    puppet.options = ['--verbose']
  end
end

Part of localrc:

HOST_IP=10.0.2.15
FLOATING_RANGE=10.0.2.25/28
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-09-15 10:46:26 -0500

darragh-oreilly gravatar image

updated 2013-09-15 12:40:48 -0500

Vagrant tells VirtualBox (or whatever) to configure the VM's eth0 for NAT and forward port 22 for ssh. You can forward additional ports like 80 for Horizon and 6080 for the VNC console. Here is a Vagrantfile for VirtualBox that does that so you can access Horizon from the host with http://localhost:8080

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

  config.vm.box = "precise64"
  config.vm.hostname = "devstack"
  config.vm.network :forwarded_port, guest: 80, host: 8080   # horizon
  config.vm.network :forwarded_port, guest: 6080, host: 6080 # vnc

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "2500"]
    vb.customize ["modifyvm", :id, "--uart1", "0x3F8", 4]
  end

end
edit flag offensive delete link more

Comments

Thanks for your response. I tried what you suggested and still no luck. I updated my post for more info.

geraldvillorente gravatar imagegeraldvillorente ( 2013-09-16 09:29:44 -0500 )edit

I donno why it is not working, but seeing that you are also giving it a non-NATed IP, why not use it? You may have to set localrc HOST_IP to 192.168.56.102. That FLOATING_RANGE will need to be fixed too. Also are you sure the "config.ssh.forward_agent" should be where it is?

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-09-16 10:26:21 -0500 )edit

After running ./stach.sh I have got the same message. Seems that everything went well, but I have the same problem, I cannot access 10.0.2.15! I did not use vagrant though!

Arash gravatar imageArash ( 2013-10-30 11:32:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2013-09-15 08:40:51 -0500

Seen: 6,571 times

Last updated: Sep 16 '13