Sync scripts from stacklight-model
This allows to deploy OpenStack (with OVS or OpenContrail) and
Kubernetes deployments with the same tools.
Change-Id: I5efeab98e70d083a8c54a649b7b59101edc497a6
diff --git a/scripts/bootstrap_all.sh b/scripts/bootstrap_all.sh
index 7d9d3ad..baa7584 100755
--- a/scripts/bootstrap_all.sh
+++ b/scripts/bootstrap_all.sh
@@ -2,11 +2,31 @@
CWD="$(dirname "$(readlink -f "$0")")"
-"$CWD"/fuel_config_verify.sh
-"$CWD"/fuel_infra_install.sh
-"$CWD"/openstack_infra_install.sh
-"$CWD"/openstack_control_install.sh
-"$CWD"/opencontrail_control_install.sh
-"$CWD"/stacklight_infra_install.sh
-"$CWD"/openstack_compute_install.sh
-"$CWD"/stacklight_monitor_install.sh
+K8S_BOOTSTRAP=$(salt -C 'I@kubernetes:master' test.ping 1>/dev/null 2>&1 && echo true)
+OPENSTACK_BOOTSTRAP=$(salt -C 'I@nova' test.ping 1>/dev/null 2>&1 && echo true)
+OPENCONTRAIL_BOOTSTRAP=$(salt -C 'I@opencontrail:control' test.ping 1>/dev/null 2>&1 && echo true)
+STACKLIGHTV2_BOOTSTRAP=$(salt -C 'I@prometheus:server' test.ping 1>/dev/null 2>&1 && echo true)
+
+"$CWD"/config_verify.sh
+"$CWD"/infra_install.sh
+"$CWD"/core_services_install.sh
+if [[ "$STACKLIGHTV2_BOOTSTRAP" == "true" ]]; then
+ "$CWD"/docker_swarm_install.sh
+fi
+if [[ "$K8S_BOOTSTRAP" == "true" ]]; then
+ "$CWD"/kubernetes_install.sh
+fi
+if [[ "$STACKLIGHTV2_BOOTSTRAP" == "true" ]]; then
+ "$CWD"/stacklightv2_infra_install.sh
+fi
+if [[ "$OPENSTACK_BOOTSTRAP" == "true" ]]; then
+ "$CWD"/openstack_control_install.sh
+ "$CWD"/stacklight_infra_install.sh
+ if [[ "$OPENCONTRAIL_BOOTSTRAP" == "true" ]]; then
+ "$CWD"/opencontrail_control_install.sh
+ "$CWD"/opencontrail_compute_install.sh
+ else
+ "$CWD"/ovs_compute_install.sh
+ fi
+ "$CWD"/stacklight_monitor_install.sh
+fi