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 <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.

SysVinit scripts

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 VDP Server" | 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 Scheduler Server" | 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 $?

Script and unit files for systemd

denodo_service_control.sh

#!/bin/bash

DENODO_HOME=/opt/denodo

case "$1" in

        vqlserver)

                case "$2" in

                        start)

                                echo "Starting Denodo Virtual DataPort..."

                                $DENODO_HOME/bin/vqlserver.sh startup > /dev/null 2>&1

                                echo "ok"

                                ;;

                        stop)

                                echo "Stopping Denodo Virtual DataPort..."

                                $DENODO_HOME/bin/vqlserver.sh shutdown > /dev/null 2>&1

                                echo "ok"

                                ;;

                esac

                ;;

        scheduler)

                case "$2" in

                        start)

                                echo "Starting Denodo Scheduler..."

                                $DENODO_HOME/bin/scheduler_startup.sh > /dev/null 2>&1

                                echo "ok"

                                ;;

                        stop)

                                echo "Stopping Denodo Scheduler..."

                                $DENODO_HOME/bin/scheduler_shutdown.sh > /dev/null 2>&1

                                echo "ok"

                                ;;

                esac

                ;;

        denodo-data-catalog)

                case "$2" in

                        start)

                                echo "Start Denodo Data Catalog..."

                                $DENODO_HOME/bin/webcontainer.sh start denodo-data-catalog > /dev/null 2>&1

                                echo "ok"

                                ;;

                        stop)

                                echo "Stopping Denodo Data Catalog..."

                                $DENODO_HOME/bin/webcontainer.sh stop denodo-data-catalog > /dev/null 2>&1

                                echo "ok"

                                ;;

                esac

                ;;

        denodo-scheduler-admin)

                case "$2" in

                        start)

                                echo "Starting Denodo Scheduler Admin Tool..."

                                $DENODO_HOME/bin/webcontainer.sh start webadmin/denodo-scheduler-admin > /dev/null 2>&1

                                echo "ok"

                                ;;

                        stop)

                                echo "Stopping Denodo Scheduler Admin Tool..."

                                $DENODO_HOME/bin/webcontainer.sh stop webadmin/denodo-scheduler-admin > /dev/null 2>&1

                                echo "ok"

                                ;;

                esac

                ;;

                diagnostic-monitoring-tool)

                case "$2" in

                        start)

                                echo "Starting Denodo Diagnostic & Monitoring Tool..."

                                $DENODO_HOME/bin/webcontainer.sh start diagnostic-monitoring-tool > /dev/null 2>&1

                                echo "ok"

                                ;;

                        stop)

                                echo "Stopping Denodo Diagnostic & Monitoring Tool..."

                                $DENODO_HOME/bin/webcontainer.sh stop diagnostic-monitoring-tool > /dev/null 2>&1

                                echo "ok"

                                ;;

                esac

                ;;

                designstudio)

                case "$2" in

                        start)

                                echo "Starting Denodo Web Design Studio..."

                                $DENODO_HOME/bin/webcontainer.sh start denodo-design-studio > /dev/null 2>&1

                                echo "ok"

                                ;;

                        stop)

                                echo "Stopping Denodo Web Design Studio Tool..."

                                $DENODO_HOME/bin/webcontainer.sh stop deonodo-design-studio > /dev/null 2>&1

                                echo "ok"

                                ;;

                esac

                ;;

esac

exit 0

denodo_vdp.service

[Unit]

Description=Denodo Virtual DataPort

After=network.target

PartOf=denodo_platform.target

[Service]

Type=forking

ExecStart=/opt/denodo/bin/systemd/denodo_service_control.sh vqlserver start

TimeoutStartSec=0

ExecStop=/opt/denodo/bin/systemd/denodo_service_control.sh vqlserver stop

[Install]

WantedBy=multi-user.target

denodo_designstudio.service

[Unit]

Description=Denodo Web Design Studio

After=network.target

PartOf=denodo_platform.target

[Service]

Type=oneshot

ExecStart=/opt/denodo/bin/systemd/denodo_service_control.sh designstudio start

TimeoutStartSec=0

ExecStop=/opt/denodo/bin/systemd/denodo_service_control.sh designstudio stop

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

denodo_scheduler.service

[Unit]

Description=Denodo Scheduler

After=network.target

PartOf=denodo_platform.target

[Service]

Type=forking

ExecStart=/opt/denodo/bin/systemd/denodo_service_control.sh scheduler start

TimeoutStartSec=0

ExecStop=/opt/denodo/bin/systemd/denodo_service_control.sh scheduler stop

[Install]

WantedBy=multi-user.target

denodo_scheduler_webadmin.service

[Unit]

Description=Denodo Scheduler Web Admin Tool

After=network.target

PartOf=denodo_platform.target

[Service]

Type=oneshot

ExecStart=/opt/denodo/bin/systemd/denodo_service_control.sh denodo-scheduler-admin start

TimeoutStartSec=0

ExecStop=/opt/denodo/bin/systemd/denodo_service_control.sh denodo-scheduler-admin stop

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

denodo_dmt.service

[Unit]

Description=Denodo Diagnostic and Monitoring Tool

After=network.target

PartOf=denodo_platform.target

[Service]

Type=oneshot

ExecStart=/opt/denodo/bin/systemd/denodo_service_control.sh diagnostic-monitoring-tool start

TimeoutStartSec=0

ExecStop=/opt/denodo/bin/systemd/denodo_service_control.sh diagnostic-monitoring-tool stop

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

denodo_data_catalog.service

[Unit]

Description=Denodo Data Catalog

After=network.target

PartOf=denodo_platform.target

[Service]

Type=oneshot

ExecStart=/opt/denodo/bin/systemd/denodo_service_control.sh denodo-data-catalog start

TimeoutStartSec=0

ExecStop=/opt/denodo/bin/systemd/denodo_service_control.sh denodo-data-catalog stop

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

Questions

Ask a question

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