Solutions to common problems when using devstack to install openstack under ubuntu18.04.

Common problems when using devstack to install openstack under ubuntu18.04

Previous article: https://blog.csdn.net/m0_49212388/article/details/107203024

In fact, they are all caused by internet speed. After executing ./stack.sh, git clone has no response for a long time. After searching the documents, I found that the following two methods can be used to solve the problem.
1 When installing a single-node all-in-one, add a new openstack source in local.conf and re-execute ./stack.sh, which is suitable for automatically downloading the master version without specifying a specific version, but automatically downloading the master version openstack
1.1 clone download devstack, no Specify the version.

sudo  su - root
git clone https://github.com/openstack-dev/devstack 

1.2 When adding a new source to local.conf, the following sources have been added, which can be handled according to the actual situation (which source to use, remove the preceding ##): It is recommended to use the gitclone.com source.

Use the stack user to enter the devstack directory and edit local.conf

sudo su - stack
cd devstack
vi local.conf

Add to:

[[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

Note 1: When the opendev version is specified as ussuri, when executing ./stack.sh, the automatic execution is git clone NOVNC_REPO=https://gitclone.com/github.com/kanaka/noVNC.git -b stable/v1. Version 0.0 is not available in gitclone.com.

2 When trying to install multi-node using devstack, I found that the official document indicated that the victory version is developing multi-node function, and the currently supported version is ussuri. After several attempts, I found that you can manually download the relevant resources first, then copy them to /opt/stack, and execute ./stack.sh again. Stack users directly git clone, and then re-execute ./stack.sh, which is suitable for specific versions of devstack and openstack, such as ussuri,
devstack version and openstack version should be unified,
2.1 download the ussuri version of devstack.

sudo  su - root
git clone https://github.com/openstack-dev/devstack -b stable/ussuri

2.2 Edit local.conf

sudo su - stack
vi local.conf

Add to:

[[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 After observation, there are the following resources to be downloaded manually:
horizon, glance, noVNC, swift, neutron, placement, tempest, cinder, keystone, nove, requirements
Download resources as root users:

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

Copy the downloaded resources to /opt/stack

cp -f  /home/stack/ussri /opt/stack

Due to permissions issues. So once again give stack user /opt/stack directory 777 permissions:

#chown -R stack:stack /opt/stack/devstack
sudo chmod -R 777 /opt/stack
#sudo echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
   

Then execute again with the stack user./stack.sh

 sudo su - stack
 ./stack.sh

Guess you like

Origin blog.csdn.net/m0_49212388/article/details/107560308