2012年(2)
分类: LINUX
2012-04-18 16:54:40
OpenStack 2012.1 已经发布了,为了领略他的风采,我准备了一台Ubuntu 12.04 的虚拟机来体验。
主机配置:
- OS: Linux Ubuntu 12.04 server version (64 bit)
- IP: 10.2.125.17
- Hostname: node1
- One network card (NIC): eth0
- One hard disk (HDD): sda
- Two networks (both on eth0):
Public network (including the floating IPs): 10.2.125.0/24 (10.2.125.0 -> 10.2.125.255)
Private network (including the fixed IPs): 172.16.0.0/16 (172.16.0.0/24 , 172.16.1.0/24 , 172.16.2.0/24 , etc.)
虚拟机最小化安装Ubuntu 12.04,记得安装openssh-server。
vi /etc/sysctl.conf
net.ipv4.ip_forward=1(取消本行的注释)
apt-get install rabbitmq-server
apt-get install mysql-server
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
restart mysql
mysql -uroot –popenstack -e "CREATE DATABASE keystone;"
mysql -uroot -popenstack -e "GRANT ALL PRIVILEGES ON *.* TO 'keystone'@'%' WITH GRANT OPTION;"
mysql -uroot -popenstack -e "SET PASSWORD FOR 'keystone'@'%' = PASSWORD('openstack');"apt-get install keystone keystone-doc
mysql -uroot -popenstack -e "CREATE DATABASE glance;"
mysql -uroot -popenstack -e "GRANT ALL PRIVILEGES ON *.* TO 'glance'@'%' WITH GRANT OPTION;"
mysql -uroot -popenstack -e "SET PASSWORD FOR 'glance'@'%' = PASSWORD('openstack');"apt-get install glance
apt-get install python-glance-doc
mysql -uroot -popenstack -e "CREATE DATABASE nova;"
mysql -uroot -popenstack -e "GRANT ALL PRIVILEGES ON *.* TO 'nova'@'%' WITH GRANT OPTION;"
mysql -uroot -popenstack -e "SET PASSWORD FOR 'nova'@'%' = PASSWORD('openstack');"apt-get install nova-api nova-objectstore nova-scheduler nova-network
apt-get install nova-compute nova-volume
apt-get install nova-doc
mysql -uroot -popenstack -e "CREATE DATABASE dash;"
mysql -uroot -popenstack -e "GRANT ALL PRIVILEGES ON *.* TO 'dash'@'%' WITH GRANT OPTION;"
mysql -uroot -popenstack -e "SET PASSWORD FOR 'dash'@'%' = PASSWORD('openstack');"apt-get install openstack-dashboard
Keystone:
vi /etc/keystone/keystone.conf
Glance:
vi /etc/glance/glance-api.conf
vi /etc/glance/glance-registry.conf
vi /etc/glance/glance-scrubber.confNova:
vi /etc/nova/nova.conf
vi /etc/nova/api-paste.iniDash:
vi /etc/openstack-dashboard/localsettings.py
具体细节见下篇
keystone DB:
# keystone-manage db_sync
glance DB:
# glance-manage db_sync
nova DB:
# nova-manage db sync
dash DB:
# /usr/share/openstack-dashboard/manage.py syncdb