Merge "joid: correct keystone ip fetch for noha mode - correct admin-password"
authorMorgan Richomme <morgan.richomme@orange.com>
Thu, 28 Jan 2016 16:47:07 +0000 (16:47 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Thu, 28 Jan 2016 16:47:07 +0000 (16:47 +0000)
1  2 
jjb/joid/joid-deploy.sh

diff --combined jjb/joid/joid-deploy.sh
@@@ -1,12 -1,4 +1,12 @@@
  #!/bin/bash
 +# SPDX-license-identifier: Apache-2.0
 +##############################################################################
 +# Copyright (c) 2016 Orange and others.
 +# All rights reserved. This program and the accompanying materials
 +# are made available under the terms of the Apache License, Version 2.0
 +# which accompanies this distribution, and is available at
 +# http://www.apache.org/licenses/LICENSE-2.0
 +##############################################################################
  set +e
  set -o nounset
  
@@@ -127,7 -119,7 +127,7 @@@ SRCBUNDLE="${SRCBUNDLE}/ovs-${SDN_CONTR
  
  # Modify Bundle
  echo "------ Set openstack password ------"
- sed -i -- "s/\"admin-password\": openstack/\"admin-password\": $OS_ADMIN_PASSWORD/" $SRCBUNDLE
+ sed -i -- "s/admin-password: openstack/admin-password: $OS_ADMIN_PASSWORD/" $SRCBUNDLE
  
  if [ -n "$EXTNET_NAME" ]; then
      echo "------ Set openstack default network ------"
@@@ -162,8 -154,16 +162,16 @@@ exit_on_error $? "Main deploy FAILED
  JOID_ADMIN_OPENRC=$LAB_CONFIG/admin-openrc
  echo "------ Create OpenRC file [$JOID_ADMIN_OPENRC] ------"
  
- # get Keystone vip
- KEYSTONE=$(cat bundles.yaml |shyaml get-value openstack-phase2.services.keystone.options.vip)
+ # get Keystone ip
+ case "$HA_MODE" in
+     "ha")
+         KEYSTONE=$(cat bundles.yaml |shyaml get-value openstack-phase2.services.keystone.options.vip)
+         ;;
+     *)
+         KEYSTONE=$(juju status keystone |grep public-address|sed -- 's/.*\: //')
+         ;;
+ esac
  
  # get controller IP
  case "$SDN_CONTROLLER" in