James E. Blair | 92e8199 | 2011-10-11 09:26:29 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Dean Troyer | e62ba4d | 2012-06-27 22:07:34 -0500 | [diff] [blame] | 2 | |
| 3 | # **build_bm.sh** |
| 4 | |
James E. Blair | 92e8199 | 2011-10-11 09:26:29 -0500 | [diff] [blame] | 5 | # Build an OpenStack install on a bare metal machine. |
| 6 | set +x |
| 7 | |
| 8 | # Source params |
| 9 | source ./stackrc |
| 10 | |
| 11 | # Param string to pass to stack.sh. Like "EC2_DMZ_HOST=192.168.1.1 MYSQL_USER=nova" |
| 12 | STACKSH_PARAMS=${STACKSH_PARAMS:-} |
| 13 | |
| 14 | # Option to use the version of devstack on which we are currently working |
| 15 | USE_CURRENT_DEVSTACK=${USE_CURRENT_DEVSTACK:-1} |
| 16 | |
| 17 | # Configure the runner |
| 18 | RUN_SH=`mktemp` |
| 19 | cat > $RUN_SH <<EOF |
| 20 | #!/usr/bin/env bash |
| 21 | # Install and run stack.sh |
| 22 | cd devstack |
| 23 | $STACKSH_PARAMS ./stack.sh |
| 24 | EOF |
| 25 | |
| 26 | # Make the run.sh executable |
| 27 | chmod 755 $RUN_SH |
| 28 | |
| 29 | scp -r . root@$CONTAINER_IP:devstack |
| 30 | scp $RUN_SH root@$CONTAINER_IP:$RUN_SH |
| 31 | ssh root@$CONTAINER_IP $RUN_SH |