Split out BBU from mcord-data-plane chart

Change-Id: I2f0f7cba4fcc5b9fe8147f3e53867773f8508650
diff --git a/mcord/mcord-bbu/.helmignore b/mcord/mcord-bbu/.helmignore
new file mode 100644
index 0000000..f0c1319
--- /dev/null
+++ b/mcord/mcord-bbu/.helmignore
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/mcord/mcord-bbu/Chart.yaml b/mcord/mcord-bbu/Chart.yaml
new file mode 100644
index 0000000..3ffd9b6
--- /dev/null
+++ b/mcord/mcord-bbu/Chart.yaml
@@ -0,0 +1,21 @@
+---
+# Copyright 2018-present Open Networking Foundation
+# Copyright 2018 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for MCORD BBU Services
+name: mcord-bbu
+version: 0.1.0
diff --git a/mcord/mcord-bbu/templates/_helpers.tpl b/mcord/mcord-bbu/templates/_helpers.tpl
new file mode 100644
index 0000000..9be35ed
--- /dev/null
+++ b/mcord/mcord-bbu/templates/_helpers.tpl
@@ -0,0 +1,48 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2018-present Open Networking Foundation
+Copyright 2018 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "mcord-bbu.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "mcord-bbu.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "mcord-bbu.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/mcord/mcord-data-plane/templates/accelleran.yaml b/mcord/mcord-bbu/templates/accelleran.yaml
similarity index 100%
rename from mcord/mcord-data-plane/templates/accelleran.yaml
rename to mcord/mcord-bbu/templates/accelleran.yaml
diff --git a/mcord/mcord-bbu/templates/cm.yaml b/mcord/mcord-bbu/templates/cm.yaml
new file mode 100644
index 0000000..8cf42d5
--- /dev/null
+++ b/mcord/mcord-bbu/templates/cm.yaml
@@ -0,0 +1,25 @@
+---
+# Copyright 2018-present Open Networking Foundation
+# Copyright 2018 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: l3-config
+data:
+  bootstrap.txt: |
+    redis.hostname:{{ .Values.accelleran_hostname }}
+    redis.port:6379
+    instance.filter:{{ .Values.accelleran.inst_id }}
diff --git a/mcord/mcord-bbu/values.yaml b/mcord/mcord-bbu/values.yaml
new file mode 100644
index 0000000..af47222
--- /dev/null
+++ b/mcord/mcord-bbu/values.yaml
@@ -0,0 +1,38 @@
+---
+# Copyright 2018-present Open Networking Foundation
+# Copyright 2018 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Default values for mcord-vepc-helm.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+accelleran_hostname: "accelleran"
+
+accelleran:
+  images:
+    init: "ngick8stesting/c3po-mmeinit"
+    nats: "10.90.0.131:30500/ngick8stesting/vbbu-nats:20190121"
+    redis: "10.90.0.131:30500/ngick8stesting/vbbu-redis:20190121"
+    bbu: "10.90.0.131:30500/accelleran/vran-l3-fdd:onf-dns"
+  ports:
+    s1ap: 36412
+  replicas: 1
+  nats_service_name: "nats-cluster"
+  inst_id: "enb_key"
+  resources:
+    cpu: 3
+    mem: "1Gi"
+
+namespace: epc
diff --git a/mcord/mcord-data-plane/Chart.yaml b/mcord/mcord-data-plane/Chart.yaml
index de3d208..2c685ea 100644
--- a/mcord/mcord-data-plane/Chart.yaml
+++ b/mcord/mcord-data-plane/Chart.yaml
@@ -18,4 +18,4 @@
 appVersion: "1.0"
 description: A Helm chart for MCORD Data Plane Services
 name: mcord-data-plane
-version: 0.1.4
+version: 0.2.0
diff --git a/mcord/mcord-data-plane/templates/cm.yaml b/mcord/mcord-data-plane/templates/cm.yaml
index 5686236..f2b7f7c 100644
--- a/mcord/mcord-data-plane/templates/cm.yaml
+++ b/mcord/mcord-data-plane/templates/cm.yaml
@@ -436,13 +436,3 @@
     PROTOCOL = 17
     LOCAL_LOW_LIMIT_PORT = 17000
     LOCAL_HIGH_LIMIT_PORT = 17010
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: l3-config
-data:
-  bootstrap.txt: |
-    redis.hostname:{{ .Values.accelleran_hostname }}
-    redis.port:6379
-    instance.filter:{{ .Values.accelleran.inst_id }}
diff --git a/mcord/mcord-data-plane/values.yaml b/mcord/mcord-data-plane/values.yaml
index f0d527f..62adfb3 100644
--- a/mcord/mcord-data-plane/values.yaml
+++ b/mcord/mcord-data-plane/values.yaml
@@ -21,7 +21,6 @@
 redis_hostname: "redis"
 controlplane_hostname: "ngic-cp"
 controlplane_port: 21
-accelleran_hostname: "accelleran"
 
 ngic_dp:
   images:
@@ -40,19 +39,4 @@
     dpdk_enabled: false
     hugepage_enabled: true
 
-accelleran:
-  images:
-    init: "ngick8stesting/c3po-mmeinit"
-    nats: "10.90.0.131:30500/ngick8stesting/vbbu-nats:20190121"
-    redis: "10.90.0.131:30500/ngick8stesting/vbbu-redis:20190121"
-    bbu: "10.90.0.131:30500/accelleran/vran-l3-fdd:onf-dns"
-  ports:
-    s1ap: 36412
-  replicas: 1
-  nats_service_name: "nats-cluster"
-  inst_id: "enb_key"
-  resources:
-    cpu: 3
-    mem: "1Gi"
-
 namespace: epc