Between the OPTION, the = and the VALUE are no spaces.
Rows starting with a # are considered as comments.
You should not comment out any OPTION If you like to use default settings simply do not specify a VALUE.
Example: HOSTLIST="dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33"
Default: HOSTLIST=""
Example: HOSTGRPS="@ADM: adm_db1_mnt adm_db1_tst adm_db1_pre adm_db1_prod
@BE: dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32"
Default: HOSTGRPS=""
Example: CACHE=True
Default: CACHE=False
Example: CACHE_DEPENDENCY="etc/hostlist.cfg etc/hostlist.dat etc/server_environment.cfg"
Default: CACHE_DEPENDENCY="etc/hostlist.cfg etc/server_environment.cfg"
This configuration contains the servers in the environment (PRODUCTION) of an enterprise where WA2L/edrc is installed. If WA2L/edrc is installed in other environments (TEST, PREPRODUCTION), too, a specific edrc/etc/hostlist.cfg configuration file has to be defined for each environment.
# # Purpose of the different HOSTGRPS: # # @_DIST: Distribution group where edrc distributes when invoking the # edrc 'distribute' command. Do not use this group for manual # invocations of rcmd or filedist. # List of hosts / Groups of hosts # HOSTLIST="dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33" HOSTGRPS="@_DIST: dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33 "
To have a single edrc/etc/hostlist.cfg configuration file for all environments (TEST, PREPRODUCTION, PRODUCTION) in the enterprise the server_environment(3) command can be used in the configuration file. In this configuration file example the HOSTLIST definition is defined for each environment with the focus to the related environment and because the HOSTGRPS definition is identical for all environments it can be defined once. If HOSTGRPS are different for each environment it has to be defined for each environment, too.
# # Purpose of the different HOSTGRPS: # # @_DIST: Distribution group where edrc distributes when invoking the # edrc 'distribute' command. Do not use this group for manual # invocations of rcmd or filedist. # @ALL: All servers of the whole environment (MAINTENANCE, TEST, # PREPRODUCTION and PRODUCTION) # # Groups of hosts # HOSTGRPS="@_DIST: dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33 dcdbsi61 dcdbsi62 dcdbsi63 dcdbsi64 dcdbsi71 dcdbsi72 dcdbsi73 dcdbsi74 dcdbsi50 @ALL: dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33 dcdbsi61 dcdbsi62 dcdbsi63 dcdbsi64 dcdbsi71 dcdbsi72 dcdbsi73 dcdbsi74 " # List of hosts # case `server_environment` in PRODUCTION) HOSTLIST="dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33" ;; PREPRODUCTION) HOSTLIST="dcdbsi61 dcdbsi62 dcdbsi71 dcdbsi72" ;; TEST) HOSTLIST="dcdbsi63 dcdbsi64 dcdbsi73 dcdbsi74" ;; esac
The setup in this disaster recovery scenario is, that the PREPRODUCTION is used to recover the PRODUCTION environment to.
If the file /.DISASTER_CASE exists it is assumed that a DISASTER CASE SITUATION exists. In that case the list of hosts is returned that correlated to this situation. To make this happen the configuration edrc/etc/server_environment.cfg has to be replaced by a configuration file that returns PRODUCTION for the hosts being part of the former PREPRODUCTION environment.
# List of hosts / Groups of hosts # case `server_environment` in PRODUCTION) if [ -f /.DISASTER_CASE ]; then ## ## DISASTER CASE SITUATION ## All servers from the PREPRODUCTION are used to form the ## PRODUCTION environment. ## The HOSTGRPS are restricted PREPRODUCTION hosts to ## encapsulate the 'Disaster Recovery Environment' from ## the other environments during a 'Disaster Simulation' ## or a 'Disaster Case'. ## ## HOSTLIST="dcdbsi61 dcdbsi62 dcdbsi71 dcdbsi72" HOSTGRPS="@_DIST: dcdbsi61 dcdbsi62 dcdbsi71 dcdbsi72 dcdbsi50 @ALL: dcdbsi61 dcdbsi62 dcdbsi71 dcdbsi72 " else ## ## NORMAL OPERATION SITUATION ## HOSTLIST="dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33" HOSTGRPS="@_DIST: dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33 dcdbsi61 dcdbsi62 dcdbsi63 dcdbsi64 dcdbsi71 dcdbsi72 dcdbsi73 dcdbsi74 dcdbsi50 @ALL: dcdbsi20 dcdbsi21 dcdbsi30 dcdbsi31 dcdbsi32 dcdbsi33 dcdbsi61 dcdbsi62 dcdbsi63 dcdbsi64 dcdbsi71 dcdbsi72 dcdbsi73 dcdbsi74 " fi ;; : : esac
This is the definition as documented in edrcsetup(1m) of WA2L/edrc starting with release 1.5.43 and is also the configuration file contents that is distributed with the full application package from now on (see also: edrc/var/samples/hostlist/07/ and edrc/var/samples/hostlist/08/).
To define the hosts and groups in the hostlist.dat file, set the USE_HOSTLIST_DAT setting to True.
: : # Set USE_HOSTLIST_DAT to True, if hosts are listed in # the etc/hostlist.dat file, if hosts are defined directly # in etc/hostlist.cfg, set USE_HOSTLIST_DAT to False. # USE_HOSTLIST_DAT=True # Define the central administration environment in the # format CUSTOMER.NAME as defined in server_environment.cfg. # CMAN_ENVIRONMENT="Highlander.ADMIN" # Read hostlist.dat definitions as resolved. # if [ "$USE_HOSTLIST_DAT" = True ]; then case `server_environment -C`.`server_environment` in $CMAN_ENVIRONMENT) out=`hostlistdat2cfg -o -m MGRPS_LIST=@LINUX,@SOLARIS,@HPUX` ;; *) out=`hostlistdat2cfg -o` ;; esac . $out; removetemp -q -d `dirname ${out}`; return 0 fi # List of hosts when defined directly in the hostlist.cfg # file. # case `server_environment -C`.`server_environment` in WA2L.EDRC_DVLP) HOSTLIST=" " HOSTGRPS="@_DIST: @ALL: " ;; esac
This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.