DevStack
OpenStackをローカル環境で構築するため、そのデプロイツールであるDevStackを使ってインストール。ブランチはJunoを選択。DevStackを実行するVMは、MacでVagrantを用いてまずシングルノード環境を構築。VMのOSはUbuntu。
ホストのハイパーバイザーはVirtualBox。
$ vagrant box add precise64 http://files.vagrantup.com/precise64.box $ vagrant init precise64 $ vim Vagrant ... # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine. In the example below, # accessing "localhost:8080" will access port 80 on the guest machine. config.vm.network "forwarded_port", guest: 5000, host: 5000 config.vm.network "forwarded_port", guest: 80, host: 8080 config.vm.provider "virtualbox" do |vb| # # Display the VirtualBox GUI when booting the machine # vb.gui = true # # # Customize the amount of memory on the VM: vb.memory = "2048" end ... $ vagrant up $ vagrant ssh
$ sudo apt-get install git $ git clone https://github.com/openstack-dev/devstack.git $ cd devstack $ git checkout -b stable/juno origin/stable/juno $ cp samples/local.conf . $ sudo rm /usr/lib/python2.7/dist-packages/setuptools.egg-info $ sudo apt-get install --reinstall python-setuptools $ ./stack.sh
VirtualBox(4.3.22)は、設定上は仮想化支援機能は有効になっているものの、ゲスト上でIntel VTは有効にできないので、ゲストのハイパーバイザーはKVM無しでQemuのみで動いているということになる。
#4032 ([feature-request] Nested Virtualization: VT-in-VT) – Oracle VM VirtualBox
vagrant@precise64:~$ grep -i vmx /proc/cpuinfo vagrant@precise64:~$
こちらはKeystone(Identity)のAPI。XMLが見えればOK。
こちらはHorizon(Dashboard)のログイン画面。 admin/nomoresecreteでログインできる(local.confのデフォルト値)。 イメージからアクション->起動でコンピュートインスタンスの起動はできた様子。
neutron(Network)を入れて、もう一台VMを作れば、仮想ネットワークで繋げたマルチノード環境が構築できそう。ただ、ホスト上のネットワークを考えないといけない。この状態だとVagrantがマッピングしたポート以外はホストからゲストに通信ができない。