aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/heat
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2019-10-31 12:28:25 -0500
committerBrian Freeman <bf1936@att.com>2019-10-31 12:40:38 -0500
commita2b067147e6681459922ca2525e7611336e9dad0 (patch)
tree28b8b850abdaaea94ed56e8394ccd66cbe4ee192 /deployment/heat
parent26fc5ccfd75501997f53464461d21354d7860e6d (diff)
Fix for staging override deployment
Issue-ID: INT-1217 Change-Id: I35f14f04b6e11b22747c9fb71d11ad4d3c1ddcf9 Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'deployment/heat')
-rw-r--r--deployment/heat/onap-rke/nfs_vm_entrypoint.sh7
-rw-r--r--deployment/heat/onap-rke/onap-oom.yaml1
-rwxr-xr-xdeployment/heat/onap-rke/scripts/deploy.sh20
3 files changed, 23 insertions, 5 deletions
diff --git a/deployment/heat/onap-rke/nfs_vm_entrypoint.sh b/deployment/heat/onap-rke/nfs_vm_entrypoint.sh
index bb0c80a50..ed1897a45 100644
--- a/deployment/heat/onap-rke/nfs_vm_entrypoint.sh
+++ b/deployment/heat/onap-rke/nfs_vm_entrypoint.sh
@@ -225,7 +225,12 @@ if [ ! -z "__helm_deploy_delay__" ]; then
fi
# Deploy ONAP
-helm deploy dev local/onap -f ~/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f ~/integration-override.yaml --namespace $NAMESPACE --verbose
+if [ ! -z "__additional_override__" ]; then
+ helm deploy dev local/onap -f ~/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f ~/integration-override.yaml -f __additional_override__ --namespace $NAMESPACE –verbose
+else
+ helm deploy dev local/onap -f ~/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f ~/integration-override.yaml --namespace $NAMESPACE –verbose
+fi
+
# re-install original helm deploy plugin
rsync -avt ~/oom/kubernetes/helm/plugins ~/.helm/
diff --git a/deployment/heat/onap-rke/onap-oom.yaml b/deployment/heat/onap-rke/onap-oom.yaml
index 7773497c9..2daf30aa8 100644
--- a/deployment/heat/onap-rke/onap-oom.yaml
+++ b/deployment/heat/onap-rke/onap-oom.yaml
@@ -233,6 +233,7 @@ resources:
template:
get_file: nfs_vm_entrypoint.sh
params:
+ __additional_override__ : { get_param: additional_override}
__nfs_volume_id__: { get_resource: nfs_volume }
__docker_proxy__: { get_param: docker_proxy }
__apt_proxy__: { get_param: apt_proxy }
diff --git a/deployment/heat/onap-rke/scripts/deploy.sh b/deployment/heat/onap-rke/scripts/deploy.sh
index 5bb2f0a7c..935e69424 100755
--- a/deployment/heat/onap-rke/scripts/deploy.sh
+++ b/deployment/heat/onap-rke/scripts/deploy.sh
@@ -25,8 +25,9 @@ fi
usage() {
- echo "Usage: $0 [ -n <number of VMs {2-15}> ][ -s <stack name> ][ -d <domain> ][ -i <integration_branch> ][ -o <oom_branch> ][ -r ][ -q ] <env>" 1>&2;
+ echo "Usage: $0 [-b staging] [ -n <number of VMs {2-15}> ][ -s <stack name> ][ -d <domain> ][ -i <integration_branch> ][ -o <oom_branch> ][ -r ][ -q ] <env>" 1>&2;
+ echo "b: branch for staging image override This must be staging to trigger staging image override." 1>&2;
echo "n: Number of worker VMs to deploy. This number must be between 2 and 15." 1>&2;
echo "s: Stack name. This name will be used for naming of resources." 1>&2;
echo "d: Base domain name to be used in portal UI URLs." 1>&2;
@@ -39,8 +40,15 @@ usage() {
}
-while getopts ":n:s:d:i:o:rq" o; do
+while getopts ":b:n:s:d:i:o:rq" o; do
case "${o}" in
+ b)
+ if [[ ! ${OPTARG} =~ ^[0-9]+$ ]];then
+ branch=${OPTARG}
+ else
+ branch=master
+ fi
+ ;;
n)
if [[ ${OPTARG} =~ ^[0-9]+$ ]];then
if [ ${OPTARG} -ge 2 -a ${OPTARG} -le 15 ]; then
@@ -147,8 +155,12 @@ 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 integration_gerrit_branch=$integration_gerrit_branch --parameter oom_gerrit_branch=$oom_gerrit_branch --parameter portal_hostname=$portal_hostname; then
- break
+ if [ "$branch" == "staging" ] ; then
+ if ! openstack stack create -t ./onap-oom.yaml~ -e $ENV_FILE~ $stack_name --parameter integration_gerrit_branch=$integration_gerrit_branch --parameter oom_gerrit_branch=$oom_gerrit_branch --parameter portal_hostname=$portal_hostname --parameter additional_override="~/integration/deployment/heat/onap-rke/staging-image-override.yaml" ; then
+ break
+ else
+ if ! openstack stack create -t ./onap-oom.yaml~ -e $ENV_FILE~ $stack_name --parameter integration_gerrit_branch=$integration_gerrit_branch --parameter oom_gerrit_branch=$oom_gerrit_branch --parameter portal_hostname=$portal_hostname; then
+ break
fi
while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $stack_name)" ]; do