Devstack虚拟机单机部署记录
Devstack虚拟机单机部署记录
VMware Workstation Pro 15
Ubuntu 16.04 LTS
XShell
Documents: https://docs.openstack.org/devstack/latest/
1. Create Ubuntu-virtual-machine
CPU: 4 core or more
RAM: 6 Gb or more
Support: Virtualized Intel VT-x/EPT or AMD-V/RVI
2. Install system & Configuration system
# Configure apt source
# apt update
$ apt-get update
$ apt-get upgrade
# Install server
$ apt-get install vim bridge-utils git python-pip
3. Configuration pip source
Every user must configuration. (user/root/stack)
$ mkdir ~/.pip
$ vi ~/.pip/pip.conf
[global]
index-url=mirrors-source/pypi/simple/
trusted-host=mirrors-source
$ pip install --upgrade pip
4. Configuration hostname & hosts
They need to be consistent by /etc/hostname
and /etc/hosts
.
$ hostname -f
5. Create user & git devstack
Create user:
$ sudo useradd -s /bin/bash -d /opt/stack -m stack
$ echo \"stack ALL=(ALL) NOPASSWD: ALL\" | sudo tee /etc/sudoers.d/stack
$ sudo su - stack
Git devstack: (stable/ocata)
stack$ cd /opt/stack/
stack$ git clone https://hub.fastgit.org/openstack/devstack.git -b stable/ocata
stack$ cd devstack
stack$ vi local.conf
local.conf:
[[local|localrc]]
# VM-IP
HOST_IP= 10.0.0.0
#Recompile, first->true, success->false
RECLONE=true
#Defaults should not be modified unless you know exactly what you are doing.
DOWNLOAD_DEFAULT_IMAGES=false
DATABASE_PASSWORD=sycadmin
ADMIN_PASSWORD=sycadmin
SERVICE_PASSWORD=sycadmin
SERVICE_TOKEN=sycadmin
RABBIT_PASSWORD=sycadmin
HORIZON_BRANCH=stable/ocata
KEYSTONE_BRANCH=stable/ocata
NOVA_BRANCH=stable/ocata
NEUTRON_BRANCH=stable/ocata
GLANCE_BRANCH=stable/ocata
CINDER_BRANCH=stable/ocata
SWIFT_BRANCH=stable/ocata
KEYSTONE_TOKEN_FORMAT=UUID
disable_service tempest
ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
SWIFT_REPLICAS=1
SWIFT_HASH=011688b44136573e209e
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
Q_USE_SECGROUP=true
Q_L3_ENABLED=true
PUBLIC_INTERFACE=eth1
Q_USE_PROVIDERNET_FOR_PUBLIC=true
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex
Q_PLUGIN=ml2
ENABLE_TENANT_VLANS=true
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=true
LOG_COLOR=true
SCREEN_LOGDIR=/opt/stack/logs
Source of image in mainland China:
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=https://hub.fastgit.org/novnc/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git
If your system is a relatively new system like 19.04, since openstack is not tested on this system, please add configuration:
FORCE=yes
6. Install devstack
stack$ ./stack.sh
According to the network status, after waiting for a period of time, the interface prompts that the installation is complete.