aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2020-01-29 17:01:48 -0800
committerBrian Freeman <bf1936@att.com>2020-02-07 20:42:02 +0000
commit0e1117113e33d27e3e10c6e0bd745ff0747be555 (patch)
treec86372ae762c076236c37cbf348f696a6d59f161
parent157b14a23b18b26fe829dce02233696e19e5a7a9 (diff)
[VVP] parameterizing devstack branch for install
- Also modifying default storage class override logic Issue-ID: INT-1424 Signed-off-by: stark, steven <steven.stark@att.com> Change-Id: If8981f3a59437e21617edb30a6bca06ee6fa36a2
-rw-r--r--deployment/aks/README.md1
-rw-r--r--deployment/aks/cloud.conf1
-rw-r--r--deployment/aks/cloud.conf.example1
-rwxr-xr-xdeployment/aks/cloud.sh3
-rwxr-xr-xdeployment/aks/create_devstack.sh16
-rwxr-xr-xdeployment/aks/create_onap.sh14
6 files changed, 18 insertions, 18 deletions
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 <<EOF
[[local|localrc]]
@@ -272,8 +279,8 @@ write_files:
enable_service h-eng h-api h-api-cfn h-api-cw
disable_service tempest
- enable_plugin heat https://git.openstack.org/openstack/heat
- enable_plugin heat-dashboard https://opendev.org/openstack/heat-dashboard
+ enable_plugin heat https://git.openstack.org/openstack/heat $DEVSTACK_BRANCH
+ enable_plugin heat-dashboard https://opendev.org/openstack/heat-dashboard $DEVSTACK_BRANCH
## Neutron options
Q_USE_SECGROUP=True
@@ -367,4 +374,3 @@ DEVSTACK_NIC_ID=`az vm nic list --resource-group ${DEVSTACK_RG} --vm-name ${DEVS
### Enabling IP Forwarding on DEVSTACK vnic ###
az network nic update --ids "$DEVSTACK_NIC_ID" --ip-forwarding
-
diff --git a/deployment/aks/create_onap.sh b/deployment/aks/create_onap.sh
index 4f3a673bb..9a494df2c 100755
--- a/deployment/aks/create_onap.sh
+++ b/deployment/aks/create_onap.sh
@@ -29,13 +29,10 @@ cd $BUILD_DIR
export KUBECONFIG="$KUBECONFIG"
kubectl get nodes
-COUNTER=0
-until [ $COUNTER -ge 10 ]; do
-
echo "overriding default storage class for AKS"
kubectl delete sc default
sleep 1
-cat <<EOF | kubectl apply -f -
+cat > "$BUILD_DIR/tmp-sc.yaml" <<EOF
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
@@ -49,14 +46,7 @@ reclaimPolicy: Delete
volumeBindingMode: Immediate
EOF
-if [ $? -eq 0 ]; then
- COUNTER=10
-else
- COUNTER=$((COUNTER +1))
-fi
-
-sleep 5
-done
+kubectl replace -f "$BUILD_DIR/tmp-sc.yaml" --force
git clone -b "$OOM_BRANCH" http://gerrit.onap.org/r/oom --recurse-submodules