上一篇文章:https://blog.csdn.net/m0_49212388/article/details/107203024
其实都是由于网速原因造成。在执行./stack.sh后,git clone 长时间无反应,经过查找文档,发现可以用以下两种方法来解决问题。
1 单节点all-in-one安装时,在local.conf里添加新openstack源 ,重新执行./stack.sh ,适用于不指定某个特定版本,而自动下载master版本openstack
1.1 clone下载devstack,不指定版本。
sudo su - root
git clone https://github.com/openstack-dev/devstack
1.2 local.conf中添加新源时,添加过以下几个源,可以根据实际情况酌情处理(使用哪个源,把前面的##去掉): 建议用gitclone.com源。
用stack用户进入devstack目录,编辑local.conf
sudo su - stack
cd devstack
vi local.conf
添加:
[[local|localrc]]
# Define images to be automatically downloaded during the DevStack built process.
DOWNLOAD_DEFAULT_IMAGES=False
IMAGE_URLS="http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img"
# source1 use TryStack git mirror 但是现在trystack.cn网站好像刚刚挂掉了。。。
## GIT_BASE=http://git.trystack.cn
## NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
## SPICE_REPO=http://git.trystack.cn/git/spice/sice-html5.git
# source2 use github mirror,但是在执行./stack.sh时,
##git clone http://github.com/xxx/yyy.git 也会吊死
##GIT_BASE=https://gitchub.com/github.com
##NOVNC_REPO=https://github.com/kanaka/noVNC.git
##SPICE_REPO=https://github.com/git/spice/sice-html5.git
#source3 使用用gitclone.com源,
#但是git clone https://gitclone.com/github.com/xxx/yyy.git -b stable/ussuri 时,会找不到相应版本,
#如果不指定版本git clone https://gitclone.com/github.com/xxx/yyy.git问题不大
GIT_BASE=https://gitclone.com/github.com
NOVNC_REPO=https://gitclone.com/github.com/kanaka/noVNC.git #注一
SPICE_REPO=https://gitclone.com/github.com/git/spice/sice-html5.git
HOST_IP=192.168.42.11
FIXED_RANGE=10.4.128.0/20
FLOATING_RANGE=192.168.42.128/25
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=labstack
DATABASE_PASSWORD=supersecret
RABBIT_PASSWORD=supersecret
SERVICE_PASSWORD=supersecret
注一:在指定opendev版本为ussuri时,执行./stack.sh时,自动执行的是git clone NOVNC_REPO=https://gitclone.com/github.com/kanaka/noVNC.git -b stable/v1.0.0版本,在gitclone.com中没有。
2 在尝试使用devstack安装多节点时,发现官方文档里提示说victory版本正在开发多节点功能,目前支持的版本是ussuri。经过几次尝试,发现可以先手动下载相关资源后,再拷贝到/opt/stack内,再次执行./stack.sh即可。 stack用户直接git clone,然后重新执行./stack.sh,适用于特定版本的devstack和openstack,如ussuri,
devstack版本和openstack版本要统一,
2.1下载ussuri版本的devstack。
sudo su - root
git clone https://github.com/openstack-dev/devstack -b stable/ussuri
2.2 编辑local.conf
sudo su - stack
vi local.conf
添加:
[[local|localrc]]
#Define images to be automatically downloaded during the DevStack built process.
DOWNLOAD_DEFAULT_IMAGES=False
IMAGE_URLS="http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img"
#用gitclone.com吧,git clone https://gitclone.com/github.com/xxx/yyy.git
GIT_BASE=https://gitclone.com/github.com
NOVNC_REPO=https://gitclone.com/github.com/kanaka/noVNC.git
SPICE_REPO=https://gitclone.com/github.com/git/spice/sice-html5.git
#Credentials
##根据具体情况设置主机ip
HOST_IP=192.168.42.11
##根据实际情况设定内网ip
FIXED_RANGE=10.4.128.0/20
##根据实际情况设定浮动ip
FLOATING_RANGE=192.168.42.128/25
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=admin
RABBIT_PASSWORD=admin
SERVICE_PASSWORD=admin
2.3 经过观察,有以下资源要手动下载:
horizon、glance、noVNC、swift、neutron、placement、tempest、cinder、keystone、nove、requirements
用root用户下载资源:
sudo su - root
git clone http://github.com/openstack/horizon.git -b stable/ussuri /home/stack/ussuri/horizon
git clone http://github.com/openstack/glance.git -b stable/ussuri /home/stack/ussuri/glance
git clone http://github.com/openstack/swift.git -b stable/ussuri /home/stack/ussuri/swift
git clone http://github.com/openstack/neutron.git -b stable/ussuri /home/stack/ussuri/neutron
git clone http://github.com/openstack/placement.git -b stable/ussuri /home/stack/ussuri/placement
git clone http://github.com/openstack/tempest.git -b stable/ussuri /home/stack/ussuri/temptest
git clone http://github.com/openstack/cinder.git -b stable/ussuri /home/stack/ussuri/cinder
git clone http://github.com/openstack/keystone.git -b stable/ussuri /home/stack/ussuri/keystone
git clone http://github.com/openstack/nove.git -b stable/ussuri /home/stack/ussuri/nove
git clone http://github.com/openstack/requirement.git -b stable/ussuri /home//stack/ussuri/requirement
git clone https://github.com/kanaka/noVNC.git -b stable/v1.0.0 /home/stack/ussuri/noVNC
将下载的资源拷贝到/opt/stack
cp -f /home/stack/ussri /opt/stack
由于权限问题。所以要再次赋予stack用户/opt/stack目录777权限:
#chown -R stack:stack /opt/stack/devstack
sudo chmod -R 777 /opt/stack
#sudo echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
然后用stack用户再次执行 ./stack.sh
sudo su - stack
./stack.sh