Friday, April 4, 2014

A working OpenStack configuration for a single network card

 After some longer trouble to get OpenStack running on a system which just has one network card I found a proper solution. 



Here it is:

  • Install a fresh Ubuntu 12.04 LTS
  • Install bridge-utils and configure a br100 bridge on your single network card eth0
    • Here the config part for br100 in /etc/network/interfaces
# Internal Network
auto br100
iface br100 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
bridge_ports eth0
bridge_fd 0
bridge_hello 2
bridge_maxage 12
bridge_stp off
  •  Create a VLAN network interface on eth0 using VLAN ID 0
    • Run:
modprobe 8021q
vconfig add eth0 0
ifconfig eth0.0:1 10.11.12.1 netmask 255.255.255.0 up
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    •  This creates a eth0.0 device with the ip 10.11.12.1
  • Check that the new eth0.0 device got created with "ifconfig -a"
  • Now follow the regular Devstack instructions
    • Add a stack user with sudo permissions
    • Check out OpenStack with git
    • Create a /home/stack/devstack/localrc as following
HOST_IP=192.168.0.1
FLOATING_RANGE=192.168.0.0/24
FIXED_RANGE=10.11.12.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=password
MYSQL_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
LOGFILE=/home/stack/stack.sh.log
  • Now run stack.sh
su - stack
cd devstack
./stack.sh

Shortly after that OpenStack will be up + running and you can connect to the OpenStack Horizion Dashboard at http://192.168.0.1

With this network configuration this setup allows to successfully launch OpenStack instances which are then reachable from the controller.

Devstack, a documented shell script to build complete OpenStack development environments. More about Devstack at: http://devstack.org