Previous: Creating Madrigal experiments   Up: Madrigal admin guide   Next: User access logging

Other administrative tasks

Some other tasks a Madrigal administrator might need to do:

Contact the OpenMadrigal administrator if some other administrative issue arises.

Set private versus public access for Madrigal data files

This new feature of Madrigal allows data files to be made either publicly available, or restricted to a limited set of IP address listed in a file.

To disable this feature and make all your data public, run the following from the $MADROOT directory:

$MADROOT/bin/setAccess $MADROOT/experiments public 

To enable this feature, you must first create a file called "trustedIPs.txt" under MADROOT. This file should contain the IP addresses of hosts considered to be part of the private group, or partial IPs if whole sub-nets should be included. This file is not created during installation. Anyone whose browser's IP matches this list will be able to view files marked as private. For example, if trustedIPs.txt contains the line 132.197.*, any IP address that begins 132.197 will have private access.

Also, if the fileTab.txt file for that experiment can be overwritten by the web server, anyone whose browser's IP matches this list will be able to to change the access of any file between public and private from the madExperiments listing page.

To change a large number of experiments to be either public or private, run the following script from the $MADROOT directory:

$MADROOT/bin/setAccess dirPath [public || private] 

where dirPath is the full path name of any directory in $MADROOT/experiments, and the second argument is either public or private. This script will set all experiments in dirPath and below to be public or private.

The access permission for any given file is set in the fileTab.txt file. See metadata documentation for details.

Add site-specific links or text to the Madrigal homepage

If you want, you can now add some site-specific links or text to the Madrigal homepage on your site. The html you add will appear under the OpenMadrigal link in the left column of the page.

To add html, simply create a file in the MADROOT directory called siteIndex.html. This file should not contain any BODY, HEAD, or HTML tags - it should only contain html to be inserted. If you want to integrate your links in with the list above it, make your links list items as in the example below:

<LI><A HREF="http://jro.igp.gob.pe/english/index.htm">Jicamarca staff</A></LI>
<LI><A HREF="http://jro.igp.gob.pe/english/index.htm">Jicamarca news</A></LI>

After the siteIndex.html file is ready, cd to MADROOT and run the following script to install it:

tclsh configureHtml

To make a change, simply edit siteIndex.html and rerun the script above.

Allow or disallow user-added notes to experiments

This feature of Madrigal allows users to append notes from the madExperiments search results page. This feature is only enabled if the web-server has write permission in the particular MADROOT/experiments directory where the experiment data is located. To allow this feature for all data, set all directory permissions below MADROOT/experiments to be writable by the web server. To disallow this feature for all data, set all directory permissions below MADROOT/experiments to not be writable by the web server.

As mention under editing madrigal.cfg, the NOTESMANAGER parameter allows a user to be notified each time a note is added. This parameter can be commented out if no notification is required.

Modify settings in the madrigal.cfg file

The following settings in the madroot/madrigal.cfg file can be modified at any time and the changes will take effect immediately:

The following settings in the madroot/madrigal.cfg file can be modified, but the script madroot/configureHtml must be run afterwards for the changes to take effect:

Add documentation specific to your site to Madrigal documentation page

If you want to add any documentation pages specific to your site to the Madrigal documentation pages, simply put them in the directory madroot/doc/siteSpecific. If you do not yet have the file madroot/doc/siteSpecific.html, cp madroot/doc/siteSpecific_template.html to madroot/doc/siteSpecific.html. The edit madroot/doc/siteSpecific.html to contain links to your documents. These links will be in the form "siteSpecific/<your document name>".

Run " tclsh configureHtml" from the madroot directory to install these modified files on your web server.

The Site Specific Documentation link on the main documentation page will then take users to your siteSpecific.html page.

Add site-specific rules-of the-road to the Madrigal experiment page

By default, users see only the Cedar rules-of-the-road on the data access page when they first enter the Madrigal site. If you want your users to see rules-of the-road specific to your Madrigal site when the reach the Madrigal experiment page, simply create a text file with your rules called local_rules_of_the_road.txt in the madroot directory.

