You can translate the document:

Goal

The different services of the Denodo Platform can be configured to be automatically started as part of the startup process of an operating system. This document lists examples of scripts that can be used on Linux systems to automate the startup process of the Denodo services

Content

  1. In case of Linux systems if you want to run Denodo as Linux Services, it will be necessary to create shell scripts with the startup and shutdown steps.
  2. Once the scripts are ready, move the scripts files to /etc/init.d folder.
  3. Then, invoke them by executing the following commands from the terminal.

If you use SysVinit,

Execute the services automatically using,

~$ chkconfig <service_name> --add

~$ chkconfig <service_name> on

Invoke the service as,

~$ service <service_name> start/stop/restart

If you are using Systemd,

First, modify the file paths of the .sh scripts for your installation, and replace the user with the user that is to start the servers.

Then, place the .sh scripts in /usr/local/bin, and the .service files in /etc/systemd/system.

Finally, load the scripts as Services, and prepare them for executing next boot by executing,

~$ systemctl daemon-reload

~$ systemctl enable <service_name>

Invoke the same as,

~$ systemctl start/stop/restart <service_name>

The .service files need to have execution privileges. If they do not have this privilege, an “unrecognized service” error will be thrown when running the service. Note as well the before and after sections of the .service files, which establish the order that the services will be started. It’s important to have the License Manager start first, so the other services are able to obtain their licenses in order to start. Please also note that the provided scripts for the web tools don’t run a check for a previously running instance, and those that do are targeted at the -DDENODO_APP jvm option in the startup command generated by the original startup scripts.

Scripts for SysVinit:

Solution Manager

#!/bin/sh

#

# solutionmanager Start/Stop the Solutionmanager Daemon.

#

# chkconfig: 345 90 60

# description:

DENODO_HOME="/opt/denodo_solution_manager"

# Source function library.

#. /etc/rc.d/init.d/functions

start(){

    if [ "$(rh_status)" = "1" ]; then

         echo "Solutionmanager is already alive"

    else

         $DENODO_HOME/bin/solutionmanager_startup.sh

    fi

}

stop(){

    if [ "$(rh_status)" = "1" ]; then

         $DENODO_HOME/bin/solutionmanager_shutdown.sh

    else

         echo "Solutionmanager is not running"

    fi

}

restart(){

    stop

    start

}

rh_status() {

    local P=$(ps -fea | grep "Denodo Platform Solution Manager" | grep -v grep)

    local ISALIVE="0"

    if [ -z "$P" ]; then

            ISALIVE="0"

    else

            ISALIVE="1"

    fi

    echo "$ISALIVE"

}

case "$1" in

    start)

         start

         ;;

    stop)

         stop

         ;;

    restart)

         restart

         ;;

    status)

         rh_status

         ;;

    *)

         echo $"Usage: $0 {start|stop|status|restart}"

         exit 2

esac

exit $?

License Manager

#!/bin/sh

#

# licensemanager Start/Stop the Licensemanager Daemon.

#

# chkconfig: 345 90 60

# description:

DENODO_HOME="/opt/denodo_solution_manager"

# Source function library.

#. /etc/rc.d/init.d/functions

start(){

    if [ "$(rh_status)" = "1" ]; then

         echo "Licensemanager is already alive"

    else

         $DENODO_HOME/bin/licensemanager_startup.sh

    fi

}

stop(){

    if [ "$(rh_status)" = "1" ]; then

         $DENODO_HOME/bin/licensemanager_shutdown.sh

    else

         echo "Licensemanager is not running"

    fi

}

restart(){

    stop

    start

}

rh_status() {

    local P=$(ps -fea | grep "Denodo Platform License Manager" | grep -v grep)

    local ISALIVE="0"

    if [ -z "$P" ]; then

            ISALIVE="0"

    else

            ISALIVE="1"

    fi

    echo "$ISALIVE"

}

case "$1" in

    start)

         start

         ;;

    stop)

         stop

         ;;

    restart)

         restart

         ;;

    status)

         rh_status

         ;;

    *)

         echo $"Usage: $0 {start|stop|status|restart}"

         exit 2

esac

exit $?

Scripts/unit files for systemd:

licensemanager.sh

#!/bin/sh

#

# licensemanager Start/Stop the licensemanager Daemon.

#

# chkconfig: 2345 90 60

# description: Denodo licensemanager

