aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/launch.sh
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-09-08 07:47:19 -0400
committerbaigk <baiguoku@huawei.com>2015-09-08 08:24:09 -0400
commitcf87d3067a63cb8be315a3addfd9c27d86be3b5a (patch)
tree861d46aebc75c73cc13a19fecfb5c48aa88a56a1 /deploy/launch.sh
parent633175ed2c5d0ab339027ba0a542bcdd4d3769c0 (diff)
Build improvement for speedup and using public repo
JIRA: COMPASS-19 Change-Id: Iba101807e1bd2f843f1253791b7e87e1acb7934b Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/launch.sh')
-rwxr-xr-xdeploy/launch.sh65
1 files changed, 65 insertions, 0 deletions
diff --git a/deploy/launch.sh b/deploy/launch.sh
new file mode 100755
index 00000000..c040900c
--- /dev/null
+++ b/deploy/launch.sh
@@ -0,0 +1,65 @@
+#set -x
+WORK_DIR=$COMPASS_DIR/work/deploy
+
+mkdir -p $WORK_DIR/script
+
+source ${COMPASS_DIR}/util/log.sh
+source ${COMPASS_DIR}/deploy/deploy_parameter.sh
+source $(process_default_para $*) || exit 1
+source $(process_input_para $*) || exit 1
+source ${COMPASS_DIR}/deploy/conf/${FLAVOR}.conf
+source ${COMPASS_DIR}/deploy/conf/${TYPE}.conf
+source ${COMPASS_DIR}/deploy/conf/base.conf
+source ${COMPASS_DIR}/deploy/prepare.sh
+source ${COMPASS_DIR}/deploy/network.sh
+source ${COMPASS_DIR}/deploy/host_${TYPE}.sh
+source ${COMPASS_DIR}/deploy/compass_vm.sh
+source ${COMPASS_DIR}/deploy/deploy_host.sh
+
+######################### main process
+if true
+then
+if ! prepare_env;then
+ echo "prepare_env failed"
+ exit 1
+fi
+
+log_info "########## get host mac begin #############"
+machines=`get_host_macs`
+if [[ -z $machines ]];then
+ log_error "get_host_macs failed"
+ exit 1
+fi
+
+log_info "deploy host macs: $machines"
+export machines
+
+log_info "########## set up network begin #############"
+if ! create_nets;then
+ log_error "create_nets failed"
+ exit 1
+fi
+
+if ! launch_compass;then
+ log_error "launch_compass failed"
+ exit 1
+fi
+else
+# test code
+export machines="'00:00:16:42:da:3b','00:00:5f:73:b0:82','00:00:f1:5b:8e:81','00:00:f8:67:07:e6','00:00:53:fe:3e:98'"
+fi
+if [[ ! -z $VIRT_NUMBER ]];then
+ if ! launch_host_vms;then
+ log_error "launch_host_vms failed"
+ exit 1
+ fi
+fi
+if ! deploy_host;then
+ #tear_down_machines
+ #tear_down_compass
+ exit 1
+else
+ #tear_down_machines
+ #tear_down_compass
+ exit 0
+fi