Add External Interface NBI project into OOM

NBI (North Bound Interface) is one of the new project added for Beijing
release.

Features added
==============

MongoDB common chart
--------------------

Ability to start a mongo container, with a chart consistent with other
common charts (readiness, liveness, persistence, resources, nfs,
service, ...).

Specific configuration:
  * name of the db to create if needed

NBI chart
---------

Ability to start a mariadb container, with a chart consistent with other
common charts (readiness, liveness, persistence, resources, nfs,
service, ...).

Specific configuration:
  * name of the db to create if needed
  * name of the user that has access to the db
  * password of the user that has access to the db
  * root password of the database

Ability to start a NBI container, with a chart consistent with other
common charts (readiness, liveness, persistence, resources, nfs,
service, ...).

Specific configuration:
  * log level
  * cloudOwner
  * ecompInstanceId
  * openStackRegion
  * openStackServiceTenantName
  * sdc_authorization
  * aai_authorization
  * so_authorization

ONAP chart
----------

Added a requirement on NBI chart, possibility to enable/disable and
configuration to push to the chart.

Current Status
==============

- [*] adding a common chart for mongodb
- [*] make mongo chart compiling
- [*] testing the mongodb common role
- [*] creating a mariadb chart inside nbi helm
- [*] testing the mariadb chart
- [*] make mariadb chart compiling
- [*] make nbi use these charts
- [*] make nbi chart compiling
- [*] test the whole solution
- [*] create a service for nbi

Change-Id: I8dd3e79768c83b1553a05c892cf418f840931255
Issue-ID: EXTAPI-54
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
diff --git a/kubernetes/nbi/charts/mariadb/templates/NOTES.txt b/kubernetes/nbi/charts/mariadb/templates/NOTES.txt
new file mode 100644
index 0000000..57947a6
--- /dev/null
+++ b/kubernetes/nbi/charts/mariadb/templates/NOTES.txt
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}