1 创建stack用户
以后的所有操作都到此用户下,不然会有异常
groupadd stack
useradd -g stack -s /bin/bash -d /opt/stack -m stack
echo “stack ALL=(ALL) NOPASSWD: ALL” >> /etc/sudoers
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
- 配置python源
[root@node149 ~]# vim .pip/pip.conf [global] timeout=6000 #index-url=http://mirrors.aliyun.com/pypi/simple #index-url = https://pypi.mirrors.ustc.edu.cn/simple index-url=https://pypi.douban.com/simple trusted-host = pypi.douban.com
========================================================
compute node:
[[local|localrc]]
HOST_IP=10.168.0.181 # change this per compute node
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=labstack
DATABASE_PASSWORD=supersecret
RABBIT_PASSWORD=supersecrete
SERVICE_PASSWORD=supersecrete
DATABASE_TYPE=mysql
SERVICE_HOST=10.168.0.149
MYSQL_HOST=
SERVICEHOSTRABBITHOST=
SERVICE_HOST
GLANCE_HOSTPORT=$SERVICE_HOST:9292
enable_plugin dragonflow http://git.openstack.org/openstack/dragonflow
disable_all_services
enable_service n-cpu
enable_service df-controller
enable_service df-etcd
enable_service df-ext-services
enable_service n-novnc
Q_ENABLE_DRAGONFLOW_LOCAL_CONTROLLER=True
Set this to the address of the main DevStack host running the rest of the # OpenStack services. (Controller node)
RABBIT_HOST=
SERVICEHOSTQHOST=
SERVICE_HOST
REMOTE_DB_IP=$SERVICE_HOST
Make VNC work on compute node
NOVA_VNC_ENABLED=True
NOVNCPROXY_URL=http://$SERVICE_HOST:6080/vnc_auto.html
VNCSERVER_LISTEN=
HOSTIPVNCSERVERPROXYCLIENTADDRESS=
VNCSERVER_LISTEN
=========================================================
controller node:
[[local|localrc]]
HOST_IP=10.168.0.149
FLAT_INTERFACE=eth0
FIXED_RANGE=10.4.128.0/20
FIXED_NETWORK_SIZE=4096
FLOATING_RANGE=172.16.1.0/24
MULTI_HOST=1
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=labstack
DATABASE_PASSWORD=supersecret
RABBIT_PASSWORD=supersecrete
SERVICE_PASSWORD=supersecrete
GIT_BASE=git@github.com:/
Q_ENABLE_DRAGONFLOW_LOCAL_CONTROLLER=True
enable_plugin dragonflow http://git.openstack.org/openstack/dragonflow
enable_service df-etcd
enable_service df-etcd-server
enable_service df-controller
enable_service df-ext-services
disable_service n-net
enable_service q-svc
enable_service q-l3
disable_service heat
disable_service tempest
Enable q-meta once nova is being used.
enable_service q-meta
We have to disable the neutron L2 agent. DF does not use the L2 agent.
disable_service q-agt
We have to disable the neutron dhcp agent. DF does not use the dhcp agent.
disable_service q-dhcp