aboutsummaryrefslogtreecommitdiffstats
path: root/opera_launch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'opera_launch.sh')
-rwxr-xr-xopera_launch.sh48
1 files changed, 30 insertions, 18 deletions
diff --git a/opera_launch.sh b/opera_launch.sh
index 001d7d1..ebbe63d 100755
--- a/opera_launch.sh
+++ b/opera_launch.sh
@@ -16,6 +16,9 @@ WORK_DIR=${OPERA_DIR}/work
UTIL_DIR=${OPERA_DIR}/util
export DEPLOY_FIRST_TIME=${DEPLOY_FIRST_TIME:-"true"}
+export DEPLOY_OPENO=${DEPLOY_OPENO:-"true"}
+export DEPLOY_JUJU=${DEPLOY_JUJU:-"true"}
+
source ${OPERA_DIR}/prepare.sh
generate_conf
source ${OPERA_DIR}/conf/download.conf
@@ -28,6 +31,7 @@ source ${OPERA_DIR}/command.sh
source ${JUJU_DIR}/adapter.sh
source ${JUJU_DIR}/juju_setup.sh
source ${JUJU_DIR}/juju_launch.sh
+source ${JUJU_DIR}/juju_connect.sh
mkdir -p $WORK_DIR
@@ -39,31 +43,39 @@ fi
source $WORK_DIR/admin-openrc.sh
-if ! openo_download_iso; then
- log_error "openo_download_iso failed"
- exit 1
-fi
+if [[ "$DEPLOY_OPENO" == "true" ]]; then
+ if ! openo_download_iso; then
+ log_error "openo_download_iso failed"
+ exit 1
+ fi
-if ! launch_openo_vm; then
- log_error "launch_openo_vm failed"
- exit 1
-fi
+ if ! launch_openo_vm; then
+ log_error "launch_openo_vm failed"
+ exit 1
+ fi
-if ! launch_openo_docker; then
- log_error "launch_openo_docker failed"
- exit 1
+ if ! launch_openo_docker; then
+ log_error "launch_openo_docker failed"
+ exit 1
+ fi
fi
-juju_env_prepare
+if [[ "$DEPLOY_JUJU" == "true" ]]; then
+ juju_env_prepare
+
+ if ! juju_prepare; then
+ log_error "juju_prepare failed"
+ exit 1
+ fi
-if ! juju_prepare; then
- log_error "launch_openo_docker failed"
- exit 1
+ if ! launch_juju; then
+ log_error "launch_juju failed"
+ exit 1
+ fi
fi
-if ! launch_juju; then
- log_error "launch_juju failed"
- exit 1
+if [[ "$DEPLOY_OPENO" == "true" && "$DEPLOY_JUJU" == "true" ]]; then
+ connect_juju_and_openo
fi
figlet -ctf slant Open-O Installed!