3 . $(dirname "$0")/setenv.bash
10 -n [NAMESPACE] : Kubernetes namespace (required)
11 -i [INSTANCE] : ONAP deployment instance # (default: 1)
12 -a [APP] : Specify a specific ONAP component (default: all)
13 from the following choices:
14 sdc, aai ,mso, message-router, robot,
15 vid, sdnc, portal, policy, appc
20 kubectl create namespace $1-$2
23 create_registry_key() {
24 kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7
28 helm install ../$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1,nodePortPrefix=$3
40 _FILES_PATH=$(echo ../$i/templates)
42 while getopts ":n:u:s:i:a:du:dp:" PARAM; do
56 if [[ -z $APP ]]; then
79 if [[ ! -z "$APP" ]]; then
84 if [ "$INSTANCE" -gt "$MAX_INSTANCE" ];then
85 printf "\n********** You choose to create ${INSTANCE}th instance of ONAP \n"
86 printf "\n********** Due to port allocation only ${MAX_INSTANCE} instances of ONAP is allowed per kubernetes deployment\n"
90 start=$((300+2*INSTANCE))
93 printf "\n********** Creating instance ${INSTANCE} of ONAP with port range ${start}00 and ${end}99\n"
96 printf "\n********** Creating ONAP: ${ONAP_APPS[*]}\n"
99 printf "\n\n********** Creating deployments for ${HELM_APPS[*]} ********** \n"
101 for i in ${HELM_APPS[@]}; do
102 printf "\nCreating namespace **********\n"
103 create_namespace $NS $i
105 printf "\nCreating registry secret **********\n"
106 create_registry_key $NS $i ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL
108 printf "\nCreating deployments and services **********\n"
109 create_onap_helm $NS $i $start
114 printf "\n**** Done ****\n"