Copy entire experiment directories from one Madrigal site to another

If you want to copy data from one Madrigal site into yours (such as is done during the standard installation with the test data from Haystack) copy all the desired data from another Madrigal site into the appropriate directory in $MADROOT/experiments. Then follow these steps:

  1. cd $MADROOT
  2. ./configureExperiments
  3. $MADROOT/bin/updateMaster

The script configureExperiments automatically edits the metadata files, changing the site id to your site id. This same procedure also works for moving experiments between experiments[0-9]* directories.

Reset experiment start and end times according to data in the experiment files

Sometimes the experiment start and end times in the metadata (the expTab.txt file) are manually edited, and do not match the start and end times of the data found in the files. The script updateExpTimes.py will examine the start and end times of all the files in an experiment, and set the experiment metadata start and end times to be the earliest and latest times found. Usage:

$MADROOT/bin/updateExpTimes.py [experiment_directory]

If optional argument experiment_directory given, then it will only update all experiments found in that directory. Default is to update the entire database. Only default or real time files are used to determine the times. Example:

$MADROOT/bin/updateExpTimes.py $MADROOT/experiments/1998

will update all experiment times for the year 1998.

 

Registering interest in an experiment or an instrument

With Madrigal 2.6, users can register interest in an existing experiment or in an instrument. When a data file is updated in that experiment using the standard admin scripts, by default all users registered for that experiment or instrument are sent an email. To ensure that is possible, you simply need to make sure the files $MADROOT/metadata/userdata/regExp.txt and $MADROOT/metadata/userdata/regExp.txt are writable by the web server. If you get a request from a user to unregister them from an experiment or an instrument, simply delete that line with their email from that file.

Mounting additional hard drives to expand the experiments disc capacity

With Madrigal 2.6, administrators can expand the disc space available for experiments by mounting a directory named experiments[0-9]* in the Madroot directory. For example, you can add a directory called experiments2 in the Madroot directory and use it for a mount point for additional space for Madrigal experiments. After you create this additional mount, you will need to create a soft link in your web server document root with a soft link to that new directory. For example, say you do the following:

You can now make use of this new directory in two ways:

  1. You can move experiments or whole directory trees of experiments between different experiments[0-9]* directrories as described in Copy entire experiement directories section (remember to run configureExperiments and updateMaster afterwards). Note, however, the experiments with geophysical data should not be moved (years 1950, 1957, and 1963).
  2. When running the scripts createExpWithFile.py or createRTExp.py, use the --experimentsDirNum argument to choose the new directory to use. By default the base experiments directory will be used. In the example above, the option --experimentsDirNum=2 would cause experiments2 to be used.

Rebuild local cached HDF5 files

As described in the initial installation section, Madrigal creates cached HDF5 versions of all default Cedar files to improve performance. There is a file called MADROOT/cachedFiles.ini that allows an administrator to create these cached HDF5 files with extra derived parameters and formats in them. These can be set according the the instrument (kinst) and kind of data (kindat). If after installation, you decide you want to modify these cached HDF5 files, then do the following:

  1. Modify the MADROOT/cachedFiles.ini file (described in initial installation)
  2. run MADROOT/bin/createCachedFiles.py --overwrite

The full usage of createCachedFiles.py is

createCachedFiles.py [--inst=<instList>  --path=<expPath> --includeNonDefault --ini=<iniFile> --overwrite -h --help]
   By default all instruments will be included.  Use --inst=<comma delimited kinst list> to only include some instruments.
   By default, all experiment directories will be included.  Use --path to limit to a particular directory and all subdirectories.
   By default only default files will be cached.  Use --includeNonDefault to include all files.
   By default, extra parameters and formats are added by the ini file $MADROOT/cachedFiles.ini.  Use
 --ini=<iniFile> to specify an alternative ini file.  See madrigal.data.MadrigalFile._parseCachedIni for description of
 the ini file format.
 -h or --help - print usage and exit

 

Previous: Creating Madrigal experiments   Up: Madrigal admin guide   Next: User access logging