blob: ab0ba0ef8a4eaaa6db81ae66ac9028539eebcfb3 [file] [log] [blame]
James E. Blair92e81992011-10-11 09:26:29 -05001#!/usr/bin/env bash
Dean Troyere62ba4d2012-06-27 22:07:34 -05002
3# **build_bm.sh**
4
James E. Blair92e81992011-10-11 09:26:29 -05005# Build an OpenStack install on a bare metal machine.
6set +x
7
Dean Troyer05530ca2012-07-06 15:09:10 -05008# Keep track of the current directory
9TOOLS_DIR=$(cd $(dirname "$0") && pwd)
10TOP_DIR=$(cd $TOOLS_DIR/..; pwd)
11
12# Import common functions
13source $TOP_DIR/functions
14
James E. Blair92e81992011-10-11 09:26:29 -050015# Source params
16source ./stackrc
17
18# Param string to pass to stack.sh. Like "EC2_DMZ_HOST=192.168.1.1 MYSQL_USER=nova"
19STACKSH_PARAMS=${STACKSH_PARAMS:-}
20
21# Option to use the version of devstack on which we are currently working
22USE_CURRENT_DEVSTACK=${USE_CURRENT_DEVSTACK:-1}
23
24# Configure the runner
25RUN_SH=`mktemp`
26cat > $RUN_SH <<EOF
27#!/usr/bin/env bash
28# Install and run stack.sh
29cd devstack
30$STACKSH_PARAMS ./stack.sh
31EOF
32
33# Make the run.sh executable
34chmod 755 $RUN_SH
35
36scp -r . root@$CONTAINER_IP:devstack
37scp $RUN_SH root@$CONTAINER_IP:$RUN_SH
38ssh root@$CONTAINER_IP $RUN_SH