Operations
- Automate Configuration Properties during Deployment (Ansible)
- Customizing Configuration for All Java Services
Automate Configuration Properties during Deployment (Ansible)
You can deploy SAS Viya with configuration values that are customized to your site by running your Ansible playbook with sitedefault.yml. Using sitedefault.yml, enables you to provision multiple machines in the same manner, and prevents you from having to modify configuration values with an administration interface after deployment.
To specify configuration values using sitedefault.yml, follow these steps:
- Sign on to your Ansible controller with administrator privileges and locate the file, /playbook/roles/consul/files/sitedefault_sample.yml.
- Make a copy of sitedefault_sample.yml and name the copy, sitedefault.yml.
- Using a text editor,
open sitedefault.yml and add values that are valid for your site.
Configuration values that apply to all services should be nested under
config: / application:. Values that apply only to a specific service should be nested underconfig: / service_name:.For information about the LDAP properties used in sitedefault.yml, see sas.identities.providers.ldap.
For information about the all the properties that can be used in sitedefault.yml, see Configuration Properties: Reference (Services).
CAUTION
Some properties require passwords. If properties with passwords are specified in sitedefault.yml, you must secure the file appropriately. If you chose not to supply the properties in sitedefault.yml, then you can enter them using SAS Environment Manager. (Sign in to SAS Environment Manager as sasboot and follow the instructions in Configure the Connection to LDAP in SAS Viya for Linux: Deployment Guide.)
- When you are finished, save sitedefault.yml and make sure that it resides in the /playbook/roles/consul/files directory of the playbook.
- Run your Ansible playbook.
Running the playbook using the site.yml file checks for sitedefault.yml,
and uses those settings if the file is present.
Here is an example:
ansible-playbook site.ymlFor a complete list of playbook commands, see Deploy the Software in SAS Viya for Linux: Deployment Guide.
- After the playbook is
run, verify that the configuration values are successfully loaded
into the configuration server by performing the following steps:
- Verify that a copy of sitedefault.yml resides in /viya/config/etc/consul.d/default/.
- Verify that config-kv-bulkload-sitedefault.json resides in /viya/config/etc/consul.d/.
- View the configuration
properties for a configuration definition such as, SAS Logon Manager,
in SAS Environment Manager to verify that the specified values are
present.
For more information, follow the first five steps in Edit Configuration Instances.
Customizing Configuration for All Java Services
You can use global configuration files to customize the start-up options for all Java services on a Linux deployment.
Follow these steps:
- In the /opt/sas/viya/config/etc/sysconfig/sas-javaesntl/ directory,
create a file whose name starts with sas-java-services.
For example, for a monitoring framework named AppMonitor, the configuration
file could be named sas-java-services-appmon.
Note: Options are applied in all of the files in the /opt/sas/viya/config/etc/sysconfig/sas-javaesntl/ directory whose filenames begin with sas-java-services, regardless of the rest of the filename. If the directory contains renamed old files or work files, the options in those files will be applied as well.
- In the configuration
file, add configuration statements for each option that you want to
specify. This is the format of each configuration statement:
export JAVA_OPTION_<variable_name>=<JVM_command_line_option>Each
JAVA_OPTION_<variable_namevalue must be globally unique. Do not use names that might conflict with names in other configuration files.The
JVM_command_line_optionmust be enclosed in double quotation marks if the command contains blanks.For example, a monitoring framework named AppMonitor requires multiple JVM start-up options. The file /opt/sas/viya/config/etc/sysconfig/sas-javaesntl/sas-java-services-appmon could contain these options:
export JAVA_OPTION_APPMON_AGENT=-javaagent:/opt/appmon/javaagent.jar export JAVA_OPTION_APPMON_CONTROLLER_HOST=-Daappmonitor.controller.hostName=eval.appmonitor.com export JAVA_OPTION_APPMON_CONTROLLER_PORT=-Dappmonitor.controller.port=443 export JAVA_OPTION_APPMON_CONTROLLER_SSL=-Dappmonitor.controller.ssl.enabled=true export JAVA_OPTION_APPMON_AGENT_NODE=-Dappmonitor.agent.nodeName=viya1 export JAVA_OPTION_APPMON_APPNAME=-Dappmonitor.agent.applicationName=prod-vdmml export JAVA_OPTION_APPMON_PROXY_HOST=-Dappmonitor.http.proxyHost=inet.abc.com export JAVA_OPTION_APPMON_PROXY_PORT=-Dappmonitor.http.proxyPort=808 - Restart one service and inspect the service log to confirm that all options are applied as expected.
- Modify the configuration file and restart. Repeat until all options are applied correctly.
- After all options are correct, restart all services for the new options to take effect.
CAUTION
Global configuration should be used carefully. Global options, especially invasive options like Java agents, can have a significant impact on the operation of a SAS Viya system. New options should be carefully tested and validated before deploying them to production systems.