533570744 TITLE GCS Environment Configuration User’s Guide Code : RPT/CTRL/0255-R Issue : 1.B Date : 05/09/2006 No. of pages : 18 Gran Telescopio de Canarias, S.A. Instituto de Astrofísica de Canarias Vía Láctea s/n 38200 - LA LAGUNA, TENERIFE, Islas Canarias Tfno +34 922 315 031 Fax +34 922 315 032 http://www.gtc.iac.es Centro Común de Astrofísica de La Palma Cuesta de San José s/n 38712 BREÑA BAJA, LA PALMA, Islas Canarias Tfno +34 922 425 720 Fax +34 922 425 701 E-Mail: gtc@iac.es Prepared by Daniel Galán Prados Control Group Signed in the original copy Jose Antonio Rodriguez Control Group Authorized by Signed in the original copy Pedro Alvarez Project Director Signed in the original copy Date: 10/10/06 2 Reference documents Nº R.1 R.2 R.3 R.4 R.5 R.6 R.7 Document tittle A development environment for the GTC Control System GTC Control System Common Service user’s guide Tornado User’s Guide VxWorks reference manual http://www.ntp.org http://www.nongnu.org/cvs/ http://www306.ibm.com/software/awdtools/purifyplus/ 3 Code RPT/CTRL/0073-R Issue 2.C NTE/CTRL/0267-R - 1.B - List of acronyms and abbreviations GDK GCS Development Kit GTC Gran Telescopio de Canarias GCS GTC Control System IDL Interface Definition Language 4 CONTENTS 1. SUMMARY....................................................................................................................... 7 2. GCS ENVIRONMENT CONFIGURATION FILES.................................................... 7 2.1 INTRODUCTION ................................................................................................................... 7 2.1.1 Solaris platform configuration file .............................................................................. 7 2.1.2 VxWorks platform configuration files ......................................................................... 7 2.1.3 Setting the GCS environment ...................................................................................... 7 2.2 SOLARIS PLATFORM ............................................................................................................ 8 2.2.1 2.2.1.1 Variables to change.............................................................................................................................. 8 2.2.1.1.1 GCS variables ................................................................................................................................ 8 2.2.1.1.2 CORBA variables .......................................................................................................................... 8 2.2.1.1.3 Persistence variables ...................................................................................................................... 9 2.2.1.1.4 Inspector variables ......................................................................................................................... 9 2.2.1.1.5 Compilation variables .................................................................................................................... 9 2.2.1.1.6 VxWorks/Tornado variables ........................................................................................................ 10 2.2.1.1.7 ObjectStore variables ................................................................................................................... 10 2.2.1.1.8 CVS variables .............................................................................................................................. 10 2.2.1.1.9 Purify variables ............................................................................................................................ 10 2.2.1.2 2.3 global.cfg..................................................................................................................... 8 Variables to not change...................................................................................................................... 10 2.2.1.2.1 GCS variables .............................................................................................................................. 10 2.2.1.2.2 Catalog variables ......................................................................................................................... 11 2.2.1.2.3 CORBA variables ........................................................................................................................ 11 2.2.1.2.4 Compilation variables .................................................................................................................. 12 2.2.1.2.5 VxWorks/Tornado variables ........................................................................................................ 12 2.2.1.2.6 CorbaScript variables ................................................................................................................... 12 2.2.1.2.7 Java variables ............................................................................................................................... 13 2.2.1.2.8 ObjectStore variables ................................................................................................................... 13 2.2.1.2.9 Purify variables ............................................................................................................................ 13 VXWORKS PLATFORM ...................................................................................................... 14 2.3.1 gcs_environment.vx ................................................................................................... 14 2.3.2 gcs_network.vx .......................................................................................................... 14 5 2.3.3 gcs_libraries.vx ......................................................................................................... 14 2.3.4 <lcu_name>_boot.vx ................................................................................................ 15 2.4 DEFAULT VALUES OF VARIABLES FROM CONFIGURATION FILES ..................................... 15 2.4.1 global.cfg................................................................................................................... 15 2.4.2 gcs_environment.vx ................................................................................................... 17 2.4.3 gcs_network.vx .......................................................................................................... 18 2.4.4 gcs_libraries.vx ......................................................................................................... 18 2.4.5 <lcu_name>_boot.vx ................................................................................................ 18 6 1. SUMMARY This document describes the environment configuration for the GTC Control System (GCS) software. This environment shall be used and properly configured by all developers that work with the GCS Development Kit (GDK). 2. GCS ENVIRONMENT CONFIGURATION FILES 2.1 Introduction In order to use the GCS, there is a set of environment variables that must be set. They are defined in different configuration files, depending on the platform, allowing for easy customization of the developer’s environment. External developers must edit those files in order to adapt them to their home installation of the GCS Development Kit (GDK). 2.1.1 Solaris platform configuration file For Solaris platform the default configuration file is the global.cfg. It is located in the etc directory of the GCS installation. The environment variables are applied by running the tool nrp. The runtime platform is also defined after the execution of this script (see R.1). There are variables which only make sense for GCS internal developers i.e. GCS Group. For instance, CVSROOT points to a local directory and, if external developers use cvs, they must either redefine it or comment it out. Other variables point to local installations of external packages. They obviously must be redefined. 2.1.2 VxWorks platform configuration files In order to develop or use VxWorks platform, it is needed the setting of other four files, apart from the global.cfg: gcs_environment.vx, gcs_network.vx, gcs_libraries.vx and <lcu_name>_boot.vx. Those files are placed in the ${GCS}/etc/vxscripts. The environment variables are applied at boot time, after setting the full path name of <lcu_name>_boot.vx as the startup script. 2.1.3 Setting the GCS environment Whenever the user is to work with GDK, command nrp must first be executed. In order to set the environment, the runtime platform must be specified. That is, the environment cannot be set unless we know what platform we want it for. 7 A typical session would start by executing the following command: nrp –p solgnu This would set the GCS environment from the default configuration file for runtime platform solgnu, that is, GNU C++ compiler in Solaris. A non-default configuration file can be given at command line. 2.2 Solaris platform 2.2.1 global.cfg Environment variables included in global.cfg file (see 2.4.1 to know the default values). 2.2.1.1 Variables to change Variables that, most certainly, external developers shall have to change are: 2.2.1.1.1 GCS variables GCS This variable must point to the root directory of the GCS installation. GCSWORK This variable must point to the root directory of the developers work area, that is, where the modules are developed. GCS_VERBOSE This variable defines the verbose level of GCS traces. The default value, NO_TRACES, means no verbose at all and ALL_TRACES means that all traces are shown (see README.TXT of src_c++/gtc/SSL/Trace module and RELEASE_NOTES.TXT of src_java/gtc/AL/inspector). 2.2.1.1.2 CORBA variables NS_HOST This variable must point to the machine where the Name Service is running (See R.2). IFR_HOST This variable must point to the server that will host the Interface Repository. OR_HOST This variable must point to the server that will host the Operation Repository. LM_HOST This variable must point to the server that will host the Log Manager. MM_HOST 8 This variable must point to the server that will host the Monitor Manager. CM_HOST This variable must point to the server that will host the Config Manager. AM_HOST This variable must point to the server that will host the Alarm Manager. GCS_OPERATOR This variable is used to specify the user allowed to start/stop the common services. To disable this feature it must be assigned an empty string. The command ‘cs’ will use these variables to perform the required operation of the common services. 2.2.1.1.3 Persistence variables POOF_ROOT_DIR This variable must point to a directory where the POOF persistence mechanism places its files (See R.2). It is the default persistence mechanism. When ObjectStore database is employed, this variable is not used. DAL_ROOT_DIR This variable must point to a directory where the ObjectStore OODBMS places its database file. It only has to be set when ObjectStore has been properly installed. If the persistence mechanism employed is DAL_POOF, this variable is not used. 2.2.1.1.4 Inspector variables INSPECTOR_CONFIG_DIR This variable must point to the directory where the inspector configuration files are placed. In order to have one component tree for each developer, it has been defined ${MY_GCS}/etc/inspector. The specified directory also holds the definitions of the panels created by the user. 2.2.1.1.5 Compilation variables MAKE This variable defines the make utility used. SOL_COMPILER_BIN This variable must point to the directory where the C++ compiler for Solaris platform is placed. JAVA_RT This variable must point to the directory where the java virtual machine is placed. 9 2.2.1.1.6 VxWorks/Tornado variables CPU This variable defines the cross-compiler platform for VxWorks (see R.3). WIND_BASE This variable must point to the root directory of Tornado installation (see R.3). WIND_HOST_TYPE This variable defines the name of host type (see R.3). 2.2.1.1.7 ObjectStore variables OS_ROOTDIR This variable must point to the root directory of the ObjectStore OODBMS installation. 2.2.1.1.8 CVS variables CVSROOT This variable must point to the root directory of the master source repository. It is only set when the CVS version control system is used (See R.6). 2.2.1.1.9 Purify variables PURIFY_HOME This variable must point to the root directory of the purify tool installation. It is only set when the Purify is used (See R.7). 2.2.1.2 Variables to not change Variables that, most certainly, external developers won’t have to change are: 2.2.1.2.1 GCS variables EXT This variable must point to the root directory of external software used and distributed by the GCS. MY_GCS This variable must point to the development directory. It has a different value for each developer. MY_INCLUDE This variable must point to the directory where the headers are placed. MY_DOC This variable must point to the directory where the documentation is placed. MY_ETC 10 This variable must point to the directory where the configuration files are placed. MY_TOOL This variable must point to the directory where the tools are placed. MY_TESTS This variable must point to the directory where the test code is placed. MY_EXAMPLES This variable must point to the directory where the example code is placed. MY_LIB This variable must point to the directory where the libraries are placed. MY_BIN This variable must point to the directory where the binaries are placed. MY_VAR This variable must point to the directory where the temporal files are placed. MY_SRC_CPP This variable must point to the directory where the c++ source code is placed. MY_SRC_JAVA This variable must point to the directory where the java source code is placed. USER_PROFILES_DIR This variable must point to the directory where the user profile files are placed. 2.2.1.2.2 Catalog variables CATALOG_ROOT_DIR This variable must point to the root directory of catalogs used by the GCS. UA2_PATH This variable must point to the root directory of USNO-A2.0 catalog. TY2_PATH This variable must point to the root directory of TYCHO2 catalog. UCAC2_PATH This variable must point to the root directory of UCAC2 catalog. 2.2.1.2.3 CORBA variables NS_PORT This variable defines the port used by the Name Service (See R.2). 11 ORB_CONFIG_DIR This variable must point to the directory where the standard CORBA services, i.e. the Name Service and Interface Repository, place their temporary files (See R.2). TAO This variable must point to the root of ACE+TAO installation (See R.2). ORBACUS This variable must point to the root of ORBacus installation (See R.2). ACE_ROOT This variable must point to the root of ACE installation. Used by tao_ifr (See R.2). TAO_ROOT This variable must point to the root of TAO installation. Used by tao_ifr (See R.2) BASE_TCP_PORT_FILE This variable is used mostly in a development environment where several users must share the available range of TCP port numbers without clashing with one another. It is used by the Interface Repository service. In a real installation of the GCS (i.e. not used for development purposes) this variable need not be assigned. 2.2.1.2.4 Compilation variables MK This variable must point to the directory where the makefiles are placed. 2.2.1.2.5 VxWorks/Tornado variables LM_LICENSE_FILE This variable defines the licence files for Tornado (see R.3). WIND_REGISTRY This variable defines the registry host (see R.3). 2.2.1.2.6 CorbaScript variables CS_HOME This variable must point to the root directory of CorbaScript installation (See R.2). CS_CONFIG_HOMEDIR This variable is used by CorbaScript to locate its configuration files (See R.2). CS_BINDIR This variable must point to the directory where the CorbaScript executables are placed (See R.2). 12 CW_BINDIR This variable must point to the directory where the CorbaWeb executables are placed. This software is a generic gateway between HTTP servers and CORBA objects (See R.2). CSPATH This variable is needed by CorbaScript. It defines the list of paths where CorbaScript searches downloadable modules (See R.2). 2.2.1.2.7 Java variables JAVA_COMPILER This variable must point to the directory where the java compiler is placed. JAVA_IDL_COMPILER This variable must point to the directory where the java idl compiler is placed. JAVA_IDL_JAR_FILE This variable must point to the directory where the java idl jar file is placed. JAVA_SOURCE_DIR This variable must point to the root directory where the java sources are placed. JAVA_CLASS_DIR This variable must point to the target directory where the java class files are created. 2.2.1.2.8 ObjectStore variables OS_META_SCHEMA_DB This variable must point to the ObjectStore meta-schema database. The metaschema database, metaschm.db, which is shipped with ObjectStore, describes hidden internal types and is needed for operations such as data browsing, schema evolution, database verification, and the Metaobject Protocol (MOP). 2.2.1.2.9 Purify variables PURIFY_LIB This variable must point to the directory in which purify library is placed. ACE_PURIFY_DIR This variable must point to the directory in purify headers are placed. PURE_CACHE_DIR This variable must point to the directory in which Pure products will produce instrumented libraries. 13 2.3 VxWorks platform 2.3.1 gcs_environment.vx All its variables must be adapted to the specific site. A part of this file is composed by the subset of environment variables of global.cfg needed to work on VxWorks: GCS See 2.2.1.1.1. MY_GCS See 2.2.1.2.1. ORB_CONFIG_DIR See 2.2.1.2.3. GCS_VERBOSE See 2.2.1.1.1. NameServiceIOR This variable is used from GCS 0.6 on as the Name Service CORBA reference in the corbaloc format (See R.2). It is defined to the following value : "corbaloc:iiop:1.2@${NS_HOST}:${NS_PORT}/NameService", replacing ${NS_HOST} and ${NS_PORT} by their values. Aditionally, there are specific VxWork variables : TIMEZONE This variable specifies the section of R.4). timezone information (See ansiTime entry of library TS_AUX_NTP_SERVER The variable defines the host where the NTP server is running. (see R.5) TS_MASTER_TIME_SERVER The variable defines the host where the master time server is running. (see R.5) 2.3.2 gcs_network.vx This file must include: The IP address of hosts where the Common Services are running. The host and the mount point where the GDK run time has been installed. 2.3.3 gcs_libraries.vx This file must include: External libraries. 14 SSL libraries. DSL libraries. 2.3.4 <lcu_name>_boot.vx This file must include: The load of GCS environment. The load of application specific libraries. The load of examples (optional). The load of tests (optional). StartLCU(1). 2.4 Default values of variables from configuration files 2.4.1 global.cfg VARIABLE DEFAULT VALUE ACE_PURIFY_DIR ${PURIFY_HOME} ACE_ROOT ${TAO}/build AM_HOST simserver1 BASE_TCP_PORT_FILE ${GCS}/var/UserTcpPortFile CATALOG_ROOT_DIR /sbase/gcs/catalogs CM_HOST simserver1 CSPATH .:${MY_ETC}/CorbaScript: ${GCS}/etc/CorbaScript: ${CS_HOME}/modules CS_BINDIR ${CS_HOME}/bin CS_CONFIG_HOMEDIR ${MY_VAR} CS_HOME ${EXT}/CorbaScript CPU PPC604 CVSROOT /sbase/gcs/GCS CW_BINDIR $CS_HOME/CorbaWeb/bin DAL_ROOT_DIR /db/daldb 15 EXT ${GCS}/ext GCS /opt/gcs GCSWORK /work GCS_VERBOSE NO_TRACES IFR_HOST simserver1 INSPECTOR_CONFIG_DIR ${MY_GCS}/etc/inspector JAVA_COMPILER ${JAVA_RT}/bin/javac JAVA_CLASS_DIR ${MY_GCS}/lib/jvm/classes JAVA_DOC_DIR ${MY_GCS}/docs JAVA_IDL_COMPILER ${JAVA_RT}/bin/idlj JAVA_IDL_JAR_FILE ${MY_GCS}/lib/jvm/java_idls.jar JAVA_SOURCE_DIR ${MY_GCS}/src_java JAVA_RT ${JAVA_RT:-/usr/local/java} LM_HOST simserver1 LM_LICENSE_FILE ${WIND_BASE}/.wind/license/WRSLicense.lic: ${WIND_BASE}/rti/flex_license.dat: ${LM_LICENSE_FILE} MAKE /usr/local/bin/gnumake MK ${GCS}/makefiles MM_HOST simserver1 MY_BIN ${MY_GCS}/bin MY_ETC ${MY_GCS}/etc MY_EXAMPLES ${MY_GCS}/examples MY_DOC ${MY_GCS}/docs MY_GCS ${GCSWORK}/${LOGNAME} MY_INCLUDE ${MY_GCS}/include MY_LIB ${MY_GCS}/lib MY_TESTS ${MY_GCS}/tests MY_TOOL ${MY_GCS}/tools MY_VAR ${MY_GCS}/var NS_HOST simserver1 16 NS_PORT 12008 GCS_OPERATOR gcsop OS_META_SCHEMA_DB devserver1:/usr/local/ostore/ostore/lib/metaschm.db OS_ROOTDIR /usr/local/ostore/ostore OR_HOST simserver1 ORBACUS ${EXT}/ORBacus ORB_CONFIG_DIR ${GCS}/var POOF_ROOT_DIR /db/poofdata PURE_CACHE_BASE_DIR ${MY_GCS} PURE_CACHE_DIR ${MY_GCS} PURIFY_HOME /usr/local/purify PURIFY_LIB ${PURIFY_HOME} SOL_COMPILER_BIN /opt/SUNWspro/bin TAO ${EXT}/ACE+TAO TAO_ROOT ${TAO}/build TORNADO ${WIND_BASE} UA2_PATH ${CATALOG_ROOT_DIR}/usno-a2.0 UCAC2_PATH ${CATALOG_ROOT_DIR}/ucac2 TY2_PATH ${CATALOG_ROOT_DIR}/tycho USER_PROFILES_DIR ${GCS}/etc/profiles/users WIND_BASE /usr/local/tornado2.2 WIND_HOST_TYPE sun4-solaris2 WIND_REGISTRY devserver1 2.4.2 gcs_environment.vx VARIABLE DEFAULT VALUE GCS The same value as in the global.cfg GCS_VERBOSE ALL_TRACES MY_GCS The same value as in the global.cfg 17 NameServiceIOR corbaloc:iiop:1.2@simserver1:12008/NameService ORB_CONFIG_DIR The same value as in the global.cfg TIMEZONE GMT::0:032804:103104 TS_AUX_NTP_SERVER devserver2 TS_MASTER_TIME_SERVER devserver2 2.4.3 gcs_network.vx This file includes: hostAdd("simserver1", "161.72.19.10") hostAdd("simcon1", "161.72.19.17") nfsMount("devserver1", "/sbase/gcs/gcs", "/opt/gcs") 2.4.4 gcs_libraries.vx This file includes the load of the following libraries: External libraries. SSL libraries: o Basic libraries. o Device Drivers Kit (DDK) Libraries. DSL libraries: o Basic libraries. o CCD_Kit libraries. o DevLib Libraries. 2.4.5 <lcu_name>_boot.vx This file includes: The load of GCS environment, that is: gcs_environment.vx, gcs_network.vx and gcs_libraries.vx. The load of some devices to test the GDK installation on Vxworks. 18