Configuration¶
The Node Manager is configured with a env-based configuration file, node_manager.env
.
The config/node_manager.env
file contains an example of configuration for the
Node Manager, which is the configuration used by default:
#!/usr/bash
##############################################################################
################## Node Manager example configuration file ##################
##############################################################################
# Node Manager example configuration file.
# This is used to enable/disable features for the node manager and
# to set configuration parameters.
#
# To provide the configuration settings defined in this script, pass
# the path of this script as parameter when you start the node manager.
# $ node_manager --env-path .env
# For more information, check the documentation.
# Note that the configuration settings contained in this script are
# defined as environment variables; therefore you can also load the
# configuration by sourcing this script.
# Some settings can be also passed as command-line arguments when you
# start the node manager. Command-line arguments have priority over the
# variables defined in this script.
##############################################################################
############################## General settings ##############################
##############################################################################
# Must debug logs be enabled? (optional, default: True)
# export DEBUG=True
# Must SRv6 Manager features be enabled? (optional, default: True)
# export ENABLE_SRV6_MANAGER=False
##############################################################################
##############################################################################
############################ gRPC server settings ############################
##############################################################################
# IP address of the gRPC server (:: means 'listen on any addrs', default: ::)
export GRPC_IP=::
# Number of port on which the gRPC server is reachable (default: 12345)
export GRPC_PORT=12345
# Must gRPC server use secure channels? (default: False)
# export GRPC_SECURE=True
# Path to the certificate of Certification Authority (CA)
# required by gRPC secure mode (default: 'cert_client.pem')
# export GRPC_SERVER_CERTIFICATE_PATH=/tmp/ca.crt
# Path to the private key of the server required by gRPC secure mode
# (default: 'key_server.pem')
# export GRPC_SERVER_KEY_PATH=/tmp/server.key
##############################################################################
##############################################################################
############################ gRPC client settings ############################
##############################################################################
# Must gRPC client use secure channels? (default: False)
# export GRPC_CLIENT_SECURE=True
# Must gRPC use secure channels? (default: False)
# export GRPC_CA_CERTIFICATE_PATH=/tmp/ca.crt
# IP address of the controller's gRPC server (default: fcff:c::1)
# export CONTROLLER_GRPC_IP=fcff:c::1
# Number of port of the controller's gRPC server (default: 12345)
# export CONTROLLER_GRPC_PORT=12345
##############################################################################
##############################################################################
########################## SRv6-PFPLM configuration ##########################
##############################################################################
# Define whether to enable or not SRv6-PFPLM features (default: False)
# export ENABLE_SRV6_PM_MANAGER=True
# Path to the folder where you cloned the repository
# https://github.com/netgroup/srv6-pm-xdp-ebpf.git
# export SRV6_PM_XDP_EBPF_PATH=/home/rose/workspace/srv6-pm-xdp-ebpf
# Path to the folder where you cloned the repository
# https://github.com/netgroup/rose-srv6-data-plane.git
# export ROSE_SRV6_DATA_PLANE_PATH=/home/rose/workspace/rose-srv6-data-plane
##############################################################################
##############################################################################
################################ VPP settings ################################
##############################################################################
# Define whether to enable or not the VPP forwarding engine (default: False)
# export ENABLE_VPP=True
# Path to the directory containing libvppapiclient.so
# (see https://wiki.fd.io/view/VPP/Python_API for the setup instructions)
# export LD_LIBRARY_PATH=\
# /home/rose/workspace/vpp/build-root/install-vpp_debug-native/vpp/lib
##############################################################################
If you want to override the default settings, you can create a node_manager.env file containing the desired configuration parameters.
The next section shows the available configuration options.
Configuration options¶
This section shows a list of the available configuration options for the Node Manager. You can set configuration parameters by using the syntax of the environment variables:
export ATTRIBUTE=VALUE
where ATTRIBUTE is the name of the configuration option that you want to set and VALUE is the value to be assigned to the option.
To use your custom configuration, you can pass your .env configuration file to the Node Manager when it is started, as explained in the Load configuration section.
General settings¶
Attribute |
Type |
Default |
Description |
---|---|---|---|
GRPC_IP |
string |
:: |
IP of the gRPC server. |
GRPC_PORT |
integer |
12345 |
Port of the gRPC server. |
GRPC_SECURE |
boolean |
False |
If True, the Node Manager will use
the TLS to encrypt and authenticate
the traffic sent to the Node Manager
on the gRPC Channel.
|
GRPC_SERVER_CERTIFICATE_PATH |
string |
None |
Name of server certificate for the TLS,
required if GRPC_SECURE is True.
|
GRPC_SERVER_KEY_PATH |
string |
None |
Name of server key for the TLS,
required if GRPC_SECURE is True.
|
DEBUG |
boolean |
False |
If True, the debug logging is enabled. |
The design of the node manager is highly modular. It is composed by different components that can be enabled or disabled in your configuration file.
The current release has two components: SRv6 Manager and SRv6-PM Manager, described in the next sections.
SRv6 Manager¶
The SRv6 Manager allows a Controller to enforce SRv6 rules and behaviors to the node. This can be used for example to create SRv6 tunnels between two nodes of the network. This component is enabled by default.
Attribute |
Type |
Default |
Description |
---|---|---|---|
ENABLE_SRV6_MANAGER |
boolean |
True |
If True, the SRv6 Manager is enabled. |
SRv6-PM Manager¶
SRv6 PFPLM functionalities depend on the SRv6-PM Manager.
If you want to use these features, you need to enable the SRv6-PM Manager support in your configuration and to set the parameters listed in this section.
If you are not interested in using SRv6 PM features, you can skip this section.
Note
SRv6 PFPLM support requires SRv6 PFPLM implementation using XDP/eBPF and tc/eBPF and ROSE SRv6 Data-Plane. Follow the instructions provided in Optional requirements section to setup the required dependencies.
Attribute |
Type |
Default |
Description |
---|---|---|---|
ENABLE_SRV6_PM_MANAGER |
boolean |
False |
If True, the SRv6 PM features are enabled. |
SRV6_PM_XDP_EBPF_PATH |
string |
None |
Path to folder where you cloned the
srv6-pm-xdp-ebpf-path library.
|
“gRPC server on the Controller” settings¶
The Controller uses the gRPC protocol to interact with the nodes. In most use-cases it acts as a gRPC client, while the node executes the gRPC server. Optionally, you can also executes a gRPC server on the Controller. This enables several use-cases where the nodes need to send information to the Controller (e.g. performance measurement data). To use this feature, you need to enable and configure it in the Controller configuration. Then you need to set some parameters in the configuration of the Node Manager. This section explains how to configure this functionality on the Node Manager.
Attribute |
Type |
Default |
Description |
---|---|---|---|
CONTROLLER_GRPC_IP |
string |
– |
The IP address of the Controller. |
CONTROLLER_GRPC_PORT |
integer |
12345 |
The TCP port on which the Controller
will listen for gRPC connections.
|
GRPC_CLIENT_SECURE |
boolean |
False |
If True, the Node Manager will use
the TLS to encrypt and authenticate
the traffic exchanged with the
Controller on the
(Node -> Controller) gRPC Channel.
|
GRPC_CA_CERTIFICATE_PATH |
string |
None |
Name of CA certificate for the TLS,
required if GRPC_CLIENT_SECURE is True.
|
Verifying configuration¶
You can verify that your configuration is correct with the check_node_manager_config
script:
check_node_manager_config /etc/rose-srv6-control-plane/node_manager.env
Configuration examples¶
For an example of configuration, you can see the config/node_manager.env
file.
It is the default configuration used by the Node Manager. You can use this file as
a template for your custom configuration.
Load configuration¶
In order to load your configuration in the Node Manager, you can pass the path of your node_manager.env configuration file when you start the Node Manager:
$ node_manager --env-file node_manager.env
For more information about the usage of the Node Manager and the supported Command-Line arguments, see the Usage section.