summaryrefslogtreecommitdiffstats
path: root/conductor/examples
diff options
context:
space:
mode:
authorrl001m <ruilu@research.att.com>2017-12-17 09:04:31 -0500
committerrl001m <ruilu@research.att.com>2017-12-17 09:05:11 -0500
commit710d958a29198b6633236c1b7cad12babfe46833 (patch)
tree5819d23e6a3b9d4e111b3debaf41ee7fe7731a78 /conductor/examples
parent22cff5d3b51d9aa2d4fd11f657264e41063add1c (diff)
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 <ruilu@research.att.com>
Diffstat (limited to 'conductor/examples')
-rw-r--r--conductor/examples/apache2/conductor.conf25
-rw-r--r--conductor/examples/distribution/ubuntu/init.d/conductor-api149
-rw-r--r--conductor/examples/distribution/ubuntu/init.d/conductor-controller148
-rw-r--r--conductor/examples/distribution/ubuntu/init.d/conductor-data148
-rw-r--r--conductor/examples/distribution/ubuntu/init.d/conductor-reservation148
-rw-r--r--conductor/examples/distribution/ubuntu/init.d/conductor-solver148
-rw-r--r--conductor/examples/distribution/ubuntu/init/conductor-api.conf37
-rw-r--r--conductor/examples/distribution/ubuntu/init/conductor-controller.conf36
-rw-r--r--conductor/examples/distribution/ubuntu/init/conductor-data.conf36
-rw-r--r--conductor/examples/distribution/ubuntu/init/conductor-reservation.conf36
-rw-r--r--conductor/examples/distribution/ubuntu/init/conductor-solver.conf36
-rw-r--r--conductor/examples/distribution/ubuntu/logrotate.d/conductor-api7
-rw-r--r--conductor/examples/distribution/ubuntu/logrotate.d/conductor-common7
-rw-r--r--conductor/examples/distribution/ubuntu/logrotate.d/conductor-controller7
-rw-r--r--conductor/examples/distribution/ubuntu/logrotate.d/conductor-data7
-rw-r--r--conductor/examples/distribution/ubuntu/logrotate.d/conductor-reservation7
-rw-r--r--conductor/examples/distribution/ubuntu/logrotate.d/conductor-solver7
-rw-r--r--conductor/examples/nginx/conductor-api.upstart.conf19
-rw-r--r--conductor/examples/nginx/nginx.conf15
-rw-r--r--conductor/examples/nginx/uwsgi_params13
20 files changed, 1036 insertions, 0 deletions
diff --git a/conductor/examples/apache2/conductor.conf b/conductor/examples/apache2/conductor.conf
new file mode 100644
index 0000000..c882555
--- /dev/null
+++ b/conductor/examples/apache2/conductor.conf
@@ -0,0 +1,25 @@
+# This is an example Apache2 configuration file for using the
+# conductor API through mod_wsgi.
+
+# Note: If you are using a Debian-based system then the paths
+# "/var/log/httpd" and "/var/run/httpd" will use "apache2" instead
+# of "httpd".
+#
+# The number of processes and threads is an example only and should
+# be adjusted according to local requirements.
+
+Listen 8091
+
+<VirtualHost *:8091>
+ WSGIDaemonProcess conductor-api processes=2 threads=10 user=SOMEUSER display-name=%{GROUP}
+ WSGIProcessGroup conductor-api
+ WSGIScriptAlias / /var/www/conductor/app
+ WSGIApplicationGroup %{GLOBAL}
+ <IfVersion >= 2.4>
+ ErrorLogFormat "%{cu}t %M"
+ </IfVersion>
+ ErrorLog /var/log/httpd/conductor_error.log
+ CustomLog /var/log/httpd/conductor_access.log combined
+</VirtualHost>
+
+WSGISocketPrefix /var/run/httpd \ No newline at end of file
diff --git a/conductor/examples/distribution/ubuntu/init.d/conductor-api b/conductor/examples/distribution/ubuntu/init.d/conductor-api
new file mode 100644
index 0000000..e67a9dc
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/init.d/conductor-api
@@ -0,0 +1,149 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: conductor-api
+# Required-Start: $network $local_fs $remote_fs $syslog
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Conductor API
+# Description: Conductor API server
+### END INIT INFO
+
+# Author: Joe D'Andrea <jdandrea@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Conductor API"
+PROJECT_NAME=conductor
+NAME=${PROJECT_NAME}-api
+PYTHON_HOME=
+PORT=8091
+
+#!/bin/sh
+# The content after this line comes from openstack-pkg-tools
+# and has been automatically added to a .init.in script, which
+# contains only the descriptive part for the daemon. Everything
+# else is standardized as a single unique script.
+
+# Author: Joe D'Andrea <jdandrea@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+if [ -z "${DAEMON}" ] ; then
+ if [ -d "${PYTHON_HOME}" ] ; then
+ DAEMON=${PYTHON_HOME}/bin/${NAME}
+ else
+ DAEMON=/usr/bin/${NAME}
+ fi
+fi
+PIDFILE=/var/run/${PROJECT_NAME}/${NAME}.pid
+if [ -z "${SCRIPTNAME}" ] ; then
+ SCRIPTNAME=/etc/init.d/${NAME}
+fi
+if [ -z "${SYSTEM_USER}" ] ; then
+ SYSTEM_USER=${PROJECT_NAME}
+fi
+if [ -z "${SYSTEM_GROUP}" ] ; then
+ SYSTEM_GROUP=${PROJECT_NAME}
+fi
+if [ "${SYSTEM_USER}" != "root" ] ; then
+ STARTDAEMON_CHUID="--chuid ${SYSTEM_USER}:${SYSTEM_GROUP}"
+fi
+if [ -z "${CONFIG_FILE}" ] ; then
+ CONFIG_FILE=/etc/${PROJECT_NAME}/${PROJECT_NAME}.conf
+fi
+LOGFILE=/var/log/${PROJECT_NAME}/${NAME}.log
+if [ -z "${NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG}" ] ; then
+ DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONFIG_FILE}"
+fi
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# If ran as root, create /var/lock/X, /var/run/X, /var/lib/X and /var/log/X as needed
+if [ `whoami` = "root" ] ; then
+ for i in lock run log lib ; do
+ mkdir -p /var/$i/${PROJECT_NAME}
+ chown ${SYSTEM_USER}:${SYSTEM_USER} /var/$i/${PROJECT_NAME}
+ done
+fi
+
+# This defines init_is_upstart which we use later on (+ more...)
+. /lib/lsb/init-functions
+
+# Manage log options: logfile and/or syslog, depending on user's choosing
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
+
+do_start() {
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ --test > /dev/null || return 1
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ -- --port ${PORT} -- $DAEMON_ARGS || return 2
+}
+
+do_stop() {
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
+ RETVAL=$?
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+do_systemd_start() {
+ exec $DAEMON $DAEMON_ARGS
+}
+
+case "$1" in
+start)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+stop)
+ #init_is_upstart > /dev/null 2>&1 && exit 0
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+status)
+ status_of_proc -p "${PIDFILE}" "$DAEMON" "$NAME" && exit 0 || exit $?
+;;
+systemd-start)
+ do_systemd_start
+;;
+restart|force-reload)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1)
+ do_start
+ case $? in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *) log_end_msg 1 ;; # Failed to stop
+ esac
+;;
+*)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload|systemd-start}" >&2
+ exit 3
+;;
+esac
+
+exit 0
+
diff --git a/conductor/examples/distribution/ubuntu/init.d/conductor-controller b/conductor/examples/distribution/ubuntu/init.d/conductor-controller
new file mode 100644
index 0000000..f09d302
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/init.d/conductor-controller
@@ -0,0 +1,148 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: conductor-controller
+# Required-Start: $network $local_fs $remote_fs $syslog
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Conductor Controller
+# Description: Conductor Controller server
+### END INIT INFO
+
+# Author: Joe D'Andrea <jdandrea@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Conductor Controller"
+PROJECT_NAME=conductor
+NAME=${PROJECT_NAME}-controller
+PYTHON_HOME=
+
+#!/bin/sh
+# The content after this line comes from openstack-pkg-tools
+# and has been automatically added to a .init.in script, which
+# contains only the descriptive part for the daemon. Everything
+# else is standardized as a single unique script.
+
+# Author: Joe D'Andrea <jdandrea@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+if [ -z "${DAEMON}" ] ; then
+ if [ -d "${PYTHON_HOME}" ] ; then
+ DAEMON=${PYTHON_HOME}/bin/${NAME}
+ else
+ DAEMON=/usr/bin/${NAME}
+ fi
+fi
+PIDFILE=/var/run/${PROJECT_NAME}/${NAME}.pid
+if [ -z "${SCRIPTNAME}" ] ; then
+ SCRIPTNAME=/etc/init.d/${NAME}
+fi
+if [ -z "${SYSTEM_USER}" ] ; then
+ SYSTEM_USER=${PROJECT_NAME}
+fi
+if [ -z "${SYSTEM_GROUP}" ] ; then
+ SYSTEM_GROUP=${PROJECT_NAME}
+fi
+if [ "${SYSTEM_USER}" != "root" ] ; then
+ STARTDAEMON_CHUID="--chuid ${SYSTEM_USER}:${SYSTEM_GROUP}"
+fi
+if [ -z "${CONFIG_FILE}" ] ; then
+ CONFIG_FILE=/etc/${PROJECT_NAME}/${PROJECT_NAME}.conf
+fi
+LOGFILE=/var/log/${PROJECT_NAME}/${NAME}.log
+if [ -z "${NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG}" ] ; then
+ DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONFIG_FILE}"
+fi
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# If ran as root, create /var/lock/X, /var/run/X, /var/lib/X and /var/log/X as needed
+if [ `whoami` = "root" ] ; then
+ for i in lock run log lib ; do
+ mkdir -p /var/$i/${PROJECT_NAME}
+ chown ${SYSTEM_USER} /var/$i/${PROJECT_NAME}
+ done
+fi
+
+# This defines init_is_upstart which we use later on (+ more...)
+. /lib/lsb/init-functions
+
+# Manage log options: logfile and/or syslog, depending on user's choosing
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
+
+do_start() {
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ --test > /dev/null || return 1
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ -- $DAEMON_ARGS || return 2
+}
+
+do_stop() {
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
+ RETVAL=$?
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+do_systemd_start() {
+ exec $DAEMON $DAEMON_ARGS
+}
+
+case "$1" in
+start)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+stop)
+ #init_is_upstart > /dev/null 2>&1 && exit 0
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+status)
+ status_of_proc -p "${PIDFILE}" "$DAEMON" "$NAME" && exit 0 || exit $?
+;;
+systemd-start)
+ do_systemd_start
+;;
+restart|force-reload)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1)
+ do_start
+ case $? in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *) log_end_msg 1 ;; # Failed to stop
+ esac
+;;
+*)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload|systemd-start}" >&2
+ exit 3
+;;
+esac
+
+exit 0
+
diff --git a/conductor/examples/distribution/ubuntu/init.d/conductor-data b/conductor/examples/distribution/ubuntu/init.d/conductor-data
new file mode 100644
index 0000000..70b3e2f
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/init.d/conductor-data
@@ -0,0 +1,148 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: conductor-data
+# Required-Start: $network $local_fs $remote_fs $syslog
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Conductor Data
+# Description: Conductor Data server
+### END INIT INFO
+
+# Author: Joe D'Andrea <jdandrea@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Conductor Data"
+PROJECT_NAME=conductor
+NAME=${PROJECT_NAME}-data
+PYTHON_HOME=
+
+#!/bin/sh
+# The content after this line comes from openstack-pkg-tools
+# and has been automatically added to a .init.in script, which
+# contains only the descriptive part for the daemon. Everything
+# else is standardized as a single unique script.
+
+# Author: Joe D'Andrea <jdandrea@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+if [ -z "${DAEMON}" ] ; then
+ if [ -d "${PYTHON_HOME}" ] ; then
+ DAEMON=${PYTHON_HOME}/bin/${NAME}
+ else
+ DAEMON=/usr/bin/${NAME}
+ fi
+fi
+PIDFILE=/var/run/${PROJECT_NAME}/${NAME}.pid
+if [ -z "${SCRIPTNAME}" ] ; then
+ SCRIPTNAME=/etc/init.d/${NAME}
+fi
+if [ -z "${SYSTEM_USER}" ] ; then
+ SYSTEM_USER=${PROJECT_NAME}
+fi
+if [ -z "${SYSTEM_GROUP}" ] ; then
+ SYSTEM_GROUP=${PROJECT_NAME}
+fi
+if [ "${SYSTEM_USER}" != "root" ] ; then
+ STARTDAEMON_CHUID="--chuid ${SYSTEM_USER}:${SYSTEM_GROUP}"
+fi
+if [ -z "${CONFIG_FILE}" ] ; then
+ CONFIG_FILE=/etc/${PROJECT_NAME}/${PROJECT_NAME}.conf
+fi
+LOGFILE=/var/log/${PROJECT_NAME}/${NAME}.log
+if [ -z "${NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG}" ] ; then
+ DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONFIG_FILE}"
+fi
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# If ran as root, create /var/lock/X, /var/run/X, /var/lib/X and /var/log/X as needed
+if [ `whoami` = "root" ] ; then
+ for i in lock run log lib ; do
+ mkdir -p /var/$i/${PROJECT_NAME}
+ chown ${SYSTEM_USER} /var/$i/${PROJECT_NAME}
+ done
+fi
+
+# This defines init_is_upstart which we use later on (+ more...)
+. /lib/lsb/init-functions
+
+# Manage log options: logfile and/or syslog, depending on user's choosing
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
+
+do_start() {
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ --test > /dev/null || return 1
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ -- $DAEMON_ARGS || return 2
+}
+
+do_stop() {
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
+ RETVAL=$?
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+do_systemd_start() {
+ exec $DAEMON $DAEMON_ARGS
+}
+
+case "$1" in
+start)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+stop)
+ #init_is_upstart > /dev/null 2>&1 && exit 0
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+status)
+ status_of_proc -p "${PIDFILE}" "$DAEMON" "$NAME" && exit 0 || exit $?
+;;
+systemd-start)
+ do_systemd_start
+;;
+restart|force-reload)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1)
+ do_start
+ case $? in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *) log_end_msg 1 ;; # Failed to stop
+ esac
+;;
+*)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload|systemd-start}" >&2
+ exit 3
+;;
+esac
+
+exit 0
+
diff --git a/conductor/examples/distribution/ubuntu/init.d/conductor-reservation b/conductor/examples/distribution/ubuntu/init.d/conductor-reservation
new file mode 100644
index 0000000..6365b32
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/init.d/conductor-reservation
@@ -0,0 +1,148 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: conductor-reservation
+# Required-Start: $network $local_fs $remote_fs $syslog
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Conductor reservation
+# Description: Conductor reservation server
+### END INIT INFO
+
+# Author: Shankaranarayanan Puzhavakath Narayanan <snarayanan@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Conductor Reservation"
+PROJECT_NAME=conductor
+NAME=${PROJECT_NAME}-reservation
+PYTHON_HOME=
+
+#!/bin/sh
+# The content after this line comes from openstack-pkg-tools
+# and has been automatically added to a .init.in script, which
+# contains only the descriptive part for the daemon. Everything
+# else is standardized as a single unique script.
+
+# Author: Shankaranarayanan Puzhavakath Narayanan <snarayanan@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+if [ -z "${DAEMON}" ] ; then
+ if [ -d "${PYTHON_HOME}" ] ; then
+ DAEMON=${PYTHON_HOME}/bin/${NAME}
+ else
+ DAEMON=/usr/bin/${NAME}
+ fi
+fi
+PIDFILE=/var/run/${PROJECT_NAME}/${NAME}.pid
+if [ -z "${SCRIPTNAME}" ] ; then
+ SCRIPTNAME=/etc/init.d/${NAME}
+fi
+if [ -z "${SYSTEM_USER}" ] ; then
+ SYSTEM_USER=${PROJECT_NAME}
+fi
+if [ -z "${SYSTEM_GROUP}" ] ; then
+ SYSTEM_GROUP=${PROJECT_NAME}
+fi
+if [ "${SYSTEM_USER}" != "root" ] ; then
+ STARTDAEMON_CHUID="--chuid ${SYSTEM_USER}:${SYSTEM_GROUP}"
+fi
+if [ -z "${CONFIG_FILE}" ] ; then
+ CONFIG_FILE=/etc/${PROJECT_NAME}/${PROJECT_NAME}.conf
+fi
+LOGFILE=/var/log/${PROJECT_NAME}/${NAME}.log
+if [ -z "${NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG}" ] ; then
+ DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONFIG_FILE}"
+fi
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# If ran as root, create /var/lock/X, /var/run/X, /var/lib/X and /var/log/X as needed
+if [ `whoami` = "root" ] ; then
+ for i in lock run log lib ; do
+ mkdir -p /var/$i/${PROJECT_NAME}
+ chown ${SYSTEM_USER} /var/$i/${PROJECT_NAME}
+ done
+fi
+
+# This defines init_is_upstart which we use later on (+ more...)
+. /lib/lsb/init-functions
+
+# Manage log options: logfile and/or syslog, depending on user's choosing
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
+
+do_start() {
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ --test > /dev/null || return 1
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ -- $DAEMON_ARGS || return 2
+}
+
+do_stop() {
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
+ RETVAL=$?
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+do_systemd_start() {
+ exec $DAEMON $DAEMON_ARGS
+}
+
+case "$1" in
+start)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+stop)
+ #init_is_upstart > /dev/null 2>&1 && exit 0
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+status)
+ status_of_proc -p "${PIDFILE}" "$DAEMON" "$NAME" && exit 0 || exit $?
+;;
+systemd-start)
+ do_systemd_start
+;;
+restart|force-reload)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1)
+ do_start
+ case $? in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *) log_end_msg 1 ;; # Failed to stop
+ esac
+;;
+*)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload|systemd-start}" >&2
+ exit 3
+;;
+esac
+
+exit 0
+
diff --git a/conductor/examples/distribution/ubuntu/init.d/conductor-solver b/conductor/examples/distribution/ubuntu/init.d/conductor-solver
new file mode 100644
index 0000000..99cc98b
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/init.d/conductor-solver
@@ -0,0 +1,148 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: conductor-solver
+# Required-Start: $network $local_fs $remote_fs $syslog
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Conductor Solver
+# Description: Conductor Solver server
+### END INIT INFO
+
+# Author: Joe D'Andrea <jdandrea@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Conductor Solver"
+PROJECT_NAME=conductor
+NAME=${PROJECT_NAME}-solver
+PYTHON_HOME=
+
+#!/bin/sh
+# The content after this line comes from openstack-pkg-tools
+# and has been automatically added to a .init.in script, which
+# contains only the descriptive part for the daemon. Everything
+# else is standardized as a single unique script.
+
+# Author: Joe D'Andrea <jdandrea@research.att.com>
+# Based on work by Thomas Goirand <zigo@debian.or>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+if [ -z "${DAEMON}" ] ; then
+ if [ -d "${PYTHON_HOME}" ] ; then
+ DAEMON=${PYTHON_HOME}/bin/${NAME}
+ else
+ DAEMON=/usr/bin/${NAME}
+ fi
+fi
+PIDFILE=/var/run/${PROJECT_NAME}/${NAME}.pid
+if [ -z "${SCRIPTNAME}" ] ; then
+ SCRIPTNAME=/etc/init.d/${NAME}
+fi
+if [ -z "${SYSTEM_USER}" ] ; then
+ SYSTEM_USER=${PROJECT_NAME}
+fi
+if [ -z "${SYSTEM_GROUP}" ] ; then
+ SYSTEM_GROUP=${PROJECT_NAME}
+fi
+if [ "${SYSTEM_USER}" != "root" ] ; then
+ STARTDAEMON_CHUID="--chuid ${SYSTEM_USER}:${SYSTEM_GROUP}"
+fi
+if [ -z "${CONFIG_FILE}" ] ; then
+ CONFIG_FILE=/etc/${PROJECT_NAME}/${PROJECT_NAME}.conf
+fi
+LOGFILE=/var/log/${PROJECT_NAME}/${NAME}.log
+if [ -z "${NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG}" ] ; then
+ DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONFIG_FILE}"
+fi
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# If ran as root, create /var/lock/X, /var/run/X, /var/lib/X and /var/log/X as needed
+if [ `whoami` = "root" ] ; then
+ for i in lock run log lib ; do
+ mkdir -p /var/$i/${PROJECT_NAME}
+ chown ${SYSTEM_USER} /var/$i/${PROJECT_NAME}
+ done
+fi
+
+# This defines init_is_upstart which we use later on (+ more...)
+. /lib/lsb/init-functions
+
+# Manage log options: logfile and/or syslog, depending on user's choosing
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
+
+do_start() {
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ --test > /dev/null || return 1
+ start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
+ -- $DAEMON_ARGS || return 2
+}
+
+do_stop() {
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
+ RETVAL=$?
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+do_systemd_start() {
+ exec $DAEMON $DAEMON_ARGS
+}
+
+case "$1" in
+start)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+stop)
+ #init_is_upstart > /dev/null 2>&1 && exit 0
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1) log_end_msg 0 ;;
+ 2) log_end_msg 1 ;;
+ esac
+;;
+status)
+ status_of_proc -p "${PIDFILE}" "$DAEMON" "$NAME" && exit 0 || exit $?
+;;
+systemd-start)
+ do_systemd_start
+;;
+restart|force-reload)
+ #init_is_upstart > /dev/null 2>&1 && exit 1
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case $? in
+ 0|1)
+ do_start
+ case $? in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *) log_end_msg 1 ;; # Failed to stop
+ esac
+;;
+*)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload|systemd-start}" >&2
+ exit 3
+;;
+esac
+
+exit 0
+
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 <jdandrea@research.att.com>"
+
+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 <jdandrea@research.att.com>"
+
+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 <jdandrea@research.att.com>"
+
+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 <snarayanan@research.att.com>"
+
+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 <jdandrea@research.att.com>"
+
+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
+
+
diff --git a/conductor/examples/distribution/ubuntu/logrotate.d/conductor-api b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-api
new file mode 100644
index 0000000..8599adf
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-api
@@ -0,0 +1,7 @@
+/var/log/conductor/conductor-api.log {
+ daily
+ missingok
+ compress
+ delaycompress
+ notifempty
+}
diff --git a/conductor/examples/distribution/ubuntu/logrotate.d/conductor-common b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-common
new file mode 100644
index 0000000..6efb26d
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-common
@@ -0,0 +1,7 @@
+/var/log/conductor/*.log {
+ daily
+ missingok
+ compress
+ delaycompress
+ copytruncate
+}
diff --git a/conductor/examples/distribution/ubuntu/logrotate.d/conductor-controller b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-controller
new file mode 100644
index 0000000..af03403
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-controller
@@ -0,0 +1,7 @@
+/var/log/conductor/conductor-controller.log {
+ daily
+ missingok
+ compress
+ delaycompress
+ notifempty
+}
diff --git a/conductor/examples/distribution/ubuntu/logrotate.d/conductor-data b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-data
new file mode 100644
index 0000000..1e4dc75
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-data
@@ -0,0 +1,7 @@
+/var/log/conductor/conductor-data.log {
+ daily
+ missingok
+ compress
+ delaycompress
+ notifempty
+}
diff --git a/conductor/examples/distribution/ubuntu/logrotate.d/conductor-reservation b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-reservation
new file mode 100644
index 0000000..648d3e5
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-reservation
@@ -0,0 +1,7 @@
+/var/log/conductor/conductor-reservation.log {
+ daily
+ missingok
+ compress
+ delaycompress
+ notifempty
+}
diff --git a/conductor/examples/distribution/ubuntu/logrotate.d/conductor-solver b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-solver
new file mode 100644
index 0000000..a433b9c
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/logrotate.d/conductor-solver
@@ -0,0 +1,7 @@
+/var/log/conductor/conductor-solver.log {
+ daily
+ missingok
+ compress
+ delaycompress
+ notifempty
+}
diff --git a/conductor/examples/nginx/conductor-api.upstart.conf b/conductor/examples/nginx/conductor-api.upstart.conf
new file mode 100644
index 0000000..fd8275f
--- /dev/null
+++ b/conductor/examples/nginx/conductor-api.upstart.conf
@@ -0,0 +1,19 @@
+# cat /etc/init/conductor-uwsgi.conf
+description "uWSGI server for conductor"
+
+start on runlevel [2345] # start on all runlevels.
+stop on runlevel [!2345] # stop when shutting down.
+
+respawn
+
+script
+ /opt/app/conductor/bin/uwsgi \
+ -s /tmp/uwsgi.sock \
+ --chmod-socket=777 \
+ --wsgi-file /etc/nginx/conductor.wsgi \
+ --callable application \
+ --set port=8091 \
+ --venv /opt/app/conductor/ \
+ --die-on-term \
+ --logto /var/log/conductor/conductor-api.log
+end scrip \ No newline at end of file
diff --git a/conductor/examples/nginx/nginx.conf b/conductor/examples/nginx/nginx.conf
new file mode 100644
index 0000000..90f78c9
--- /dev/null
+++ b/conductor/examples/nginx/nginx.conf
@@ -0,0 +1,15 @@
+# This is an example nginx configuration file for using the
+# conductor API through uWSGI. Include the "server" section
+# within the broader "http" configuration.
+
+http {
+ server {
+ listen 8091;
+ server_name CONDUCTOR_API_FQDN;
+
+ location / {
+ include uwsgi_params;
+ uwsgi_pass unix:/tmp/uwsgi.sock;
+ }
+ }
+}
diff --git a/conductor/examples/nginx/uwsgi_params b/conductor/examples/nginx/uwsgi_params
new file mode 100644
index 0000000..c7727cd
--- /dev/null
+++ b/conductor/examples/nginx/uwsgi_params
@@ -0,0 +1,13 @@
+uwsgi_param QUERY_STRING $query_string;
+uwsgi_param REQUEST_METHOD $request_method;
+uwsgi_param CONTENT_TYPE $content_type;
+uwsgi_param CONTENT_LENGTH $content_length;
+uwsgi_param REQUEST_URI $request_uri;
+uwsgi_param PATH_INFO $document_uri;
+uwsgi_param DOCUMENT_ROOT $document_root;
+uwsgi_param SERVER_PROTOCOL $server_protocol;
+uwsgi_param REMOTE_ADDR $remote_addr;
+uwsgi_param REMOTE_PORT $remote_port;
+uwsgi_param SERVER_ADDR $server_addr;
+uwsgi_param SERVER_PORT $server_port;
+uwsgi_param SERVER_NAME $server_name;