diff options
author | Harry Huang <huangxiangyu5@huawei.com> | 2017-03-01 15:06:26 +0800 |
---|---|---|
committer | Harry Huang <huangxiangyu5@huawei.com> | 2017-03-01 15:08:22 +0800 |
commit | cce77461244bce9cd3f58c480ff895a4a9fb3837 (patch) | |
tree | 3db820c41f0cb29fed5146cdeb31b29bcdcf9769 | |
parent | bd9c1aff4191019efe05cd0fabbade624bb2229d (diff) |
juju connect bug fix
1. fix false juju metadata ip in tomcat8 config files
2. add missing modify_file.sh
Change-Id: I319a747dccf95e2aeb6568a36746ad5e1f32bb81
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
-rwxr-xr-x | juju/juju_connect.sh | 1 | ||||
-rw-r--r-- | util/modify_file.sh | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/juju/juju_connect.sh b/juju/juju_connect.sh index 2bc742b..6d1b3e4 100755 --- a/juju/juju_connect.sh +++ b/juju/juju_connect.sh @@ -42,6 +42,7 @@ function sync_juju_driver_file() scp_to_openo ${UTIL_DIR}/modify_file.sh /home local cmd2="sed -i s/REPLACE_JUJU_DRIVER_IP/$NFVO_DRIVER_VNFM_JUJU_IP/ /home/modify_file.sh; \ + sed -i s/REPLACE_JUJU_METADATA_IP/$floating_ip_metadata/ /home/modify_file.sh; \ chmod +x /home/modify_file.sh; \ /home/modify_file.sh" exec_cmd_on_openo $cmd2 diff --git a/util/modify_file.sh b/util/modify_file.sh new file mode 100644 index 0000000..c33a2eb --- /dev/null +++ b/util/modify_file.sh @@ -0,0 +1,23 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD 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 +############################################################################## +file1=/home/etc/conf/juju_conf.json +sed -i 's/^\(.*"image-metadata-url":\).*/\1 "http:\/\/REPLACE_JUJU_METADATA_IP\/images"\,/g' $file1 +sed -i 's/^\(.*"network":\).*/\1 "juju-net"\,/g' $file1 +#sed -i 's/^\(.*"use-floating-ip":\).*/\1 "False"\,/g' $file + +file2=/home/etc/csarInfo/csarinfo.json +sed -i 's/^\(.*"csar_file_path":\).*/\1 "\/home\/ubuntu\/csar\/"\,/g' $file2 + +file3=/home/ROOT/WEB-INF/classes/db.properties +sed -i 's/^\(.*jdbc.url=\).*/\1jdbc:mysql:\/\/REPLACE_JUJU_DRIVER_IP:3306\/jujuvnfmdb/g' $file3 + +file4=/home/ROOT/WEB-INF/classes/juju-config.properties +sed -i 's/^\(.*charmPath=\).*/\1\/home\/ubuntu\/csar\//g' $file4 +sed -i 's/^\(.*grant_jujuvnfm_url=\).*/\1http:\/\/REPLACE_JUJU_DRIVER_IP:8483\//g' $file4 |