澳门金沙国际 1

ubuntu14.04 桌面版/服务器版安装DevStack教程,ubuntu16.04devstack

澳门金沙国际 2

官网安装教程链接: 

自个儿在ubuntu14.04 LTS
桌面版/服务器版都安装DevStack成功后,在那边记录下安装进程。

介绍下安装环境:

  VMware Workstation Pro 12

  ubuntu14.04 LTS 系统

服务器版安装DevStack教程。设置前准备:

  ① 、系统更换ubuntu源 

deb http://mirrors.yun-idc.com/ubuntu/ trusty main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-backports main restricted universe multiverse

 

  二 、ubuntu手动配置一个IP,便于在ubuntu系统重启后,DevStack能够采用。

  叁 、ubuntu配置一张能够访问外网的网卡即可。

  肆 、由于设置环境时会涉及到pip工具,供给把pip源的地址映射到国内:

[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com

安装步骤

配置pip源

[email protected]:/# mkdir /root/.pip
[email protected]:/# vi /root/.pip/pip.conf


[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com

下载DevStack

安装git工具并下载DevStack

[email protected]:/# sudo apt-get install git
[email protected]:/# cd /home
[email protected]:/# git clone http://git.trystack.cn/openstack-dev/devstack.git -b stable/mitaka

创建stack用户

在非root用户下开创stack

[email protected]:~$ cd /home/devstack/tools/
[email protected]:~$ sudo ./create-stack-user.sh

为stack用户授权

在root用户下

[email protected]:/# vi /etc/sudoers

#找到如下一行:
root ALL=(ALL:ALL) ALL
#添加stack授权:
stack ALL=(ALL:ALL) ALL

[email protected]:/# chown -R stack:stack /home/devstack
[email protected]:/# chown -R stack:stack /opt/stack

创建local.conf文件

进去/home/devstack目录下,新建并编写制定local.conf文件

[email protected]:/# cd /home/devstack
[email protected]:/home/devstack# vi local.conf

在local.conf文件中添加如下内容(配置IP依据作者条件修改):

[[local|localrc]]  
# 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  

# CredentialsDATABASE_PASSWORD=pass  
DATABASE_PASSWORD=pass  
ADMIN_PASSWORD=pass  
SERVICE_PASSWORD=pass  
SERVICE_TOKEN=pass  
RABBIT_PASSWORD=pass  

HOST_IP=192.168.28.138  
SERVICE_HOST=192.168.28.138  
MYSQL_HOST=192.168.28.138 
RABBIT_HOST=192.168.28.138  
GLANCE_HOSTPORT=192.168.28.138:9292  

disable_service n-net  
enable_service q-svc  
enable_service q-agt  
enable_service q-dhcp  
enable_service q-l3  
enable_service q-meta  
enable_service q-metering  
enable_service neutron  

# only support IP v4   
SERVICE_IP_VERSION=4  
## Neutron optionsQ_USE_SECGROUP=True  
FLOATING_RANGE="192.168.28.0/24"  
FIXED_RANGE="10.0.1.0/24"  
NETWORK_GATEWAY="10.0.1.254"  
Q_FLOATING_ALLOCATION_POOL=start=192.168.28.230,end=192.168.28.250  
PUBLIC_NETWORK_GATEWAY="192.168.28.2"  
Q_L3_ENABLED=True  
PUBLIC_INTERFACE=eth0  
Q_USE_PROVIDERNET_FOR_PUBLIC=True  
OVS_PHYSICAL_BRIDGE=br-ex  
PUBLIC_BRIDGE=br-ex  
OVS_BRIDGE_MAPPINGS=public:br-ex  

# VLAN configuration.Q_PLUGIN=ml2  
ENABLE_TENANT_VLANS=True

以stack用户运转脚本安装DevStack:

[email protected]:/home/devstack# su stack
[email protected]:/home/devstack# ./stack.sh

透过如上陈设,即可到位安装。

设置进度中会有有关报错。

错误:

澳门金沙国际 3

缓解格局如下:

运行指令:

python
import openstack
import pbr.version
print(pbr.version.VersionInfo('openstacksdk').version_string())
quit()

./unstack.sh
./clean.sh
./stack.sh

如图所示:

澳门金沙国际 4

在/usr/local/lib/python2.7/dist-packages/openstack/session.py
第②9行中期维修改“openstacksdk/%s” 为 “openstacksdk/0.8.1”后,重新安装。

 

 

 

    

 

 

 

 

桌面版/服务器版安装DevStack教程,ubuntu16.04devstack
官网安装教程链接:
我在ubuntu14.04 LTS 桌面版…

澳门金沙国际 5

澳门金沙国际 6

官网安装教程链接: 

官网安装教程链接: 

官网安装教程链接: 

自个儿在ubuntu14.04 LTS
桌面版/服务器版都设置DevStack成功后,在那里记录下安装进度。

自身在ubuntu14.04 LTS
桌面版/服务器版都安装DevStack成功后,在此处记录下安装进程。

我在Ubuntu 14.04 LTS
桌面版/服务器版都安装DevStack成功后,在此处记录下安装进度。

介绍下安装环境:

介绍下安装环境:

介绍下安装环境:

  VMware Workstation Pro 12

  VMware Workstation Pro 12

  VMware Workstation Pro 12 
http://www.linuxidc.com/Linux/2017-05/143996.htm

  ubuntu14.04 LTS 系统

  ubuntu14.04 LTS 系统

  Ubuntu 14.04 LTS 系统

设置前准备:

设置前准备:

Windows
7下硬盘安装Ubuntu 14.04永恒更新鸿基土地资金财产址

http://www.linuxidc.com/Linux/2014-04/100369.htm

  ① 、系统更换ubuntu源 

  一 、系统更换ubuntu源 

U盘安装Ubuntu 14.04 LTS正式版 
http://www.linuxidc.com/Linux/2014-04/100446.htm

deb http://mirrors.yun-idc.com/ubuntu/ trusty main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.yun-idc.com/ubuntu/ trusty main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-backports main restricted universe multiverse

安装前准备:

 

 

  壹 、系统更换ubuntu源 
http://www.linuxidc.com/Linux/2014-04/100476.htm ,从链接中挑选三个数据源,作者接纳的源如下:

  ② 、ubuntu手动配置3个IP,便于在ubuntu系统重启后,DevStack能够接纳。

  二 、ubuntu手动配置叁个IP,便于在ubuntu系统重启后,DevStack能够选择。

deb http://mirrors.yun-idc.com/ubuntu/ trusty main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://mirrors.yun-idc.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://mirrors.yun-idc.com/ubuntu/ trusty-backports main restricted universe multiverse

  ③ 、ubuntu配置一张能够访问外网的网卡即可。

  三 、ubuntu配置一张能够访问外网的网卡即可。

  贰 、ubuntu手动配置贰个IP,便于在ubuntu系统重启后,DevStack能够运用。

  ④ 、由于设置环境时会涉及到pip工具,必要把pip源的地址映射到国内:

  ④ 、由于设置环境时会涉及到pip工具,供给把pip源的地址映射到国内:

  叁 、ubuntu配置一张能够访问外网的网卡即可。

[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com

  四 、由于设置环境时会涉及到pip工具,需求把pip源的地址映射到境内:

安装步骤

安装步骤

[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com

配置pip源

配置pip源

安装步骤

root@ubuntu:/# mkdir /root/.pip
root@ubuntu:/# vi /root/.pip/pip.conf


[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com
root@ubuntu:/# mkdir /root/.pip
root@ubuntu:/# vi /root/.pip/pip.conf


[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com

配置pip源

澳门金沙国际,下载DevStack

下载DevStack

root@ubuntu:/# mkdir /root/.pip
root@ubuntu:/# vi /root/.pip/pip.conf


[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com

设置git工具并下载DevStack

设置git工具并下载DevStack

下载DevStack

root@ubuntu:/# sudo apt-get install git
root@ubuntu:/# cd /home
root@ubuntu:/# git clone http://git.trystack.cn/openstack-dev/devstack.git -b stable/mitaka
root@ubuntu:/# sudo apt-get install git
root@ubuntu:/# cd /home
root@ubuntu:/# git clone http://git.trystack.cn/openstack-dev/devstack.git -b stable/mitaka

设置git工具并下载DevStack

创建stack用户

创建stack用户

root@ubuntu:/# sudo apt-get install git
root@ubuntu:/# cd /home
root@ubuntu:/# git clone http://git.trystack.cn/openstack-dev/devstack.git -b stable/mitaka

在非root用户下创立stack

在非root用户下创办stack

创建stack用户

Devstack@ubuntu:~$ cd /home/devstack/tools/
Devstack@ubuntu:~$ sudo ./create-stack-user.sh
Devstack@ubuntu:~$ cd /home/devstack/tools/
Devstack@ubuntu:~$ sudo ./create-stack-user.sh

在非root用户下开创stack

为stack用户授权

为stack用户授权

Devstack@ubuntu:~$ cd /home/devstack/tools/
Devstack@ubuntu:~$ sudo ./create-stack-user.sh

在root用户下

在root用户下

为stack用户授权

root@ubuntu:/# vi /etc/sudoers

#找到如下一行:
root ALL=(ALL:ALL) ALL
#添加stack授权:
stack ALL=(ALL:ALL) ALL

root@ubuntu:/# chown -R stack:stack /home/devstack
root@ubuntu:/# chown -R stack:stack /opt/stack
root@ubuntu:/# vi /etc/sudoers

#找到如下一行:
root ALL=(ALL:ALL) ALL
#添加stack授权:
stack ALL=(ALL:ALL) ALL

root@ubuntu:/# chown -R stack:stack /home/devstack
root@ubuntu:/# chown -R stack:stack /opt/stack

在root用户下

创建local.conf文件

创建local.conf文件

root@ubuntu:/# vi /etc/sudoers

#找到如下一行:
root ALL=(ALL:ALL) ALL
#添加stack授权:
stack ALL=(ALL:ALL) ALL

root@ubuntu:/# chown -R stack:stack /home/devstack
root@ubuntu:/# chown -R stack:stack /opt/stack

进去/home/devstack目录下,新建并编写制定local.conf文件

进去/home/devstack目录下,新建并编写local.conf文件

创建local.conf文件

root@ubuntu:/# cd /home/devstack
root@ubuntu:/home/devstack# vi local.conf
root@ubuntu:/# cd /home/devstack
root@ubuntu:/home/devstack# vi local.conf

进入/home/devstack目录下,新建并编写local.conf文件

在local.conf文件中添加如下内容(配置IP依照自身环境修改):

在local.conf文件中添加如下内容(配置IP根据笔者环境修改):

root@ubuntu:/# cd /home/devstack
root@ubuntu:/home/devstack# vi local.conf
[[local|localrc]]  
# 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  

# CredentialsDATABASE_PASSWORD=pass  
DATABASE_PASSWORD=pass  
ADMIN_PASSWORD=pass  
SERVICE_PASSWORD=pass  
SERVICE_TOKEN=pass  
RABBIT_PASSWORD=pass  

HOST_IP=192.168.28.138  
SERVICE_HOST=192.168.28.138  
MYSQL_HOST=192.168.28.138 
RABBIT_HOST=192.168.28.138  
GLANCE_HOSTPORT=192.168.28.138:9292  

disable_service n-net  
enable_service q-svc  
enable_service q-agt  
enable_service q-dhcp  
enable_service q-l3  
enable_service q-meta  
enable_service q-metering  
enable_service neutron  

# only support IP v4   
SERVICE_IP_VERSION=4  
## Neutron optionsQ_USE_SECGROUP=True  
FLOATING_RANGE="192.168.28.0/24"  
FIXED_RANGE="10.0.1.0/24"  
NETWORK_GATEWAY="10.0.1.254"  
Q_FLOATING_ALLOCATION_POOL=start=192.168.28.230,end=192.168.28.250  
PUBLIC_NETWORK_GATEWAY="192.168.28.2"  
Q_L3_ENABLED=True  
PUBLIC_INTERFACE=eth0  
Q_USE_PROVIDERNET_FOR_PUBLIC=True  
OVS_PHYSICAL_BRIDGE=br-ex  
PUBLIC_BRIDGE=br-ex  
OVS_BRIDGE_MAPPINGS=public:br-ex  

# VLAN configuration.Q_PLUGIN=ml2  
ENABLE_TENANT_VLANS=True
[[local|localrc]]  
# 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  

# CredentialsDATABASE_PASSWORD=pass  
DATABASE_PASSWORD=pass  
ADMIN_PASSWORD=pass  
SERVICE_PASSWORD=pass  
SERVICE_TOKEN=pass  
RABBIT_PASSWORD=pass  

HOST_IP=192.168.28.138  
SERVICE_HOST=192.168.28.138  
MYSQL_HOST=192.168.28.138 
RABBIT_HOST=192.168.28.138  
GLANCE_HOSTPORT=192.168.28.138:9292  

disable_service n-net  
enable_service q-svc  
enable_service q-agt  
enable_service q-dhcp  
enable_service q-l3  
enable_service q-meta  
enable_service q-metering  
enable_service neutron  

# only support IP v4   
SERVICE_IP_VERSION=4  
## Neutron optionsQ_USE_SECGROUP=True  
FLOATING_RANGE="192.168.28.0/24"  
FIXED_RANGE="10.0.1.0/24"  
NETWORK_GATEWAY="10.0.1.254"  
Q_FLOATING_ALLOCATION_POOL=start=192.168.28.230,end=192.168.28.250  
PUBLIC_NETWORK_GATEWAY="192.168.28.2"  
Q_L3_ENABLED=True  
PUBLIC_INTERFACE=eth0  
Q_USE_PROVIDERNET_FOR_PUBLIC=True  
OVS_PHYSICAL_BRIDGE=br-ex  
PUBLIC_BRIDGE=br-ex  
OVS_BRIDGE_MAPPINGS=public:br-ex  

# VLAN configuration.Q_PLUGIN=ml2  
ENABLE_TENANT_VLANS=True

在local.conf文件中添加如下内容(配置IP遵照作者条件修改):

以stack用户运维脚本安装DevStack:

以stack用户运转脚本安装DevStack:

[[local|localrc]]  
# 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  

# CredentialsDATABASE_PASSWORD=pass  
DATABASE_PASSWORD=pass  
ADMIN_PASSWORD=pass  
SERVICE_PASSWORD=pass  
SERVICE_TOKEN=pass  
RABBIT_PASSWORD=pass  

HOST_IP=192.168.28.138  
SERVICE_HOST=192.168.28.138  
MYSQL_HOST=192.168.28.138 
RABBIT_HOST=192.168.28.138  
GLANCE_HOSTPORT=192.168.28.138:9292  

disable_service n-net  
enable_service q-svc  
enable_service q-agt  
enable_service q-dhcp  
enable_service q-l3  
enable_service q-meta  
enable_service q-metering  
enable_service neutron  

# only support IP v4   
SERVICE_IP_VERSION=4  
## Neutron optionsQ_USE_SECGROUP=True  
FLOATING_RANGE="192.168.28.0/24"  
FIXED_RANGE="10.0.1.0/24"  
NETWORK_GATEWAY="10.0.1.254"  
Q_FLOATING_ALLOCATION_POOL=start=192.168.28.230,end=192.168.28.250  
PUBLIC_NETWORK_GATEWAY="192.168.28.2"  
Q_L3_ENABLED=True  
PUBLIC_INTERFACE=eth0  
Q_USE_PROVIDERNET_FOR_PUBLIC=True  
OVS_PHYSICAL_BRIDGE=br-ex  
PUBLIC_BRIDGE=br-ex  
OVS_BRIDGE_MAPPINGS=public:br-ex  

# VLAN configuration.Q_PLUGIN=ml2  
ENABLE_TENANT_VLANS=True
root@ubuntu:/home/devstack# su stack
root@ubuntu:/home/devstack# ./stack.sh
root@ubuntu:/home/devstack# su stack
root@ubuntu:/home/devstack# ./stack.sh

以stack用户运维脚本安装DevStack:

经过如上布置,即可到位安装。

通过如上布置,即可成功安装。

root@ubuntu:/home/devstack# su stack
root@ubuntu:/home/devstack# ./stack.sh

设置进度中会有连锁报错。

安装进度中会有连锁报错。

经过如上布置,即可到位安装。

错误:

错误:

设置进程中会有连带报错。

澳门金沙国际 7

澳门金沙国际 8

错误:

不留余地办法如下:

化解办法如下:

澳门金沙国际 9

运作指令:

运转指令:

竭泽而渔办法如下:

python
import openstack
import pbr.version
print(pbr.version.VersionInfo('openstacksdk').version_string())
quit()

./unstack.sh
./clean.sh
./stack.sh
python
import openstack
import pbr.version
print(pbr.version.VersionInfo('openstacksdk').version_string())
quit()

./unstack.sh
./clean.sh
./stack.sh

运维指令:

如图所示:

如图所示:

python
import openstack
import pbr.version
print(pbr.version.VersionInfo('openstacksdk').version_string())
quit()

./unstack.sh
./clean.sh
./stack.sh

澳门金沙国际 10

澳门金沙国际 11

如图所示:

在/usr/local/lib/python2.7/dist-packages/openstack/session.py
第叁9行中期维修改“openstacksdk/%s” 为 “openstacksdk/0.8.1”后,重新安装。

在/usr/local/lib/python2.7/dist-packages/openstack/session.py
第一9行中期维修改“openstacksdk/%s” 为 “openstacksdk/0.8.1”后,重新安装。

澳门金沙国际 12

 

 

在/usr/local/lib/python2.7/dist-packages/openstack/session.py
第39行中期维修改“openstacksdk/%s” 为 “openstacksdk/0.8.1”后,重新安装。

 

 

越多Ubuntu相关新闻见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

 

 

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-06/144670.htm

    

    

澳门金沙国际 13

 

 

 

 

 

 

 

 

相关文章