PackStack with Vagrant (2016-09-25)
devstackを使っていたけど、毎回どこかでハマるのでpackstackを使ってみる。
- https://www.rdoproject.org/install/quickstart/
- https://www.rdoproject.org/install/running-an-instance/
例によってVagrantで楽に構築したかったので、上記ページを参考にしてVagrantfileを作った。
Vagrantfile
ダッシュボード用にポートフォワードしておく。
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.network "forwarded_port", guest: 5000, host: 5000
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.synced_folder ".", "/vagrant"
config.vm.provider "virtualbox" do |vb|
vb.cpus = 2
vb.memory = 8192
end
config.vm.provision "shell", path: "provision.sh"
config.vm.define 'controller' do |manage|
manage.vm.hostname = 'controller'
manage.vm.network :private_network, ip: "192.168.33.10", virtualbox__intnet: "intnet"
end
end
provision.sh
手順の通りにセットアップするだけのシェルスクリプト。
sudo systemctl disable firewalld
sudo systemctl stop firewalld
sudo systemctl disable NetworkManager
sudo systemctl stop NetworkManager
sudo systemctl enable network
sudo systemctl start network
sudo yum install -y https://rdoproject.org/repos/rdo-release.rpm
sudo yum install -y centos-release-openstack-mitaka
sudo yum update -y
sudo yum install -y openstack-packstack
vaagrnt upしてAllInOneで構築
$ vagrant up controller
$ packstack --allinone
$ sudo cat /root/keystonerc_demo
unset OS_SERVICE_TOKEN
export OS_USERNAME=demo
export OS_PASSWORD=c4f25cd303da4fc7
export PS1='[\u@\h \W(keystone_demo)]\$ '
export OS_AUTH_URL=http://10.0.2.15:5000/v2.0
export OS_TENANT_NAME=demo
export OS_IDENTITY_API_VERSION=2.0
ブラウザでHorizonにアクセスできる。
http://localhost:8080/dashboard