Upgrading Shares

Warning:

Prior to performing any upgrade, IBM Aspera strongly recommends customers:

  1. Perform a full environment back up and ensure the back up is successful. In case the upgrade fails, the only reliable, short-term fix is to roll back the environment using the back up.
  2. Test the upgrade in a test environment comparable to the production environment.
  3. If upgrading the test environment is successful, upgrade the production environment, but do not bring the production environment back online.
  4. Prior to bringing the production environment back online, the customer must test the application to determine if an immediate rollback is needed. Otherwise, customers risk losing all data generated between upgrade and rollback.
  1. Download IBM Aspera Shares from http://downloads.asperasoft.com/en/downloads/34. Use the credentials provided to your organization by Aspera for access. If you need help determining your organization's access credentials, contact your Aspera account manager.
  2. Back up your system before performing an upgrade.
    1. Run the following script as a root user.
      The script stops Shares services, backs up all necessary files, and restarts Shares.
      # /opt/aspera/shares/u/setup/bin/backup /backup_dir 
      Note: The rake task runs as an unprivileged user. Ensure ensure the destination directory is writable by all users. Aspera recommends using /tmp.
      For example:
      # /opt/aspera/shares/u/setup/bin/backup /tmp
      
      Creating backup directory /tmp/20130627025459 ...
      Checking status of aspera-shares ...
      Status is running
      mysqld is alive
      Backing up the Shares database and config files ...
      Backing up the SSL certificates ...
      Done
    2. Make a note of the ID of the created backup directory for future use. In the above example: 20130627025459.
  3. Unpack the installer.
    Run the following command as root, where version is the package version:
    # rpm -Uvh aspera-shares-version.rpm
    The following is an example of the output generated:
      Preparing...                ########################################### [100%]
    
      Switching to the down runlevel ...
      runsvchdir: down: now current.
      Switched runlevel
      
      Checking status of aspera-shares ...
      Status is running
      Stopping aspera-shares ...
      Stopped
      
         1:aspera-shares          ########################################### [100%]
      
      To complete the upgrade, please run this script as the root user:
      
          [root]$ /opt/aspera/shares/u/setup/bin/upgrade
  4. Run the upgrade script.
    # /opt/aspera/shares/u/setup/bin/upgrade 
    The following is an example of the output generated during the upgrade:
      Starting aspera-shares ...
      Started
      Waiting for MySQL server to answer
      mysqld is alive
      Migrating the Shares database ...
      Initializing the Shares database ...
      Clearing background jobs ...
      Migrating the stats collector database ...
      Done
  5. If the system is configured to serve Aspera Connect locally, point Shares to the new Connect SDK location.
    Note: For more information on serving Connect locally, see Serving Connect from a Local Location.
    To ensure the system continues to serve Connect locally after upgrade, go to the_aspera_web_plugin_install.html.haml file, located in the following location:
    /opt/aspera/shares/u/shares/app/views/node/shared/
    Find the following line:
    - connect_autoinstall_location = '//d3gcli72yxqn2z.cloudfront.net/connect/v4'
    • To programmatically set the domain name of the server, change the line to the following:
      - connect_autoinstall_location = "//#{ request.host_with_port }/connect/v4"
    • To manually set the domain name of the server, change the line to the following, replacing shares.example.com with the Shares server domain.
      - connect_autoinstall_location = '//shares.example.com/connect/v4'
    Find the following line under function loadConnectScript:
    var url = window.location.protocol + CONNECT_AUTOINSTALL_LOCATION + '/' + script + '.min.js';
    Replace it with the line below, deleting .min:
    var url = window.location.protocol + CONNECT_AUTOINSTALL_LOCATION + '/' + script + '.js';
  6. Restart all Shares services.
    # service aspera-shares restart
Shares is now running and accessible from the IP address or domain name configured during installation.
Note: If after upgrading, Shares does not load in the browser, check to see if Nginx is running on the Shares machine. If Nginx is not running, and trying to restart the service manually results in the error message below, follow the instructions in Disabling IPv6 Support in Shares to disable Nginx from listening to IPv6 ports.
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
Note: If after upgrading you notice that only the MySQL service is running, see Fixing Services Not Running After Upgrading Shares for instructions on how to fix the issue.