Ubuntu14.04 install DevStack for desktop/Server, ubuntu16.04devstack
Official Website installation tutorial link: https://docs.openstack.org/developer/devstack/
After DevStack is successfully installed on ubuntu14.04 LTS desktop/Server, record the installation process here.
This section describes the installation environment:
VMware Workstation Pro 12
Ubuntu14.04 LTS System
Preparations before installation:
1. Change the ubuntu source region:
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
2. manually configure an IP address for ubuntu to enable DevStack after the ubuntu system is restarted.
3. configure a NIC for accessing the Internet in ubuntu.
4. Because the pip tool is involved in the installation environment, you need to map the pip source address to China:
[global]timeout = 6000index-url = http://pypi.douban.com/simple/[install]trusted-host = pypi.douban.com
Installation Steps
Configure pip Source
root@ubuntu:/# mkdir /root/.piproot@ubuntu:/# vi /root/.pip/pip.conf[global]timeout = 6000index-url = http://pypi.douban.com/simple/[install]trusted-host = pypi.douban.com
Download DevStack
Install git and download DevStack
root@ubuntu:/# sudo apt-get install gitroot@ubuntu:/# cd /homeroot@ubuntu:/# git clone http://git.trystack.cn/openstack-dev/devstack.git -b stable/mitaka
Create a stack user
Create a stack under a non-root User
Devstack@ubuntu:~$ cd /home/devstack/tools/Devstack@ubuntu:~$ sudo ./create-stack-user.sh
Authorize a stack user
Under the root user
Root @ ubuntu:/# vi/etc/sudoers # Find the following line: root ALL = (ALL: ALL) ALL # Add stack authorization: stack ALL = (ALL: ALL) ALLroot @ ubuntu:/# chown-R stack: stack/home/devstackroot @ ubuntu:/# chown-R stack: stack/opt/stack
Create a local. conf file
Go to the/home/devstack directory and create and edit the local. conf file.
root@ubuntu:/# cd /home/devstackroot@ubuntu:/home/devstack# vi local.conf
Add the following content to the local. conf file (configure the IP address to be modified according to the environment ):
[[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
Install DevStack using the stack user running script:
root@ubuntu:/home/devstack# su stackroot@ubuntu:/home/devstack# ./stack.sh
After the above configuration, you can complete the installation.
Related errors may occur during installation.
Error:
The solution is as follows:
Run the command:
pythonimport openstackimport pbr.versionprint(pbr.version.VersionInfo('openstacksdk').version_string())quit()./unstack.sh./clean.sh./stack.sh
:
Modify "openstacksdk/% s" to "openstacksdk/0.8.1" in/usr/local/lib/python2.7/dist-packages/openstack/session. py 29th and reinstall it.