Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1290961
  • 博文数量: 297
  • 博客积分: 285
  • 博客等级: 二等列兵
  • 技术积分: 3006
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-06 22:04
个人简介

Linuxer, ex IBMer. GNU https://hmchzb19.github.io/

文章分类

全部博文(297)

文章存档

2020年(11)

2019年(15)

2018年(43)

2017年(79)

2016年(79)

2015年(58)

2014年(1)

2013年(8)

2012年(3)

分类: LINUX

2016-03-31 11:24:05

我的感觉是devstack 对ubuntu 的支持比较好。
ubuntu 上一切都很简单,我使用的是Ubuntu 14.04 LTS 
准备环境,查看防火墙。

点击(此处)折叠或打开

  1. apt-get update
  2. iptables -nvL
开始安装:

点击(此处)折叠或打开

  1. sudo git clone https://git.openstack.org/openstack-dev/devstack
  2. sudo su - root
  3. /devstack/tools/create-stack-user.sh
  4. chown -R stack.stack /devstack/
  5. su - stack
  6. cd /devstack
  7. cp samples/local.conf ./
修改local.conf

点击(此处)折叠或打开

  1. ADMIN_PASSWORD=pass
  2. DATABASE_PASSWORD=pass
  3. RABBIT_PASSWORD=pass
开始安装:10分钟后,openstack 就装好了。

点击(此处)折叠或打开

  1. ./stack.sh

Rhel 7.2 就要烦很多:先disable iptables,  disable selinux.
1. 装brctl. 此处略过下载,创建stack 用户和修改conf文件的过程。

点击(此处)折叠或打开

  1. yum makecache
  2. yum provides brctl
  3. yum install bridge-utils-1.5-9.el7.x86_64
2. 出错的log 看起来很烦,

点击(此处)折叠或打开

  1. vim vim /opt/stack/logs/stack.sh.log.2016-03-29-032832
  2. 2016-03-29 07:29:54.179 | ++^[[3242mfunctions-common:yum_install:1353 ^[(B^[[m die 'Detected fatal package install failure'
  3. 2016-03-29 07:29:54.183 | ++^[[3242mfunctions-common:die:186 ^[(B^[[m local exitcode=0
  4. 2016-03-29 07:29:54.187 | [Call Trace]
  5. 2016-03-29 07:29:54.187 | ./stack.sh:713:source
  6. 2016-03-29 07:29:54.187 | /usr/local/devstack/tools/install_prereqs.sh:72:install_package
  7. 2016-03-29 07:29:54.187 | /usr/local/devstack/functions-common:1277:real_install_package
  8. 2016-03-29 07:29:54.187 | /usr/local/devstack/functions-common:1265:yum_install
  9. 2016-03-29 07:29:54.187 | /usr/local/devstack/functions-common:1353:die
  10. 2016-03-29 07:29:54.189 | [ERROR] /usr/local/devstack/functions-common:Detected fatal
  11. 2016-03-29 07:29:55.198 | Error on exit
然后看functions-common: 1353 行:

点击(此处)折叠或打开

  1. function yum_install {
  2.     local result parse_yum_result

  3.     [[ "$OFFLINE" = "True" ]] && return

  4.     time_start "yum_install"

  5.     # - We run with LC_ALL=C so string matching *should* be OK
  6.     # - Exit 1 if the failure might get better with a retry.
  7.     # - Exit 2 if it is fatal.
  8.     parse_yum_result=' \
  9.         BEGIN { result=0 } \
  10.         /^YUM_FAILED/ { exit $2 } \
  11.         /^No package/ { result=2 } \
  12.         /^Failed:/ { result=2 } \
  13.         //{ print } \
  14.         END { exit result }'

  15.     # The manual check for missing packages is because yum -y assumes
  16.     # missing or failed packages are OK.
  17.     # See https://bugzilla.redhat.com/show_bug.cgi?id=965567
  18.     (sudo_with_proxies "${YUM:-yum}" install -y "$@" 2>&1 || echo YUM_FAILED $?) \
  19.         | awk "$parse_yum_result" && result=$? || result=$?

  20.     time_stop "yum_install"

  21.     # if we return 1, then the wrapper functions will run an update
  22.     # and try installing the package again as a defense against bad
  23.     # mirrors. This can hide failures, especially when we have
  24.     # packages that are in the "Failed:" section because their rpm
  25.     # install scripts failed to run correctly (in this case, the
  26.     # package looks installed, so when the retry happens we just think
  27.     # the package is OK, and incorrectly continue on).
  28.     if [ "$result" == 2 ]; then
  29.         die "Detected fatal package install failure"
  30.     fi

  31.     return "$result"
  32. }

可以断定:'Detected fatal package install failure' 意味着yum install -y 某个包出错,在log里面一顿找,发现有些包没有找到,手动装上。

3. 又碰上mariadb 的问题,我安装了更新的 mariadb-libs. 
log 如下: 

点击(此处)折叠或打开

  1. 2016-03-30 06:27:05.304 | ---> Package perl-Co+^[[3242mfunctions-common:yum_install:1340 ^[(B^[[m echo YUM_FAILED 1
  2. 2016-03-30 06:27:05.304 | mpress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
  3. 2016-03-30 06:27:05.304 | --> Finished Dependency Resolution
  4. 2016-03-30 06:27:05.304 | Error: Package: 1:mariadb-server-5.5.44-2.el7.x86_64 (rhel-x86_64-server-7)
  5. 2016-03-30 06:27:05.304 | Requires: mariadb-libs(x86-64) = 1:5.5.44-2.el7
  6. 2016-03-30 06:27:05.304 |            Installed: 1:mariadb-libs-5.5.47-1.el7_2.x86_64
卸载掉继续。

总结下: Ubuntu 14.04 LTS 使用devstack 装openstack ,一路绿灯,没有报错。
Rhel 7.2 出错10次左右,自己手动卸载或者安装N个。
Centos 7.2 可以参考: 
http://www.cnblogs.com/lsyu/p/5142876.html












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