SolarSoft

Upgrading an SSW installation

S.L.Freeland, freeland@sxt1.lmsal.com; August 3, 2000
Last Revision: R.D.Bentley; November 13 2000

One of the philosophical goals of SolarSoft is to provide a programming and analysis environment which is evolutionary and consistent at all remote institutions rather than stagnant and divergent. It follows that once you have executed the SSW Installation Procedure at your site, we strongly suggest that you attempt to keep the system up to date. The supported method makes use of the Perl application Mirror. The SSW general purpose library contains several related routines to assist you. The routine ssw_upgrade.pro generates the appropriate Mirror packages required to keep a local site up to date - local path names, proper Mirror switches, SSW host references, etc. are all encoded automatically. Driver routines are included in the distribution to simplify periodic execution of ssw_upgrade via. cron (UNIX) or at (Windows sytems). Daily scheduling of upgrades is suggested.

Running ssw_upgrade.pro

SSW Upgrade Prerequisites
Perl installed (at least Version 5)
Perl is a useful (and free) scripting language. Many users/machines will already have this independent of SSW; if you need to install it, follow the instructions in the Perl Note below.
Mirror
Mirror is a Perl application designed for maintaining identical directory tree contents between master and remote sites. Mirror uses standard ftp protocols and makes use of time stamp and size comparisons to enable incremental upgrades. A copy of Mirror is included with the SSW distribution package so you will already obtain a current version of this during your initial SSW installation. See the Mirror Note below.

Once you have Perl installed, we recommend that you first run ssw_upgrade.pro interactively from within an SSW IDL session - this way, potential Perl or Mirror problems can be traced prior to committing this to a cronjob. When calling ssw_upgrade, the /SPAWN switch is required to actually execute the Mirror - leaving the /SPAWN switch off will just generate the Mirror package but not execute it (useful for testing or Mirroring at a later date)

ssw_upgrade.pro interactive execution

;Calling Sequence:
   IDL> ssw_upgrade [, /INST1, /INST2, /INST3...] [,/spawn] , [,/loud]

; Interactive Calling Examples:
   IDL> ssw_upgrade, /gen, /loud [,/spawn]       ; just update $SSW/gen area
   IDL> ssw_upgrade, /eit, /sxt, /loud [,/spawn] ; update EIT and SXT and relavent GEN
                                                 ; (SSW/gen, yohkoh/gen, soho/gen)
   IDL> ssw_upgrade [,/spawn,/loud]              ; no instrument switches? then use
                                                 ;    $SSW_INSTR list to determine
                                                 ;    which paths to mirror

Periodic upgrades of SolarSoft

Unix and Linux Systems - via cron

The main level routine go_update_ssw is provided for periodic ssw system maintenance - it includes a call to ssw_upgrade and sswdb_upgrade. Running go_update_ssw via a cronjob provides a simple way to keep your ssw site current. Note that this cronjob is piped through the script ssw_batch which provides generalized front end for executing IDL jobs in the background (under an SSW IDL environment)
You may define which SSW instruments branches are automatically maintained (updated) at your site by defining the instrument list in the file $SSW/site/setup/setup.ssw_upgrade. If that file exists, the SSW_INSTR list defined by it is preferentially used by go_update_ssw

>>> Step 1 Update your site configuration file

Edit the file $SSW/site/setup/setup.ssw_upgrade (create the one line file if you did not get a template file by that name). You need to include the desired instrument list in a line like...

      SSW_INSTR xxx, yyy, zzz     # extend or delete as required
   
where xxx, yyy, zzz = intruments or packages in {eit, mdi,lasco, sxt, trace, chianti, etc}
[instrument list can be space or comma delimited list, embeded blanks or quotation marks ignored]

Example of a 'typical' line within $SSW/site/setup/setup.ssw_upgrade

      SSW_INSTR eit, sxt, trace, mdi, binaries, chianti  # SSW branches updated via cronjob
   

>>> Step 2 Update the crontab file

Add a line in your crontab file to execute go_update_ssw at the desired time. The line should look something like:

     MM HH * * * /LOCALSSW/gen/bin/ssw_batch go_update_ssw /LOCALSSW/site/setup/update_ssw.log
    
where MM HH is the desired time (MM=minutes, HH=hours) to kick off a once-a-day update and /LOCALSSW is your local pathname for $SSW

Example of a 'typical' crontab line to update SSW tree at 2:30 a.m. At this site, $SSW <=> /ssw

     30 2  * * * /ssw/gen/bin/ssw_batch go_update_ssw /ssw/site/setup/update_ssw.log

Windows (NT/95/98) Systems

Instructions for updating SSW under Windows are given here.

A description on automatic updating of SSW under Windows (via AT) is coming soon. At the moment, it is not clear if this will be possible under Windows 98.


Perl Note
UNIX/Linux systems:
If you do not already have Perl on your Unix system, you can download a copy here.

The current SSW version of Mirror assumes that Perl is located at pathname /usr/local/bin/perl If it is not at that location, put a symbolic link there pointing to where your Perl actually resides - you can use the following command, running from the root account
# ln -s /your_perl_path /usr/local/bin/perl

Windows (NT/95/98) systems:
If you do not already have Perl on your Windows system, follow the instructions on installing it here.

The page creating the update .bat file assumes that Perl executable (perl.exe) resides at one of the following locations:

A planned future revision of the SSW upgrade process would hunt around for Perl a little harder if it is not found in one of the above locations.

Mirror Note

You get a free version of Mirror in the SSW tree ($SSW/gen/mirror/mirror.pl) which ssw_upgrade will try to use if you don't explicitly pass a desired local mirror command.

------------------------------------------------------------------

freeland@penumbra.nascom.nasa.gov

------------------------------------------------------------------