正如我之前发布的 DevStack 一样,安装它时我总是执行相同的步骤:
1 - 创建 Stack 用户:
$: sudo groupadd stack
$: sudo useradd -g stack -s /bin/bash -d /opt/stack -m stack
$: sudo passwd stack
$: sudo visudo
然后添加行
stack ALL=(ALL) NOPASSWD:ALL
保存文件并退出,注销并以该用户身份登录。
2 - 下载包:
$: git clone https://git.openstack.org/openstack-dev/devstack -b stable/mitaka
3 - 创建 local.conf
使用本指南,https://gist.github.com/amotoki/b5ca4affd768177ed911
$: nano local.conf
4 - 安装 Devstack
$: ./stack
但我收到了这样的错误:
[ERROR] ./stack.sh:191 If you wish to run this script anyway run with FORCE=yes
/home/richardsith/devstack/functions-common: line 232: /opt/stack/logs/error.log: No such file or directory
第 191 行表示:
# Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``FORCE=yes ./stack``
if [[ ! ${DISTRO} =~ (trusty|vivid|wily|7.0|wheezy|sid|testing|jessie|f22|f23|rhel7|kvmibm1) ]]; then
echo "WARNING: this script has not been tested on $DISTRO"
if [[ "$FORCE" != "yes" ]]; then
die $LINENO "If you wish to run this script anyway run with FORCE=yes"
fi
fi
此任务是使用以下命令传递的:
$: FORCE=yes ./stack
但在操作过程中我收到此错误:
2016-06-07 13:47:08.494 | +lib/keystone:configure_keystone:194 cp -p /opt/stack/keystone/etc/policy.json /etc/keystone
2016-06-07 13:47:08.496 | cp: cannot create regular file '/etc/keystone/policy.json': Permission denied
2016-06-07 13:47:08.503 | +lib/keystone:configure_keystone:1 exit_trap
2016-06-07 13:47:08.509 | +./stack.sh:exit_trap:474 local r=1
2016-06-07 13:47:08.514 | ++./stack.sh:exit_trap:475 jobs -p
2016-06-07 13:47:08.520 | +./stack.sh:exit_trap:475 jobs=
2016-06-07 13:47:08.525 | +./stack.sh:exit_trap:478 [[ -n '' ]]
2016-06-07 13:47:08.530 | +./stack.sh:exit_trap:484 kill_spinner
2016-06-07 13:47:08.535 | +./stack.sh:kill_spinner:370 '[' '!' -z '' ']'
2016-06-07 13:47:08.541 | +./stack.sh:exit_trap:486 [[ 1 -ne 0 ]]
2016-06-07 13:47:08.547 | +./stack.sh:exit_trap:487 echo 'Error on exit'
2016-06-07 13:47:08.547 | Error on exit
2016-06-07 13:47:08.552 | +./stack.sh:exit_trap:488 generate-subunit 1465306861 367 fail
2016-06-07 13:47:08.965 | +./stack.sh:exit_trap:489 [[ -z /opt/stack/logs ]]
2016-06-07 13:47:08.970 | +./stack.sh:exit_trap:492 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
2016-06-07 13:47:09.480 | +./stack.sh:exit_trap:498 exit 1
此步骤也已解决,运行安装程序停止的命令,在这种情况下
$: sudo cp -p /opt/stack/keystone/etc/policy.json /etc/keystone
$: FORCE=yes ./stack
安装过程中收到的所有错误均采用相同的步骤......
为什么如果我设置具有 sudo 权限的 Stack 用户会收到权限被拒绝的错误?提前致谢
答案1
Official guide.
http://docs.openstack.org/developer/devstack/
My guide.
apt-get update
cd /
git clone https://git.openstack.org/openstack-dev/devstack
optionally -b stable/juno || stable/liberty || stable/mitaka
cd devstack/
cp samples/local.conf local.conf
vi local.conf
ADMIN_PASSWORD=xxxxxx
MYSQL_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
/devstack/tools/create-stack-user.sh
chown -R stack:stack /devstack
su stack
/devstack/stack.sh
不要使用 root/sudo./stack
或./rejoin
。这会破坏你的安装
答案2
像这样弄乱权限不会让你得到任何结果。如果你不想使用经过测试的 14.04 lts,也许你可以使用 docker,然后按照官方描述的程序进行操作这里..
答案3
我在安装时遇到了这个问题 ./stack.sh /devstack/functions-common:265 对 xenial 的支持不完整:不支持无效的硬件类型 -