Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7171972
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类:

2012-04-19 21:39:21

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。

 

  • 开启 ip_forward:

vi /etc/sysctl.conf

net.ipv4.ip_forward=1(取消本行的注释)

  • 安装 RabbitMQ (消息中间件):

apt-get install rabbitmq-server

  • 安装 MySQL :

apt-get install mysql-server
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
restart mysql

  • 安装 Keystone (身份验证服务)

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

  • 安装 Glance (镜像服务):*

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

  • 安装 Nova (计算服务):

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

  • 安装 Dash(用户门户)

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

  • 调正配置文件使用mysql数据库:

Keystone:

vi /etc/keystone/keystone.conf

Glance:

vi /etc/glance/glance-api.conf
vi /etc/glance/glance-registry.conf
vi /etc/glance/glance-scrubber.conf

Nova:

vi /etc/nova/nova.conf
vi /etc/nova/api-paste.ini

Dash:

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

  • 添加keystone数据

 

阅读(497) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~