server_environment.cfg

Package: WA2L/edrc 1.5.57
Section: Configuration Files (4)
Updated: 17 June 2008
Index Return to Main Contents

 

NAME

server_environment.cfg - configuration file for server_environment

 

SYNOPSIS

edrc/etc/server_environment.cfg

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

This is the configuration for the server_environment command.

 

FILEFORMAT

The fileformat is a list of definitions that have the format

NAME:Description:server_regex:Customer:

Rows starting with a # are considered as comments.

The definitions are processed in the sequence as listed in the configuration file. If a regular expression ( server_regex ) matches, the remaining definitions are not processed any more.

 

OPTIONS

NAME
Name of the environment. It has been proven as a good practice to use all capital letters for the environment name, but this is not imperative. Characters other then "a-zA-Z0-9_.,=%+-" are replaced by an underscore ( _ ) in the output.

Description
Free-form text to describe environment.

server_regex
Regular expression for server selection. If a servername passes the regular expression the related information (NAME, Description, Customer) is returned.

To test if a regular expression is working as expected, the command:

server_environment -s hostname

or

echo hostname | egrep "server_regex"

can be used.

Be aware, that the output of hostname(1) is checked against the server_regex when server_environment is called without the -s options.

Customer
Name of the customer. This has to be a single word that can be used as file- and directory name, too. Characters other then "a-zA-Z0-9_.,=%+-" are replaced by an underscore ( _ ) in the output.

 

EXAMPLES

1) normal example configuration file

This configuration file defines the six environments PRODUCTION, PREPRODUCTION, TEST, MAINTENANCE, BACKUP_BE and BACKUP_BB and is used in normal operations:

  #
  # etc/server_environment.cfg - cfg for server_environment in NORMAL OPERATION
  # etc/server_environment.cfg.NORMAL_OPERATION - cfg for server_environment in NORMAL OPERATION
  #
  # [00] 24.07.2004 CWa Initial Version
  #

  #
  #  Format:
  #    <NAME>:<Description>:<server_regex>:<Customer>:
  #
  PRODUCTION:GDC Bern, new PRODUCTION Environment:dcdbsi(2[0-1]|3[0-3]):ACME:

  PREPRODUCTION:GDC Balsberg, new PREPRODUCTION Environment:dcdbsi(50|6[1-2]|7[1-2]):ACME:
  TEST:GDC Balsberg, new TEST Environment:dcdbsi(6[3-4]|7[3-4]):ACME:
  MAINTENANCE:GDC Balsberg, new MAINTENANCE Environment:dcdbsi(60|70):ACME:

  BACKUP_BE:GDC Bern, BACKUP Environment:dcdbsi(05|10|4[0-1]):ACME:
  BACKUP_BB:GDC Balsberg, BACKUP Environment:dcdbsi(5[1-2]|8[0-1]):ACME:

2) disaster case configuration file

This configuration file defines the five environments PRODUCTION, TEST, MAINTENANCE, BACKUP_BE and BACKUP_BB and is used in a disaster case situation. This file replaces the file in example 1) during a disaster recovery where the PREPRODUCTION servers are used to host the PRODUCTION services.

Therefore the PREPRODUCTION definition disappeared and the PRODUCTION definition now contains the server_regex of the former PREPRODUCTION.

  #
  # etc/server_environment.cfg - cfg for server_environment in a DISASTER CASE
  # etc/server_environment.cfg.DISASTER_CASE - cfg for server_environment in a DISASTER CASE
  #
  # [00] 24.07.2004 CWa Initial Version
  #

  #
  #  Format:
  #    <NAME>:<Description>:<server_regex>:<Customer>:
  #
  PRODUCTION:GDC Balsberg, DISASTER CENTER Environment:dcdbsi(50|6[1-2]|7[1-2]):ACME:

  TEST:GDC Balsberg, new TEST Environment:dcdbsi(6[3-4]|7[3-4]):ACME:
  MAINTENANCE:GDC Balsberg, new MAINTENANCE Environment:dcdbsi(60|70):ACME:

  BACKUP_BE:GDC Bern, BACKUP Environment:dcdbsi(05|10|4[0-1]):ACME:
  BACKUP_BB:GDC Balsberg, BACKUP Environment:dcdbsi(5[1-2]|8[0-1]):ACME:

Due to the fact that server_environment reads the config file edrc/etc/server_environment.cfg it makes sense to create a symbolic link to the active configuration file if a disaster recovery situation has to be covered:

  [ /opt/edrc/etc ]
  [ root@dcdbsi30 ][*edrc*/bash]: ls -al server_environment.cfg*

  lrwxrwxrwx    Jan 28 23:01 server_environment.cfg -> server_environment.cfg.NORMAL_OPERATION
  -rw-r--r--    Feb 28 16:59 server_environment.cfg.DISASTER_CASE
  -rw-r--r--    Apr  2 13:32 server_environment.cfg.NORMAL_OPERATION

See also hostlist(3) and hostlist.cfg(4) for more information about the special usage in a disaster case.

 

SEE ALSO

edrcintro(1), server_environment(4), hostlist(3), hostlist.cfg(3), hostlist.dat(4), regexintro(3)

 

NOTES

-

 

BUGS

-

 

AUTHOR

server_environment.cfg was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2008 Christian Walther

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.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
FILEFORMAT
OPTIONS
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 00:14:24 GMT, March 08, 2025