DENODO_HOME="/path/to/denodo-solution-manager-8.0"

VDP_USER="user"

# Source function library.

#. /etc/rc.d/init.d/functions

start(){

      local PID=$(get_pid)

       if [ -z $PID ]; then

         su -c "$DENODO_HOME/bin/licensemanager_startup.sh" $VDP_USER || return 0

       else

           echo "licensemanager (pid $PID) is already running."

       fi

}

stop(){

       local PID=$(get_pid)

       if [ -z $PID ]; then

           echo "licensemanager is not running."

       else

            echo "starting lm shutdown"

           $DENODO_HOME/bin/licensemanager_shutdown.sh

       fi

}

restart(){

   stop

   start

}

reload() {

   restart

}

force_reload() {

   # new configuration takes effect after restart

   restart

}

status() {

       local VPID=$(get_pid)

       if [ -z $VPID ]; then

          echo "licensemanager is not running."

       else

          echo "licensemanager (pid $VPID) is running..."

       fi

}

get_pid() {

       local P=`ps -fea | grep "Denodo Platform License Manager" | grep -v grep | awk '{print $2}'`

       echo "$P"

}

case "$1" in

   start)

       start

       ;;

   stop)

       stop

       ;;

   restart)

       restart

       ;;

   status)

       status

       ;;

   *)

       echo $"Usage: $0 {start|stop|status|restart}"

       exit 2

esac

exit $?

licensemanager.service

[Unit]

Description=License manager startup script

After=network.target

Before=SMvqlserver.service

[Service]

ExecStart=/usr/local/bin/licensemanager.sh start

Type=oneshot

RemainAfterExit=true

ExecStop=/usr/local/bin/licensemanager.sh stop

[Install]

WantedBy=default.target

solutionmanager.sh

#!/bin/sh

#

# SolutionManager Server Start/Stop the VQL Server Daemon.

#

# chkconfig: 2345 90 60

# description: SolutionManager Server

DENODO_HOME="/path/to/denodo-solution-manager-8.0"

VDP_USER="user"

# Source function library.

#. /etc/rc.d/init.d/functions

start(){

          local PID=$(get_pid)

           if [ -z $PID ]; then

             su -c "$DENODO_HOME/bin/solutionmanager_startup.sh" $VDP_USER || return 0

           else

               echo "SolutionManager Server (pid $PID) is already running."

           fi

}

stop(){

           local PID=$(get_pid)

           if [ -z $PID ]; then

               echo "SolutionManager Server is not running."

           else

                echo "starting sm shutdown"

               $DENODO_HOME/bin/solutionmanager_shutdown.sh

           fi

}

restart(){

   stop

   sleep 5

   start

}

reload() {

   restart

}

force_reload() {

   # new configuration takes effect after restart

   restart

}

status() {

           local VPID=$(get_pid)

           if [ -z $VPID ]; then

              echo "SolutionManager Server is not running."

           else

              echo "SolutionManager Server (pid $VPID) is running..."

           fi

}

get_pid() {

           local P=`ps -fea | grep "Denodo Platform Solution Manager" | grep -v grep | awk '{print $2}'`

           echo "$P"

}

case "$1" in

   start)

           start

           ;;

   stop)

           stop

           ;;

   restart)

           restart

           ;;

   status)

           status

           ;;

   *)

           echo $"Usage: $0 {start|stop|status|restart}"

           exit 2

esac

exit $?

solutionmanager.service

[Unit]

Description=Solution Manager startup script

After=network.target

After=licensemanager.service

[Service]

ExecStart=/usr/local/bin/solutionmanager.sh start

Type=oneshot

RemainAfterExit=true

ExecStop=/usr/local/bin/solutionmanager.sh stop

KillMode=none

[Install]

WantedBy=default.target

Note: It is possible to set up the Solution Manager to stop the Denodo Monitor when the Solution Manager is stopped or to keep the Denodo Monitor running.

This behaviour is set by the configuration property com.denodo.solutionmanagerserver.monitoring.stopRunningMonitorsOnShutdown. If set to false the Denodo Monitor will not stop, this is the default setting in Denodo 8.

To stop the Denodo Monitor when the Solution Manager stops this property can be set to true (default setting in Denodo 7). In addition to that, when starting the Solution Manager as a service remove the line KillMode=none from the service file.

SMvqlserver.sh

#!/bin/sh

#

