SAS Viya 3.5 introduces an entirely new approach to configuring network communication. There are several new configuration directives to become familiar with. One part to achieving that is understanding how the various terms all relate to one another. In particular, the configuration directives that identify which network bindings the Viya software should use have an interesting chain of dependencies and assumptions.
This post will dive into the details specific to the BIND parameters, explaining how they relate one to another, and offering suggestions on configuration for different deployment scenarios.
The network configurations for SAS Viya 3.5 are presented in two places:
.../sas_viya_playbook/host_vars/<deploytarget>.ymlThis file is processed at install time when the site.yml play is run. Specifying these values is optional for single NIC hosts and required for multi-NIC hosts. Each deploy target defined in the Ansible inventory file of the sas_viya_playbook should have its own YAML file here, if needed.
On the Ansible Controller host, you manually create the network configuration files for each deploy target in the host_vars subdirectory. Here's one of mine from a recent installation for a deploy target with hostname alias "sasviya01":
$ cat /path/to/sas_viya_playbook/host_vars/sasviya01.yml --- network_conf: SAS_HOSTNAME: sasviya01.race.sas.com SAS_BIND_ADDR_IF: "eth0"
/opt/sas/viya/config/network.confThis file is created on each host of the Viya deployment with the values provided by associated the host_vars file. And this file is read each time Viya services start up on this host.
Shown here is the file created for my "sasviya01" deploy target on its host machine:
$ cat /opt/sas/viya/config/network.conf # BEGIN Ansible managed network configuration options export SAS_HOSTNAME="sasviya01.race.sas.com" export SAS_BIND_ADDR_IF="eth0"
Notice that the files in the host_vars subdirectory are provided in YAML format, but that the resulting network.conf files on each Viya host are in shell syntax.
One of the key objectives of revamping how network configuration works in Viya 3.5 is to provide a set of reference variables that all of the Viya software services can rely on identically.
Of those, the first two you should know about are:
Notice that both of these have self-determining default values. So specifying these configuration directives is optional for host machines with a single network interface. If your machine has more than one network interface (a.k.a. multiple NICs or multi-NIC), then the SAS Configuration Server requires you to identify which network interface it should bind to for communication (it will not allow 0.0.0.0 as an acceptable value).
Making the choice and specifying a particular network interface has consequences to consider. The values of those two configuration parameters are referred to by almost all Viya 3.5 services (or they should be) through internal SAS function calls. This means that your choice of SAS_BIND_ADDR will affect not just SAS Configuration Server, but the rest of the Viya software, too - everything will listen on that one specified network interface, unless…
…you also set these two configuration parameters as well:
Be careful with your interpretation of "external" here. It doesn't mean "alternative" or "outside". It's only used by a small, select set of Viya services which present public-facing interfaces. Think of this in comparison to the majority of Viya services communication which is private - not directly shared with any end-user client. For example, the CAS Controller provides a public interface which listens for end-user clients on port 5570 (by default) and is bound to the network specified by SAS_EXTERNAL_BIND_ADDR, but it communicates with the CAS workers extensively through a different internal set of interfaces which are configured by SAS_BIND_ADDR instead.
There's a secondary tier of configuration values which can be specified. These directives are used to deterministically derive and set the value for SAS_BIND_ADDR based on dynamic criteria of your network infrastructure:
Notice in terms of precedence that specifying a value for SAS_BIND_ADDR overrides SAS_BIND_ADDR_IF and that SAS_BIND_ADDR_IF will override SAS_BIND_ADDR_CIDR due to specificity. My recommendation is only to set the directive you intend to use to avoid any confusion.
These same secondary parameters are also available for _EXTERNAL_ as well.
To show this all as a simple set of rules, take a look at the following pseudocode to see how Viya services will determine which hostname and IP to use in their communications and registration:
|For Viya to determine the SAS_HOSTNAME value:|
if SAS_HOSTNAME is set in network.conf, then use it
|For Viya to determine the SAS_EXTERNAL_HOSTNAME value:|
if SAS_EXTERNAL_HOSTNAME is set in network.conf, then use it
|For Viya to determine the SAS_BIND_ADDR value:|
if SAS_BIND_ADDR is set in network.conf, then use it
|For Viya to determine the SAS_EXTERNAL_BIND_ADDR value:|
if SAS_EXTERNAL_BIND_ADDR is set in network.conf, then use it
There really is no one right way to configure the network that will work for all circumstances. You must evaluate the requirements of a given environment and adjust. With that out of the way, I usually start off with the following and then modify my approach as needed:
Pro-tip: consider SAS_EXTERNAL_BIND_ADDR=0.0.0.0 to direct the Viya public services to listen on all of this host's network interfaces if that makes sense for your environment.
I could go on and on. As you can tell, I'm excited by the new possibilities afforded to this huge upgrade to network identification in Viya. I hope this post helps guide your understanding how the network.conf file is processed when Viya services are installed and started.
Refer to the the SAS documentation for more information about networking configuration in Viya 3.5:
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.