NetDRMS Installation Version 9.1

Installing or Upgrading to NetDRMS Version 9.1



This is a full release for development and testing of analysis modules and applications built on the DRMS and SUMS libraries at JSOC and cooperating NetDRMS sites.

These instructions are for downloading and building a new version of NetDRMS. This includes building your initial version. They are intended both for NetDRMS site administrators who will be providing the services, and for individual users who wish to have their own version of the library for development or for reference.

Upgrading from an Earlier Release

  1. Move or copy the contents of your current DRMS root directory, e.g. /usr/local/drms or $HOME/drms (hereinafter referred to as $DRMS), to another location for safekeeping. You may want to run make clean in that directory, just to save space. The $DRMS directory into which you will donwload the NetDRMS distribution should be empty.
  2. Download the current NetDRMS Distribution, a gzipped tarfile, and unpack it into your $DRMS root directory:
  3. For detailed instructions on setting up the local configuration file config.local and other issues, you should contact Art Amezcua.
  4. In the target root directory $DRMS, run
      ./configure
    
    This builds a set of links for include files, man pages, scripts, and jsd (JSOC Series Descriptor) files in common subdirectories below the root. It also generates a custom.mk file appropriate for your site. If different compilers are present in your path, icc is used in preference to gcc and ifort to gfortran. If none of these compilers is in your path but you have an equivalent alternative, such as gfortran43 instead of gfortran, you can either make a link of the real compiler to the canonical name, or manually modify the scripts make_basic.mk and moreconfigure.pl before running the configure script. If you wish to use a different compiler from the preferred one, such as gcc rather than icc (assuming both are available), edit the generated custom.mk accordingly after running the configure script.
  5. In the root directory $DRMS, type make. If all goes well, the directory $DRMS/bin/arch_name will be created and filled, likewise the library directory $DRMS/lib/arch_name. If you are building on multiple architectures, repeat this step on each one. (You may have to rerun configure with a different config.local file if the paths are different on the different machines; in that case it would be a good idea to link your $DRMS/config.local to ones in /usr/local for example.)
Before you can run the newly built binaries, someone (the database manager) must create an additional table, drms.minvers in the DRMS database. This can be done by running the following psql commands:
  CREATE TABLE drms.minvers (minversion text DEFAULT '1.0' NOT NULL);
  GRANT SELECT ON drms.minvers TO public;
  INSERT INTO drms.minvers (minversion) VALUES ('1.0');

These instructions should suffice for all users except the DRMS/SUMS manager (production user), who needs to rebuild and restart the SUMS server. The manager should continue with the next steps:

  1. Run make sums in the $DRMS root directory. (This only needs to be done once for the system; individual users do not need to do it.)
  2. If the sum_export_svc process is running, kill it.
  3. Restart the SUMS server:
      $DRMS/scripts/sum_stop
      $DRMS/scripts/sum_start
    
    (You may need to provide a -f flag to the sum_stop script to force a stop if there are pending or hanging processes.)
  4. If you are using remote SUMS for mirrored data, restart the sum_export_svc process:
      source ~/.ssh-agent_rs
      $DRMS/scripts/sum_export_svc &
    

Installing NetDRMS for the First Time

The configuration and compilation of NetDRMS described here can proceed largely independently of the site and/or user setup, which only needs to be done once. It is recommended that the site setup be done first, as the NetDRMS build requires the definition of certain site-dependent names, such as those of the database and server; however, if these names are already known, the libraries can be built without the database and SUMS storage in place. Any code that requires access to the database will not of course function until the DRMS and SUMS services have been set up.

