From 0e1117113e33d27e3e10c6e0bd745ff0747be555 Mon Sep 17 00:00:00 2001 From: "stark, steven" Date: Wed, 29 Jan 2020 17:01:48 -0800 Subject: [VVP] parameterizing devstack branch for install - Also modifying default storage class override logic Issue-ID: INT-1424 Signed-off-by: stark, steven Change-Id: If8981f3a59437e21617edb30a6bca06ee6fa36a2 --- deployment/aks/README.md | 1 + deployment/aks/cloud.conf | 1 + deployment/aks/cloud.conf.example | 1 + deployment/aks/cloud.sh | 3 ++- deployment/aks/create_devstack.sh | 16 +++++++++++----- deployment/aks/create_onap.sh | 14 ++------------ 6 files changed, 18 insertions(+), 18 deletions(-) (limited to 'deployment') diff --git a/deployment/aks/README.md b/deployment/aks/README.md index a5be9a904..1b46e5139 100644 --- a/deployment/aks/README.md +++ b/deployment/aks/README.md @@ -135,6 +135,7 @@ DEVSTACK_ADMIN_USER= User name that will be created on DevStack VM. Use th DEVSTACK_VNET_NAME= Name of VNET that DevStack VM will attach to. DEVSTACK_SUBNET_NAME= Name of SUBNET attached to DEVSTACK_VNET_NAME. DEVSTACK_DISK_SIZE= Size of OS Disk for DevStack VM. +DEVSTACK_BRANCH= Branch to use when installing devstack. OPENSTACK_USER= User name that will be added to OpenStack after devstack has finished installing. This is also the username that will be used to create a cloud site in ONAP SO. OPENSTACK_PASS= Password to use for OPENSTACK_USER. OPENSTACK_TENANT= Tenant name that will be added to OpenStack after devstack has finished installing. This is also the username that will be used to create a cloud site in ONAP SO. diff --git a/deployment/aks/cloud.conf b/deployment/aks/cloud.conf index 0865d7ae6..d37da0e9d 100644 --- a/deployment/aks/cloud.conf +++ b/deployment/aks/cloud.conf @@ -58,6 +58,7 @@ DEVSTACK_ADMIN_USER= DEVSTACK_VNET_NAME= DEVSTACK_SUBNET_NAME= DEVSTACK_DISK_SIZE= +DEVSTACK_BRANCH= OPENSTACK_USER= OPENSTACK_PASS= OPENSTACK_TENANT= diff --git a/deployment/aks/cloud.conf.example b/deployment/aks/cloud.conf.example index d3f5087ba..3172be1d9 100644 --- a/deployment/aks/cloud.conf.example +++ b/deployment/aks/cloud.conf.example @@ -58,6 +58,7 @@ DEVSTACK_ADMIN_USER="onap_user" DEVSTACK_VNET_NAME=$BUILD"-DEVSTACKVNET" DEVSTACK_SUBNET_NAME=$BUILD"-DEVSTACKSUBNET" DEVSTACK_DISK_SIZE=512 +DEVSTACK_BRANCH="stable/stein" OPENSTACK_USER="onap_user" OPENSTACK_PASS="supersecret" OPENSTACK_TENANT="onap_project" diff --git a/deployment/aks/cloud.sh b/deployment/aks/cloud.sh index 555ba12cc..b99865145 100755 --- a/deployment/aks/cloud.sh +++ b/deployment/aks/cloud.sh @@ -133,6 +133,7 @@ DEVSTACK_ADMIN_USER = "$DEVSTACK_ADMIN_USER" DEVSTACK_VNET_NAME = "$DEVSTACK_VNET_NAME" DEVSTACK_SUBNET_NAME = "$DEVSTACK_SUBNET_NAME" DEVSTACK_DISK_SIZE = "$DEVSTACK_DISK_SIZE" +DEVSTACK_BRANCH = "$DEVSTACK_BRANCH" OPENSTACK_USER = "$OPENSTACK_USER" OPENSTACK_PASS = "$OPENSTACK_PASS" OPENSTACK_TENANT = "$OPENSTACK_TENANT" @@ -209,6 +210,7 @@ $DIR/create_devstack.sh --name "$DEVSTACK_NAME" \ --openstack-password "$OPENSTACK_PASS" \ --openstack-tenant "$OPENSTACK_TENANT" \ --image-list "$IMAGE_LIST" \ + --devstack-branch "$DEVSTACK_BRANCH" \ --no-prompt @@ -451,4 +453,3 @@ EOF $DIR/post_install.sh "$BUILD_DIR/onap.conf" "$DIR/cloud.conf" fi - diff --git a/deployment/aks/create_devstack.sh b/deployment/aks/create_devstack.sh index 63ce54765..87c76a1a8 100755 --- a/deployment/aks/create_devstack.sh +++ b/deployment/aks/create_devstack.sh @@ -35,6 +35,7 @@ OPENSTACK_USER= OPENSTACK_PASS= OS_PROJECT_NAME= IMAGE_LIST= +DEVSTACK_BRANCH= function check_required_parameter() { # arg1 = parameter @@ -84,6 +85,7 @@ while test $# -gt 0; do echo "--openstack-username default user name for openstack [optional]" echo "--openstack-password default password for openstack [optional]" echo "--openstack-tenant default tenant name for openstack [optional]" + echo "--devstack-branch branch to use for devstack install [optional]" echo "" exit 0 ;; @@ -176,6 +178,11 @@ while test $# -gt 0; do OS_PROJECT_NAME=$1 shift ;; + --devstack-branch) + shift + DEVSTACK_BRANCH=$1 + shift + ;; *) echo "Unknown Argument $1. Try running with --help." exit 0 @@ -201,7 +208,7 @@ OPENSTACK_USER=$(check_optional_paramater "$OPENSTACK_USER" "admin") OPENSTACK_PASS=$(check_optional_paramater "$OPENSTACK_PASS" "secret") OS_PROJECT_NAME=$(check_optional_paramater "$OS_PROJECT_NAME" "admin") IMAGE_LIST=$(check_optional_paramater "$IMAGE_LIST" "") - +DEVSTACK_BRANCH=$(check_optional_paramater "$DEVSTACK_BRANCH" "master") if [ $NO_PROMPT = 0 ]; then read -p "Would you like to proceed? [y/n]" -n 1 -r @@ -254,7 +261,7 @@ write_files: DEBIAN_FRONTEND=noninteractive sudo apt-get install -qqy git || sudo yum install -qy git sudo chown stack:stack /home/stack cd /home/stack - git clone https://git.openstack.org/openstack-dev/devstack + git clone -b $DEVSTACK_BRANCH https://git.openstack.org/openstack-dev/devstack cd devstack cat > local.conf < "$BUILD_DIR/tmp-sc.yaml" <