Technical Paper Installing and Cnfiguring Envirnment Manager in a Grid Envirnment with a Shared Cnfiguratin Directry Last Mdified: January 2018
Release Infrmatin Cntent Versin: January 2018. Trademarks and Patents Institute Inc., Campus Drive, Cary, Nrth Carlina 27513. and all ther Institute Inc. prduct r service names are registered trademarks r trademarks f 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 Definitins...1 Assumptins...1 High-level prcess descriptin...1 Autmatin Script...2 Overview... 2 Caveats... 2 Usage... 2 Inputs... 3 Cmmand Line Optins... 6 Example Cmmand Line Invcatins... 7 Manual Prcess...7 Assumptins and Ntes... 7 Prcess... 8 i
Overview This dcument is intended nly fr custmers wh have a Grid envirnment with a shared cnfiguratin directry and a shared hme directry. This dcument describes: The high-level prcess fr cnfiguring the Envirnment Manager Agent in a Grid envirnment in which a shared cnfiguratin directry has been used t deply 9.4. The deply-ev-agents.sh script that has been develped t autmate the prcess f cnfiguring the Envirnment Manager Agent in a Grid envirnment in which a shared cnfiguratin directry has been used t deply 9.4. A manual prcess fr cnfiguring the Envirnment in a Grid envirnment in which a shared cnfiguratin directry has been used t deply 9.4. Definitins These terms are used in this dcument: Grid Cntrl Server r Grid Master Nde this machine cntrls distributin f jbs t the grid. This is the machine n which the Deplyment Wizard cnfigured sftware, and is als the machine n which the Envirnment Manager Enablement Kit scripts execute. Grid ndes these machines are grid cmputing resurces that are capable f receiving the wrk that is being distributed t the grid ndes. Assumptins has already been deplyed int shared cnfiguratin directries (Hme and Cnfig) by running the Deplyment Wizard n the Grid Cntrl Server. All ther Grid ndes have access t the shared cnfiguratin directry via the same fully qualified path. The Grid Cntrl Server shuld have nly ne Envirnment running n it, lcated at $_CONFIG/Web/EnvirnmentManager/agent-5.8.0-EE/bin/hq-agent.sh High-level prcess descriptin Stp the Envirnment n the Grid Cntrl Server. On the Grid Cntrl Server, 1
change t the directry that cntains the Envirnment. Fr every ther 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 cnf/agent.prperties file in the target directry. Update the agent.prperties file in the target directry. Create a backup f the custm agent prperty file (cnf/sas.prperties) in the target directry. Link the custm agent prperty file t the riginal custm agent prperty file used n the Grid Cntrl Server. Start the Envirnment n the Grid Cntrl Server. The default path fr the cmmand is $_CONFIG/Lev1/Web/EnvirnmentManager/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 f installing and cnfiguring Envirnment Manager n a Grid system with shared cnfiguratin directries (Hme and Cnfig). The script is available frm http://supprt.sas.cm/rnd/scalability/grid/ev/sasev.html. Caveats The prcess f running the deply-ev-agents.sh script des nt include any f the manual pst-deplyment steps that yu must run, such as starting the Envirnment s n the 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. The script is a wrk-in-prgress and may be updated in its current lcatin withut prir ntice. Althugh it is expected that this script shuld wrk n any UNIX system with a 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: 2
1. The lcatin f the Cnfiguratin directry (up t and including the cnfiguratin LevN directry). 2. A list f ne r mre Grid ndes fr which t deply the Envirnment. 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 _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. This table summarizes the script inputs: Descriptin Envirnmental Variable Cmmand Line Optin Default Value Fully- qualified path t cnfiguratin directry (up t and including the cnfiguratin "LevN" directry) GRID CONFIG -c NONE Extensin t use fr any backup files created by the script GRID_BACKUP_EXTENSION NONE.rig 3
Descriptin Envirnmental Variable Cmmand Line Optin Default Value Relative path t Envirnment cntrl script GRID_EV_AGENT_CONTROL_SCRIPT NONE bin/hq-agent.sh Relative path t Envirnment data directry GRID_EV_AGENT_DATA_DIRECTORY NONE data Relative path t deplyment rt created by script fr Envirnment Manager agents used by Grid ndes GRID_EV_AGENT_DEPLOY_ROOT NONE grid Envirnment identifier (als the name f the agent rt directry) GRID_EV_AGENT_ID NONE agent-5.8.0-ee Envirnment IP address r hst name GRID_EV_AGENT_IP_PROPERTY NONE agent.setup.agentip 4
Descriptin Envirnmental Variable Cmmand Line Optin Default Value Name f prperty used t cnfigure Envirnment plugins t be excluded GRID_EV_AGENT_PLUGINS_EXCLUDE_PROPERTY NONE plugins.exclude Name f prperty used t cnfigure Envirnment plugins t be included GRID_EV_AGENT_PLUGINS_INCLUDE_PROPERTY NONE plugins.include Relative path t Envirnment lg directry GRID_EV_AGENT_LOG_DIRECTORY NONE lg Relative path t Envirnment prperty file GRID_EV_AGENT_PROPERTY_FILE NONE cnf/agent.prperties Relative path t Envirnment custm prperty filer GRID_EV_AGENT PROPERTY_FILE NONE cnf/sas.prperties Envirnment cntrl script start cmmand GRID_EV_AGENT_START_COMMAND NONE start 5
Descriptin Envirnmental Variable Cmmand Line Optin Default Value EV agent cntrl script stp cmmand GRID_EV_AGENT_STOP_COMMAND NONE stp Relative path t EV agent cnfiguratin directry GRID_EV_CONFIG_DIRECTORY NONE Web/EnvirnmentManager Cmmand Line Optins This table 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 cnfiguratin directry (up t and including the cnfiguratin "LevN" 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 6
Example Cmmand Line Invcatins Display usage statement:./deply-ev-agents.sh h Deply grid agents fr the fllwing Grid ndes using a shared deplyment directry lcated at /shared/cnfig/lev1: sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm./deply-ev-agents.sh -c /shared/cnfig/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/cnfig/lev1 sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm Deply grid agents fr the fllwing Grid ndes using a shared deplyment directry lcated at /shared/cnfig/lev1 and using the GRID CONFIG envirnment variable t specify the cnfiguratin directry: sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm GRID CONFIG=/shared/Cnfig/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 CONFIG=/shared/Cnfig/Lev1./deply-ev-agents.sh -n sasgrid01.sas.cm sasgrid02.sas.cm sasgrid03.sas.cm Manual Prcess Assumptins and Ntes Envirnment variables are used in these steps in rder make it easier t cpy the cmmands. The $_CONFIG variable represents yur cnfiguratin directry (including the LevN directry). The $GRID_NODE variable represents the fully qualified hst name f a grid nde. These variables are nt defined in 7
a cnfiguratin file. Yu must manually replace the variables with the values fr yur envirnment when yu cpy the cmmand. This prcess cvers nly a single Grid nde. Additinal ndes fllw a similar prcess. When perfrming this prcess fr multiple ndes, the first and last steps (stpping and starting the riginal Envirnment, respectively) nly ccur nce while all steps in between ccur fr every Grid nde. If the Grid ndes use multiple NICs r hstname aliasing, see Manually Specifying Hstnames and IP Addresses in Envirnment Manager User s Guide, Third Editin. Prcess 1. Stp the Envirnment n the Grid Cntrl Server. $_CONFIG/Web/EnvirnmentManager/agent-5.8.0-EE/bin/hq-agent.sh stp 2. Create a target directry fr each Grid nde s new agent in the grid shared file space. Nte: Yu must cmplete the steps listed belw fr each Grid nde. mkdir -p $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE 3. Cpy the agent directry structure int the target directry. cp -pr $_CONFIG/Web/EnvirnmentManager/agent-5.8.0-EE $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE 4. Remve the agent data/ directry frm the target directry. rm -rf $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent- 5.8.0-EE/data 5. Remve the agent lg/ directry frm the target directry. rm -rf $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent- 5.8.0-EE/lg 6. Create a backup f the agent.prperties file in the target directry. mv $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties.rig 7. Update the agent.prperties file in the target directry. sed "s/^agent.setup.agentip=.*/agent.setup.agentip=$grid_node/" $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties.rig > 8
$_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties ech "" >> $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties ech "# Include nly Envirnment Manager plugins fr Grid ndes" >> $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties ech "plugins.include=sas-servers,hqagent,sas-deply-agent" >> $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/agent.prperties 8. Create a backup f the custm agent prperty file in the target directry. mv $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/sas.prperties $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/sas.prperties.rig 9. Link the custm agent prperty file t the riginal custm agent prperty file n the Grid Cntrl Server. ln -s $_CONFIG/Web/EnvirnmentManager/agent-5.8.0- EE/cnf/sas.prperties $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0- EE/cnf/sas.prperties 10. Start the Envirnment n the Grid Cntrl Server. This instance f the agent is the nly ne that shuld be started frm the lcatin where the Deplyment Wizard installed the script. $_CONFIG/Web/EnvirnmentManager/agent-5.8.0-EE/bin/hq-agent.sh start 11. Start the Envirnment n each f the Grid ndes by running Envirnment Managers agent start script. Yu must run the hq-agent.sh start script frm the lcatin in the grid shared file space, and nt frm the lcatin where the Deplyment Wizard installed the script. $_CONFIG/Web/EnvirnmentManager/grid/$GRID_NODE/agent-5.8.0-EE/bin/hqagent.sh start. 9
T cntact yur lcal ffice, please visit: sas.cm/ffices and all ther Institute Inc. prduct r service names are registered trademarks r trademarks f Institute Inc. in the USA and ther cuntries. indicates USA registratin. Other brand and prduct names are trademarks f their respective cmpanies. Cpyright 2014, Institute Inc. All rights reserved. 10