Installing JobServer as a service - 6.4

Talend Real-time Big Data Platform Installation Guide for Solaris

EnrichVersion
6.4
EnrichProdName
Talend Real-Time Big Data Platform
task
Installation and Upgrade
EnrichPlatform
Talend Administration Center
Talend CommandLine
Talend ESB
Talend JobServer
Talend Runtime

To install JobServer as a service, proceed as follows:

  1. Create an xml file named talend_agent.xml,

  2. Place this file under the following path

    /var/svc/manifest/application/

  3. Include the following commands to the file you've just created:

    <?xml version="1.0"?>
    <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
    
    <service_bundle type='manifest' name='talend_agent'>
    
    <service
            name='application/talend_agent'
            type='service'
            version='1'>
    
            <create_default_instance enabled='true' />
    
            <single_instance/>
    
            <exec_method
                    type='method'
                    name='start'
                    exec='/lib/svc/method/talend_agent start'
                    timeout_seconds='150'
                     />
    
            <exec_method
                    type='method'
                    name='stop'
                    exec='/lib/svc/method/talend_agent stop'
                    timeout_seconds='150' />
    
            <template>
                    <common_name>
                         <loctext xml:lang='C'>
                              JobServer Agent: Talend component
                         </loctext>
                    </common_name>
                    <documentation>
                              <manpage title='Talend JobServer agent' section='5'
    />
                         <doc_link name='talend.com'
                              uri='http://talend.com'/>
                    </documentation>
            </template>
    
    </service>
    </service_bundle>
    <>

  4. Then create a file named talend_agent.

  5. Place it under

    /lib/svc/method

  6. In this file, type in the script that will be called when enabling/disabling the service:

    #!/bin/sh
    
    case "$1" in
    'start')
            cd <JobServerPath>
            sh start_rs.sh &
            ;;
    
    'stop')
            cd <JobServerPath>
            sh stop_rs.sh
            ;;
    
    *)
            echo "Usage: $0 {start|stop}"
            exit 1
            ;;
    esac
    exit 0

You can now import the configuration file using the following command:

svccfg import /var/svc/manifest/application/talend_agent.xml

You can also enable the service using the following command:

svcadm enable talend_agent

And you can also make sure that the service is running using the following command:

svcs | grep talend

And checking that the output is:

online Apr_20 svc:/application/talend_agent:default