Browse code

Revert "Create tools/install_prereqs.sh"

This reverts commit 7be0b04

This work breaks the ability to do multi database installs,
revert until there is a working solution here, as this is going
to make fixing postgresql in tempest impossible.

Change-Id: I39a2b78542fe60233806d1005186ce1b31d4be17

Sean Dague authored on 2013/01/03 03:59:47
Showing 3 changed files
... ...
@@ -710,27 +710,6 @@ function restart_service() {
710 710
 }
711 711
 
712 712
 
713
-# HTTP and HTTPS proxy servers are supported via the usual environment variables [1]
714
-# ``http_proxy``, ``https_proxy`` and ``no_proxy``. They can be set in
715
-# ``localrc`` or on the command line if necessary::
716
-#
717
-# [1] http://www.w3.org/Daemon/User/Proxies/ProxyClients.html
718
-#
719
-#     http_proxy=http://proxy.example.com:3128/ no_proxy=repo.example.net ./stack.sh
720
-
721
-function re_export_proxy_variables() {
722
-    if [[ -n "$http_proxy" ]]; then
723
-        export http_proxy=$http_proxy
724
-    fi
725
-    if [[ -n "$https_proxy" ]]; then
726
-        export https_proxy=$https_proxy
727
-    fi
728
-    if [[ -n "$no_proxy" ]]; then
729
-        export no_proxy=$no_proxy
730
-    fi
731
-}
732
-
733
-
734 713
 # Helper to launch a service in a named screen
735 714
 # screen_it service "command-line"
736 715
 function screen_it {
... ...
@@ -648,7 +648,25 @@ set -o xtrace
648 648
 
649 649
 # Install package requirements
650 650
 echo_summary "Installing package prerequisites"
651
-$TOP_DIR/tools/install_prereqs.sh
651
+if is_ubuntu; then
652
+    install_package $(get_packages $FILES/apts)
653
+elif is_fedora; then
654
+    install_package $(get_packages $FILES/rpms)
655
+elif is_suse; then
656
+    install_package $(get_packages $FILES/rpms-suse)
657
+else
658
+    exit_distro_not_supported "list of packages"
659
+fi
660
+
661
+if [[ $SYSLOG != "False" ]]; then
662
+    if is_ubuntu || is_fedora; then
663
+        install_package rsyslog-relp
664
+    elif is_suse; then
665
+        install_package rsyslog-module-relp
666
+    else
667
+        exit_distro_not_supported "rsyslog-relp installation"
668
+    fi
669
+fi
652 670
 
653 671
 if is_service_enabled rabbit; then
654 672
     # Install rabbitmq-server
655 673
deleted file mode 100755
... ...
@@ -1,78 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-# **install_prereqs.sh**
4
-
5
-# Install system package prerequisites
6
-#
7
-# install_prereqs.sh [-f]
8
-#
9
-# -f        Force an install run now
10
-
11
-
12
-if [[ -n "$1" &&  "$1" = "-f" ]]; then
13
-    FORCE=1
14
-fi
15
-
16
-# Keep track of the devstack directory
17
-TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
18
-
19
-# Import common functions
20
-source $TOP_DIR/functions
21
-
22
-# Determine what system we are running on.  This provides ``os_VENDOR``,
23
-# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
24
-# and ``DISTRO``
25
-GetDistro
26
-
27
-# Needed to get ``ENABLED_SERVICES``
28
-source $TOP_DIR/stackrc
29
-
30
-# Prereq dirs are here
31
-FILES=$TOP_DIR/files
32
-
33
-# Minimum wait time
34
-PREREQ_RERUN_MARKER=${PREREQ_RERUN_MARKER:-$TOP_DIR/.prereqs}
35
-PREREQ_RERUN_HOURS=${PREREQ_RERUN_HOURS:-2}
36
-PREREQ_RERUN_SECONDS=$((60*60*$PREREQ_RERUN_HOURS))
37
-
38
-NOW=$(date "+%s")
39
-LAST_RUN=$(head -1 $PREREQ_RERUN_MARKER 2>/dev/null || echo "0")
40
-DELTA=$(($NOW - $LAST_RUN))
41
-if [[ $DELTA -lt $PREREQ_RERUN_SECONDS && -z "$FORCE" ]]; then
42
-    echo "Re-run time has not expired ($(($PREREQ_RERUN_SECONDS - $DELTA)) seconds remaining); exiting..."
43
-    exit 0
44
-fi
45
-
46
-# Make sure the proxy config is visible to sub-processes
47
-re_export_proxy_variables
48
-
49
-# Install Packages
50
-# ================
51
-
52
-# Install package requirements
53
-if is_ubuntu; then
54
-    install_package $(get_packages $FILES/apts)
55
-elif is_fedora; then
56
-    install_package $(get_packages $FILES/rpms)
57
-elif is_suse; then
58
-    install_package $(get_packages $FILES/rpms-suse)
59
-else
60
-    exit_distro_not_supported "list of packages"
61
-fi
62
-
63
-if [[ -n "$SYSLOG" && "$SYSLOG" != "False" ]]; then
64
-    if is_ubuntu || is_fedora; then
65
-        install_package rsyslog-relp
66
-    elif is_suse; then
67
-        install_package rsyslog-module-relp
68
-    else
69
-        exit_distro_not_supported "rsyslog-relp installation"
70
-    fi
71
-fi
72
-
73
-
74
-# Mark end of run
75
-# ---------------
76
-
77
-date "+%s" >$PREREQ_RERUN_MARKER
78
-date >>$PREREQ_RERUN_MARKER