These instructions assume that there is already a NetDRMS database server and associated SUMS server that you can connect to. If that is not the case, then you or someone else at your site will first have to do a Site Installation. You must also have the PostgreSQL Core installed at least as a client library on any machine on which you intend to build the package. You should have psql in your path.

  1. Download the NetDRMS Distribution. This is a gzipped tarfile. Unpack it into a target root directory of your choice, e.g. /usr/local/drms or $HOME/drms. The size of the source distribution is currently (V 9.1) about 13 MB. A built system (including SUMS) is typically about 320 MB.
  2. In the target root directory (hereinafter referred to as $DRMS), you must supply a config.local file describing your site configuration. If V 8.7 or higher has been installed by your site administrator, you should simply copy or link to their version of the file. For site administrators:

    If you had not previously installed a V 8.7 release or higher, you should create the config.local file fresh. You can do so either by copying one from the file config.local.template and editing it to supply the appropriate values, or by running the perl script netdrms_setup.pl which will walk you through the fields. (That script has not been widely tested, and might require some tweaking. In particular it tries to execute some additional scripts at the end that are not yet in the release.)

    Most of the entries in the file should be self-explanatory. It is essential that the first variable, LOCAL_CONFIG_SET be changed from NO or commented out. Other variables that are almost certain to require changes are DBSERVER_HOST, DRMS_DATABASE, SUMS_SERVER_HOST, and DRMS_SITE_CODE. If you intend to export as well as import data, your DRMS_SITE_CODE must be registered. See the site code page for a list of currently assigned codes.

    However, you create your config.local file, it is a good idea to save a copy in a directory outside your $DRMS directory; the SUMS_LOG_BASEDIR would be a good place to keep it if you are the SUMS_MANAGER. Other users' config.local files should match that of the SUMS_MANAGER in any case.
  3. In the target root directory $DRMS, run
      ./configure
    
    This simply builds a set of links for include files, man pages, scripts, and jsd (JSOC Series Descriptor) files in common subdirectories below the root. Note that it is a csh script. If you do not have csh or tcsh installed on your system, you will have to make those links yourself. (Chances are that you will have to perform the whole site configuration by hand.)
  4. The NetDRMS distribution is currently supported for two target architectures under Linux, named (by default): The distribution has been built on both Enterprise Linux versions 4 and 5. Enterprise 5, has a system bug that needs to be fixed in order to build the SUMS server (it does not affect the DRMS client.) See platform notes for instructions on how to fix this bug.

    If you are making on any other architecture, the target name will be custom. Binaries and libraries will be placed in appropriate subdirectories based on these names. If you will be making on multiple architectures, or if you wish to change the target architecture name, you should either add the following line near the beginning of the file $DRMS/make_basic.mk
      JSOC_MACHINE = name
    
    or set your environment variable JSOC_MACHINE to name before running the make. The latter is recommended for future use, so that you can set appropriate paths in your login or shell initialization scripts.
  5. If necessary, edit the file $DRMS/make_basic.mk to set your compiler options. The default compilers for Linux are the Intel compiler icc and ifort if available; otherwise gcc and gfortran. If you prefer to use different compilers, change the following two lines in the file accordingly:
      COMPILER = icc
      FCOMPILER= ifort
    
    Note that the DRMS Fortran API requires a Fortran 90 compiler. The Fortran compiler is only required if you wish to build Fortran modules that will link against the DRMS library; nothing in the DRMS and SUMS internals and applications uses Fortran. Besides ifort, the gfortran43 compiler should work; there may be a problem with f95. For Macs, the default compiler is gcc. Note that you can only build on a system on which the Postgres SQL Client Applications libraries exist (e.g. libecpg.a). You will also require the OpenSSL secure sockets toolkit; You should have a /usr/include/openssl directory or equivalent on your system where the compiler can locate it by default.
    N.B. If you are using the icc compiler, it is recommended to use version 11 . There are some very nasty bugs using version 10.*.
  6. In the root directory $DRMS, type make. If all goes well, the directory $DRMS/bin/arch_name will be created and filled, likewise the library directory $DRMS/lib/arch_name. If you are building on multiple architectures, repeat this step on each one, being careful to observe the rules in the previous three steps.

These instructions should suffice for all users except the manager who needs to initialize the database and/or start the SUMS server. If you do not need to start a SUMS server, you are done. The SUMS manager (production user) should continue with the next step.

  1. To make the SUMS server available, the SUMS manager (only) needs to run make sums in the DRMS root directory. This only needs to be done once for the system; individual users do not need to do it.

At this point, if you are the SUMS manager, you are ready to proceed with the configuration, build and start of SUMS services. Proceed to the SUMS setup instructions. Otherwise you are ready to go.


Valid HTML 4.01 Strict 24 Aug 2017, 07:23-0700