How to Host Connect 3.x plugins and installers on Shares

Description

You may want to host your own IBM Aspera Connect installers and plugins for your applications rather than having the downloads served from Aspera's CloudFront CDN. To host your own copies of the latest installers and Connect browser plugin on your IBM Aspera Shares Server, use the following instructions.

Environment

  • Product: Shares
  • Version: 1.9.1+
  • Operating System: Linux, Windows

Note that Shares version 1.9.1 must be patched for Connect 3.6 and above in order to serve installations of this version. For instructions on how to patch Shares for Connect 3.6 and above, see this article (How to patch Shares for Connect 3.6). Shares version 1.9.2 and above does not need to be patched.

Instructions

1. Download the latest Connect SDK 3.x from the Aspera Developer Network. Unzip the folder into the following location:

  • Linux: /opt/aspera/shares/u/connect-sdk
  • Windows: C:\Shares\connect-sdk

2. Open the connectinstaller-4.js file in a text editor which should now be found at the following:

  • Linux: /opt/aspera/shares/u/connect-sdk/v4/connectinstaller-4.js
  • Windows: C:\Shares\connect-sdk\v4\connectinstaller-4.js

Find the variable updatesURL, and ensure it is set to connectOptions.sdkLocation, as below:

var updatesURL = connectOptions.sdkLocation;

If it is not, set it as above. Older versions of the SDK (prior to 3.6.6) would require this change.

Save the file.

3. Configure NginX to add the proper URL redirect for the connect folder.

On Linux

Create a file named connect-sdk in the following location if it doesn't already exist:

  • /opt/aspera/shares/etc/nginx/locations-available/connect-sdk

    Paste in the following content and save the file:

location /connect/ {
alias /opt/aspera/shares/u/connect-sdk/;
expires 1d;
}

Create a symlink between the connect-sdk file and the locations-enabled folder so Nginx includes the configuration file. You can do so with the following command:

ln -s /opt/aspera/shares/etc/nginx/locations-available/connect-sdk /opt/aspera/shares/etc/nginx/locations-enabled

On Windows

Open the file at the following location:

  • C:\Shares\nginx\conf\nginx.conf

Ensure the directive below is included in the file. Shares 1.9.3 and above contains this directive by default. Shares 1.9.2 and below will need to have this directive added to nginx.conf:

 http {
   server {
     include locations-enabled/*.conf;
   }
 }

Create a file named connect-sdk.conf in the following location:

  • C:\Shares\nginx\conf\locations-enabled\connect-sdk.conf

Paste in the following content and save the file:

location /connect/ {
  alias C:/Shares/connect-sdk/;
  expires 1d;
}

4. Open the file at the following location:

  • Linux: /opt/aspera/shares/u/shares/app/views/node/shared/_aspera_web_plugin_install.html.haml
  • Windows: C:\Shares\www\app\views\node\shared\_aspera_web_plugin_install.html.haml

Near the top of the file locate the following line:

- connect_autoinstall_location = '//d3gcli72yxqn2z.cloudfront.net/connect/v4'

You can replace the above line with either of the following two lines.

a) Use the following line to programmatically set the domain name of your server:

- connect_autoinstall_location = "//#{request.host_with_port}/connect/v4"
Note that double quotes (") should be used here.

b) Use the following line to set the domain name of your server manually (replace shares.example.com with your Shares server domain):

- connect_autoinstall_location = '//shares.example.com/connect/v4'

Next, find the following line in the loadConnectScript function:

var url = window.location.protocol + CONNECT_AUTOINSTALL_LOCATION + '/' + script + '.min.js';

and replace it with the line below:

var url = window.location.protocol + CONNECT_AUTOINSTALL_LOCATION + '/' + script + '.js';

5. Restart Shares.

On Linux

Use the following commands:

# service aspera-shares restart
# killall -HUP nginx

On Windows

  1. Go to your Services window by navigating to Start Menu > Control Panel > Administrative Tools > Services
  2. Select the following services, and for each, click Restart on the left:
    • Aspera Nginx Service
    • Aspera Delayed Job Service
    • Aspera Web Services
    • Aspera Stats Collector

6. Your Shares server is now hosting Connect 3.6 plugins and installers.

Note that you may need to clear your browser cache in order for these changes to take effect.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk