1 Setting up a Node with a Single NIC
2 ===================================
4 Installing the STN Daemon
5 -------------------------
7 The STN (Steal the NIC) daemon must be installed on every node in the
8 cluster that has only one NIC. The STN daemon installation(*) should be
9 performed before deployment of the Contiv-VPP plugin.
11 \* Docker daemon must be present when installing STN. Also, Docker must
12 be configured to allow shared mount. On CentOS, this may not be the case
13 by default. You can enable it by following the instructions at
14 https://docs.portworx.com/knowledgebase/shared-mount-propagation.html.
16 Run as root (not using sudo):
20 bash <(curl -s https://raw.githubusercontent.com/contiv/vpp/master/k8s/stn-install.sh)
22 The install script should output the following:
26 Installing Contiv STN daemon.
27 Starting contiv-stn Docker container:
28 550334308f85f05b2690f5cfb5dd945bd9c501ab9d074231f15c14d7098ef212
30 Check that the STN daemon is running:
35 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
36 550334308f85 contivvpp/stn "/stn" 33 seconds ago Up 33 seconds contiv-stn
38 Check that the STN daemon is operational:
42 docker logs contiv-stn
44 The expected logs would look like the following excerpt:
48 2018/02/23 10:08:34 Starting the STN GRPC server at port 50051
50 For more details, please read the Go documentation for
51 `contiv-stn <https://github.com/contiv/vpp/blob/master/cmd/contiv-stn/doc.go>`__
53 `contiv-init <https://github.com/contiv/vpp/blob/master/cmd/contiv-init/doc.go>`__.
55 Creating a VPP Interface Configuration
56 --------------------------------------
58 Create the VPP configuration for the hardware interface as described
59 `here <https://github.com/contiv/vpp/blob/master/docs/VPP_CONFIG.md#single-nic-configuration>`__.
61 Configuring STN in Contiv-VPP K8s Deployment Files
62 --------------------------------------------------
64 The STN feature is disabled by default. It needs to be enabled either
65 globally, or individually for every node in the cluster.
70 Global configuration is used in homogeneous environments where all nodes
71 in a given cluster have the same hardware configuration, for example
72 only a single Network Adapter. To enable the STN feature globally, put
73 the ``StealFirstNIC: True`` stanza into the [``contiv-vpp.yaml``][1]
74 deployment file, for example:
80 TCPstackDisabled: true
86 Setting ``StealFirstNIC`` to ``True`` will tell the STN Daemon on every
87 node in the cluster to steal the first NIC from the kernel and assign it
88 to VPP. Note that the Network Adapters on different nodes do not need to
89 be of the same type. You still need to create the respective vswitch
90 configurations on every node in the cluster, as shown
91 [above](#creating-a-vpp-interface-configuration).
93 Individual Configuration:
94 ~~~~~~~~~~~~~~~~~~~~~~~~~
96 Individual configuration is used in heterogeneous environments where
97 each node in a given cluster may be configured differently. To enable
98 the STN feature for a specific node in the cluster, put the following
99 stanza into its Node Configuration in the [``contiv-vpp.yaml``][1]
100 deployment file, for example:
106 - NodeName: "ubuntu-1"
107 StealInterface: "enp0s8"
108 - NodeName: "ubuntu-2"
109 StealInterface: "enp0s8"
112 Note that you still have to create the vswitch configuration on the node
113 as shown `here <#creating-a-vpp-interface-configuration>`__.
115 Uninstalling the STN Daemon
116 ---------------------------
118 Run as root (not using sudo):
122 bash <(curl -s https://raw.githubusercontent.com/contiv/vpp/master/k8s/stn-install.sh) --uninstall
124 The install script should output the following:
128 Uninstalling Contiv STN daemon.
129 Stopping contiv-stn Docker container:
134 Make sure that the STN daemon has been uninstalled:
138 docker ps -q -f name=contiv-stn
140 No containers should be listed.