Benjamin KAHANE
- Updated
This article describes the process to get AmberFin Cloud (Dalet SaaS) set up and working with a Flex deployment.
This configuration requires 3 systems:
The Flex system talks to the AmberFin workflow server API (port 31013) to launch a new instance of an AmberFin workflow. The AmberFin workflow contains a stencil to communicate with AmberFin cloud SaaS. When the workflow engine reaches that stencil in the workflow execution, the AmberFin servers calls the AmberFin cloud SaaS API to perform the transcode.
Flex will need to communicate with the AmberFin EC2 server on port 31013.
On the EC2 machine, create a firewall rule to allow inbound connections on port 31013:
If Flex and the EC2 machines are in different VPCs (for example, the Flex system is a staging system but there's only 1 EC2 machine which is in the production system), create a Zendesk ticket to SRE (Site Reliability Engineering, formerly CS Ops) to create a peering between the 2 VPCs and allow communication on port 31013. Here is a example of such a peering.
Create Dalet AmberFin Workflows.
You can configure AmberFin to use a S3 access key and a S3 secret key or a role can be set up to allow access to the bucket for the AmberFin cloud SaaS.
Create a Zendesk ticket for SRE to request the creation of an assume role for the AmberFin AWS account.
An AIM role and a AIM policy will be created in the project account, here is an example. And an assume-role policy will be added to the AmberFin account role media-processing-production-${region}-instance-role:
Once this is all done, the following roleARN can be used in the AmberFin workflow server configuration:
arn:aws:iam::${customerAccount}:role/${env}-amberfin-cloud-assume-role
In Flex, create an AmberFin resource (resource Type: Process, Plugin: AmberFin resource JEF):
With host and port:
Create a launch action (action Type: Launch, Plugin: Launch AmberFin Job JEF):
and configure it with the AmberFin resource, the name of the AmberFin workflow and all required variables:
Since those variables do not exist in the AmberFin workflow stencil, they need to be added to the Flex Start Event. To do so, add a Flex Start Event stencil in the workflow, right-click save as template, then give it a new name, add all the variables in the outputs section separated by commas and click on create. The new stencil will be added in the same section as the original (section Start Events in this case)
The AmberFin integration can allow 3 types of workflow:
A project might or might not require all 3 types of workflow, but if this is the case, the AmberFin launch action needs to be configured several times with different parameters. Here is an example workflow with all 3 types configured (the corresponding AmberFin workflow is configured to receive an xml variable):
There are 2 ways to design the AmberFin workflow using the AmberFin Cloud SaaS service, one is to use the "Cloud Transcoder" stencil and to enter all required information in the stencil (template, conversion, filepath, ...). The second one is to use "Cloud Transcoder with Parameters" and putting the xml variable generated in Flex in the stencil.
Using the XML method allows for greater flexibility in the usage of the Transcoder and allows to easily add functionalities (burn in TC, image overlay...) without having to do a conversion profile for each. In the case of image overlay, the credentials used to access the file on S3 are the same as the credentials of the input section of the XML.
Here is an example of XML asking AmberFin to trim the source, add an image overlay and add a burn-in Timecode:
<transcodeparameters xmlns='http://www.amberfin.com/schema/TranscoderParameters'>
<inputs>
<input id='Master'>
<file name='s3://xxxx-ingest/video/162929.mp4'>
<amazons3 rolearn='arn:aws:iam::xxxxxxxxxxxx:role/xxxxx-amberfin-cloud-assume-role'/>
</file>
</input>
</inputs>
<segments>
<segment id='1'>
<input>Master</input>
<in>00:00:01:00</in>
<out>00:00:07:00</out>
</segment>
</segments>
<output template='@Presets-ProxyCreation' conversion='ToH264-Baseline-500kbps-640x360P-MP4-FastStart'>
<file name='83269241-c1f3-4a42-8b43-cbe1f3a571e6'/>
<directory name='s3://xxxx-ingest/video'/>
<amazons3 rolearn='arn:aws:iam::xxxxxxxxxxxx:role/xxxxx-amberfin-cloud-assume-role'/>
<overlays>
<logo>
<file name='s3://xxxx-ingest/tests/logo.png'/>
<position>0,0</position>
<size>640,360</size>
<segments>
<segment>1</segment>
</segments>
</logo>
<timecode>
<font>Lucida Console</font>
<fontsize>40</fontsize>
<position>1</position>
<size>300,40</size>
<fillbackground>true</fillbackground>
<segments>
<segment>1</segment>
</segments>
</timecode>
</overlays>
</output>
</transcodeparameters>
Since AmberFin cloud SaaS is a service by itself in the cloud, access to the logs can be complicated.
Create a Zendesk ticket for SRE to request that the customer should be added to Control Tower.
Once done, log access is explained in this document: AmberFin Cloud Service Troubleshooting via AmberFin Control Tower Dashboards.
Other considerations: please note that not all formats are supported on s3. Here is the list: AmberFin Transcoder S3 Supported Formats.
Comments
0 comments
Please sign in to leave a comment.