Installing JobServer as a service

Talend Data Management Platform Installation Guide for Linux

EnrichVersion
6.2
EnrichProdName
Talend Data Management Platform
task
Installation and Upgrade

Installing JobServer as a service on RedHat/CentOS 7 Systems

All the following commands have to be executed with super-user privileges.

  1. Create the service file with the following command:

    touch /etc/systemd/system/Talend-JobServer.service

  2. Assign the relevant rights to the file you created:

    chmod 664 /etc/systemd/system/Talend-JobServer.service

  3. Paste the following content in the file while adapting it to your configuration:

    [Unit]
    Description=Talend JobServer Service
    After=network.target
    
    [Service]
    WorkingDirectory=<JobServerPath>
    ExecStart=/bin/bash start_rs.sh
    ExecStop=/bin/bash stop_rs.sh
    Type=simple
    
    [Install]
    WantedBy=default.target
  4. Reload the service daemon:

    systemctl daemon-reload

  5. Start the service:

    systemctl start Talend-JobServer.service

Installing JobServer as a service on RedHat/CentOS 6

  1. Create/Copy the following script to the /etc/init.d/jobserver file:

    # chkconfig: 345 91 10
    # description: Starts and stops the jobserver daemon.
    #
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Get config.
    . /etc/sysconfig/network
    

    # Check that networking is up.
    [ "${NETWORKING}" = "no" ] && exit 0
    
    user=cxp
    jobserver=/u/bin/Talend/jobserver_3.0.1
    startup=start_rs.sh
    shutdown=stop_rs.sh
    
    
    start(){
     echo -n $"Starting jobserver service: "
     su - $user -c "cd $jobserver && sh $startup &" 
     RETVAL=$?
     echo
    }
    
    stop(){
     echo -n $ "Stopping jobserver service: "
     su - $user -c  "cd $jobserver && sh $shutdown"
     RETVAL=$?
     echo
    }
    
    restart() {
     stop
     start
    }
    
    # See how we were called.
    case "$1" in
    start)
     start
     ;;
    stop)
     stop
     ;;
    restart)
     restart
     ;;
    *)
     echo $"Usage: $0 {start|stop|restart}"
     exit 1
    esac
    
    exit 0

  2. Edit the user and jobserver variable values in the script (with the dedicated user to run Talend, and the JobServer path respectively).

  3. To make sure that the script is executable, type:

    # chmod 0755 /etc/init.d/jobserver

  4. Type in:

    chkconfig --list

    chkconfig --add jobserver

    Now, you can test this self-defined service.

Installing JobServer as a service on Ubuntu

  1. Create/Copy the following script to the /etc/init.d/jobserver file as explained in Installing JobServer as a service on RedHat/CentOS 6.

  2. Edit the user and jobserver variable values in the script (with the dedicated user to run Talend, and the JobServer path respectively).

  3. To make sure that the script is executable, type:

    # chmod 0755 /etc/init.d/jobserver

  4. Execute the following command:

    # update-rc.d jobserver defaults 60

Install JobServer as a service on OpenSuse

The following procedure needs to be performed with root privileges.

Note

This procedure was tested on OpenSuse 11.2 x64 bits.

  1. Make sure that the three scripts jobserver_start, jobserver_stop and jobserver are executable.

  2. Copy usr/bin/jobserver_start and usr/bin/jobserver_stop into:

    /usr/bin/

  3. Copy etc/ini.d/jobserver in:

    /etc/init.d/

  4. Edit the configuration file etc/sysconfig/jobserver and set the path to your installation directory.

  5. Copy this file into:

    /etc/sysconfig/

  6. Execute the following command to create a link called rcjobserver:

    ln -s /etc/init.d/jobserver /usr/sbin/rcjobserver

  7. To start or stop the JobServer manually, use:

    rcjobserver start

    rcjobserver stop

  8. Install the service using:

    Yast > System > System Services

  9. Type in:

    chkconfig -e jobserver

  10. Set the variable to ON

  11. Run SuSEconfig.

    Note

    The JobServer installation path can be edited through Yast > /etc/sysconfig Editor in Applications/Talend.