IRIS Home  
site map contact search  
data software stations and instrumentation  
You are here: IRIS > Software and Manuals > NetDC
 

NetDC manual [ back ] [ forward ]


10.0 NETDC INSTALLATION AND SETUP

NetDC is a software distribution that contains a number of source code directories, each with their own "makefiles" for building executables. There is also online documentation included. A running NetDC system will take shape with the data center's administrator building the system up from the NetDC distribution.

Installation and setup will involve the following steps:

  1. Creation of a NetDC user account with email reception capabilities
  2. Un-tar-ing the NetDC software package in an installation directory
  3. Creating a request processing directory
  4. Setting up an FTP directory for outgoing shipments
  5. Building the software executables
  6. Setting up soft links to executables
  7. Customizing interface code to local system
  8. Installing a ".forward" file for email processing
  9. Testing the NetDC installation

Let us discuss each step in detail:

  1. CREATION OF A NetDC USER ACCOUNT
  2. Ask your system administrator to set up a user account called "netdc". The account must be visible to the machine receiving email for NetDC and the account must also have a mail spool set up for it. The account will require a home directory and can run any startup shell desired. In order to make installation easy, the "netdc" username should be accessible to whoever installs and maintains the software, through such avenues as "login" or "su". Either the administrator of the NetDC software knows the password to the account or that person has root access and can just drop into the account. In the second case, the password can be an unknown value, for security purposes.

  3. UN-tar-ING THE NetDC SOFTWARE PACKAGE
  4. As user "netdc", copy the NetDC tar distribution file to a write-capable directory (like the "netdc" home directory) and type:

    tar -xvf <netdc_file>.tar

    where <netdc_file> is the base name of the tar file. The tar archive will extract to the local directory only. What is written are the source code directories from which the executables will be built. The directories you will see there are:

       date_calc	-- code for performing    date calculations
       doc			-- contains online documentation
       ftpcl			-- code for the ftp client
       netdc_req	--	the main code for NetDC…a majority of the functionality    can be found here   

    There may be other directories present, that will be provided with enhancements and upgrade to the code. In each of the source code directories, there is a file called "Makefile", that needs to be edited before running. This can be done after setting up the processing and FTP directories.

  5. CREATING A REQUEST PROCESSING DIRECTORY

    Find a write-capable directory to be used for request processing and type:

  6. mkdir requests

    Next type this:

    mkdir tables

    The routing table will be kept there, as well as a log file or processing activity. Next type:

    mkdir tmp

    This is a directory for writing temporary files. NetDC will do its best to keep the "tmp" and "requests" directories cleaned up, but it will pay to check in on it now and then to see if it needs files to be removed by hand.

  7. MAKE AN FTP DIRECTORY
  8. Set up a directory for shipments to be placed for anonymous FTP access. Make sure this directory is write-capable by the "netdc" username. Also, it is assumed that your site has its own cleanup methods in place for FTP directories to remove old files. The location of this FTP directory will be specified in the makefile for the main NetDC routines.

    Fig. 10.1 illustrates a typical anonymous FTP layout:


    Fig. 10.1 - anonymous FTP directory layout

  9. BUILDING THE SOFTWARE


  10. Proceed inside each of the source code directories that came with the distribution and do the following:

    1. Edit the makefile, changing just the variable settings so that they apply to your system environment. Take note of the directory settings that you have for your binary links, request processing, and FTP access. Also note that if your system specifications change in the future (new pathnames, new installation, name changes), the makefile needs to be edited and the executables rebuilt. Save these edits and return to the shell.
    2. Type: make
    3. If you get a "rm" error regarding not finding a "core" file or ".o" files, just ignore it. This is just noise from "make".
    4. Check to see that there are no compilation errors. If there are, it is possible that you need to do some fine-tuning with your compiler flags, specifying the proper compiler, and setting the proper environment variables for header files and libraries. There may be some system-specific conflicts that have to be rooted out in the source code, but the code was written to minimize this. Be sure that your compiler is ANSI C-compatible, because the code was written in this standard.
    5. You can leave the created binaries in their respective directories and have symbolic links point to them from your "bin" directory. The other alternative is to copy all of the executables to the "bin" directory.


  11. SET UP BINARY DIRECTORY
  12. In your NetDC home directory, type:

    mkdir bin

    This will be the directory where the binaries are referenced. This is referred to as BIN_DIR in the NetDC configuration makefiles. Inside, soft-links can be made to each of the executables that have been built in the source directories. This can be done by hand using the "ln" command, or done with a script that Is provided, called "setup_links.csh".

    In the NetDC home directory, you will find "setup_links.csh". To run it, simply type:

    ./setup_links.csh

    to have soft-links placed in the bin directory. This will include links to all files that have executable status.

    The other alternative is to copy all of the executables to the "bin" directory.

  13. CUSTOMIZING INTERFACE CODE TO LOCAL SYSTEM
  14. The installing administrator will have to do some customized coding to interface the NetDC request processing routines with their local data center's information base. The three main routines that will need to be customized are "process_inv", "process_resp", and "process_data". Example code is provided in C source format and it is recommended that this code is modified for use as opposed to writing the interface code from scratch. This code will be called from their respective "local" functions, which are represented in the source files "local_inv.c", "local_resp.c", and "local_data.c".

    More detail will be provided on interface code later in the manual.

  15. INSTALLING A ".forward" FILE

