Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6998
  • 博文数量: 2
  • 博客积分: 132
  • 博客等级: 入伍新兵
  • 技术积分: 45
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-01 09:08
文章分类
文章存档

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。

 

  • 开启 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数据

 

阅读(2800) | 评论(2) | 转发(1) |
0

上一篇:使用 ScribeFire 发表博客

下一篇:没有了

给主人留下些什么吧!~~

重返人生2012-04-19 21:34:56

- -博主说的是。。。不过还是多实用的,多谢啦

韬宇2012-04-18 16:57:37

格式不好哈,为啥米?