aboutsummaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rwxr-xr-xdeploy/launch.sh5
-rw-r--r--deploy/opera_adapter.py9
-rwxr-xr-xdeploy/prepare.sh2
3 files changed, 11 insertions, 5 deletions
diff --git a/deploy/launch.sh b/deploy/launch.sh
index 5f1ee1cb..51094b29 100755
--- a/deploy/launch.sh
+++ b/deploy/launch.sh
@@ -142,8 +142,11 @@ echo "NOTE: openrc file is in the controller nodes"
echo ""
if [[ ${DHA##*/} =~ "openo" ]]; then
- sudo python ${COMPASS_DIR}/deploy/opera_adapter.py $DHA $NETWORK
+ python ${COMPASS_DIR}/deploy/opera_adapter.py $DHA $NETWORK
if [[ $? -ne 0 ]]; then
+ log_error 'opera launch failed'
exit 1
fi
fi
+
+echo 'compass deploy success'
diff --git a/deploy/opera_adapter.py b/deploy/opera_adapter.py
index 71f19951..137aba54 100644
--- a/deploy/opera_adapter.py
+++ b/deploy/opera_adapter.py
@@ -76,14 +76,14 @@ if __name__ == "__main__":
compass_dir = os.getenv('COMPASS_DIR')
if not compass_dir:
- print("env var COMPASS_DIR doesn't exit")
+ print("env var COMPASS_DIR doesn't exist")
sys.exit(1)
if not os.path.exists(dha_file):
- print("DHA file doesn't exit")
+ print("DHA file doesn't exist")
sys.exit(1)
if not os.path.exists(network_file):
- print("NETWORK file doesn't exit")
+ print("NETWORK file doesn't exist")
sys.exit(1)
dha = load_file(dha_file)
@@ -121,3 +121,6 @@ if __name__ == "__main__":
p2 = subprocess.Popen("./opera_launch.sh", cwd=opera_dir, shell=True)
p2.communicate()
+ if p2.returncode != 0:
+ print('./opera_launch.sh fail')
+ sys.exit(1)
diff --git a/deploy/prepare.sh b/deploy/prepare.sh
index c2023223..b7e5bfa1 100755
--- a/deploy/prepare.sh
+++ b/deploy/prepare.sh
@@ -74,7 +74,7 @@ function _prepare_python_env() {
else
sudo apt-get update -y
sudo apt-get install -y --force-yes mkisofs bc curl ipmitool openvswitch-switch
- sudo apt-get install -y --force-yes git python-dev python-pip figlet
+ sudo apt-get install -y --force-yes git python-dev python-pip figlet sshpass
sudo apt-get install -y --force-yes libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev
sudo apt-get install -y --force-yes libffi-dev libssl-dev