# SolutionManager vqlserver Start/Stop the VQL Server Daemon.

#

# chkconfig: 2345 90 60

# description: SolutionManager Denodo VQL Server

DENODO_HOME="/path/to/denodo-solution-manager-8.0"

VDP_USER="user"

# Source function library.

#. /etc/rc.d/init.d/functions

start(){

          local PID=$(get_pid)

           if [ -z $PID ]; then

             su -c "$DENODO_HOME/bin/vqlserver_startup.sh" $VDP_USER || return 0

           else

               echo "SolutionManager VQL Server (pid $PID) is already running."

           fi

}

stop(){

           local PID=$(get_pid)

           if [ -z $PID ]; then

               echo "SolutionManager VQL Server is not running."

           else

               $DENODO_HOME/bin/vqlserver_shutdown.sh

           fi

}

restart(){

   stop

   sleep 5

   start

}

reload() {

   restart

}

force_reload() {

   # new configuration takes effect after restart

   restart

}

status() {

           local VPID=$(get_pid)

           if [ -z $VPID ]; then

              echo "SolutionManager VQL Server is not running."

           else

              echo "SolutionManager VQL Server (pid $VPID) is running..."

           fi

}

get_pid() {

           local P=`ps -fea | grep "Denodo VDP Server" | grep $DENODO_HOME | grep -v grep | awk '{print $2}'`

           echo "$P"

}

case "$1" in

   start)

           start

           ;;

   stop)

           stop

           ;;

   restart)

           restart

           ;;

   status)

           status

           ;;

   *)

           echo $"Usage: $0 {start|stop|status|restart}"

           exit 2

esac

exit $?

SMvqlserver.service

[Unit]

Description=Solution Manager vqlserver startup script

After=network.target

After=licensemanager.service

[Service]

ExecStart=/usr/local/bin/SMvqlserver.sh start

Type=oneshot

RemainAfterExit=true

ExecStop=/usr/local/bin/SMvqlserver.sh stop

[Install]

WantedBy=default.target

solutionmanager_webadmin.sh for for sysvinit

#!/bin/sh

#

# Solution Manager Admin Tool Start/Stop.

#

# chkconfig: 345 90 60

# description: Solution Manager Administration Tool

DENODO_HOME="/path/to/denodo-solution-manager-8.0"

VDP_USER="vdp"

# Source function library.

. /etc/rc.d/init.d/functions

start() {

   su -c "$DENODO_HOME/bin/solutionmanagerwebtool_startup.sh" $VDP_USER || return 0

}

stop() {

   $DENODO_HOME/bin/solutionmanagerwebtool_shutdown.sh

}

restart() {

   stop

   start

}

case "$1" in

   start)

          start

          ;;

   stop)

          stop

          ;;

   restart)

          restart

          ;;

   *)

          echo $"Usage: $0 {start|stop|restart}"

          exit 2

esac

exit $?

solutionmanager_webadmin.sh for systemd

#!/bin/sh

#

# SolutionManager Admin Tool Start/Stop.

#

# chkconfig: 2345 90 60

# description: SolutionManager Admin Tool

DENODO_HOME="/path/to/denodo-solution-manager-8.0"

VDP_USER="user"

# Source function library.

#. /etc/rc.d/init.d/functions

start(){

             su -c "$DENODO_HOME/bin/solutionmanagerwebtool_startup.sh" $VDP_USER || return 0

}

stop(){

               $DENODO_HOME/bin/solutionmanagerwebtool_shutdown.sh

}

restart(){

   stop

   sleep 5

   start

}

reload() {

   restart

}

case "$1" in

   start)

           start

           ;;

   stop)

           stop

           ;;

   restart)

           restart

           ;;

   status)

           status

           ;;

   *)

           echo $"Usage: $0 {start|stop|status|restart}"

           exit 2

esac

exit $?

solutionmanager_webadmin.service

[Unit]

Description=Solution Manager Administration Tool startup script

After=network.target

After=licensemanager.service

After=solutionmanager.service

After=SMvqlserver.service

[Service]

ExecStart=/usr/local/bin/solutionmanager_webadmin.sh start

Type=oneshot

RemainAfterExit=true

ExecStop=/usr/local/bin/solutionmanager_webadmin.sh stop

[Install]

WantedBy=default.target

Questions

Ask a question

You must sign in to ask a question. If you do not have an account, you can register here