Installing OpenStack: All-In-One node using Single NIC
Gone are the days when you need 3 or more nodes to do a test setup of Openstack. All you need is a single node. I call it “All-In-one” node. Let me explain you “HOW We to setup All-in-one node openstack using 1 NIC”.
To install Openstack in Minimal Hardware all you need is at least …
Processor: Single Socket CPU 64 bit with 2 core (Dual core Processor)
Minimum RAM : 4 GB DDR-3
OS : Ubuntu 14.04
Harddisk: 146 GB
Network : 1 NIC ( 1Gbps is would be better )
Note :
1) The NIC will be used for accessing the Operating System (Ubuntu), the services (API endpoints), the dashboard (Horizon) and for “exposing” VMs when you associate a floating IP address to them.
Do we need to configure NIC before installing Openstack. YES, we do. Follow few simple steps to get your NIC configured. Before you configure NIC, lets assume
- you want to install openstack (Havana or latest) with Neutron (not nova-network)
- your installation is really a single node; i.e. you are not going to add compute nodes in the future
The first thing to do is to configure the network at Operating System level.
Step 1:
$ sudo ovs-vsctl add-br br-ex
Step 2:
The following is an example of how you can configure the network using /etc/network/interfaces:
auto lo
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
up ifconfig $IFACE promisc
up ifconfig $IFACE multicast
down ip link set $IFACE down
auto br-ex iface br-ex inet static
address <static-ip-address>
netmask <mask>
network <network>
broadcast <broadcast>
gateway <gateway-ip-address>
up ifconfig $IFACE promisc
dns-nameservers <dns-ip-address>
a) The first entry configures the loopback interface: no explanation is needed.
b) The second entry “starts” the interface whenever you switch on the PC. It’s worth noticing that you do not assign any IP address to such an interface and this is needed because this interface will ‘capture’ all the traffic on the physical network it is connected to. The ‘captured’ traffic will be forwarded to all the virtual devices connected to the interfaces and one of such devices is br-ex.
c) The third entry configures br-ex, an OpenVSwitch bridge that will serve for the following purposes:
- give access to the services (API endpoints) and Horizon
- give access to the PC’s Operating System (ubuntu)
- give access to VMs in the cloud when they are associated to a floating IP address
After setting up the configuration file, all you need is to reboot the PC and not just network restart as sometimes the configuration files doesn’t get updated in the kernel. Once the reboot is completed, you need to access the console locally rather than remotely. As there is no IP address assigned yet.
After accessing through the local console, you should see that you have three interfaces (ifconfig command):
Lo Link encap:Local Loopbackinet addr:127.0.0.1 Mask:255.0.0.0inet6 addr: ::1/128 Scope:HostUP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:91931 errors:0 dropped:0 overruns:0 frame:0
TX packets:91931 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:19815734 (19.8 MB) TX bytes:19815734 (19.8 MB)
inet6 addr: fe80::21a:4bff:fedd:445e/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:3370 errors:0 dropped:2 overruns:0 frame:0
TX packets:427 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:432117 (432.1 KB) TX bytes:60022 (60.0 KB)
inet addr:10.15.5.92 Bcast:10.15.5.255 Mask:255.255.255.0
inet6 addr: fe80::9051:56ff:fe8d:568d/64 Scope:Link
UP BROADCAST RUNNING PROMISC MTU:1500 Metric:1
RX packets:3238 errors:0 dropped:8 overruns:0 frame:0
TX packets:415 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:383674 (383.6 KB) TX bytes:56880 (56.8 KB).
$ sudo ovs-vsctl add-port br-ex eth1
At this point you should be able to access the PC from “outside” using the IP address assigned to br-
Now you can start installing the OpenStack (omitting network configuration part) following the doc from docs.openstack.org
When you install Neutron, you need to ensure the floating IP address assigned should be in the same subnet.
Refer example give below
- when you create the “external network”, the floating IP addresses need to be on the same network where br-ex is (e.g. if the node is on 10.15.5.0/24, the floating IP address need to be on 10.15.5.0/24 as well).
Note : You cannot proceed with remote OpenStack installation while using one NIC.
Hope this is was useful. Would be interested to hear your inputs/feedback.
Cheers,
Vinoth
Leave a Comment