Technical Paper Installing and Cnfiguring SAS Envirnment Manager in a SAS Grid Envirnment Last Mdified: Octber 2016
Release Infrmatin Cntent Versin: Octber 2016. Trademarks and Patents SAS Institute Inc., SAS Campus Drive, Cary, Nrth Carlina 27513. SAS and all ther SAS Institute Inc. prduct r service names are registered trademarks r trademarks f SAS Institute Inc. in the USA and ther cuntries. indicates USA registratin. Other brand and prduct names are registered trademarks r trademarks f their respective cmpanies.
Cntents Overview...1 Caveats...1 Assumptins...1 High-level prcess descriptin...2 Manual Prcess...2 Assumptins and Ntes... 2 Prcess... 3 Autmatin Script...4 Overview... 4 Caveats... 4 Usage... 4 Inputs... 5 Cmmand Line Optins... 8 Example Cmmand Line Invcatins... 8 i
Overview This dcument will describe: The high-level prcess fr cnfiguring the SAS Envirnment Manager Agent in a SAS Grid envirnment in which a shared directry has been used t deply SAS 9.4. A manual prcess fr cnfiguring the SAS Envirnment Manager Agent in a SAS Grid envirnment in which a shared directry has been used t deply SAS 9.4. The deply-ev-agents.sh script that has been develped t autmate the prcess f cnfiguring the SAS Envirnment Manager Agent in a SAS Grid envirnment in which a shared directry has been used t deply SAS 9.4. Caveats This dcument is fcused n SAS Grid deplyed n UNIX. This prcess des nt cver any f the manual pst-deplyment steps that must be run, such as starting the SAS Envirnment Manager Agents n the SAS Grid ndes. Hwever, the autmatin script des print a summary f the actins it perfrmed as well as any required pst-deplyment steps that must be perfrmed after the script successfully cmpletes. This infrmatin is printed t the screen just befre the script exits n a successful deplyment. This prcess des nt include creatin f SAS metadata sftware cmpnents fr newly created SAS Envirnment Manager Agents used by SAS Grid ndes. Assumptins 1. SAS has already been deplyed int a shared deplyment directry by running the SAS Deplyment Manager n the SAS Grid Cntrl Server. 2. All ther SAS Grid ndes have access t the shared deplyment directry via the same fully qualified path. 1
High-level prcess descriptin Stp the SAS Envirnment Manager Agent n the SAS Grid Cntrl Server. Fr every ther SAS Grid nde: Create a target directry fr the new agent. Cpy the agent directry structure int the target directry. Remve the agent data/ directry frm the target directry. Remve the agent lg/ directry frm the target directry. Create a backup f the agent prperty file in the target directry. Update the agent prperty file in the target directry. Create a backup f the SAS custm agent prperty file in the target directry. Link the SAS custm agent prperty file t the riginal SAS custm agent prperty file used n the SAS Grid Cntrl Server. Start the SAS Envirnment Manager Agent n the SAS Grid Cntrl Server Manual Prcess Assumptins and Ntes Envirnment variables are used in place f actual values fr the SAS Cnfiguratin Lev directry and the grid hst name t facilitate cpying and pasting the belw cmmands. The SAS Cnfiguratin directry (up t and including the cnfiguratin "Lev" directry) is lcated at $SAS_CONFIG. This prcess will nly cver a single SAS Grid nde. Additinal ndes wuld fllw a similar prcess. T clarify, when perfrming this prcess fr multiple ndes, the first and last steps (stpping and starting the riginal SAS Envirnment Manager Agent, respectively) nly ccur nce while all steps in between ccur fr every SAS Grid nde. The SAS Grid nde that we are cnfiguring the agent fr is $GRID_NODE. It is recmmended that the fully qualified hst name be used fr the actual value f $GRID_NODE. 2
Prcess Stp the SAS Envirnment Manager Agent n the SAS Grid Cntrl Server. $SAS_CONFIG/Web/SASEnvirnmentManager/agent-5.8.0-EE/bin/hq-agent.sh stp Create a target directry fr the new agent. mkdir -p $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE Cpy the agent directry structure int the target directry. cp -pr $SAS_CONFIG/Web/SASEnvirnmentManager/agent-5.8.0-EE $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE Remve the agent data/ directry frm the target directry. rm -rf $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent- 5.8.0-EE/data Remve the agent lg/ directry frm the target directry. rm -rf $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent- 5.8.0-EE/lg Create a backup f the agent prperty file in the target directry. mv $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent- 5.8.0- EE/cnf/agent.prperties.rig Update the agent prperty file in the target directry. sed "s/^agent.setup.agentip=.*/agent.setup.agentip=$grid_node/" $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties.rig > $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties ech >> $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties ech # Exclude the plugin that discvers the SAS Deplyment Agent >> $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties ech plugins.exclude=sas-deply-agent >> $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties 3
Create a backup f the custm agent prperty file in the target directry. mv $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/sas.prperties $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/sas.prperties.rig Link the custm agent prperty file t the riginal custm agent prperty file n the SAS Grid Cntrl Server. ln -s $SAS_CONFIG/Web/SASEnvirnmentManager/agent-5.8.0- EE/cnf/sas.prperties $SAS_CONFIG/Web/SASEnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/sas.prperties Start the SAS Envirnment Manager Agent n the SAS Grid Cntrl Server. $SAS_CONFIG/Web/SASEnvirnmentManager/agent-5.8.0-EE/bin/hq-agent.sh start Autmatin Script Overview deply-ev-agents.sh is a script that has been develped t autmate the prcess described abve. Caveats The script is a wrk-in-prgress and may be updated in its current lcatin withut prir ntice. While it is expected that this script shuld wrk n any UNIX system with an sh r bash shell, the script has nly been tested and verified t wrk n a 64-bit Linux system. Usage In its mst basic frm, the script requires tw inputs: 1. The lcatin f the SAS Cnfiguratin directry (up t and including the cnfiguratin "Lev" directry). 2. A list f ne r mre SAS Grid ndes fr which t deply the SAS Envirnment Manager Agent. 4
T see the usage statement, run the script with the -h ptin: %./deply-ev-agents.sh -h -------------------------------------------------- Usage:./deply-ev-agents.sh [-n] [-q] -c SAS_CONFIG_DIRECTORY NODE1 [NODE2... NODEN]./deply-ev-agents.sh -V./deply-ev-agents.sh h ------------------------------------------------- Inputs The script takes a number f inputs. Sme f thse inputs are required and thers are ptinal. All f the ptinal inputs default t sane values. Sme inputs can be specified either via an envirnment variable r a cmmand line ptin. Fr thse inputs, the cmmand line ptin takes precedence if bth the cmmand line ptin and the envirnment variable are specified. The table belw summarizes the script inputs: Descriptin Envirnmental Variable Cmmand Line Optin Default Value Fullyqualified path t SAS cnfiguratin directry (up t and including the cnfiguratin "Lev" directry) GRID_SAS_CONFIG -c NONE Extensin t use fr any backup files created by the script GRID_BACKUP_EXTENSION NONE.rig 5
Relative path t SAS EV Agent cntrl script GRID_EV_AGENT_CONTROL_SCRIPT NONE bin/hq-agent.sh Relative path t SAS EV Agent data directry GRID_EV_AGENT_DATA_DIRECTORY NONE data Relative path t deplyment rt created by script fr Agents used by SAS Grid ndes GRID_EV_AGENT_DEPLOY_ROOT NONE grid Agent identifier (als the name f the Agent rt directry) GRID_EV_AGENT_ID NONE agent-5.8.0-ee Name f prperty used t cnfigure Agent IP address r hst name GRID_EV_AGENT_IP_PROPERTY NONE agent.setup.agentip 6
Name f prperty used t cnfigure Agent plugins t be excluded GRID_EV_AGENT_PLUGINS_EXCLUDE_PROPERTY NONE plugins.exclude Relative path t SAS EV Agent lg directry GRID_EV_AGENT_LOG_DIRECTORY NONE lg Relative path t SAS EV Agent prperty file GRID_EV_AGENT_PROPERTY_FILE NONE cnf/agent.prperties Relative path t SAS EV Agent SAScustm prperty file GRID_EV_AGENT_SAS_PROPERTY_FILE NONE cnf/sas.prperties Agent cntrl script start cmmand GRID_EV_AGENT_START_COMMAND NONE start Agent cntrl script stp cmmand GRID_EV_AGENT_STOP_COMMAND NONE stp Relative path t SAS EV Agent cnfiguratin directry GRID_EV_CONFIG_DIRECTORY NONE Web/SASEnvirnmentManager 7
Cmmand Line Optins The table belw summarizes the cmmand line ptins fr the script. Sme f these ptins were discussed earlier in the inputs sectin. Optin Descriptin Required? Default Value -c Specify the SAS cnfiguratin directry (up t and including the cnfiguratin "Lev" directry) -n Execute the script in dry-run r "n execute" mde -q Execute the script in quiet mde; suppresses infrmatinal utput YES NO NO NONE -v Display versin infrmatin NO N/A -h Print the usage statement NO N/A Example Cmmand Line Invcatins Display usage statement:./deply-ev-agents.sh h Deply grid agents fr the fllwing SAS Grid ndes using a shared deplyment directry lcated at /shared/sascnfig/lev1: sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm./deply-ev-agents.sh -c /shared/sascnfig/lev1 sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm Run the script in dry-run mde t see the effects f running the abve cmmand:./deply-ev-agents.sh -n -c /shared/sascnfig/lev1 sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm 8
Deply grid agents fr the fllwing SAS Grid ndes using a shared deplyment directry lcated at /shared/sascnfig/lev1 and using the GRID_SAS_CONFIG envirnment variable t specify the SAS cnfiguratin directry: sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm GRID_SAS_CONFIG=/shared/SASCnfig/Lev1./deply-ev-agents.sh sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm Run the script in dry-run mde t see the effects f running the abve cmmand: GRID_SAS_CONFIG=/shared/SASCnfig/Lev1./deply-ev-agents.sh -n sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm. 9
T cntact yur lcal SAS ffice, please visit: sas.cm/ffices SAS and all ther SAS Institute Inc. prduct r service names are registered trademarks r trademarks f SAS Institute Inc. in the USA and ther cuntries. indicates USA registratin. Other brand and prduct names are trademarks f their respective cmpanies. Cpyright 2014, SAS Institute Inc. All rights reserved. 10