3 . $(dirname "$0")/setenv.bash
10 -n [NAMESPACE] : Kubernetes namespace (required)
11 -v [VALUES] : HELM values filepath (usefull when deploying one component at a time)
12 -i [INSTANCE] : ONAP deployment instance # (default: 1)
13 -a [APP] : Specify a specific ONAP component (default: all)
14 from the following choices:
15 sdc, aai ,mso, message-router, robot,
16 vid, sdnc, portal, policy, appc
21 kubectl create namespace $1-$2
24 create_registry_key() {
25 kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7
29 HELM_VALUES_ADDITION=""
30 if [[ ! -z $4 ]]; then
31 HELM_VALUES_ADDITION="--values=$4"
33 helm install ../$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1 --set nodePortPrefix=$3 ${HELM_VALUES_ADDITION}
47 while getopts ":n:u:s:i:a:du:dp:v:" PARAM; do
57 HELM_VALUES_FILEPATH=${OPTARG}
64 if [[ -z $APP ]]; then
87 if [[ ! -z "$APP" ]]; then
92 if [ "$INSTANCE" -gt "$MAX_INSTANCE" ];then
93 printf "\n********** You choose to create ${INSTANCE}th instance of ONAP \n"
94 printf "\n********** Due to port allocation only ${MAX_INSTANCE} instances of ONAP is allowed per kubernetes deployment\n"
98 start=$((300+2*INSTANCE))
101 printf "\n********** Creating instance ${INSTANCE} of ONAP with port range ${start}00 and ${end}99\n"
104 printf "\n********** Creating ONAP: ${ONAP_APPS[*]}\n"
107 printf "\n\n********** Creating deployments for ${HELM_APPS[*]} ********** \n"
109 for i in ${HELM_APPS[@]}; do
110 printf "\nCreating namespace **********\n"
111 create_namespace $NS $i
113 printf "\nCreating registry secret **********\n"
114 create_registry_key $NS $i ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL
116 printf "\nCreating deployments and services **********\n"
117 create_onap_helm $NS $i $start $HELM_VALUES_FILEPATH
122 printf "\n**** Done ****\n"