Browse code

Remove Zaqar from devstack

Zaqar's devstack code has been moved into a plugin in the Zaqar repo.
This patch removes the remaining code from devstack.

Depends-On: Iceefabb6cd528b23075a91e8039b8264eb3f33f5
Change-Id: Ifcf54fa2d4a5bf49b6757b593bb70cdeda8edb2a

Flavio Percoco authored on 2015/04/30 15:54:15
Showing 7 changed files
... ...
@@ -173,7 +173,7 @@ Scripts
173 173
 * `lib/swift <lib/swift.html>`__
174 174
 * `lib/tempest <lib/tempest.html>`__
175 175
 * `lib/tls <lib/tls.html>`__
176
-* `lib/zaqar <lib/zaqar.html>`__
176
+* `lib/trove <lib/trove.html>`__
177 177
 * `unstack.sh <unstack.sh.html>`__
178 178
 * `clean.sh <clean.sh.html>`__
179 179
 * `run\_tests.sh <run_tests.sh.html>`__
... ...
@@ -181,7 +181,6 @@ Scripts
181 181
 * `extras.d/50-ironic.sh <extras.d/50-ironic.sh.html>`__
182 182
 * `extras.d/60-ceph.sh <extras.d/60-ceph.sh.html>`__
183 183
 * `extras.d/70-tuskar.sh <extras.d/70-tuskar.sh.html>`__
184
-* `extras.d/70-zaqar.sh <extras.d/70-zaqar.sh.html>`__
185 184
 * `extras.d/80-tempest.sh <extras.d/80-tempest.sh.html>`__
186 185
 
187 186
 * `inc/ini-config <inc/ini-config.html>`__
... ...
@@ -239,4 +238,3 @@ Exercises
239 239
 * `exercises/sec\_groups.sh <exercises/sec_groups.sh.html>`__
240 240
 * `exercises/swift.sh <exercises/swift.sh.html>`__
241 241
 * `exercises/volumes.sh <exercises/volumes.sh.html>`__
