In this step, we would create the VLAN between all the nodes. If you already have a LAN with all the 4 machines connected, you can skip this step.
We would be binding the following ip address to the workstation and cluster nodes.
Keep a note of the internal ip address allocated to the above nodes as we would be using it during the command execution below. You can get the internal ip address for the nodes from Google Cloud VM console.
- Next, ssh to bm-wkst node and execute the following command one by one, to create the VLAN between bm-wkst and cluster machines.
> set -x
> sudo ip link add vxlan0 type vxlan id 42 dev ens4 dstport 0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-cp-ipaddress> dev vxlan0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-node1-ipaddress> dev vxlan0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-node2-ipaddress>dev vxlan0
> sudo ip addr add 10.200.0.2/24 dev vxlan0
> sudo ip link set up dev vxlan0
- Next, ssh to bm-cp node and execute the following command one by one, to create the VLAN between bm-cp node and other machines.
> set -x
> sudo ip link add vxlan0 type vxlan id 42 dev ens4 dstport 0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-wkst-ipaddress> dev vxlan0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-cp-ipaddress> dev vxlan0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-node1-ipaddress>dev vxlan0
> sudo ip addr add 10.200.0.3/24 dev vxlan0
> sudo ip link set up dev vxlan0
- Next, ssh to bm-node1 node and execute the following command one by one, to create the VLAN between bm-node1 and other machines.
> set -x
> sudo ip link add vxlan0 type vxlan id 42 dev ens4 dstport 0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-wkst-ipaddress> dev vxlan0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-cp-ipaddress> dev vxlan0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-node2-ipaddress>dev vxlan0
> sudo ip addr add 10.200.0.4/24 dev vxlan0
> sudo ip link set up dev vxlan0
- Next, ssh to bm-node2 node and execute the following command one by one, to create the VLAN between bm-node2 and other nodes.
> set -x
> sudo ip link add vxlan0 type vxlan id 42 dev ens4 dstport 0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-wkst-ipaddress> dev vxlan0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-cp-ipaddress> dev vxlan0
> sudo bridge fdb append to 00:00:00:00:00:00 dst <bm-node1-ipaddress>dev vxlan0
> sudo ip addr add 10.200.0.5/24 dev vxlan0
> sudo ip link set up dev vxlan0
This completes setting up the VLAN across all the nodes.
Next, we install the bmctl tool for creating bare metal cluster configuration file