How to Bridge The Cloud Gap With the New Vidispine Server Agent

By Isak - November 3, 2015 (Last updated: September 19, 2019)

Vidispine Server Agent combines the Vidispine Transcoder and an Agent for local content into a bridge between your cloud Vidispine instance and on-premise essence. This means you can keep your original assets safely on-premise while still enabling a Vidispine cloud solution.

One of the major features in the VS 4.4 release was the support for Vidispine Server Agent, VSA for short. The VSA has been continuously improved, and can now be bought directly in the Vidinet store, we well as downloaded through the repository.

Note: This blog post has been updated to also include installation instructions for the Vidinet version of the VSA. 

So what is VSA?

VSA is a component that makes it possible to connect local storage to a cloud instance of Vidispine or VidiXplore. The VSA is a secure gateway from the Vidispine instance to your on-premise files, meaning you can manage, analyse, transcode, conform the essence without moving it to the cloud. All while your business logic stays in the cloud, close to your end-user application. And when you are ready to move your content, all of Vidispine’s storage rules and mechanisms are at your disposal.

VSA Illustration

So what is VSA, really?

VSA is two parts – the transcoder and the agent. Let’s start with the transcoder. It is the same Vidispine transcoder that is used in Vidispine Core and Enterprise, so nothing new there.

Then there is the agent. The agent does several things:

  • It establishes a secure, encrypted, link from your local server to the Vidispine instance (VS).
  • It provides VS with a view of the local files, so they are visible in the Vidispine API (/API/storage/file )
  • It can do file operations on the local storage.

How to install from Vidinet

The quickest way to install a new VSA and connect it to a Vidispine API as-a-Service is to buy it directly from Vidinet, and then run the installation script on a server that can access the content you want to connect it to. Login in to the Vidinet Dashboard, and go to the Vidinet Store. From there choose the VSA and fill out the form, then press Launch.

Vidinet dashboard - launch setup

When you have launched the service you get the choice of downloading installation script for your server.

Vidinet dashboard - a VSA is launched

Download and run the script:

$ sudo sh VSA-install-c3009f58-dcdd-42d9-b1bb-654a590b3c5e-ubuntu 16.04 lts.sh

When the script is finished you can start the agent with the following command:

$ sudo service start vidispine-agent

Now you’re ready to add your shares according to description below.

How to install from Vidispine repository

The latest VSA installation guide can be found in the API documentation. If you have added the Vidispine repository to your server’s list of repos, you just have to install two packages: vidispine-agent and vidispine-agent-tools. All dependencies are installed automatically.

Next, you need to establish the connection to your running Vidispine instance. This is done by enabling a ssh tunnel to the Vidispine server. On your Vidispine server, run

$ vidispine-admin vsa-enable
sudo validation...............: done
enter administrator user name (Enter for 'admin'): admin
enter administrator password: *****
enter external address for Vidispine: my-cloud-instance.example.com
enter ssh port (Enter for 22):
enter unique name for this node (optional but recommended, if not entered host name will be used): vsa-dubai
enter uuid for this node (optional):
vsa user......................: done
creating ssh directory........: done
adding key....................: done
setting owner.................: done
setting permissions...........: done

# Copy this content to /etc/vidispine/agent.conf on the VSA machine and restart the vidispine-agent service
operationMode=VSA-VS
userName=admin
password=KioqYWRtaW4=
connectionString=my-cloud-instance.example.com\t22\tvsa-user\t-----BEGIN RSA PRIVATE KEY-----\nMIIEpgIBAAKCAQEAzNWDVm6dC5+E1nivHwMRyMUFN...xZlh4S+/Z\n-----END RSA PRIVATE KEY-----\n
vxaname=vsa-dubai

 

Now, create a file /etc/vidispine/agent.conf.d/connection  on the VSA server, and copy the last 5 lines above to that file. (Configuration can be put in /etc/vidispine/agent.conf  or in files in the directory /etc/vidispine/agent.conf.d , or both. The preferred way is in agent.conf.d.)

Starting the agent

Start the VSA by running the commands below:

$ sudo service start vidispine-agent
$ sudo service transcoder start

Agent status

Retrieve status by issuing the command below:

$ vidispine-agent-admin status
sudo validation...............: done
service.......................: status: started
configuration file............: ok, listening on port 8090
connecting to VSA.............: ok, name vsa-dubai, uuid 0b15551e-84a0-4c98-9de4-4445fa55679d
vidispine-agent...............: ONLINE, version 4.4.1, operation mode VSA-VS
transcoder....................: ONLINE, version 4.4.1
vidispine.....................: ONLINE, connecting to my-cloud-instance.example.com as admin
shares........................: no shares are defined

On the Vidispine side, you should be able to find the VSA using API call /API/vxa/. The tunneled transcoder is also listed on /API/resource/transcoder/. If you have installed a VSA from Vidinet, it will also be listed under Vidispine Server Agents on the corresponding Vidispine API, in the dashboard.

Vidinet Dashboard - VSA Status

Adding a share

A Share in VSA is a directory that is shared from VSA to your Vidispine instance. To create a share:

vidispine-agent-admin add-local-share
enter share name (e.g. Videos): Import
enter share path: /srv/media/
adding share..................: ok

When a Share is created in VSA, a Storage with a Storage Method is created on Vidispine. The storage method has a special URI scheme: vxa, and the path part is the name of the share on VSA. Using the storage id, you can perform imports of the files using the regular /API/storage/{storage-id}/file/{file-id}/import .

But wait, there is more

VSA is not restricted to one storage = one VSA. Using multiple VSAs, hence multiple transcoders, performance can be boosted.

This is how to do that. Assume you have a folder on a SAN or NAS or other shared disk, and you have 3 VSAs. Add this share to all VSAs. There will now be 3 storages in Vidispine, each with 1 storage method. Using the Vidispine API, take the method definitions from storage 2 and 3 and an add it to storage 1. Also on storage 1, remove the vxaId (since it no longer associated with a single VSA).

<StorageListDocument xmlns="https://xml.vidispine.com/schema/vidispine">
  <storage>
    <id>VX-51</id>
    <state>NONE</state>
    <type>VXA</type>
    <method>
      <id>VX-66</id>
      <uri>vxa://5982cd8e-c7d2-4454-ad54-f2667dee2e79/Import/</uri>
      <read>true</read>
      <write>true</write>
      <browse>true</browse>
      <type>NONE</type>
    </method>
    <method>
      <id>VX-67</id>
      <uri>vxa://fc139407-982a-42a7-9988-4bdee1f925af/Import/</uri>
      <read>true</read>
      <write>true</write>
      <browse>true</browse>
      <type>NONE</type>
    </method>
    <method>
      <id>VX-68</id>
      <uri>vxa://2eb9d9af-f01e-4add-a865-d5a6cd039695/Import/</uri>
      <read>true</read>
      <write>true</write>
      <browse>true</browse>
      <type>NONE</type>
    </method>
  </storage>
</StorageListDocument>

That was the first in-depth post on the Vidispine Server Agent. Read about new VSA configurations here.