The ".forward" file is necessary for automated mail processing to take place. Simply use your text editor as user "netdc" and create a file called ".forward". Inside, enter just one line and save the file:

"|<BIN_DIR>/netdc_request"

where <BIN_DIR> is the full file path of your NetDC binary directory. Be sure to include the double-quotes. An example might look like this:

"/users/netdc/bin/netdc_request"

Then, type:

chmod 644 .forward

9. TESTING THE NetDC INSTALLATION

Once all of these steps have been followed through, including the building of the interface code and the placement of a .forward file, NetDC is ready for testing. Conduct tests along the following lines as a username other than "netdc":

      1. Mail an inventory request to the local site, asking for a list of data centers.
      2. Mail an inventory request to a remote site, asking for its list of data centers.
      3. Mail a request (for any kind of data), to the local site, requesting data for a network code that the local site supports.
      4. Mail a request to the local site for data that another site supports.
      5. Mail a request to a remote site for data that the local site supports.
      6. Mail a request to the local site requesting data for many different networks (note that a wildcard for the network code will only route to the local site).
      7. Perform the same request, but insist upon data merging.
      8. Mail the same request to another site and request data merging.

Acting in the role of a user requesting data, assess the feedback and the data returned to see that NetDC is working properly. Also be on the lookout for errors and watch the "netdc_activity.log" file (in the "tables" directory) for anything unusual. More will be described on troubleshooting and monitoring later in Chapter 12.0.


NetDC manual [ back ] [ forward ]

introduction •• overall concept •• request format •• request reception and delegation
datagrams •• local request processing •• inventory requests •• response requests
waveform requests •• product shipment •• installation and setup •• writing interface code
troubleshooting •• future implementations •• conclusion •• appendix A - summary of NetDC datagrams

 
About IRIS | Members | Programs | USArray | Seismic Monitor | Earthquakes | SeismoArchives
Mailing Lists | Stations | Data | Software | Publications | News | Contact | Site Map | Search

Incorporated Research Institutions for Seismology
1200 New York Ave NW • Suite 800 • Washington DC 20005
Phone: 202.682.2220 | Fax: 202.682.2444

Data Management Center
1408 NE 45th St. Suite 201
Seattle, WA 98105
Phone: 206.547.0393 | Fax: 206.547.1093
PASSCAL Instrument Center
100 East Road • Tech Industrial Park
New Mexico Tech • Socorro, NM 87801
Phone: 505.835.5070 | Fax: 505.835.5079

Send comments to the