| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,31 +0,0 @@ |
| 1 |
-# gantt.sh - Devstack extras script to install Gantt |
|
| 2 |
- |
|
| 3 |
-if is_service_enabled n-sch; then |
|
| 4 |
- disable_service gantt |
|
| 5 |
-fi |
|
| 6 |
- |
|
| 7 |
-if is_service_enabled gantt; then |
|
| 8 |
- if [[ "$1" == "source" ]]; then |
|
| 9 |
- # Initial source |
|
| 10 |
- source $TOP_DIR/lib/gantt |
|
| 11 |
- elif [[ "$1" == "stack" && "$2" == "install" ]]; then |
|
| 12 |
- echo_summary "Installing Gantt" |
|
| 13 |
- install_gantt |
|
| 14 |
- cleanup_gantt |
|
| 15 |
- elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then |
|
| 16 |
- echo_summary "Configuring Gantt" |
|
| 17 |
- configure_gantt |
|
| 18 |
- |
|
| 19 |
- elif [[ "$1" == "stack" && "$2" == "extra" ]]; then |
|
| 20 |
- # Initialize gantt |
|
| 21 |
- init_gantt |
|
| 22 |
- |
|
| 23 |
- # Start gantt |
|
| 24 |
- echo_summary "Starting Gantt" |
|
| 25 |
- start_gantt |
|
| 26 |
- fi |
|
| 27 |
- |
|
| 28 |
- if [[ "$1" == "unstack" ]]; then |
|
| 29 |
- stop_gantt |
|
| 30 |
- fi |
|
| 31 |
-fi |
| 32 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,98 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-# |
|
| 3 |
-# lib/gantt |
|
| 4 |
-# Install and start **Gantt** scheduler service |
|
| 5 |
- |
|
| 6 |
-# Dependencies: |
|
| 7 |
-# |
|
| 8 |
-# - functions |
|
| 9 |
-# - DEST, DATA_DIR, STACK_USER must be defined |
|
| 10 |
- |
|
| 11 |
-# stack.sh |
|
| 12 |
-# --------- |
|
| 13 |
-# - install_gantt |
|
| 14 |
-# - configure_gantt |
|
| 15 |
-# - init_gantt |
|
| 16 |
-# - start_gantt |
|
| 17 |
-# - stop_gantt |
|
| 18 |
-# - cleanup_gantt |
|
| 19 |
- |
|
| 20 |
-# Save trace setting |
|
| 21 |
-XTRACE=$(set +o | grep xtrace) |
|
| 22 |
-set +o xtrace |
|
| 23 |
- |
|
| 24 |
-# Defaults |
|
| 25 |
-# -------- |
|
| 26 |
- |
|
| 27 |
-# set up default directories |
|
| 28 |
-GANTT_DIR=$DEST/gantt |
|
| 29 |
-GANTT_STATE_PATH=${GANTT_STATE_PATH:=$DATA_DIR/gantt}
|
|
| 30 |
-GANTT_REPO=${GANTT_REPO:-${GIT_BASE}/openstack/gantt.git}
|
|
| 31 |
-GANTT_BRANCH=${GANTT_BRANCH:-master}
|
|
| 32 |
- |
|
| 33 |
-GANTTCLIENT_DIR=$DEST/python-ganttclient |
|
| 34 |
-GANTTCLIENT_REPO=${GANTT_REPO:-${GIT_BASE}/openstack/python-ganttclient.git}
|
|
| 35 |
-GANTTCLIENT_BRANCH=${GANTT_BRANCH:-master}
|
|
| 36 |
- |
|
| 37 |
-# eventually we will have a separate gantt config |
|
| 38 |
-# file but for compatibility reasone stick with |
|
| 39 |
-# nova.conf for now |
|
| 40 |
-GANTT_CONF_DIR=${GANTT_CONF_DIR:-/etc/nova}
|
|
| 41 |
-GANTT_CONF=$GANTT_CONF_DIR/nova.conf |
|
| 42 |
- |
|
| 43 |
-# Support entry points installation of console scripts |
|
| 44 |
-GANTT_BIN_DIR=$(get_python_exec_prefix) |
|
| 45 |
- |
|
| 46 |
- |
|
| 47 |
-# Functions |
|
| 48 |
-# --------- |
|
| 49 |
- |
|
| 50 |
-# cleanup_gantt() - Remove residual data files, anything left over from previous |
|
| 51 |
-# runs that a clean run would need to clean up |
|
| 52 |
-function cleanup_gantt {
|
|
| 53 |
- echo "Cleanup Gantt" |
|
| 54 |
-} |
|
| 55 |
- |
|
| 56 |
-# configure_gantt() - Set config files, create data dirs, etc |
|
| 57 |
-function configure_gantt {
|
|
| 58 |
- echo "Configure Gantt" |
|
| 59 |
-} |
|
| 60 |
- |
|
| 61 |
-# init_gantt() - Initialize database and volume group |
|
| 62 |
-function init_gantt {
|
|
| 63 |
- echo "Initialize Gantt" |
|
| 64 |
-} |
|
| 65 |
- |
|
| 66 |
-# install_gantt() - Collect source and prepare |
|
| 67 |
-function install_gantt {
|
|
| 68 |
- git_clone $GANTT_REPO $GANTT_DIR $GANTT_BRANCH |
|
| 69 |
- setup_develop $GANTT_DIR |
|
| 70 |
-} |
|
| 71 |
- |
|
| 72 |
-# install_ganttclient() - Collect source and prepare |
|
| 73 |
-function install_ganttclient {
|
|
| 74 |
- echo "Install Gantt Client" |
|
| 75 |
-# git_clone $GANTTCLIENT_REPO $GANTTCLIENT_DIR $GANTTCLIENT_BRANCH |
|
| 76 |
-# setup_develop $GANTTCLIENT_DIR |
|
| 77 |
-} |
|
| 78 |
- |
|
| 79 |
-# start_gantt() - Start running processes, including screen |
|
| 80 |
-function start_gantt {
|
|
| 81 |
- if is_service_enabled gantt; then |
|
| 82 |
- run_process gantt "$GANTT_BIN_DIR/gantt-scheduler --config-file $GANTT_CONF" |
|
| 83 |
- fi |
|
| 84 |
-} |
|
| 85 |
- |
|
| 86 |
-# stop_gantt() - Stop running processes |
|
| 87 |
-function stop_gantt {
|
|
| 88 |
- echo "Stop Gantt" |
|
| 89 |
- stop_process gantt |
|
| 90 |
-} |
|
| 91 |
- |
|
| 92 |
-# Restore xtrace |
|
| 93 |
-$XTRACE |
|
| 94 |
- |
|
| 95 |
-# Tell emacs to use shell-script-mode |
|
| 96 |
-## Local variables: |
|
| 97 |
-## mode: shell-script |
|
| 98 |
-## End: |