Linux startup scripts for Virtual DataPort, Scheduler and Web Tools

Applies to: Denodo 8.0 , Denodo 7.0
Last modified on: 08 Nov 2021
Tags: Administration Installation

Download document

You can translate the document:

Goal

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

Content

In case of Linux systems, if you want to run Denodo Platform services as Linux services, it is necessary to:

  1. Create shell scripts with the startup and shutdown steps.
  2. Move the script files to the /etc/init.d folder.
  3. Invoke them by executing the following commands from a terminal.

If you are using SysVinit:

  • execute the services automatically using:

~$ chkconfig <service_name> --add

~$ chkconfig <service_name> on

  • invoke the service using:

~$ service <service_name> start/stop/restart

If you are using systemd:

  • load the scripts as services by executing:

~$ systemctl daemon-reload

  • invoke the service using:

~$ systemctl start/stop/restart <service_name>

  • execute the service automatically at the next boot using:

~$ systemctl enable <service_name>

The service files need to have execution privileges. If they do not have these privileges, an “unrecognized service” error will be thrown when running the service.

The below scripts are applicable to SystemV systems. For systemd, the syntax and instructions for the scripts may change.

Virtual DataPort server

#!/bin/sh

#

# vdpserver Start/stop the VDP server daemon.

#

# chkconfig: 345 90 60

# description: Virtual DataPort Server

DENODO_HOME="/opt/denodo_platform"

VDP_USER="vdp"

# 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 "VDP server (pid $PID) is already running."

   fi

}

stop() {

   local PID=$(get_pid)

   if [ -z $PID ]; then

         echo "VDP server is not running."

   else

         $DENODO_HOME/bin/vqlserver_shutdown.sh

   fi

}

restart() {

   stop

   start

}

reload() {

   restart

}

force_reload() {

   # new configuration takes effect after restart

   restart

}

status() {

   local PID=$(get_pid)

   if [ -z $PID ]; then

          echo "VDP server is not running."

   else

          echo "VDP server (pid $PID) is running."

   fi

}

get_pid() {

   local P=`ps -fwwu $VDP_USER | grep $DENODO_HOME/conf/vdp/startup.ini | 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 $?

Design Studio (only available in Denodo Platform 8.0)

#!/bin/sh

#

# designstudio Start/stop the Design Studio daemon.

#

# chkconfig: 345 90 60

# description: Design Studio

DENODO_HOME="/opt/denodo_platform"

VDP_USER="vdp"

# Source function library.

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

start() {

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

}

stop() {

   $DENODO_HOME/bin/designstudio_shutdown.sh

}

restart() {

   stop

   start

}

case "$1" in

   start)

          start

          ;;

   stop)

          stop

          ;;

   restart)

          restart

          ;;

   *)

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

          exit 2

esac

exit $?

Scheduler server

#!/bin/sh

#

# scheduler Start/stop the Scheduler server daemon.

#

# chkconfig: 345 90 60

# description: Scheduler Server

DENODO_HOME="/opt/denodo_platform"

VDP_USER="vdp"

# Source function library.

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

start() {

   local PID=$(get_pid)

   if [ -z $PID ]; then

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

   else

          echo "Scheduler server (pid $PID) is already running."

   fi

}

stop() {

   local PID=$(get_pid)

   if [ -z $PID ]; then

          echo "Scheduler server is not running."

   else

          $DENODO_HOME/bin/scheduler_shutdown.sh

   fi

}

restart() {

   stop

   start

}

reload() {

   restart

}

force_reload() {

   # new configuration takes effect after restart

   restart

}

status() {

   local PID=$(get_pid)

   if [ -z $PID ]; then

          echo "Scheduler server is not running."

   else

          echo "Scheduler server (pid $PID) is running."

   fi

}

get_pid() {

   local P=`ps -fwwu $VDP_USER | grep $DENODO_HOME/conf/scheduler/scheduler_startup.ini | 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 $?

Scheduler Administration Tool

#!/bin/sh

#

# scheduler_webadmin  Start/stop the Scheduler Administration Tool daemon.

#

# chkconfig: 345 90 60

# description: Scheduler Administration Tool

DENODO_HOME="/opt/denodo_platform"

VDP_USER="vdp"

# Source function library.

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

start() {

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

}

stop() {

   $DENODO_HOME/bin/scheduler_webadmin_shutdown.sh

}

restart() {

   stop

   start

}

case "$1" in

   start)

          start

          ;;

   stop)

          stop

          ;;

   restart)

          restart

          ;;

   *)

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

          exit 2

esac

exit $?

Data Catalog

#!/bin/sh

#

# datacatalog Start/stop the Data Catalog daemon.

#

# chkconfig: 345 90 60

# description: Denodo Platform Data Catalog

DENODO_HOME="/opt/denodo_platform"

VDP_USER="vdp"

# Source function library.

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

start() {

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

}

stop() {

   $DENODO_HOME/bin/datacatalog_shutdown.sh

}

restart() {

   stop

   start

}

case "$1" in

   start)

          start

          ;;

   stop)

          stop

          ;;

   restart)

          restart

          ;;

   *)

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

          exit 2

esac

exit $?

Diagnostic & Monitoring Tool

Note: If using the Diagnostic & Monitoring Tool embedded with Denodo Platform, DENODO_HOME should be specified as "/opt/denodo_platform" instead.

#!/bin/sh

#

# diagnosticmonitoringtool Start/stop the Diagnostic & Monitoring Tool daemon.

#

# chkconfig: 345 90 60

# description: Diagnostic & Monitoring Tool

DENODO_HOME="/opt/denodo_platform"

VDP_USER="vdp"

# Source function library.

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

start() {

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

}

stop() {

   $DENODO_HOME/bin/diagnosticmonitoringtool_shutdown.sh

}

restart() {

   stop

   start

}

case "$1" in

   start)

          start

          ;;

   stop)

          stop

          ;;

   restart)

          restart

          ;;

   *)

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

          exit 2

esac

exit $?

Questions

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

Featured content

DENODO TRAINING

Ready for more? Great! We offer a comprehensive set of training courses, taught by our technical instructors in small, private groups for getting a full, in-depth guided training in the usage of the Denodo Platform. Check out our training courses.

Training