sbgrid-cli-admin

SBGrid installation manager admin mode

sbgrid-cli admin mode replaces the sbgrid-admin script installation method used previously to install and automatically update SBGrid installations. sbgrid-cli admin offers a some advantages:

  • parallel updates for fast, more efficient transfers
  • default version only for limited disk space
  • rolling updates for immediate releases

The sbgrid-cli admin command will:

  • Install all new titles added to SBGrid
  • Update existing versions when newer versions are added to SBGrid
  • Remove obsolete verisons that are no longer supported

Installation Steps:

  1. Create an 'sbgrid' user on the machine that will host your software installation. This step is not strictly required, but is highly recommended.
adduser sbgrid

sbgrid-cli will attempt to use sudo to create the install path and symlink at /programs that is required to run the software. The sudo requirement can be skipped with the --target and --no-link flags (details below). If you would prefer the sbgrid-cli create /programs and the installation path, add the sbgrid user to sudo with this command:

echo 'sbgrid    ALL=(ALL)       ALL' > /etc/sudoers.d/sbgrid
This is only required for activation and can be removed anytime after the installation is activated.
  1. Log in as this 'sbgrid' user
su sbgrid
  1. Download the sbgrid-cli application here: https://sbgrid.org/wiki/client_downloads

For Linux:

curl -LO https://sbgrid-installation-manager.s3.amazonaws.com/2.2.29/sbgrid-cli_2.2.29-linux.tar.gz
For Mac:
curl -LO https://sbgrid-installation-manager.s3.amazonaws.com/2.2.29/sbgrid-cli_2.2.29-macos.tar.gz
  1. Untar the archive and make it executable by running 'chmod +x sbgrid-cli'
tar -zxvf sbgrid-cli_2.2.29-linux.tar.gz && chmod +x sbgrid-cli 
  1. Activate the installation

Activating the installation will create the required installation paths and directories for installing the software. This is the point where alternate installation paths can be used. Please see https://sbgrid.org//wiki/sbgrid-cli#activation for more info.

./sbgrid-cli activate <site> <user> <key>

If the sbgrid user does not have sudo access, use

./sbgrid-cli activate <site> <user> <key> --no-link --target=<path to where the software should be installed>
where the target path is writable. This option does not require sudo but will require manual creation of the /programs symlink to the target installation directory. This is not required for installation and updates, only for using the software. It may not be needed on servers that host the programs as a network share.
  1. Run the installation using ./sbgrid-cli admin

  2. Add to crontab for periodic updates using ./sbgrid-cli crontab

Post-Install Steps:

  1. Once the download has completed, you'll need to add a symlink in the root directory of each machine that wants to use the software. Typically, this directory is shared via NFS to each of your computers.

    ln -s /path/to/sbgrid/install /programs

  2. Any user that wishes to use SBGrid needs to configure their shell to initialize the SBGrid shell environment:

    For bash: add source /programs/sbgrid.shrc to ~/.bashrc
    For tcsh: add source /programs/sbgrid.cshrc to ~/.cshrc

  3. Configure your workstations for maximum compatibility:

    https://sbgrid.org/wiki/software/workstation_setup

Examples :

To install all default versions of all titles, add new, update existing, remove obsolete, run :

$ sbgrid-cli admin

To do the same for all versions of all titles :

$ sbgrid-cli admin --all-versions

To make this automatic, add a crontab entry. This can be done from sbgrid-cli with this command :

sbgrid-cli crontab

For more info on cron, see https://www.man7.org/linux/man-pages/man5/crontab.5.html

Migrating existing site installations

To migrate an existing site-install, use the sbgrid-cli migrate-admin command as the sbgrid user. This will convert the legacy sbgrid-admin installation.