使用devstack安裝openstack
阿新 • • 發佈:2018-11-19
安裝準備
1、安裝ubuntu 16.0.4
2、修改ubuntu國內映象
/etc/apt/sources.list 增加
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun .com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
3、從國內映象下載devstack
cd /home
git clone http://git.trystack.cn/openstack-dev/devstack.git
4、建立stack使用者
執行
/home/devstack/tools/create-stack-user .sh
預設home /opt/stack
5、配置pip源
[email protected]:~# mkdir /root/.pip
[email protected]:~# vi /root/.pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com
6、建立local.conf檔案
[[local|localrc]]
DOWNLOAD_DEFAULT_IMAGES=False
IMAGE_URLS="http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img"
\## use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git
7、以stack使用者身份執行指令碼安裝
su stack
cd /home/devstack
./stack.sh
8、可能的錯誤
8.1 下載etcd-v3.1.10-linux-amd64.tar.gz 等失敗或者巨慢。
在/etc/hosts 中增加github的解析地址
151.101.88.249 github.global.ssl.fastly.net
可在windows下配置,然後迅雷下載
c:\windwos\system32\drivers\etc\hosts 增加
151.101.88.249 github.global.ssl.fastly.net
然後下載:
https://github.com/coreos/etcd/releases/download/v3.1.10/etcd-v3.1.10-linux-amd64.tar.gz
https://github.com/coreos/etcd/releases/download/v3.1.7/etcd-v3.1.7-linux-amd64.tar.gz
http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
在採用winscp傳輸到/home/devstack/files
然後重新執行/home/devstack/stack.sh