Sunday, October 27, 2013

Nodes networking setup and Chef bootstrapping

Nodes Networking Setup

Use Ubuntu 12.04 LTS 64 bit.

Setup the nodes networking such that the eth0 of Controller, Compute and Network nodes are all on the same network as the Chef Workstation and this network is able to reach the Hosted Chef Server across the Internet.

The out-of-band eth0 management interfaces are where the primary IP address of the node is located, and is not controlled by OpenStack Networking.

Important: We are using Quantum networking. This is specified in the Chef environment file by using "network": { "provider": "quantum"}. The Rackspace Private Cloud cookbooks will use VLAN based networking by default. So, all eth1 interfaces should be connected to a switch using Trunk Ports. Multiple VLANs will be used to segregate the private networks that will be created using Quantum.

The eth1 physical provider interfaces have no IP addresses and must be configured to be "up" on boot. For example, to accomplish this in Ubuntu, the following configuration would need to be added to/etc/network/interfaces:

auto eth1
iface eth1 inet manual
  up ip link set $IFACE up
  down ip link set $IFACE down



The /etc/network/interfaces of controller node is as below:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

auto eth0
iface eth0 inet static
address 10.112.252.244
netmask 255.255.255.0
gateway 10.112.252.253
dns-nameservers 10.112.116.138 10.112.116.139 10.112.64.1

auto eth1
iface eth1 inet manual
  up ip link set $IFACE up
  down ip link set $IFACE down



Bootstrapping the nodes to Chef Server

On the Chef Workstation we can run the following knife bootstrap commands to bootstrap the nodes to the Chef Server.

# knife bootstrap 10.112.252.244 -x root -P password -N "setup1-controller"
# knife bootstrap 10.112.252.245 -x root -P password -N "setup1-network"
# knife bootstrap 10.112.252.246 -x root -P password -N "setup1-compute"



Verify that the nodes are bootstrapped using 'knife node list' command:

# knife node list
setup1-compute
setup1-controller
setup1-network

2 comments:

  1. Hi,
    Thanks for this series of posts! I've had not trouble at all up until this point :)
    This is my 4th attempt at getting openstack setup working. Pardon the newbie questions:
    1) The 3 nodes it sounds like I need to have them available before I run the bootstrapping commands - is that correct ?
    2) Do I need 3 VMs for this ?
    3) If yes, what is the min config requirements on them ?

    I am just trying to get up a testing environment to understand how openstack works and the compute and network are the only services I am interested in at the moment.
    Please comment.

    Thanks,
    Suma

    ReplyDelete
    Replies
    1. Hi,

      1) Yes, you need to prepare the nodes before you bootstrap them to chef. OS is Ubuntu 12.04 LTS 64 bit. Server/Desktop does *not* matter. You will need Internet Connectivity for these servers to download the Openstack packages. If you have http proxy in your network, then you need to make sure you proxy settings are taken care on the nodes.

      2) These could be VMs or even Physical Servers. Depends on your setup. I used VMs running on ESXi, and the virtual NICs connected to vSwitches created on ESXi. Much easier to play with VMs, vNICs and vSwitches. Rather than setting up with Physical servers and Physical Switches. Though it should work with both VMs and Physical servers.

      3) I use VMs with 4GB RAM and 40G Hard disk. Generally good to have a bit more RAM for your Controller. If you want to play with a lot of instances then you may need more for the Compute node. Or you can keep adding more Compute Nodes.

      Hope this helps.

      Cheers!

      Delete