Personal tools
You are here: Home RenderServer RenderServer - Configuration

RenderServer - Configuration

How to configure your Cinnamon RenderServer

Installation

Set the environment variable RENDERSERVER_DIR to the path where you are going to keep the RenderServer's configuration files.

The RenderServer requires a CinnamonServer with at least version 1.0.9.

Changes to Cinnamon server configuration

You need to enable the RenderServerConnector and create a sudo user for the processes that the RenderServer is going to start. You should create a separate user for this and not use the admin account in a production setting.

This has to be done in the cinnamon_config.xml on the server:

<repository>
  ...
  <apiClasses>
    ...
    <apiClass>server.extension.RenderServerConnector</apiClass>
  </apiClasses>
  ...
</repository>

New ObjectType

You will need to create a new ObjectType with Dandelion:

  • Name: _render_task
  • Description: a description like "RenderServer task object type"

Configure the RenderServer

In RENDERSERVER_DIR, create a file renderserver.client.xml:

<config>
    <taskQueryFile>taskQuery.xml</taskQueryFile>
    <sleepDuration>10000</sleepDuration> <!-- sleep between runs in milliseconds -->
    <threadCount>5</threadCount> <!-- number of parallel threads -->
    <repositories>
        <repository>
            <name>cmn_test</name>
            <url>http://172.16.13.130:8080/cinnamon/cinnamon</url>
            <username>admin</username>
            <password>admin</password>
            <lifeCycleName>_RenderServerLC</lifeCycleName> <!-- do not change lifeCycleName. -->
            <registeredTasks>
                <taskName>foo2pdf</taskName>
            </registeredTasks>
        </repository>
    </repositories>
    <tasks>
        <task>
            <name>foo2pdf</name>
            <exec>java -jar lib/foo2pdf.jar</exec>
        </task>
    </tasks>
</config>

If you need to configure a new task, see How to configure RenderTasks

Also, you are going to need to add the file taskQuery.xml, which is used by the RenderServer to find new tasks in the configured Cinnamon repositories.

<?xml version="1.0" encoding="UTF-8"?>
<BooleanQuery>
    <Clause occurs="must">
        <TermQuery fieldName="lifecyclestate">__lcsId__</TermQuery>
        <TermQuery fieldName="objectTypeName">_render_task</TermQuery>
    </Clause>
</BooleanQuery>

LifeCycle: _RenderServerLC

The RenderServer communicates the state of a render task via the lifecycle state of the task object. Unless it already exists in you repository, you need to create this lifecycle by name of "_RenderServerLC".

The _RenderServerLC lifecycle needs four distinct lifecycle states:

Id Name State class LifeCycle lifeCycleState for copies Parameters
1 rendering server.lifecycle.state.NopState _RenderServerLC new <config />
2
finished server.lifecycle.state.NopState _RenderServerLC new <config />
3 failed server.lifecycle.state.NopState _RenderServerLC new <config />
4 new server.lifecycle.state.NopState _RenderServerLC new <config />
 

The "new" state should be the lifecycles default state.

 

Document Actions