I recently configured a multi-node Devstack DVR setup and thought it might be useful to share my experience.
I use three VMs: 192.168.0.1/2/3. Each VM has one NIC with internet access. I normally run Devstack Neutron VMs with only one NIC – If the instances you create inside this environment require internet access, just connect the NIC to br-ex and move the IP addressing information to be-ex. I designate one VM as an ‘all-in-one’ (API servers, compute, and network), the second VM as a compute, and the third as a network node. This allows me to test DVR east-west routing (This is why I have two computes) as well as default SNAT behavior (Requires a dedicated network node / A l3 agent in ‘dvr-snat’ mode). I dislike Devstack flags/macros and prefer to configure the services myself with [post-config] sections. This soothes my control-freak nature and allows me to assert that I understand how the configuration should end up looking like.
All in one local.conf:
[[local|localrc]] DEST=/opt/openstack DATA_DIR=$DEST/data LOGFILE=$DATA_DIR/logs/stack.log SCREEN_LOGDIR=$DATA_DIR/logs VERBOSE=False MYSQL_PASSWORD=1 RABBIT_PASSWORD=1 SERVICE_TOKEN=1 SERVICE_PASSWORD=1 ADMIN_PASSWORD=1 disable_service n-net enable_service neutron enable_service q-svc enable_service q-meta enable_service q-agt enable_service q-dhcp enable_service q-l3 # TODO: Set this host's IP HOST_IP=192.168.0.1 [[post-config|$NEUTRON_CONF]] [DEFAULT] router_distributed=True [[post-config|/$Q_PLUGIN_CONF_FILE]] [ml2] type_drivers=flat,vlan,vxlan tenant_network_types=vxlan mechanism_drivers=openvswitch,l2population [ml2_type_vxlan] vni_ranges=1000:1999 [ovs] local_ip=$HOST_IP [agent] tunnel_types=vxlan l2_population=True enable_distributed_routing=True [[post-config|$Q_L3_CONF_FILE]] [DEFAULT] agent_mode=dvr router_delete_namespaces=True [[post-config|$Q_DHCP_CONF_FILE]] [DEFAULT] dhcp_delete_namespaces=True
Compute local.conf:
[[local|localrc]] DEST=/opt/openstack DATA_DIR=$DEST/data LOGFILE=$DATA_DIR/logs/stack.log SCREEN_LOGDIR=$DATA_DIR/logs VERBOSE=False MYSQL_PASSWORD=1 RABBIT_PASSWORD=1 SERVICE_TOKEN=1 SERVICE_PASSWORD=1 ADMIN_PASSWORD=1 ENABLED_SERVICES=n-cpu,neutron,n-novnc,q-agt,q-l3,q-meta # TODO: Set this host's IP HOST_IP=192.168.0.2 # TODO: Set the controller's IP SERVICE_HOST=192.168.0.1 MYSQL_HOST=$SERVICE_HOST RABBIT_HOST=$SERVICE_HOST Q_HOST=$SERVICE_HOST GLANCE_HOSTPORT=$SERVICE_HOST:9292 VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP VNCSERVER_LISTEN=0.0.0.0 [[post-config|/$Q_PLUGIN_CONF_FILE]] [ovs] local_ip=$HOST_IP [agent] tunnel_types=vxlan l2_population=True enable_distributed_routing=True [[post-config|$Q_L3_CONF_FILE]] [DEFAULT] agent_mode=dvr router_delete_namespaces=True
Network node local.conf:
[[local|localrc]] DEST=/opt/openstack DATA_DIR=$DEST/data LOGFILE=$DATA_DIR/logs/stack.log SCREEN_LOGDIR=$DATA_DIR/logs VERBOSE=False MYSQL_PASSWORD=1 RABBIT_PASSWORD=1 SERVICE_TOKEN=1 SERVICE_PASSWORD=1 ADMIN_PASSWORD=1 ENABLED_SERVICES=neutron,q-agt,q-l3,q-meta # TODO: Set this host's IP HOST_IP=192.168.0.3 # TODO: Set the controller's IP SERVICE_HOST=192.168.0.1 MYSQL_HOST=$SERVICE_HOST RABBIT_HOST=$SERVICE_HOST GLANCE_HOSTPORT=$SERVICE_HOST:9292 [[post-config|/$Q_PLUGIN_CONF_FILE]] [ovs] local_ip=$HOST_IP [agent] tunnel_types=vxlan l2_population=True enable_distributed_routing=True [[post-config|$Q_L3_CONF_FILE]] [DEFAULT] agent_mode=dvr_snat router_delete_namespaces=True
Pingback: Distributed Virtual Routing – Overview and East/West Routing | Assaf Muller
Reblogged this on JungIn's Blog.
This blog entry is still immensely useful after 18 months, but I wanted to play with distributed HA routers in Mitaka. To create HA routers, distributed or not, I had to set the L3 agent mode on the controller from dvr to dvr-snat. As documented in https://wiki.openstack.org/wiki/Neutron/DVR/HowTo, this seems to be the standard anyway nowadays.