Alfresco Transform Service

cancel
Showing results for 
Search instead for 
Did you mean: 
rstoops
Customer

Alfresco Transform Service

I'm trying to test the helloWorld transformer to get it run via ATS; I can get the local version working and this is against Enterprise addition.

I'm trying this with as much out of box code/configuration as possible. My starting point is:

https://github.com/Alfresco/acs-deployment/tree/master/docker-compose

No code here is custom, I've either commented some of the containers I did need or didn't have access too like control-center. So with that said, I did add some external volume because going the setup it seem like they need to be there. So the changes that have happened are:

1.
image: quay.io/alfresco/alfresco-content-repository:7.2.0
mem_limit: 4096m
volumes:
- type: bind
      source: /Users/rstoops/dev/projects/t-engine/acs-deployment/docker-compose/acs
      target: /usr/local/tomcat/shared/classes/alfresco/extension/transform
 
For the sake of the 2 json files under transfom/transfomers and transform/renditions.
 
Add to JAVA_OPTS:
   -DlocalTransform.helloworld.url=http://transform-helloworld:8090/
 
 
2.
transform-helloworld:
image: alfresco/alfresco-helloworld-transformer:latest
environment:
JAVA_OPTS: " -Xms256m -Xmx256m"
ACTIVEMQ_URL: "nio://activemq:61616"
ACTIVEMQ_USER: "admin"
ACTIVEMQ_PASSWORD: "admin"
ports:
- "8096:8090"
 
3.
transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:1.5.2
volumes:
- type: bind
source: /Users/rstoops/dev/projects/t-engine/acs-deployment/docker-compose/transformer
target: /pipelines
environment:
JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"
TRANSFORMER_ROUTES_ADDITIONAL_HTML_VIA_TXT: "/pipelines/custom_pipelines.json"
 
For the sake of copying in 
{
"transformers": [
{
"transformerName": "helloWorldText",
"transformerPipeline" : [
{"transformerName": "helloWorld", "targetMediaType": "text/html"},
{"transformerName": "html"}
],
"supportedSourceAndTargetList": [
{"sourceMediaType": "text/plain", "priority": 45, "targetMediaType": "text/plain" }
 
 
],
"transformOptions": [
"helloWorldOptions"
]
}
]
}
 
I opened up the running container and verified the files are where they are suppose to be.
When executing via POSTMAN, the rendition is created but looking at the logs for the transform-router I see the transformer is ignored but it is running.
 
Screen Shot 2022-04-20 at 3.02.32 PM.png
 
When I look at the log from transformer-router, it sees my config file for helloWorld but doesn't seee even though the transformer does work.
What am I missing?
2 Replies
DEdwards
Member II

Re: Alfresco Transform Service

Hi rstoops

It looks like you're router is missing the config for the new transformer's URL. 

I can see from the above that you have added it to ACS, but it is missing from the transform-router config.

Try adding the following to your transform-router config: 

transform-router:
environment:
HELLO_WORLD_URL: "<transform-helloworld-url>"
So the environment section (based on what you've provided above) would be something like: 
transform-router:
  environment:
    JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"
    TRANSFORMER_ROUTES_ADDITIONAL_HTML_VIA_TXT: "/pipelines/custom_pipelines.json"
    HELLO_WORLD_URL: "http://transform-helloworld:8090"

 

angelborroy
Alfresco Employee

Re: Alfresco Transform Service

Also the QUEUE name might be relevant.

Check out this deployment instructions:

https://github.com/aborroy/alf-tengine-ocr#adding-alfresco-ocr-transformer-to-docker-compose-async-t...

Hyland Developer Evangelist