Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 73E2A200B12 for ; Sun, 12 Jun 2016 12:58:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 724B1160A2C; Sun, 12 Jun 2016 10:58:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A2FEE160A06 for ; Sun, 12 Jun 2016 12:58:21 +0200 (CEST) Received: (qmail 36001 invoked by uid 500); 12 Jun 2016 10:58:20 -0000 Mailing-List: contact commits-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list commits@aurora.apache.org Received: (qmail 35992 invoked by uid 99); 12 Jun 2016 10:58:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jun 2016 10:58:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8C8CDE0200; Sun, 12 Jun 2016 10:58:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: serb@apache.org To: commits@aurora.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: aurora-packaging git commit: Update RPM services and startup scripts to match our Debian packages. Date: Sun, 12 Jun 2016 10:58:20 +0000 (UTC) archived-at: Sun, 12 Jun 2016 10:58:23 -0000 Repository: aurora-packaging Updated Branches: refs/heads/master 7cb3829ca -> a665227c0 Update RPM services and startup scripts to match our Debian packages. Bugs closed: AURORA-1394 Reviewed at https://reviews.apache.org/r/48513/ Project: http://git-wip-us.apache.org/repos/asf/aurora-packaging/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora-packaging/commit/a665227c Tree: http://git-wip-us.apache.org/repos/asf/aurora-packaging/tree/a665227c Diff: http://git-wip-us.apache.org/repos/asf/aurora-packaging/diff/a665227c Branch: refs/heads/master Commit: a665227c0d1634fe69bb9c45559f7d1ff69a4c03 Parents: 7cb3829 Author: Kasisnu Singh Authored: Sun Jun 12 12:54:55 2016 +0200 Committer: Stephan Erb Committed: Sun Jun 12 12:54:55 2016 +0200 ---------------------------------------------------------------------- specs/rpm/SOURCES/aurora-scheduler.init.sh | 200 +++++++++++++++++++++ specs/rpm/SOURCES/aurora-scheduler.logrotate | 24 +++ specs/rpm/SOURCES/aurora-scheduler.service | 27 +++ specs/rpm/SOURCES/aurora-scheduler.startup.sh | 27 +++ specs/rpm/SOURCES/aurora-scheduler.sysconfig | 76 ++++++++ specs/rpm/SOURCES/aurora.init.sh | 200 --------------------- specs/rpm/SOURCES/aurora.logrotate | 24 --- specs/rpm/SOURCES/aurora.service | 27 --- specs/rpm/SOURCES/aurora.startup.sh | 27 --- specs/rpm/SOURCES/aurora.sysconfig | 76 -------- specs/rpm/SOURCES/thermos-observer.init.sh | 197 -------------------- specs/rpm/SOURCES/thermos-observer.logrotate | 24 --- specs/rpm/SOURCES/thermos-observer.service | 27 --- specs/rpm/SOURCES/thermos-observer.startup.sh | 19 -- specs/rpm/SOURCES/thermos-observer.sysconfig | 21 --- specs/rpm/SOURCES/thermos.init.sh | 197 ++++++++++++++++++++ specs/rpm/SOURCES/thermos.logrotate | 24 +++ specs/rpm/SOURCES/thermos.service | 27 +++ specs/rpm/SOURCES/thermos.startup.sh | 19 ++ specs/rpm/SOURCES/thermos.sysconfig | 21 +++ specs/rpm/aurora.spec | 85 ++++----- 21 files changed, 685 insertions(+), 684 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora-scheduler.init.sh ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora-scheduler.init.sh b/specs/rpm/SOURCES/aurora-scheduler.init.sh new file mode 100644 index 0000000..a0e3dc8 --- /dev/null +++ b/specs/rpm/SOURCES/aurora-scheduler.init.sh @@ -0,0 +1,200 @@ +#!/bin/bash +# +# aurora Starts the Aurora task scheduler for Mesos. +# +# chkconfig: 345 55 25 +# description: This script starts the Aurora service scheduler for Apache Mesos, \ +# used for scheduling and executing long-running tasks and \ +# cron jobs. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +### BEGIN INIT INFO +# Provides: aurora +# Required-Start: +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Starts the Aurora task scheduler for Mesos. +# Description: Starts the Aurora task scheduler for Mesos. +### END INIT INFO + +# Source LSB function library. +. /lib/lsb/init-functions + +aurora_user="aurora" +exec="/usr/bin/aurora-scheduler-startup" +prog="aurora" +logdir="/var/log/aurora" +lockfile="/var/run/aurora.lock" +pid_file="/var/run/aurora.pid" +stdout_log="${logdir}/aurora.log" +stderr_log="${logdir}/aurora-error.log" + +# Get a sane screen width +[ -z "${COLUMNS:-}" ] && COLUMNS=80 +[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype)" + +# Read in init configuration. +if [ -z "${BOOTUP:-}" ]; then + if [ -f /etc/sysconfig/init ]; then + . /etc/sysconfig/init + else + BOOTUP=color + RES_COL=60 + MOVE_TO_COL="echo -en \\033[${RES_COL}G" + SETCOLOR_SUCCESS="echo -en \\033[1;32m" + SETCOLOR_FAILURE="echo -en \\033[1;31m" + SETCOLOR_WARNING="echo -en \\033[1;33m" + SETCOLOR_NORMAL="echo -en \\033[0;39m" + LOGLEVEL=1 + fi + if [ "$CONSOLETYPE" = "serial" ]; then + BOOTUP=serial + MOVE_TO_COL= + SETCOLOR_SUCCESS= + SETCOLOR_FAILURE= + SETCOLOR_WARNING= + SETCOLOR_NORMAL= + fi +fi + +function usage { + err "Starts the Aurora task scheduler for Mesos." + err "Usage: ${0} (restart|start|stop|status)" +} + +function out { + printf '%s\n' "$*"; +} + +function msg { + out "$*" >&2; +} + +function err { + local x=${?}; + msg "$*"; + return $(( ${x} == 0 ? 1 : ${x} )); +} + +function echo_success { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS + echo -n $" OK " + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 0 +} + +function echo_failure { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE + echo -n $"FAILED" + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 1 +} + +# Parse arguments. +ACTION=${1} + +# Ensures that action is. +if [ -z ${ACTION} ]; then + err "ERROR: No action specified." + usage + exit -1 +fi + +start() { + [ -x ${exec} ] || exit 5 + [ -f ${config} ] || exit 6 + echo -n $"Starting $prog: " + start_daemon daemonize -u ${aurora_user} -o ${stdout_log} -e ${stderr_log} -p ${pid_file} ${exec} + retval=$? + [ $retval -eq 0 ] && (echo_success; touch $lockfile) || echo_failure + echo + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p ${pid_file} ${exec} + retval=$? + [ $retval -eq 0 ] && (echo_success; rm -f $lockfile) || echo_failure + echo + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + pid=$(pidofproc -p ${pid_file} ${prog}) + if [ $? -eq 0 ]; then + echo "${prog} (pid ${pid}) is running..." + return 0 + else + if [ -e $lockfile ]; then + echo "${prog} dead but lockfile exists" + return 2 + else + echo "${prog} is stopped" + return 1 + fi + fi +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + +# Executes the requested daemon action. +case "${ACTION}" in + start) + rh_status_q && rh_status && exit 0 + start + ;; + stop) + stop + ;; + status) + rh_status + ;; + restart) + restart + ;; + *) + err "ERROR: Invalid action specified." + usage + exit -3 +esac + +exit $? http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora-scheduler.logrotate ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora-scheduler.logrotate b/specs/rpm/SOURCES/aurora-scheduler.logrotate new file mode 100644 index 0000000..1c43073 --- /dev/null +++ b/specs/rpm/SOURCES/aurora-scheduler.logrotate @@ -0,0 +1,24 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +/var/log/aurora/*.log { + + daily + missingok + rotate 14 + compress + delaycompress + notifempty + copytruncate + +} http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora-scheduler.service ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora-scheduler.service b/specs/rpm/SOURCES/aurora-scheduler.service new file mode 100644 index 0000000..b81cb63 --- /dev/null +++ b/specs/rpm/SOURCES/aurora-scheduler.service @@ -0,0 +1,27 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[Unit] +Description=Aurora Scheduler +After=network.target +Wants=network.target + +[Service] +ExecStart=/usr/bin/aurora-scheduler-startup +User=aurora +Group=aurora +Restart=always +RestartSec=20 +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora-scheduler.startup.sh ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora-scheduler.startup.sh b/specs/rpm/SOURCES/aurora-scheduler.startup.sh new file mode 100644 index 0000000..2ce64e8 --- /dev/null +++ b/specs/rpm/SOURCES/aurora-scheduler.startup.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Starts up an Aurora scheduler process. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +source /etc/sysconfig/aurora-scheduler + +# Environment variables control the behavior of the Mesos scheduler driver (libmesos). +export GLOG_v LIBPROCESS_PORT LIBPROCESS_IP +export JAVA_OPTS="${JAVA_OPTS[*]}" + +# Preferences Java 1.8 over any other Java version. +export PATH=/usr/lib/jvm/java-1.8.0/bin:${PATH} + +exec /usr/lib/aurora/bin/aurora-scheduler "${AURORA_FLAGS[@]}" http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora-scheduler.sysconfig ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora-scheduler.sysconfig b/specs/rpm/SOURCES/aurora-scheduler.sysconfig new file mode 100644 index 0000000..d812341 --- /dev/null +++ b/specs/rpm/SOURCES/aurora-scheduler.sysconfig @@ -0,0 +1,76 @@ +#!/bin/bash +# Configuration used when executing the Aurora task scheduler process. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +GLOG_v=0 + +LIBPROCESS_PORT=8083 +LIBPROCESS_IP='127.0.0.1' + +# Flags that control the behavior of the JVM. +JAVA_OPTS=( + # Uses server-level GC optimizations, as this is a server. + -server + + # Location of libmesos-XXXX.so / libmesos-XXXX.dylib + -Djava.library.path='/usr/lib;/usr/lib64' +) + +# Flags control the behavior of the Aurora scheduler. +# For a full list of available flags, run /usr/lib/aurora/bin/aurora-scheduler -help +AURORA_FLAGS=( + # The name of this cluster. + -cluster_name='main' + + # The HTTP port upon which Aurora will listen. + -http_port=8081 + + # The ZooKeeper URL of the ZNode where the Mesos master has registered. + -mesos_master_address='zk://127.0.0.1:2181/mesos' + + # The ZooKeeper quorum to which Aurora will register itself. + -zk_endpoints='127.0.0.1:2181' + + # The ZooKeeper ZNode within the specified quorum to which Aurora will register its + # ServerSet, which keeps track of all live Aurora schedulers. + -serverset_path='/aurora/scheduler' + + # Allows the scheduling of containers of the provided type. + -allowed_container_types='DOCKER,MESOS' + + ### Native Log Settings ### + + # The native log serves as a replicated database which stores the state of the + # scheduler, allowing for multi-master operation. + + # Size of the quorum of Aurora schedulers which possess a native log. If running in + # multi-master mode, consult the following document to determine appropriate values: + # + # https://aurora.apache.org/documentation/latest/deploying-aurora-scheduler/#replicated-log-configuration + -native_log_quorum_size='1' + # The ZooKeeper ZNode to which Aurora will register the locations of its replicated log. + -native_log_zk_group_path='/aurora/native-log' + # The local directory in which an Aurora scheduler can find Aurora's replicated log. + -native_log_file_path='/var/lib/aurora/scheduler/db' + # The local directory in which Aurora schedulers will place state backups. + -backup_dir='/var/lib/aurora/scheduler/backups' + + ### Thermos Settings ### + + # The local path of the Thermos executor binary. + -thermos_executor_path='/usr/bin/thermos_executor' + # Flags to pass to the Thermos executor. + -thermos_executor_flags='--announcer-ensemble 127.0.0.1:2181' +) http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora.init.sh ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora.init.sh b/specs/rpm/SOURCES/aurora.init.sh deleted file mode 100644 index a0e3dc8..0000000 --- a/specs/rpm/SOURCES/aurora.init.sh +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# -# aurora Starts the Aurora task scheduler for Mesos. -# -# chkconfig: 345 55 25 -# description: This script starts the Aurora service scheduler for Apache Mesos, \ -# used for scheduling and executing long-running tasks and \ -# cron jobs. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -### BEGIN INIT INFO -# Provides: aurora -# Required-Start: -# Required-Stop: -# Should-Start: -# Should-Stop: -# Default-Start: 3 4 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Starts the Aurora task scheduler for Mesos. -# Description: Starts the Aurora task scheduler for Mesos. -### END INIT INFO - -# Source LSB function library. -. /lib/lsb/init-functions - -aurora_user="aurora" -exec="/usr/bin/aurora-scheduler-startup" -prog="aurora" -logdir="/var/log/aurora" -lockfile="/var/run/aurora.lock" -pid_file="/var/run/aurora.pid" -stdout_log="${logdir}/aurora.log" -stderr_log="${logdir}/aurora-error.log" - -# Get a sane screen width -[ -z "${COLUMNS:-}" ] && COLUMNS=80 -[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype)" - -# Read in init configuration. -if [ -z "${BOOTUP:-}" ]; then - if [ -f /etc/sysconfig/init ]; then - . /etc/sysconfig/init - else - BOOTUP=color - RES_COL=60 - MOVE_TO_COL="echo -en \\033[${RES_COL}G" - SETCOLOR_SUCCESS="echo -en \\033[1;32m" - SETCOLOR_FAILURE="echo -en \\033[1;31m" - SETCOLOR_WARNING="echo -en \\033[1;33m" - SETCOLOR_NORMAL="echo -en \\033[0;39m" - LOGLEVEL=1 - fi - if [ "$CONSOLETYPE" = "serial" ]; then - BOOTUP=serial - MOVE_TO_COL= - SETCOLOR_SUCCESS= - SETCOLOR_FAILURE= - SETCOLOR_WARNING= - SETCOLOR_NORMAL= - fi -fi - -function usage { - err "Starts the Aurora task scheduler for Mesos." - err "Usage: ${0} (restart|start|stop|status)" -} - -function out { - printf '%s\n' "$*"; -} - -function msg { - out "$*" >&2; -} - -function err { - local x=${?}; - msg "$*"; - return $(( ${x} == 0 ? 1 : ${x} )); -} - -function echo_success { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS - echo -n $" OK " - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 0 -} - -function echo_failure { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE - echo -n $"FAILED" - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 1 -} - -# Parse arguments. -ACTION=${1} - -# Ensures that action is. -if [ -z ${ACTION} ]; then - err "ERROR: No action specified." - usage - exit -1 -fi - -start() { - [ -x ${exec} ] || exit 5 - [ -f ${config} ] || exit 6 - echo -n $"Starting $prog: " - start_daemon daemonize -u ${aurora_user} -o ${stdout_log} -e ${stderr_log} -p ${pid_file} ${exec} - retval=$? - [ $retval -eq 0 ] && (echo_success; touch $lockfile) || echo_failure - echo - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - killproc -p ${pid_file} ${exec} - retval=$? - [ $retval -eq 0 ] && (echo_success; rm -f $lockfile) || echo_failure - echo - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - pid=$(pidofproc -p ${pid_file} ${prog}) - if [ $? -eq 0 ]; then - echo "${prog} (pid ${pid}) is running..." - return 0 - else - if [ -e $lockfile ]; then - echo "${prog} dead but lockfile exists" - return 2 - else - echo "${prog} is stopped" - return 1 - fi - fi -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - -# Executes the requested daemon action. -case "${ACTION}" in - start) - rh_status_q && rh_status && exit 0 - start - ;; - stop) - stop - ;; - status) - rh_status - ;; - restart) - restart - ;; - *) - err "ERROR: Invalid action specified." - usage - exit -3 -esac - -exit $? http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora.logrotate ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora.logrotate b/specs/rpm/SOURCES/aurora.logrotate deleted file mode 100644 index 1c43073..0000000 --- a/specs/rpm/SOURCES/aurora.logrotate +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -/var/log/aurora/*.log { - - daily - missingok - rotate 14 - compress - delaycompress - notifempty - copytruncate - -} http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora.service ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora.service b/specs/rpm/SOURCES/aurora.service deleted file mode 100644 index b81cb63..0000000 --- a/specs/rpm/SOURCES/aurora.service +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -[Unit] -Description=Aurora Scheduler -After=network.target -Wants=network.target - -[Service] -ExecStart=/usr/bin/aurora-scheduler-startup -User=aurora -Group=aurora -Restart=always -RestartSec=20 -LimitNOFILE=16384 - -[Install] -WantedBy=multi-user.target http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora.startup.sh ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora.startup.sh b/specs/rpm/SOURCES/aurora.startup.sh deleted file mode 100644 index 3c444d9..0000000 --- a/specs/rpm/SOURCES/aurora.startup.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Starts up an Aurora scheduler process. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -source /etc/sysconfig/aurora - -# Environment variables control the behavior of the Mesos scheduler driver (libmesos). -export GLOG_v LIBPROCESS_PORT LIBPROCESS_IP -export JAVA_OPTS="${JAVA_OPTS[*]}" - -# Preferences Java 1.8 over any other Java version. -export PATH=/usr/lib/jvm/java-1.8.0/bin:${PATH} - -exec /usr/lib/aurora/bin/aurora-scheduler "${AURORA_FLAGS[@]}" http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/aurora.sysconfig ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora.sysconfig b/specs/rpm/SOURCES/aurora.sysconfig deleted file mode 100644 index d812341..0000000 --- a/specs/rpm/SOURCES/aurora.sysconfig +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# Configuration used when executing the Aurora task scheduler process. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -GLOG_v=0 - -LIBPROCESS_PORT=8083 -LIBPROCESS_IP='127.0.0.1' - -# Flags that control the behavior of the JVM. -JAVA_OPTS=( - # Uses server-level GC optimizations, as this is a server. - -server - - # Location of libmesos-XXXX.so / libmesos-XXXX.dylib - -Djava.library.path='/usr/lib;/usr/lib64' -) - -# Flags control the behavior of the Aurora scheduler. -# For a full list of available flags, run /usr/lib/aurora/bin/aurora-scheduler -help -AURORA_FLAGS=( - # The name of this cluster. - -cluster_name='main' - - # The HTTP port upon which Aurora will listen. - -http_port=8081 - - # The ZooKeeper URL of the ZNode where the Mesos master has registered. - -mesos_master_address='zk://127.0.0.1:2181/mesos' - - # The ZooKeeper quorum to which Aurora will register itself. - -zk_endpoints='127.0.0.1:2181' - - # The ZooKeeper ZNode within the specified quorum to which Aurora will register its - # ServerSet, which keeps track of all live Aurora schedulers. - -serverset_path='/aurora/scheduler' - - # Allows the scheduling of containers of the provided type. - -allowed_container_types='DOCKER,MESOS' - - ### Native Log Settings ### - - # The native log serves as a replicated database which stores the state of the - # scheduler, allowing for multi-master operation. - - # Size of the quorum of Aurora schedulers which possess a native log. If running in - # multi-master mode, consult the following document to determine appropriate values: - # - # https://aurora.apache.org/documentation/latest/deploying-aurora-scheduler/#replicated-log-configuration - -native_log_quorum_size='1' - # The ZooKeeper ZNode to which Aurora will register the locations of its replicated log. - -native_log_zk_group_path='/aurora/native-log' - # The local directory in which an Aurora scheduler can find Aurora's replicated log. - -native_log_file_path='/var/lib/aurora/scheduler/db' - # The local directory in which Aurora schedulers will place state backups. - -backup_dir='/var/lib/aurora/scheduler/backups' - - ### Thermos Settings ### - - # The local path of the Thermos executor binary. - -thermos_executor_path='/usr/bin/thermos_executor' - # Flags to pass to the Thermos executor. - -thermos_executor_flags='--announcer-ensemble 127.0.0.1:2181' -) http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos-observer.init.sh ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos-observer.init.sh b/specs/rpm/SOURCES/thermos-observer.init.sh deleted file mode 100644 index 38eea53..0000000 --- a/specs/rpm/SOURCES/thermos-observer.init.sh +++ /dev/null @@ -1,197 +0,0 @@ -#!/bin/bash -# -# thermos-observer Starts the Thermos task observer. -# -# chkconfig: 345 55 25 -# description: This script starts the Thermos task observer, which provides a WebUI for \ -# viewing the state of tasks launched by the Thermos executor. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -### BEGIN INIT INFO -# Provides: thermos-observer -# Required-Start: -# Required-Stop: -# Should-Start: -# Should-Stop: -# Default-Start: 3 4 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Starts the Thermos task observer. -# Description: Starts the Thermos task observer. -### END INIT INFO - -# Source LSB function library. -. /lib/lsb/init-functions - -exec="/usr/bin/thermos-observer-startup" -prog="thermos-observer" -logdir="/var/log/thermos" -lockfile="/var/run/thermos-observer.lock" -pid_file="/var/run/thermos-observer.pid" -stdout_log="${logdir}/observer.log" -stderr_log="${logdir}/observer-error.log" - -# Get a sane screen width -[ -z "${COLUMNS:-}" ] && COLUMNS=80 -[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype)" - -# Read in init configuration. -if [ -z "${BOOTUP:-}" ]; then - if [ -f /etc/sysconfig/init ]; then - . /etc/sysconfig/init - else - BOOTUP=color - RES_COL=60 - MOVE_TO_COL="echo -en \\033[${RES_COL}G" - SETCOLOR_SUCCESS="echo -en \\033[1;32m" - SETCOLOR_FAILURE="echo -en \\033[1;31m" - SETCOLOR_WARNING="echo -en \\033[1;33m" - SETCOLOR_NORMAL="echo -en \\033[0;39m" - LOGLEVEL=1 - fi - if [ "$CONSOLETYPE" = "serial" ]; then - BOOTUP=serial - MOVE_TO_COL= - SETCOLOR_SUCCESS= - SETCOLOR_FAILURE= - SETCOLOR_WARNING= - SETCOLOR_NORMAL= - fi -fi - -function usage { - err "Starts the Thermos task observer." - err "Usage: ${0} (restart|start|stop|status)" -} - -function out { - printf '%s\n' "$*"; -} - -function msg { - out "$*" >&2; -} - -function err { - local x=${?}; - msg "$*"; - return $(( ${x} == 0 ? 1 : ${x} )); -} - -function echo_success { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS - echo -n $" OK " - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 0 -} - -function echo_failure { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE - echo -n $"FAILED" - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 1 -} - -# Parse arguments. -ACTION=${1} - -# Ensures that action is. -if [ -z ${ACTION} ]; then - err "ERROR: No action specified." - usage - exit -1 -fi - -start() { - [ -x ${exec} ] || exit 5 - [ -f ${config} ] || exit 6 - echo -n $"Starting $prog: " - start_daemon daemonize -o ${stdout_log} -e ${stderr_log} -p ${pid_file} ${exec} - retval=$? - [ $retval -eq 0 ] && (echo_success; touch $lockfile) || echo_failure - echo - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - killproc -p ${pid_file} ${exec} - retval=$? - [ $retval -eq 0 ] && (echo_success; rm -f $lockfile) || echo_failure - echo - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - pid=$(pidofproc -p ${pid_file} ${prog}) - if [ $? -eq 0 ]; then - echo "${prog} (pid ${pid}) is running..." - return 0 - else - if [ -e $lockfile ]; then - echo "${prog} dead but lockfile exists" - return 2 - else - echo "${prog} is stopped" - return 1 - fi - fi -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - -# Executes the requested daemon action. -case "${ACTION}" in - start) - rh_status_q && rh_status && exit 0 - start - ;; - stop) - stop - ;; - status) - rh_status - ;; - restart) - restart - ;; - *) - err "ERROR: Invalid action specified." - usage - exit -3 -esac - -exit $? http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos-observer.logrotate ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos-observer.logrotate b/specs/rpm/SOURCES/thermos-observer.logrotate deleted file mode 100644 index a6a7f5c..0000000 --- a/specs/rpm/SOURCES/thermos-observer.logrotate +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -/var/log/thermos/*.log { - - daily - missingok - rotate 14 - compress - delaycompress - notifempty - copytruncate - -} http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos-observer.service ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos-observer.service b/specs/rpm/SOURCES/thermos-observer.service deleted file mode 100644 index d019635..0000000 --- a/specs/rpm/SOURCES/thermos-observer.service +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -[Unit] -Description=Thermos Observer -After=network.target -Wants=network.target - -[Service] -ExecStart=/usr/bin/thermos-observer-startup -User=root -Group=root -Restart=always -RestartSec=20 -LimitNOFILE=16384 - -[Install] -WantedBy=multi-user.target http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos-observer.startup.sh ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos-observer.startup.sh b/specs/rpm/SOURCES/thermos-observer.startup.sh deleted file mode 100644 index 2d94fd9..0000000 --- a/specs/rpm/SOURCES/thermos-observer.startup.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# Starts up a Thermos observer process. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -source /etc/sysconfig/thermos-observer - -exec /usr/bin/thermos_observer "${OBSERVER_ARGS[@]}" http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos-observer.sysconfig ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos-observer.sysconfig b/specs/rpm/SOURCES/thermos-observer.sysconfig deleted file mode 100644 index 353cfa3..0000000 --- a/specs/rpm/SOURCES/thermos-observer.sysconfig +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# Configuration used when executing the Thermos observer process. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -OBSERVER_ARGS=( - --port=1338 - --log_to_disk=NONE - --log_to_stderr=google:INFO -) http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos.init.sh ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos.init.sh b/specs/rpm/SOURCES/thermos.init.sh new file mode 100644 index 0000000..461fea6 --- /dev/null +++ b/specs/rpm/SOURCES/thermos.init.sh @@ -0,0 +1,197 @@ +#!/bin/bash +# +# thermos-observer Starts the Thermos task observer. +# +# chkconfig: 345 55 25 +# description: This script starts the Thermos task observer, which provides a WebUI for \ +# viewing the state of tasks launched by the Thermos executor. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +### BEGIN INIT INFO +# Provides: thermos-observer +# Required-Start: +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Starts the Thermos task observer. +# Description: Starts the Thermos task observer. +### END INIT INFO + +# Source LSB function library. +. /lib/lsb/init-functions + +exec="/usr/bin/thermos-startup" +prog="thermos-observer" +logdir="/var/log/thermos" +lockfile="/var/run/thermos-observer.lock" +pid_file="/var/run/thermos-observer.pid" +stdout_log="${logdir}/observer.log" +stderr_log="${logdir}/observer-error.log" + +# Get a sane screen width +[ -z "${COLUMNS:-}" ] && COLUMNS=80 +[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype)" + +# Read in init configuration. +if [ -z "${BOOTUP:-}" ]; then + if [ -f /etc/sysconfig/init ]; then + . /etc/sysconfig/init + else + BOOTUP=color + RES_COL=60 + MOVE_TO_COL="echo -en \\033[${RES_COL}G" + SETCOLOR_SUCCESS="echo -en \\033[1;32m" + SETCOLOR_FAILURE="echo -en \\033[1;31m" + SETCOLOR_WARNING="echo -en \\033[1;33m" + SETCOLOR_NORMAL="echo -en \\033[0;39m" + LOGLEVEL=1 + fi + if [ "$CONSOLETYPE" = "serial" ]; then + BOOTUP=serial + MOVE_TO_COL= + SETCOLOR_SUCCESS= + SETCOLOR_FAILURE= + SETCOLOR_WARNING= + SETCOLOR_NORMAL= + fi +fi + +function usage { + err "Starts the Thermos task observer." + err "Usage: ${0} (restart|start|stop|status)" +} + +function out { + printf '%s\n' "$*"; +} + +function msg { + out "$*" >&2; +} + +function err { + local x=${?}; + msg "$*"; + return $(( ${x} == 0 ? 1 : ${x} )); +} + +function echo_success { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS + echo -n $" OK " + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 0 +} + +function echo_failure { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE + echo -n $"FAILED" + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 1 +} + +# Parse arguments. +ACTION=${1} + +# Ensures that action is. +if [ -z ${ACTION} ]; then + err "ERROR: No action specified." + usage + exit -1 +fi + +start() { + [ -x ${exec} ] || exit 5 + [ -f ${config} ] || exit 6 + echo -n $"Starting $prog: " + start_daemon daemonize -o ${stdout_log} -e ${stderr_log} -p ${pid_file} ${exec} + retval=$? + [ $retval -eq 0 ] && (echo_success; touch $lockfile) || echo_failure + echo + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p ${pid_file} ${exec} + retval=$? + [ $retval -eq 0 ] && (echo_success; rm -f $lockfile) || echo_failure + echo + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + pid=$(pidofproc -p ${pid_file} ${prog}) + if [ $? -eq 0 ]; then + echo "${prog} (pid ${pid}) is running..." + return 0 + else + if [ -e $lockfile ]; then + echo "${prog} dead but lockfile exists" + return 2 + else + echo "${prog} is stopped" + return 1 + fi + fi +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + +# Executes the requested daemon action. +case "${ACTION}" in + start) + rh_status_q && rh_status && exit 0 + start + ;; + stop) + stop + ;; + status) + rh_status + ;; + restart) + restart + ;; + *) + err "ERROR: Invalid action specified." + usage + exit -3 +esac + +exit $? http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos.logrotate ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos.logrotate b/specs/rpm/SOURCES/thermos.logrotate new file mode 100644 index 0000000..a6a7f5c --- /dev/null +++ b/specs/rpm/SOURCES/thermos.logrotate @@ -0,0 +1,24 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +/var/log/thermos/*.log { + + daily + missingok + rotate 14 + compress + delaycompress + notifempty + copytruncate + +} http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos.service ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos.service b/specs/rpm/SOURCES/thermos.service new file mode 100644 index 0000000..b699a56 --- /dev/null +++ b/specs/rpm/SOURCES/thermos.service @@ -0,0 +1,27 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[Unit] +Description=Thermos Observer +After=network.target +Wants=network.target + +[Service] +ExecStart=/usr/bin/thermos-startup +User=root +Group=root +Restart=always +RestartSec=20 +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos.startup.sh ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos.startup.sh b/specs/rpm/SOURCES/thermos.startup.sh new file mode 100644 index 0000000..788210a --- /dev/null +++ b/specs/rpm/SOURCES/thermos.startup.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Starts up a Thermos observer process. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +source /etc/sysconfig/thermos + +exec /usr/bin/thermos_observer "${OBSERVER_ARGS[@]}" http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/SOURCES/thermos.sysconfig ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/thermos.sysconfig b/specs/rpm/SOURCES/thermos.sysconfig new file mode 100644 index 0000000..353cfa3 --- /dev/null +++ b/specs/rpm/SOURCES/thermos.sysconfig @@ -0,0 +1,21 @@ +#!/bin/bash +# Configuration used when executing the Thermos observer process. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +OBSERVER_ARGS=( + --port=1338 + --log_to_disk=NONE + --log_to_stderr=google:INFO +) http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/a665227c/specs/rpm/aurora.spec ---------------------------------------------------------------------- diff --git a/specs/rpm/aurora.spec b/specs/rpm/aurora.spec index a4fc46d..200864e 100644 --- a/specs/rpm/aurora.spec +++ b/specs/rpm/aurora.spec @@ -63,16 +63,16 @@ License: ASL 2.0 URL: https://aurora.apache.org/ Source0: http://www.apache.org/dyn/closer.cgi?action=download&filename=aurora/%{version}/apache-aurora-%{version}.tar.gz#/apache-aurora-%{version}.tar.gz -Source1: aurora.service -Source2: thermos-observer.service -Source3: aurora.init.sh -Source4: thermos-observer.init.sh -Source5: aurora.startup.sh -Source6: thermos-observer.startup.sh -Source7: aurora.sysconfig -Source8: thermos-observer.sysconfig -Source9: aurora.logrotate -Source10: thermos-observer.logrotate +Source1: aurora-scheduler.service +Source2: thermos.service +Source3: aurora-scheduler.init.sh +Source4: thermos.init.sh +Source5: aurora-scheduler.startup.sh +Source6: thermos.startup.sh +Source7: aurora-scheduler.sysconfig +Source8: thermos.sysconfig +Source9: aurora-scheduler.logrotate +Source10: thermos.logrotate Source11: clusters.json Source12: aurora-pants.ini @@ -133,6 +133,7 @@ Summary: Mesos executor that runs and monitors tasks scheduled by the Aurora sch Group: Applications/System Requires: mesos >= %{MESOS_VERSION} +Requires: cyrus-sasl %if 0%{?rhel} && 0%{?rhel} < 7 Requires: python27 %else @@ -220,21 +221,21 @@ done # Installs all support scripting. %if 0%{?fedora} || 0%{?rhel} > 6 -install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/systemd/system -install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/systemd/system/thermos-observer.service +install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/systemd/system/aurora-scheduler.service +install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/systemd/system/thermos.service %else -install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/aurora -install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/thermos-observer +install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/aurora-scheduler +install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/thermos %endif install -m 755 %{SOURCE5} %{buildroot}%{_bindir}/aurora-scheduler-startup -install -m 755 %{SOURCE6} %{buildroot}%{_bindir}/thermos-observer-startup +install -m 755 %{SOURCE6} %{buildroot}%{_bindir}/thermos-startup -install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/aurora -install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/thermos-observer +install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/aurora-scheduler +install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/thermos -install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/aurora -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/logrotate.d/thermos-observer +install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/aurora-scheduler +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/logrotate.d/thermos install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/aurora/clusters.json @@ -249,47 +250,47 @@ exit 0 # Pre/post installation scripts: %post %if 0%{?fedora} || 0%{?rhel} > 6 -%systemd_post aurora.service +%systemd_post aurora-scheduler.service %else -/sbin/chkconfig --add aurora +/sbin/chkconfig --add aurora-scheduler %endif %preun %if 0%{?fedora} || 0%{?rhel} > 6 -%systemd_preun aurora.service +%systemd_preun aurora-scheduler.service %else -/sbin/service aurora stop >/dev/null 2>&1 -/sbin/chkconfig --del aurora +/sbin/service aurora-scheduler stop >/dev/null 2>&1 +/sbin/chkconfig --del aurora-scheduler %endif %postun %if 0%{?fedora} || 0%{?rhel} > 6 -%systemd_postun_with_restart aurora.service +%systemd_postun_with_restart aurora-scheduler.service %else -/sbin/service aurora start >/dev/null 2>&1 +/sbin/service aurora-scheduler start >/dev/null 2>&1 %endif %post -n aurora-executor %if 0%{?fedora} || 0%{?rhel} > 6 -%systemd_post thermos-observer.service +%systemd_post thermos.service %else -/sbin/chkconfig --add thermos-observer +/sbin/chkconfig --add thermos %endif %preun -n aurora-executor %if 0%{?fedora} || 0%{?rhel} > 6 -%systemd_preun thermos-observer.service +%systemd_preun thermos.service %else -/sbin/service thermos-observer stop >/dev/null 2>&1 -/sbin/chkconfig --del thermos-observer +/sbin/service thermos stop >/dev/null 2>&1 +/sbin/chkconfig --del thermos %endif %postun -n aurora-executor %if 0%{?fedora} || 0%{?rhel} > 6 -%systemd_postun_with_restart thermos-observer.service +%systemd_postun_with_restart thermos.service %else -/sbin/service thermos-observer start >/dev/null 2>&1 +/sbin/service thermos start >/dev/null 2>&1 %endif @@ -303,12 +304,12 @@ exit 0 %{_prefix}/lib/aurora/etc/* %{_prefix}/lib/aurora/lib/* %if 0%{?fedora} || 0%{?rhel} > 6 -%{_sysconfdir}/systemd/system/aurora.service +%{_sysconfdir}/systemd/system/aurora-scheduler.service %else -%{_sysconfdir}/init.d/aurora +%{_sysconfdir}/init.d/aurora-scheduler %endif -%config(noreplace) %{_sysconfdir}/logrotate.d/aurora -%config(noreplace) %{_sysconfdir}/sysconfig/aurora +%config(noreplace) %{_sysconfdir}/logrotate.d/aurora-scheduler +%config(noreplace) %{_sysconfdir}/sysconfig/aurora-scheduler %files -n aurora-tools @@ -324,16 +325,16 @@ exit 0 %{_bindir}/thermos_executor %{_bindir}/thermos_observer %{_bindir}/thermos_runner -%{_bindir}/thermos-observer-startup +%{_bindir}/thermos-startup %{_localstatedir}/log/thermos %{_localstatedir}/run/thermos %if 0%{?fedora} || 0%{?rhel} > 6 -%{_sysconfdir}/systemd/system/thermos-observer.service +%{_sysconfdir}/systemd/system/thermos.service %else -%{_sysconfdir}/init.d/thermos-observer +%{_sysconfdir}/init.d/thermos %endif -%config(noreplace) %{_sysconfdir}/logrotate.d/thermos-observer -%config(noreplace) %{_sysconfdir}/sysconfig/thermos-observer +%config(noreplace) %{_sysconfdir}/logrotate.d/thermos +%config(noreplace) %{_sysconfdir}/sysconfig/thermos %changelog