blob: 43d4c3f54914a659ef668d2f13743641c2e6e246 [file] [log] [blame]
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +02001Setting up a Node with a Single NIC
2===================================
3
4Installing the STN Daemon
5-------------------------
6
7The STN (Steal the NIC) daemon must be installed on every node in the
8cluster that has only one NIC. The STN daemon installation(*) should be
9performed before deployment of the Contiv-VPP plugin.
10
11\* Docker daemon must be present when installing STN. Also, Docker must
12be configured to allow shared mount. On CentOS, this may not be the case
13by default. You can enable it by following the instructions at
14https://docs.portworx.com/knowledgebase/shared-mount-propagation.html.
15
16Run as root (not using sudo):
17
18::
19
20 bash <(curl -s https://raw.githubusercontent.com/contiv/vpp/master/k8s/stn-install.sh)
21
22The install script should output the following:
23
24::
25
26 Installing Contiv STN daemon.
27 Starting contiv-stn Docker container:
28 550334308f85f05b2690f5cfb5dd945bd9c501ab9d074231f15c14d7098ef212
29
30Check that the STN daemon is running:
31
32::
33
34 docker ps -a
35 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
36 550334308f85 contivvpp/stn "/stn" 33 seconds ago Up 33 seconds contiv-stn
37
38Check that the STN daemon is operational:
39
40::
41
42 docker logs contiv-stn
43
44The expected logs would look like the following excerpt:
45
46::
47
48 2018/02/23 10:08:34 Starting the STN GRPC server at port 50051
49
50For more details, please read the Go documentation for
51`contiv-stn <https://github.com/contiv/vpp/blob/master/cmd/contiv-stn/doc.go>`__
52and
53`contiv-init <https://github.com/contiv/vpp/blob/master/cmd/contiv-init/doc.go>`__.
54
55Creating a VPP Interface Configuration
56--------------------------------------
57
58Create 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>`__.
60
61Configuring STN in Contiv-VPP K8s Deployment Files
62--------------------------------------------------
63
64The STN feature is disabled by default. It needs to be enabled either
65globally, or individually for every node in the cluster.
66
67Global Configuration:
68~~~~~~~~~~~~~~~~~~~~~
69
70Global configuration is used in homogeneous environments where all nodes
71in a given cluster have the same hardware configuration, for example
72only a single Network Adapter. To enable the STN feature globally, put
73the ``StealFirstNIC: True`` stanza into the [``contiv-vpp.yaml``][1]
74deployment file, for example:
75
76::
77
78 data:
79 contiv.yaml: |-
80 TCPstackDisabled: true
81 ...
82 StealFirstNIC: True
83 ...
84 IPAMConfig:
85
86Setting ``StealFirstNIC`` to ``True`` will tell the STN Daemon on every
87node in the cluster to steal the first NIC from the kernel and assign it
88to VPP. Note that the Network Adapters on different nodes do not need to
89be of the same type. You still need to create the respective vswitch
90configurations on every node in the cluster, as shown
91[above](#creating-a-vpp-interface-configuration).
92
93Individual Configuration:
94~~~~~~~~~~~~~~~~~~~~~~~~~
95
96Individual configuration is used in heterogeneous environments where
97each node in a given cluster may be configured differently. To enable
98the STN feature for a specific node in the cluster, put the following
99stanza into its Node Configuration in the [``contiv-vpp.yaml``][1]
100deployment file, for example:
101
102::
103
104 ...
105 NodeConfig:
106 - NodeName: "ubuntu-1"
107 StealInterface: "enp0s8"
108 - NodeName: "ubuntu-2"
109 StealInterface: "enp0s8"
110 ...
111
112Note that you still have to create the vswitch configuration on the node
113as shown `here <#creating-a-vpp-interface-configuration>`__.
114
115Uninstalling the STN Daemon
116---------------------------
117
118Run as root (not using sudo):
119
120::
121
122 bash <(curl -s https://raw.githubusercontent.com/contiv/vpp/master/k8s/stn-install.sh) --uninstall
123
124The install script should output the following:
125
126::
127
128 Uninstalling Contiv STN daemon.
129 Stopping contiv-stn Docker container:
130 contiv-stn
131 contiv-stn
132 contiv-stn
133
134Make sure that the STN daemon has been uninstalled:
135
136::
137
138 docker ps -q -f name=contiv-stn
139
140No containers should be listed.