Adding Local Assets - StormSurgeLive/asgs GitHub Wiki

Introduction

Users may add locally maintained resources, that includes:

  • Platforms
  • Meshes
  • Remote file servers (for us with output/opendap_post2.sh)
  • Supported versions of ADCIRC via locally maintained Patch Sets

The basic idea is that there is a single local directory maintained somehow that mirrors the directory structure of the upstream ASGS repository. All resources must be contained in a single local directory; and this directory is tracked internally via the environmental variable, ASGS_LOCAL_DIR. This environmental variable is set when first building asgs via init-asgs.sh's -L option.

(Side Note: alternatively, -p may be used, but is not as good of a neumonic).

Initializing Local Support

Local support may be enabled when first building ASGS or in an already existing installation of ASGS. Each scenario is covered in the following sections.

New ASGS Installations

Adding local asset support begins with there being a local directory containing one or more of the local resources already in existence before ASGS is oinstalled. The general proceedure is to just run init-asgs.sh with a flag that tells it where the local assets are to be found:

  1. run init-asgs.sh with the -L option, NOTE: if any local platforms are defined locally, they will show up in the list:

./init-asgs.sh -L path/to/local-asset-dir

  1. follow wizard to install ASGS as documented elsewhere in this wiki

  2. once installed, observe that the ./update-asgs wrapper contains the environmental variable defined from the -L option passed, ASGS_LOCAL_DIR. The variable is also present when inside of the ASGS Shell Environment (./asgsh).

Depending on what resources are present, the commands related to the supported resources will automatically find and list or make available the local resources.

Existing ASGS Installations

The following command will update all that is needed in order to add local asset support to an existing ASGS installation:

./init-asgs.sh -b -L path/to/local-assets-dir -x "--run-steps update-shell"

This is necessary because, crucually the ./update-asgs helper script must be updated to reflect the location of the local assets directory. Otherwise, this connection would not persist after ./update-asgs is run to do normal updating.

Adding Local Assets

It is recommended that local assests be managed within a single directory structure across a group or site; furthermore, it is recommended that some sort of change management or version control be used internally. For most this means using git and a local repository or a private Github repository for teams needing non-local access.

Local Platform Support

Local platform support requires information that must be available when ASGS is built (above), if a custom platform definition was selected during this process then the environmental variable PLATFORM_INIT will point to the require platform definitions needed for the duration of using ASGS.

If a custom platform definition is being utilized, it is strongly recommended that ASGS be installed fresh using it.

For information on adding a new platform, view the file ./platforms/README.

Locally Defined SSH Server

ASGS supports defining your own local set of remote servers.

Adding private or locally defined SSH servers is as easy as following the structure in $SCRIPTDIR/ssh-servers inside of your $ASGS_LOCAL_DIR/ssh-servers.

There is an Issue #1019 to add support for this in ASGS_LOCAL_DIR.

Locally Defined Meshes

$ASGS_LOCAL_DIR/config/mesh_defaults.sh must exist and must be properly defined. Similarly, the local meshes defined must exist in the local directory under similar paths as the officially supported meshes, i.e, $ASGS_LOCAL_DIR/input/meshes/.

The rest of the information for adding a new mesh is nearly identical the documentation for adding a new mesh.

A new local mesh resource is safe to add to an existing installation of ASGS.

When trying to add local mesh support to an ASGS installation that already exists, ./init-asgs.sh -b -L path/to/local-assets-dir -x "--update-shell" can be used to re-run the wizard and to regenerate ./update-asgs with the proper ASGS_LOCAL_DIR set without disrupting the local installation.

Local ADCIRC Patch Sets

This capability is now available in ASGS. It requires supporting a directory structure of ADCIRC patches that reflects the structure provided by ASGS.

Assuming one has in place, build adcirc will find the locally retained versions of ADCIRC for listing and use with the build adcirc command.

See the section above on Initializing Local Asset Support to see how to such a resource to a new or existing ASGS installation.

Additional information on creating and maintaining these patch sets can be found:

  • Compiling ADCIRC - discusses how patch sets are used by ASGS' build adcirc command

  • Adding and Modifying ADCIRC Patch Sets - discusses in detail how to create and maintain a patch set for ASGS to use; all the information in this document applies to both official and locally controlled ADCIRC patch sets.

Additional Information

This document is a work in progress as is support for localized assets. Please let us know if you have questions or requests for supporting other types of local assets.