Skip to content

Commit 02d4e0e

Browse files
committed
simple eho installation scripts has been added
1 parent e7f0c7b commit 02d4e0e

3 files changed

Lines changed: 85 additions & 0 deletions

File tree

lib/eho

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# lib/eho
2+
# Functions to control the configuration and operation of the EHO service
3+
# <do not include this template file in ``stack.sh``!>
4+
5+
# ``stack.sh`` calls the entry points in this order:
6+
#
7+
# install_eho
8+
# configure_eho
9+
# init_eho
10+
# start_eho
11+
# stop_eho
12+
# cleanup_eho
13+
14+
# Save trace setting
15+
XTRACE=$(set +o | grep xtrace)
16+
set +o xtrace
17+
18+
19+
# Defaults
20+
# --------
21+
22+
# <define global variables here that belong to this project>
23+
24+
# Set up default directories
25+
EHO_DIR=$DEST/eho
26+
27+
if [[ -d $EHO_DIR/bin ]]; then
28+
EHO_BIN_DIR=$EHO_DIR/bin
29+
else
30+
EHO_BIN_DIR=$(get_python_exec_prefix)
31+
fi
32+
33+
# Entry Points
34+
# ------------
35+
36+
function cleanup_eho() {
37+
echo "EHO has been cleaned"
38+
}
39+
40+
function configure_eho() {
41+
setup_develop $EHO_DIR
42+
}
43+
44+
function init_eho() {
45+
}
46+
47+
function install_eho() {
48+
git_clone $EHO_REPO $EHO_DIR $EHO_BRANCH $EHO_TAG
49+
}
50+
51+
function start_eho() {
52+
screen_it eho "cd $EHO_DIR && $EHO_BIN_DIR/eho --reset-db --stub-data"
53+
}
54+
55+
function stop_horizon() {
56+
for serv in eho; do
57+
screen -S $SCREEN_NAME -p $serv -X kill
58+
done
59+
}
60+
61+
# Restore xtrace
62+
$XTRACE

stack.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,15 @@ source $TOP_DIR/lib/heat
283283
source $TOP_DIR/lib/quantum
284284
source $TOP_DIR/lib/baremetal
285285
source $TOP_DIR/lib/ldap
286+
source $TOP_DIR/lib/eho
286287

287288
# Set the destination directories for OpenStack projects
288289
HORIZON_DIR=$DEST/horizon
289290
OPENSTACKCLIENT_DIR=$DEST/python-openstackclient
290291
NOVNC_DIR=$DEST/noVNC
291292
SPICE_DIR=$DEST/spice-html5
292293
SWIFT3_DIR=$DEST/swift3
294+
EHO_DIR=$DEST/eho
293295

294296
# Should cinder perform secure deletion of volumes?
295297
# Defaults to true, can be set to False to avoid this bug when testing:
@@ -712,6 +714,9 @@ if is_service_enabled ceilometer; then
712714
install_ceilometerclient
713715
install_ceilometer
714716
fi
717+
if is_service_enabled eho; then
718+
install_eho
719+
fi
715720

716721

717722
# Initialization
@@ -777,6 +782,10 @@ if is_service_enabled tls-proxy; then
777782
# don't be naive and add to existing line!
778783
fi
779784

785+
if is_service_enabled eho; then
786+
configure_eho
787+
fi
788+
780789
# Syslog
781790
# ------
782791

@@ -1199,6 +1208,16 @@ if is_service_enabled heat; then
11991208
start_heat
12001209
fi
12011210

1211+
if is_service_enabled eho; then
1212+
echo_summary "Uploading EHO images"
1213+
for eho_image_url in ${EHO_IMAGE_URLS//,/ }; do
1214+
upload_image $eho_image_url $TOKEN
1215+
done
1216+
echo_summary "Configuring EHO"
1217+
init_eho
1218+
echo_summary "Starting EHO"
1219+
start_eho
1220+
12021221
# Create account rc files
12031222
# =======================
12041223

stackrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,7 @@ VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-5130M}
198198

199199
PRIVATE_NETWORK_NAME=${PRIVATE_NETWORK_NAME:-"private"}
200200
PUBLIC_NETWORK_NAME=${PUBLIC_NETWORK_NAME:-"nova"}
201+
202+
# eho confs
203+
EHO_REPO=${GIT_BASE}/Mirantis/eho.git
204+
EHO_BRANCH=master

0 commit comments

Comments
 (0)