ubuntu 上一切都很简单,我使用的是Ubuntu 14.04 LTS
准备环境,查看防火墙。
点击(此处)折叠或打开
- apt-get update
- iptables -nvL
点击(此处)折叠或打开
- sudo git clone https://git.openstack.org/openstack-dev/devstack
- sudo su - root
- /devstack/tools/create-stack-user.sh
- chown -R stack.stack /devstack/
- su - stack
- cd /devstack
- cp samples/local.conf ./
点击(此处)折叠或打开
- ADMIN_PASSWORD=pass
- DATABASE_PASSWORD=pass
- RABBIT_PASSWORD=pass
点击(此处)折叠或打开
- ./stack.sh
Rhel 7.2 就要烦很多:先disable iptables, disable selinux.
1. 装brctl. 此处略过下载,创建stack 用户和修改conf文件的过程。
点击(此处)折叠或打开
- yum makecache
- yum provides brctl
- yum install bridge-utils-1.5-9.el7.x86_64
点击(此处)折叠或打开
- vim vim /opt/stack/logs/stack.sh.log.2016-03-29-032832
- 2016-03-29 07:29:54.179 | ++^[[3242mfunctions-common:yum_install:1353 ^[(B^[[m die 'Detected fatal package install failure'
- 2016-03-29 07:29:54.183 | ++^[[3242mfunctions-common:die:186 ^[(B^[[m local exitcode=0
- 2016-03-29 07:29:54.187 | [Call Trace]
- 2016-03-29 07:29:54.187 | ./stack.sh:713:source
- 2016-03-29 07:29:54.187 | /usr/local/devstack/tools/install_prereqs.sh:72:install_package
- 2016-03-29 07:29:54.187 | /usr/local/devstack/functions-common:1277:real_install_package
- 2016-03-29 07:29:54.187 | /usr/local/devstack/functions-common:1265:yum_install
- 2016-03-29 07:29:54.187 | /usr/local/devstack/functions-common:1353:die
- 2016-03-29 07:29:54.189 | [ERROR] /usr/local/devstack/functions-common:Detected fatal
- 2016-03-29 07:29:55.198 | Error on exit
点击(此处)折叠或打开
- function yum_install {
- local result parse_yum_result
- [[ "$OFFLINE" = "True" ]] && return
- time_start "yum_install"
- # - We run with LC_ALL=C so string matching *should* be OK
- # - Exit 1 if the failure might get better with a retry.
- # - Exit 2 if it is fatal.
- parse_yum_result=' \
- BEGIN { result=0 } \
- /^YUM_FAILED/ { exit $2 } \
- /^No package/ { result=2 } \
- /^Failed:/ { result=2 } \
- //{ print } \
- END { exit result }'
- # The manual check for missing packages is because yum -y assumes
- # missing or failed packages are OK.
- # See https://bugzilla.redhat.com/show_bug.cgi?id=965567
- (sudo_with_proxies "${YUM:-yum}" install -y "$@" 2>&1 || echo YUM_FAILED $?) \
- | awk "$parse_yum_result" && result=$? || result=$?
- time_stop "yum_install"
- # if we return 1, then the wrapper functions will run an update
- # and try installing the package again as a defense against bad
- # mirrors. This can hide failures, especially when we have
- # packages that are in the "Failed:" section because their rpm
- # install scripts failed to run correctly (in this case, the
- # package looks installed, so when the retry happens we just think
- # the package is OK, and incorrectly continue on).
- if [ "$result" == 2 ]; then
- die "Detected fatal package install failure"
- fi
- return "$result"
- }
可以断定:'Detected fatal package install failure' 意味着yum install -y 某个包出错,在log里面一顿找,发现有些包没有找到,手动装上。
3. 又碰上mariadb 的问题,我安装了更新的 mariadb-libs.
log 如下:
点击(此处)折叠或打开
- 2016-03-30 06:27:05.304 | ---> Package perl-Co+^[[3242mfunctions-common:yum_install:1340 ^[(B^[[m echo YUM_FAILED 1
- 2016-03-30 06:27:05.304 | mpress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
- 2016-03-30 06:27:05.304 | --> Finished Dependency Resolution
- 2016-03-30 06:27:05.304 | Error: Package: 1:mariadb-server-5.5.44-2.el7.x86_64 (rhel-x86_64-server-7)
- 2016-03-30 06:27:05.304 | Requires: mariadb-libs(x86-64) = 1:5.5.44-2.el7
- 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