blob: 154bad58ca7a79d31050546829c770a6abc86ee8 [file] [log] [blame]
Mike Elliottd17accd2017-08-14 16:21:40 -04001#!/bin/bash
2
3usage() {
4 cat <<EOF
5Usage: $0 [PARAMs]
6-u : Display usage
7-n [NAMESPACE] : Kubernetes namespace (required)
8EOF
9}
10
11create_namespace() {
12 kubectl create namespace $1
13}
14
15create_configuration() {
16 create_namespace $1
Mandeep Khindadc2dc862017-09-08 05:20:30 +000017 helm install . --name "$1-config" --namespace $1 --set nsPrefix=$1
Mike Elliottd17accd2017-08-14 16:21:40 -040018}
19
20#MAINs
21NS=
22
23while getopts ":n:u:" PARAM; do
24 case $PARAM in
25 u)
26 usage
27 exit 1
28 ;;
29 n)
30 NS=${OPTARG}
31 ;;
32 ?)
33 usage
34 exit
35 ;;
36 esac
37done
38
39if [[ -z $NS ]]; then
40 usage
41 exit 1
42fi
43
44printf "\n**** Creating configuration for ONAP instance: $NS\n"
45create_configuration $NS
46
47printf "**** Done ****\n"