Configuring the Data Network
Nodes in the Lightbits server clusters communicate via a high-speed data network interface.
All nodes in the cluster must be configured with an IP address from the same accessible network before running the Ansible playbook.
You can configure the network using an automatic (recommended) or manual method.
For full examples, see Host Configuration File Examples.
Automatic Data Network Configuration (Recommended)
The Ansible playbook can help you automatically set the data interface IP when some optional network host variables are transferred.
This means that to make deployment easier, the playbook configures the data network interface persistently for you by specifying the list variable for each host. For example:
data_ifaces:- bootproto: static conn_name: ens1 ifname: ens1 ip4: 10.20.20.10/27In this example, we have set the playbook to permanently configure interface ens1 with static IP 10.20.20.10.
Manual Data Network Configuration
In this method, you assign the data IPs on the data interfaces for each node on the cluster.
To set the data IPs:
Log into the machine with the following command: $ ssh root@rack03-server70
Detect the data interface with the
businfocommand.
$ lshw -c net -businfoBus info Device Class Description=======================================================pci@0000:01:00.0 eno1 network I350 Gigabit Network Connectionpci@0000:01:00.1 eno2 network I350 Gigabit Network Connectionpci@0000:02:00.0 ens1f0 network MT27710 Family [ConnectX-4 Lx]pci@0000:02:00.1 ens1f1 network MT27710 Family [ConnectX-4 Lx]- Set a new data interface IP and net mask IP for the data NIC. In the following example, the card is ens1f0 :
$ cat >/etc/sysconfig/network-scripts/ifcfg-ens1f0 <<EOLDEVICE=ens1f0NM_CONTROLLED=noIPADDR=10.20.20.10NETMASK=255.255.255.224ONBOOT=yesBOOTPROTO=staticEOL- Toggle the NIC down and then up again by entering the
ifdowncommand, waiting at least 30 seconds, and then entering theifupcommand.
$ ifdown ens1f0$ ifup ens1f0- Verify that the data interface’s IP is updated.
$ ip -4 a…4: ens1f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000inet 10.20.20.10/27 brd 10.20.20.31 scope global ens1f0valid_lft forever preferred_lft foreverUse nmtui (NetworkManager-tui) if NetworkManager is installed, and ip -4 -br a or ip -br a to verify the ip (for a cleaner view).