aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/heat/onap-oom/scripts
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-12-10 11:31:24 -0800
committerGary Wu <gary.i.wu@huawei.com>2018-12-11 02:04:18 +0000
commit4a69d514e75e410621bf81b0c5a9d9c47ac40337 (patch)
treee5fd6d79021dab6d1adbc0325a62071eba05b73e /deployment/heat/onap-oom/scripts
parent071cbf7518ddff923713b77296b5267926976101 (diff)
Support custom hostname for Portal UI
Change-Id: If315051577a3bf1367f779d6d1385b17e57c5dc3 Issue-ID: INT-774 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'deployment/heat/onap-oom/scripts')
-rwxr-xr-xdeployment/heat/onap-oom/scripts/deploy.sh15
-rwxr-xr-xdeployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh1
2 files changed, 13 insertions, 3 deletions
diff --git a/deployment/heat/onap-oom/scripts/deploy.sh b/deployment/heat/onap-oom/scripts/deploy.sh
index 4387bbec0..7977c6a55 100755
--- a/deployment/heat/onap-oom/scripts/deploy.sh
+++ b/deployment/heat/onap-oom/scripts/deploy.sh
@@ -10,6 +10,7 @@
#
stack_name="oom"
+portal_hostname="portal.api.simpledemo.onap.org"
full_deletion=false
if [ -z "$WORKSPACE" ]; then
@@ -17,10 +18,11 @@ if [ -z "$WORKSPACE" ]; then
fi
usage() {
- echo "Usage: $0 [ -n <number of VMs {2-15}> ][ -s <stack name> ][ -m <manifest> ][ -r ][ -q ] <env>" 1>&2;
+ echo "Usage: $0 [ -n <number of VMs {2-15}> ][ -s <stack name> ][ -m <manifest> ][ -d <domain> ][ -r ][ -q ] <env>" 1>&2;
echo "n: Set the number of VM's that will be installed. This number must be between 2 and 15" 1>&2;
echo "s: Set the name to be used for stack. This name will be used for naming of resources" 1>&2;
+ echo "d: Set the base domain name to be used in portal UI URLs" 1>&2;
echo "m: The docker manifest to apply; must be either \"docker-manifest-staging.csv\" or \"docker-manifest.csv\"." 1>&2;
echo "r: Delete all resources relating to ONAP within enviroment." 1>&2;
echo "q: Quiet Delete of all ONAP resources." 1>&2;
@@ -29,7 +31,7 @@ usage() {
}
-while getopts ":n:s:m:rq" o; do
+while getopts ":n:s:d:m:rq" o; do
case "${o}" in
n)
if [[ ${OPTARG} =~ ^[0-9]+$ ]];then
@@ -49,6 +51,13 @@ while getopts ":n:s:m:rq" o; do
usage
fi
;;
+ d)
+ if [[ ! ${OPTARG} =~ ^[0-9]+$ ]];then
+ portal_hostname=${OPTARG}
+ else
+ usage
+ fi
+ ;;
m)
if [ -f $WORKSPACE/version-manifest/src/main/resources/${OPTARG} ]; then
docker_manifest=${OPTARG}
@@ -120,7 +129,7 @@ for n in $(seq 1 5); do
./scripts/gen-onap-oom-yaml.sh $vm_num > onap-oom.yaml~
fi
- if ! openstack stack create -t ./onap-oom.yaml~ -e $ENV_FILE~ $stack_name --parameter docker_manifest=$docker_manifest; then
+ if ! openstack stack create -t ./onap-oom.yaml~ -e $ENV_FILE~ $stack_name --parameter docker_manifest=$docker_manifest --parameter portal_hostname=$portal_hostname; then
break
fi
diff --git a/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh b/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
index 61d5f9f70..6117801a8 100755
--- a/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
+++ b/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
@@ -64,6 +64,7 @@ cat <<EOF
__helm_deploy_delay__: { get_param: helm_deploy_delay }
__use_ramdisk__: { get_param: use_ramdisk }
__mtu__: { get_param: mtu }
+ __portal_hostname__: { get_param: portal_hostname }
__public_net_id__: { get_param: public_net_id }
__oam_network_cidr__: { get_param: oam_network_cidr }
__oam_network_id__: { get_resource: oam_network }