From 710d958a29198b6633236c1b7cad12babfe46833 Mon Sep 17 00:00:00 2001 From: rl001m Date: Sun, 17 Dec 2017 09:04:31 -0500 Subject: Added all common modules in conductor directory Added the common modules used by all the other components of Homing Optimizer. Change-Id: I6e8a991b54ef422da66b3174f27f6998731ec188 Issue-ID: OPTFRA-11 Signed-off-by: rl001m --- .../distribution/ubuntu/init/conductor-api.conf | 37 ++++++++++++++++++++++ .../ubuntu/init/conductor-controller.conf | 36 +++++++++++++++++++++ .../distribution/ubuntu/init/conductor-data.conf | 36 +++++++++++++++++++++ .../ubuntu/init/conductor-reservation.conf | 36 +++++++++++++++++++++ .../distribution/ubuntu/init/conductor-solver.conf | 36 +++++++++++++++++++++ 5 files changed, 181 insertions(+) create mode 100644 conductor/examples/distribution/ubuntu/init/conductor-api.conf create mode 100644 conductor/examples/distribution/ubuntu/init/conductor-controller.conf create mode 100644 conductor/examples/distribution/ubuntu/init/conductor-data.conf create mode 100644 conductor/examples/distribution/ubuntu/init/conductor-reservation.conf create mode 100644 conductor/examples/distribution/ubuntu/init/conductor-solver.conf (limited to 'conductor/examples/distribution/ubuntu/init') diff --git a/conductor/examples/distribution/ubuntu/init/conductor-api.conf b/conductor/examples/distribution/ubuntu/init/conductor-api.conf new file mode 100644 index 0000000..f6f805e --- /dev/null +++ b/conductor/examples/distribution/ubuntu/init/conductor-api.conf @@ -0,0 +1,37 @@ +description "Conductor API" +author "Joe D'Andrea " + +env PYTHON_HOME= +env PORT=8091 + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +respawn +limit nofile 65535 65535 + +pre-start script + for i in lock run log lib ; do + mkdir -p /var/$i/conductor + chown conductor:conductor /var/$i/conductor + done +end script + +script + DAEMON="/usr/bin/conductor-api" + [ -d "$PYTHON_HOME" ] && DAEMON="$PYTHON_HOME/bin/conductor-api" + [ -x "$DAEMON" ] || exit 0 + DAEMON_ARGS="" + [ -r /etc/default/openstack ] && . /etc/default/openstack + [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB + [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog" + [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/conductor/conductor-api.log" + + exec start-stop-daemon --start --chdir /var/lib/conductor \ + --chuid conductor:conductor --make-pidfile --pidfile /var/run/conductor/conductor-engine.pid \ + --exec $DAEMON -- --port $PORT -- --config-file=/etc/conductor/conductor.conf ${DAEMON_ARGS} +end script + + diff --git a/conductor/examples/distribution/ubuntu/init/conductor-controller.conf b/conductor/examples/distribution/ubuntu/init/conductor-controller.conf new file mode 100644 index 0000000..9d44be2 --- /dev/null +++ b/conductor/examples/distribution/ubuntu/init/conductor-controller.conf @@ -0,0 +1,36 @@ +description "Conductor Controller" +author "Joe D'Andrea " + +env PYTHON_HOME= + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +respawn +limit nofile 65535 65535 + +pre-start script + for i in lock run log lib ; do + mkdir -p /var/$i/conductor + chown conductor /var/$i/conductor + done +end script + +script + DAEMON="/usr/bin/conductor-controller" + [ -d "$PYTHON_HOME" ] && DAEMON="$PYTHON_HOME/bin/conductor-controller" + [ -x "$DAEMON" ] || exit 0 + DAEMON_ARGS="" + [ -r /etc/default/openstack ] && . /etc/default/openstack + [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB + [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog" + [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/conductor/conductor-controller.log" + + exec start-stop-daemon --start --chdir /var/lib/conductor \ + --chuid conductor:conductor --make-pidfile --pidfile /var/run/conductor/conductor-controller.pid \ + --exec $DAEMON -- --config-file=/etc/conductor/conductor.conf ${DAEMON_ARGS} +end script + + diff --git a/conductor/examples/distribution/ubuntu/init/conductor-data.conf b/conductor/examples/distribution/ubuntu/init/conductor-data.conf new file mode 100644 index 0000000..643206d --- /dev/null +++ b/conductor/examples/distribution/ubuntu/init/conductor-data.conf @@ -0,0 +1,36 @@ +description "Conductor Data" +author "Joe D'Andrea " + +env PYTHON_HOME= + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +respawn +limit nofile 65535 65535 + +pre-start script + for i in lock run log lib ; do + mkdir -p /var/$i/conductor + chown conductor /var/$i/conductor + done +end script + +script + DAEMON="/usr/bin/conductor-data" + [ -d "$PYTHON_HOME" ] && DAEMON="$PYTHON_HOME/bin/conductor-data" + [ -x "$DAEMON" ] || exit 0 + DAEMON_ARGS="" + [ -r /etc/default/openstack ] && . /etc/default/openstack + [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB + [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog" + [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/conductor/conductor-data.log" + + exec start-stop-daemon --start --chdir /var/lib/conductor \ + --chuid conductor:conductor --make-pidfile --pidfile /var/run/conductor/conductor-data.pid \ + --exec $DAEMON -- --config-file=/etc/conductor/conductor.conf ${DAEMON_ARGS} +end script + + diff --git a/conductor/examples/distribution/ubuntu/init/conductor-reservation.conf b/conductor/examples/distribution/ubuntu/init/conductor-reservation.conf new file mode 100644 index 0000000..0af5603 --- /dev/null +++ b/conductor/examples/distribution/ubuntu/init/conductor-reservation.conf @@ -0,0 +1,36 @@ +description "Conductor Reservation" +author "Shankaranarayanan Puzhavakath Narayanan " + +env PYTHON_HOME= + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +respawn +limit nofile 65535 65535 + +pre-start script + for i in lock run log lib ; do + mkdir -p /var/$i/conductor + chown conductor /var/$i/conductor + done +end script + +script + DAEMON="/usr/bin/conductor-reservation" + [ -d "$PYTHON_HOME" ] && DAEMON="$PYTHON_HOME/bin/conductor-reservation" + [ -x "$DAEMON" ] || exit 0 + DAEMON_ARGS="" + [ -r /etc/default/openstack ] && . /etc/default/openstack + [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB + [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog" + [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/conductor/conductor-reservation.log" + + exec start-stop-daemon --start --chdir /var/lib/conductor \ + --chuid conductor:conductor --make-pidfile --pidfile /var/run/conductor/conductor-reservation.pid \ + --exec $DAEMON -- --config-file=/etc/conductor/conductor.conf ${DAEMON_ARGS} +end script + + diff --git a/conductor/examples/distribution/ubuntu/init/conductor-solver.conf b/conductor/examples/distribution/ubuntu/init/conductor-solver.conf new file mode 100644 index 0000000..649c8c6 --- /dev/null +++ b/conductor/examples/distribution/ubuntu/init/conductor-solver.conf @@ -0,0 +1,36 @@ +description "Conductor Solver" +author "Joe D'Andrea " + +env PYTHON_HOME= + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +respawn +limit nofile 65535 65535 + +pre-start script + for i in lock run log lib ; do + mkdir -p /var/$i/conductor + chown conductor /var/$i/conductor + done +end script + +script + DAEMON="/usr/bin/conductor-solver" + [ -d "$PYTHON_HOME" ] && DAEMON="$PYTHON_HOME/bin/conductor-solver" + [ -x "$DAEMON" ] || exit 0 + DAEMON_ARGS="" + [ -r /etc/default/openstack ] && . /etc/default/openstack + [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB + [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog" + [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/conductor/conductor-solver.log" + + exec start-stop-daemon --start --chdir /var/lib/conductor \ + --chuid conductor:conductor --make-pidfile --pidfile /var/run/conductor/conductor-solver.pid \ + --exec $DAEMON -- --config-file=/etc/conductor/conductor.conf ${DAEMON_ARGS} +end script + + -- cgit 1.2.3-korg