242
-* `exercises/zaqar.sh <exercises/zaqar.sh.html>`__
243 242
deleted file mode 100755
... ...
@@ -1,43 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-# **zaqar.sh**
4
-
5
-# Sanity check that Zaqar started if enabled
6
-
7
-echo "*********************************************************************"
8
-echo "Begin DevStack Exercise: $0"
9
-echo "*********************************************************************"
10
-
11
-# This script exits on an error so that errors don't compound and you see
12
-# only the first error that occurred.
13
-set -o errexit
14
-
15
-# Print the commands being run so that we can see the command that triggers
16
-# an error.  It is also useful for following allowing as the install occurs.
17
-set -o xtrace
18
-
19
-
20
-# Settings
21
-# ========
22
-
23
-# Keep track of the current directory
24
-EXERCISE_DIR=$(cd $(dirname "$0") && pwd)
25
-TOP_DIR=$(cd $EXERCISE_DIR/..; pwd)
26
-
27
-# Import common functions
28
-source $TOP_DIR/functions
29
-
30
-# Import configuration
31
-source $TOP_DIR/openrc
32
-
33
-# Import exercise configuration
34
-source $TOP_DIR/exerciserc
35
-
36
-is_service_enabled zaqar-server || exit 55
37
-
38
-$CURL_GET http://$SERVICE_HOST:8888/v1/ 2>/dev/null | grep -q 'queue_name' || die $LINENO "Zaqar API not functioning!"
39
-
40
-set +o xtrace
41
-echo "*********************************************************************"
42
-echo "SUCCESS: End DevStack Exercise: $0"
43
-echo "*********************************************************************"
44 1
deleted file mode 100644
... ...
@@ -1,29 +0,0 @@
1
-# zaqar.sh - Devstack extras script to install Zaqar
2
-
3
-if is_service_enabled zaqar-server; then
4
-    if [[ "$1" == "source" ]]; then
5
-        # Initial source
6
-        source $TOP_DIR/lib/zaqar
7
-    elif [[ "$1" == "stack" && "$2" == "install" ]]; then
8
-        echo_summary "Installing Zaqar"
9
-        install_zaqarclient
10
-        install_zaqar
11
-    elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
12
-        echo_summary "Configuring Zaqar"
13
-        configure_zaqar
14
-        configure_zaqarclient
15
-
16
-        if is_service_enabled key; then
17
-            create_zaqar_accounts
18
-        fi
19
-
20
-    elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
21
-        echo_summary "Initializing Zaqar"
22
-        init_zaqar
23
-        start_zaqar
24
-    fi
25
-
26
-    if [[ "$1" == "unstack" ]]; then
27
-        stop_zaqar
28
-    fi
29
-fi
30 1
deleted file mode 100644
... ...
@@ -1,4 +0,0 @@
1
-python-pymongo
2
-mongodb-server
3
-pkg-config
4
-redis-server # NOPRIME
5 1
\ No newline at end of file
6 2
deleted file mode 100644
... ...
@@ -1,5 +0,0 @@
1
-selinux-policy-targeted
2
-mongodb
3
-mongodb-server
4
-pymongo
5
-redis # NOPRIME
... ...
@@ -550,7 +550,7 @@ function configure_tempest {
550 550
     # this tempest service list needs to be all the services that
551 551
     # tempest supports, otherwise we can have an erroneous set of
552 552
     # defaults (something defaulting true in Tempest, but not listed here).
553
-    TEMPEST_SERVICES="key,glance,nova,neutron,cinder,swift,heat,ceilometer,horizon,sahara,ironic,trove,zaqar"
553
+    TEMPEST_SERVICES="key,glance,nova,neutron,cinder,swift,heat,ceilometer,horizon,sahara,ironic,trove"
554 554
     for service in ${TEMPEST_SERVICES//,/ }; do
555 555
         if is_service_enabled $service ; then
556 556
             iniset $TEMPEST_CONFIG service_available $service "True"
557 557
deleted file mode 100644
... ...
@@ -1,225 +0,0 @@
1
-#!/bin/bash
2
-#
3
-# lib/zaqar
4
-# Install and start **Zaqar** service
5
-
6
-# To enable a minimal set of Zaqar services, add the following to localrc:
7
-#
8
-#     enable_service zaqar-server
9
-#
10
-# Dependencies:
11
-# - functions
12
-# - OS_AUTH_URL for auth in api
13
-# - DEST set to the destination directory
14
-# - SERVICE_PASSWORD, SERVICE_TENANT_NAME for auth in api
15
-# - STACK_USER service user
16
-
17
-# stack.sh
18
-# ---------
19
-# install_zaqar
20
-# configure_zaqar
21
-# init_zaqar
22
-# start_zaqar
23
-# stop_zaqar
24
-# cleanup_zaqar
25
-# cleanup_zaqar_mongodb
26
-
27
-# Save trace setting
28
-XTRACE=$(set +o | grep xtrace)
29
-set +o xtrace
30
-
31
-
32
-# Defaults
33
-# --------
34
-
35
-# Set up default directories
36
-ZAQAR_DIR=$DEST/zaqar
37
-ZAQARCLIENT_DIR=$DEST/python-zaqarclient
38
-ZAQAR_CONF_DIR=/etc/zaqar
39
-ZAQAR_CONF=$ZAQAR_CONF_DIR/zaqar.conf
40
-ZAQAR_AUTH_CACHE_DIR=${ZAQAR_AUTH_CACHE_DIR:-/var/cache/zaqar}
41
-
42
-# Support potential entry-points console scripts
43
-ZAQAR_BIN_DIR=$(get_python_exec_prefix)
44
-
45
-# Set up database backend
46
-ZAQAR_BACKEND=${ZAQAR_BACKEND:-mongodb}
47
-
48
-
49
-# Set Zaqar repository
50
-ZAQAR_REPO=${ZAQAR_REPO:-${GIT_BASE}/openstack/zaqar.git}
51
-ZAQAR_BRANCH=${ZAQAR_BRANCH:-master}
52
-
53
-# Set client library repository
54
-ZAQARCLIENT_REPO=${ZAQARCLIENT_REPO:-${GIT_BASE}/openstack/python-zaqarclient.git}
55
-ZAQARCLIENT_BRANCH=${ZAQARCLIENT_BRANCH:-master}
56
-
57
-# Set Zaqar Connection Info
58
-ZAQAR_SERVICE_HOST=${ZAQAR_SERVICE_HOST:-$SERVICE_HOST}
59
-ZAQAR_SERVICE_PORT=${ZAQAR_SERVICE_PORT:-8888}
60
-ZAQAR_SERVICE_PROTOCOL=${ZAQAR_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
61
-
62
-# Functions
63
-# ---------
64
-
65
-# Test if any Zaqar services are enabled
66
-# is_zaqar_enabled
67
-function is_zaqar_enabled {
68
-    [[ ,${ENABLED_SERVICES} =~ ,"zaqar-" ]] && return 0
69
-    return 1
70
-}
71
-
72
-# cleanup_zaqar() - Cleans up general things from previous
73
-# runs and storage specific left overs.
74
-function cleanup_zaqar {
75
-    if [ "$ZAQAR_BACKEND" = 'mongodb' ] ; then
76
-        cleanup_zaqar_mongodb
77
-    fi
78
-}
79
-
80
-# cleanup_zaqar_mongodb() - Remove residual data files, anything left over from previous
81
-# runs that a clean run would need to clean up
82
-function cleanup_zaqar_mongodb {
83
-    if ! timeout $SERVICE_TIMEOUT sh -c "while ! mongo zaqar --eval 'db.dropDatabase();'; do sleep 1; done"; then
84
-        die $LINENO "Mongo DB did not start"
85
-    else
86
-        full_version=$(mongo zaqar --eval 'db.dropDatabase();')
87
-        mongo_version=`echo $full_version | cut -d' ' -f4`
88
-        required_mongo_version='2.2'
89
-        if [[ $mongo_version < $required_mongo_version ]]; then
90
-            die $LINENO "Zaqar needs Mongo DB version >= 2.2 to run."
91
-        fi
92
-    fi
93
-}
94
-
95
-# configure_zaqarclient() - Set config files, create data dirs, etc
96
-function configure_zaqarclient {
97
-    setup_develop $ZAQARCLIENT_DIR
98
-}
99
-
100
-# configure_zaqar() - Set config files, create data dirs, etc
101
-function configure_zaqar {
102
-    setup_develop $ZAQAR_DIR
103
-
104
-    sudo install -d -o $STACK_USER -m 755 $ZAQAR_CONF_DIR
105
-
106
-    iniset $ZAQAR_CONF DEFAULT debug True
107
-    iniset $ZAQAR_CONF DEFAULT verbose True
108
-    iniset $ZAQAR_CONF DEFAULT admin_mode True
109
-    iniset $ZAQAR_CONF DEFAULT use_syslog $SYSLOG
110
-    iniset $ZAQAR_CONF 'drivers:transport:wsgi' bind $ZAQAR_SERVICE_HOST
111
-
112
-    configure_auth_token_middleware $ZAQAR_CONF zaqar $ZAQAR_AUTH_CACHE_DIR
113
-
114
-    if [ "$ZAQAR_BACKEND" = 'mysql' ] || [ "$ZAQAR_BACKEND" = 'postgresql' ] ; then
115
-        iniset $ZAQAR_CONF drivers storage sqlalchemy
116
-        iniset $ZAQAR_CONF 'drivers:storage:sqlalchemy' uri `database_connection_url zaqar`
117
-    elif [ "$ZAQAR_BACKEND" = 'mongodb' ] ; then
118
-        iniset $ZAQAR_CONF  drivers storage mongodb
119
-        iniset $ZAQAR_CONF 'drivers:storage:mongodb' uri mongodb://localhost:27017/zaqar
120
-        configure_mongodb
121
-    elif [ "$ZAQAR_BACKEND" = 'redis' ] ; then
122
-        iniset $ZAQAR_CONF  drivers storage redis
123
-        iniset $ZAQAR_CONF 'drivers:storage:redis' uri redis://localhost:6379
124
-        configure_redis
125
-    fi
126
-
127
-    iniset $ZAQAR_CONF DEFAULT notification_driver messaging
128
-    iniset $ZAQAR_CONF DEFAULT control_exchange zaqar
129
-
130
-    iniset_rpc_backend zaqar $ZAQAR_CONF
131
-
132
-    cleanup_zaqar
133
-}
134
-
135
-function configure_redis {
136
-    if is_ubuntu; then
137
-        install_package redis-server
138
-        pip_install_gr redis
139
-    elif is_fedora; then
140
-        install_package redis
141
-        pip_install_gr redis
142
-    else
143
-        exit_distro_not_supported "redis installation"
144
-    fi
145
-}
146
-
147
-function configure_mongodb {
148
-    # Set nssize to 2GB. This increases the number of namespaces supported
149
-    # # per database.
150
-    if is_ubuntu; then
151
-        sudo sed -i -e "
152
-            s|[^ \t]*#[ \t]*\(nssize[ \t]*=.*\$\)|\1|
153
-            s|^\(nssize[ \t]*=[ \t]*\).*\$|\1 2047|
154
-        " /etc/mongodb.conf
155
-        restart_service mongodb
156
-    elif is_fedora; then
157
-        sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod
158
-        restart_service mongod
159
-    fi
160
-}
161
-
162
-# init_zaqar() - Initialize etc.
163
-function init_zaqar {
164
-    # Create cache dir
165
-    sudo install -d -o $STACK_USER $ZAQAR_AUTH_CACHE_DIR
166
-    rm -f $ZAQAR_AUTH_CACHE_DIR/*
167
-}
168
-
169
-# install_zaqar() - Collect source and prepare
170
-function install_zaqar {
171
-    git_clone $ZAQAR_REPO $ZAQAR_DIR $ZAQAR_BRANCH
172
-    setup_develop $ZAQAR_DIR
173
-}
174
-
175
-# install_zaqarclient() - Collect source and prepare
176
-function install_zaqarclient {
177
-    git_clone $ZAQARCLIENT_REPO $ZAQARCLIENT_DIR $ZAQARCLIENT_BRANCH
178
-    setup_develop $ZAQARCLIENT_DIR
179
-}
180
-
181
-# start_zaqar() - Start running processes, including screen
182
-function start_zaqar {
183
-    if [[ "$USE_SCREEN" = "False" ]]; then
184
-        run_process zaqar-server "zaqar-server --config-file $ZAQAR_CONF --daemon"
185
-    else
186
-        run_process zaqar-server "zaqar-server --config-file $ZAQAR_CONF"
187
-    fi
188
-
189
-    echo "Waiting for Zaqar to start..."
190
-    if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- $ZAQAR_SERVICE_PROTOCOL://$ZAQAR_SERVICE_HOST:$ZAQAR_SERVICE_PORT/v1/health; do sleep 1; done"; then
191
-        die $LINENO "Zaqar did not start"
192
-    fi
193
-}
194
-
195
-# stop_zaqar() - Stop running processes
196
-function stop_zaqar {
197
-    local serv
198
-    # Kill the zaqar screen windows
199
-    for serv in zaqar-server; do
200
-        screen -S $SCREEN_NAME -p $serv -X kill
201
-    done
202
-}
203
-
204
-function create_zaqar_accounts {
205
-    create_service_user "zaqar"
206
-
207
-    if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
208
-
209
-        get_or_create_service "zaqar" "messaging" "Zaqar Service"
210
-        get_or_create_endpoint "messaging" \
211
-            "$REGION_NAME" \
212
-            "$ZAQAR_SERVICE_PROTOCOL://$ZAQAR_SERVICE_HOST:$ZAQAR_SERVICE_PORT" \
213
-            "$ZAQAR_SERVICE_PROTOCOL://$ZAQAR_SERVICE_HOST:$ZAQAR_SERVICE_PORT" \
214
-            "$ZAQAR_SERVICE_PROTOCOL://$ZAQAR_SERVICE_HOST:$ZAQAR_SERVICE_PORT"
215
-    fi
216
-
217
-}
218
-
219
-
220
-# Restore xtrace
221
-$XTRACE
222
-
223
-# Local variables:
224
-# mode: shell-script
225
-# End: