Merge "CORD-3162 Create demo-exampleservice profile"
diff --git a/voltha/requirements.yaml b/voltha/requirements.yaml
index 946ac26..cef6629 100644
--- a/voltha/requirements.yaml
+++ b/voltha/requirements.yaml
@@ -14,7 +14,7 @@
 
 dependencies:
 - name: etcd-operator
-  version: 0.7.3
+  version: 0.8.0
   repository: https://kubernetes-charts.storage.googleapis.com/
   condition: etcd.operator.enabled
 - name: consul
diff --git a/voltha/templates/_helpers.tpl b/voltha/templates/_helpers.tpl
new file mode 100644
index 0000000..bc4f720
--- /dev/null
+++ b/voltha/templates/_helpers.tpl
@@ -0,0 +1,70 @@
+{{- /*
+Copyright 2017-present Open Networking Foundation
+
+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.
+*/ -}}
+
+{{- define "voltha-shovel.cmd" }}
+- "/shovel/shovel/main.py"
+- "--kafka={{ .Values.kafkaReleaseName }}-kafka.default.svc.cluster.local"
+- "--host=grafana.voltha.svc.cluster.local"
+- "--topic=voltha.kpis"
+{{- end }}
+
+{{- define "voltha-dashd.cmd" }}
+- "/dashd/dashd/main.py"
+- "--kafka={{ .Values.kafkaReleaseName }}-kafka.default.svc.cluster.local"
+- "--grafana_url=http://admin:admin@grafana.$(NAMESPACE).svc.cluster.local:80/api"
+- "--topic=voltha.kpis"
+{{- end }}
+
+{{- define "voltha-vcore.cmd" }}
+- "voltha/voltha/main.py"
+- "-v"
+- "--etcd=etcd-cluster.default.svc.cluster.local:2379"
+- "--kafka={{ .Values.kafkaReleaseName }}-kafka.default.svc.cluster.local"
+- "--rest-port=8880"
+- "--grpc-port=50556"
+- "--interface=eth1"
+- "--backend=etcd"
+- "--pon-subnet=10.38.0.0/12"
+- "--ponsim-comm=grpc"
+{{- end }}
+
+{{- define "xos-core.initial_data" }}
+- model: core.Site
+  fields:
+    name: {{ .Values.cordSiteName | quote }}
+    abbreviated_name: {{ .Values.cordSiteName | quote }}
+    login_base: {{ .Values.cordSiteName | quote }}
+    site_url: "http://opencord.org/"
+    hosts_nodes: true
+
+- model: core.User
+  fields:
+    email: {{ .Values.xosAdminUser | quote }}
+    password: {{ .Values.xosAdminPassword | quote }}
+    firstname: {{ .Values.xosAdminFirstname | quote }}
+    lastname:  {{ .Values.xosAdminLastname | quote }}
+    is_admin: true
+  relations:
+    site:
+      fields:
+        name: {{ .Values.cordSiteName | quote }}
+      model: core.Site
+{{- end }}
+
+{{- define "xos-core.ca_cert_chain" }}
+{{ .Values.ca_cert_chain | b64dec }}
+{{- end }}
+
diff --git a/voltha/templates/stats.yaml b/voltha/templates/stats.yaml
index 51511a8..6e187b4 100644
--- a/voltha/templates/stats.yaml
+++ b/voltha/templates/stats.yaml
@@ -39,11 +39,8 @@
             fieldRef:
               fieldPath: metadata.namespace
         args:
-        - "/dashd/dashd/main.py"
-        - "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
-        - "--grafana_url=http://admin:admin@grafana.$(NAMESPACE).svc.cluster.local:80/api"
-        - "--topic=voltha.kpis"
-        #- "--consul=consul:8500"
+{{ include "voltha-dashd.cmd" . | indent 8 }}
+
 ---
 #
 # The shovel deployment
@@ -72,8 +69,4 @@
             fieldRef:
               fieldPath: metadata.namespace
         args:
-        - "/shovel/shovel/main.py"
-        - "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
-        - "--host=grafana.voltha.svc.cluster.local"
-        - "--topic=voltha.kpis"
-        #- "--consul=consul:8500"
\ No newline at end of file
+{{ include "voltha-shovel.cmd" . | indent 8 }}
\ No newline at end of file
diff --git a/voltha/templates/vcore_for_etcd.yaml b/voltha/templates/vcore_for_etcd.yaml
index 7f02fe0..c660760 100644
--- a/voltha/templates/vcore_for_etcd.yaml
+++ b/voltha/templates/vcore_for_etcd.yaml
@@ -61,16 +61,7 @@
                 fieldRef:
                   fieldPath: metadata.namespace
           args:
-            - "voltha/voltha/main.py"
-            - "-v"
-            - "--etcd=etcd-cluster.default.svc.cluster.local:2379"
-            - "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
-            - "--rest-port=8880"
-            - "--grpc-port=50556"
-            - "--interface=eth1"
-            - "--backend=etcd"
-            - "--pon-subnet=10.38.0.0/12"
-            - "--ponsim-comm=grpc"
+{{ include "voltha-vcore.cmd" . | indent 12 }}
           ports:
             - containerPort: 8880
               name: rest-port
diff --git a/voltha/values.yaml b/voltha/values.yaml
index 4cc250f..32616d1 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -47,10 +47,28 @@
           port: 50555
           targetPort: 50555
 
+kafka:
+  enabled: false
+  persistence:
+    enabled: false
+  zookeeper:
+    persistence:
+      enabled: false
+
+etcd:
+  operator:
+    enabled: true
 etcd-operator:
   customResources:
+    size: 1
     createEtcdClusterCRD: true
 
+kafkaReleaseName: voltha-kafka
+etcdReleaseName: voltha-etcd
+
+consul:
+  enabled: false
+
 envoyForEtcdImage: 'voltha/voltha-envoy:latest'
 freeradiusImage: 'tpdock/freeradius:latest'
 grafanaImage: 'kamon/grafana_graphite:3.0'
@@ -61,39 +79,10 @@
 vcliImage: 'voltha/voltha-cli:latest'
 vcoreImage: 'voltha/voltha-voltha:latest'
 
-kafka:
-  enabled: true
-  persistence:
-    enabled: false
-  zookeeper:
-    persistence:
-      enabled: false
-etcd:
-  operator:
-    enabled: true
-consul:
-  enabled: false
-
-
 # Need the namespace global for kafka
 global:
   namespace: voltha
 
-stats:
-  #dashd_args:
-  #- "/dashd/dashd/main.py"
-  #- "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
-  #- "--grafana_url=http://admin:admin@grafana.$(NAMESPACE).svc.cluster.local:80/api"
-  #- "--topic=voltha.kpis"
-  #- "--consul=consul:8500"
-
-  #shovel_args:
-  #- "/shovel/shovel/main.py"
-  #- "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
-  #- "--host=grafana.voltha.svc.cluster.local"
-  #- "--topic=voltha.kpis"
-  #- "--consul=consul:8500"
-
 vcli_args:
 - "/cli/cli/setup.sh"
 - "-C consul:8500"
@@ -101,18 +90,6 @@
 - "-s voltha:18880"
 - "-G"
 
-#vcore_etcd_args:
-#- "voltha/voltha/main.py"
-#- "-v"
-#- "--etcd=etcd-restore-operator.default.svc.cluster.local:2379"
-#- "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
-#- "--rest-port=8880"
-#- "--grpc-port=50556"
-#- "--interface=eth1"
-#- "--backend=etcd"
-#- "--pon-subnet=10.38.0.0/12"
-#- "--ponsim-comm=grpc"
-
 ofagent_args:
 - "/ofagent/ofagent/main.py"
 - "-v"
diff --git a/xos-services/hssdb/values.yaml b/xos-services/hssdb/values.yaml
index 4a5d79e..701f2fc 100644
--- a/xos-services/hssdb/values.yaml
+++ b/xos-services/hssdb/values.yaml
@@ -29,8 +29,8 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
-vnfImageURL: "http://www.vicci.org/cord/image-hss-db.qcow2.20180511"
-vnfImageVersion: "v0.1"
+vnfImageURL: "https://github.com/opencord/hss_db/releases/download/vms/image-hss-db.qcow2.v0.1.1"
+vnfImageVersion: "v0.1.1"
 vnfImageFlavor: "m1.large"
 
 publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL5L5vDsQ1bmSeisxMf/GZEqv85oHHu6RFE17VYoTAuBBsHQnETOccbQT85qSBy5NAMAICtOd15iXYfmul0eFeSHoQr1H3IAXT0if6ANxXOm8/Z2rlRNthOEgsjDQU9foNxQ4wksygy5epKmbEhMqbFZjuj4zYfStPzE/gkFSE9QjhKMWaJmyLFfq9f8DnC+TTE41K5iGbtramr7qHSWsKKy75XV6MZZLLFExrQqlYDlLA2V0aYezCql3fB96KJmf6GJRT3j3Y7oWaj7gEzMCycA2QgP8ZNFL/2Q1qgvQRc6I46/HUiOh3IT8LVDdo2ZUn9qrNameQ1zR7a+wBvYIV Insecure M-CORD keypair"
diff --git a/xos-services/internetemulator/values.yaml b/xos-services/internetemulator/values.yaml
index 04882da..255a284 100644
--- a/xos-services/internetemulator/values.yaml
+++ b/xos-services/internetemulator/values.yaml
@@ -29,8 +29,8 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
-vnfImageURL: "http://www.vicci.org/cord/image-internetemulator.qcow2.20180511"
-vnfImageVersion: "v0.1"
+vnfImageURL: "https://github.com/opencord/internetemulator/releases/download/vms/image-internetemulator.qcow2.v0.1.1"
+vnfImageVersion: "v0.1.1"
 
 publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL5L5vDsQ1bmSeisxMf/GZEqv85oHHu6RFE17VYoTAuBBsHQnETOccbQT85qSBy5NAMAICtOd15iXYfmul0eFeSHoQr1H3IAXT0if6ANxXOm8/Z2rlRNthOEgsjDQU9foNxQ4wksygy5epKmbEhMqbFZjuj4zYfStPzE/gkFSE9QjhKMWaJmyLFfq9f8DnC+TTE41K5iGbtramr7qHSWsKKy75XV6MZZLLFExrQqlYDlLA2V0aYezCql3fB96KJmf6GJRT3j3Y7oWaj7gEzMCycA2QgP8ZNFL/2Q1qgvQRc6I46/HUiOh3IT8LVDdo2ZUn9qrNameQ1zR7a+wBvYIV Insecure M-CORD keypair"
 privateKeyFile: "files/id_rsa"
diff --git a/xos-services/onos-service/templates/_tosca.tpl b/xos-services/onos-service/templates/_tosca.tpl
index ddffea6..27bb698 100644
--- a/xos-services/onos-service/templates/_tosca.tpl
+++ b/xos-services/onos-service/templates/_tosca.tpl
@@ -50,16 +50,6 @@
             node: service#ONOS_Fabric
             relationship: tosca.relationships.BelongsToOne
 
-    onos_app#hostprovider:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: org.onosproject.hostprovider
-        app_id: org.onosproject.hostprovider
-      requirements:
-        - owner:
-            node: service#ONOS_Fabric
-            relationship: tosca.relationships.BelongsToOne
-
     onos_app#netcfghostprovider:
       type: tosca.nodes.ONOSApp
       properties:
@@ -70,11 +60,11 @@
             node: service#ONOS_Fabric
             relationship: tosca.relationships.BelongsToOne
 
-    onos_app#openflow-base:
+    onos_app#openflow:
       type: tosca.nodes.ONOSApp
       properties:
-        name: org.onosproject.openflow-base
-        app_id: org.onosproject.openflow-base
+        name: org.onosproject.openflow
+        app_id: org.onosproject.openflow
       requirements:
         - owner:
             node: service#ONOS_Fabric
@@ -102,11 +92,11 @@
           rest_hostname: onos-cord-ui
           rest_port: 8181
 
-    onos_app#openflow-base:
+    onos_app#openflow:
       type: tosca.nodes.ONOSApp
       properties:
-        name: org.onosproject.openflow-base
-        app_id: org.onosproject.openflow-base
+        name: org.onosproject.openflow
+        app_id: org.onosproject.openflow
       requirements:
         - owner:
             node: service#ONOS_CORD
@@ -128,7 +118,7 @@
         name: cord-config
         url: {{ .cordConfigAppURL }}
         version: 1.4.0
-        dependencies: org.onosproject.openflow-base, org.onosproject.dhcp
+        dependencies: org.onosproject.openflow, org.onosproject.dhcp
       requirements:
         - owner:
             node: service#ONOS_CORD
diff --git a/xos-services/vhss/values.yaml b/xos-services/vhss/values.yaml
index 7aa14e4..4eee01c 100644
--- a/xos-services/vhss/values.yaml
+++ b/xos-services/vhss/values.yaml
@@ -29,8 +29,8 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
-vnfImageURL: "http://www.vicci.org/cord/image-hss.qcow2.20180511"
-vnfImageVersion: "v0.1"
+vnfImageURL: "https://github.com/opencord/vHSS/releases/download/vms/image-hss.qcow2.v0.1.1"
+vnfImageVersion: "v0.1.1"
 vnfImageFlavor: "m1.large"
 
 publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL5L5vDsQ1bmSeisxMf/GZEqv85oHHu6RFE17VYoTAuBBsHQnETOccbQT85qSBy5NAMAICtOd15iXYfmul0eFeSHoQr1H3IAXT0if6ANxXOm8/Z2rlRNthOEgsjDQU9foNxQ4wksygy5epKmbEhMqbFZjuj4zYfStPzE/gkFSE9QjhKMWaJmyLFfq9f8DnC+TTE41K5iGbtramr7qHSWsKKy75XV6MZZLLFExrQqlYDlLA2V0aYezCql3fB96KJmf6GJRT3j3Y7oWaj7gEzMCycA2QgP8ZNFL/2Q1qgvQRc6I46/HUiOh3IT8LVDdo2ZUn9qrNameQ1zR7a+wBvYIV Insecure M-CORD keypair"
diff --git a/xos-services/vmme/values.yaml b/xos-services/vmme/values.yaml
index 60ccb8c..ed82da4 100644
--- a/xos-services/vmme/values.yaml
+++ b/xos-services/vmme/values.yaml
@@ -29,8 +29,8 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
-vnfImageURL: "http://www.vicci.org/cord/image-mme.qcow2.20180511"
-vnfImageVersion: "v0.1"
+vnfImageURL: "https://github.com/opencord/vMME/releases/download/vms/image-mme.qcow2.v0.1.1"
+vnfImageVersion: "v0.1.1"
 vnfImageFlavor: "m1.large"
 
 publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL5L5vDsQ1bmSeisxMf/GZEqv85oHHu6RFE17VYoTAuBBsHQnETOccbQT85qSBy5NAMAICtOd15iXYfmul0eFeSHoQr1H3IAXT0if6ANxXOm8/Z2rlRNthOEgsjDQU9foNxQ4wksygy5epKmbEhMqbFZjuj4zYfStPzE/gkFSE9QjhKMWaJmyLFfq9f8DnC+TTE41K5iGbtramr7qHSWsKKy75XV6MZZLLFExrQqlYDlLA2V0aYezCql3fB96KJmf6GJRT3j3Y7oWaj7gEzMCycA2QgP8ZNFL/2Q1qgvQRc6I46/HUiOh3IT8LVDdo2ZUn9qrNameQ1zR7a+wBvYIV Insecure M-CORD keypair"
diff --git a/xos-services/vspgwc/values.yaml b/xos-services/vspgwc/values.yaml
index bbdda8b..ecb6c61 100644
--- a/xos-services/vspgwc/values.yaml
+++ b/xos-services/vspgwc/values.yaml
@@ -29,8 +29,8 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
-vnfImageURL: "http://www.vicci.org/cord/image-spgwc.qcow2.20180511"
-vnfImageVersion: "v0.1"
+vnfImageURL: "https://github.com/opencord/vspgwc/releases/download/vms/image-spgwc.qcow2.v0.1.1"
+vnfImageVersion: "v0.1.1"
 vnfImageFlavor: "m1.large"
 
 publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL5L5vDsQ1bmSeisxMf/GZEqv85oHHu6RFE17VYoTAuBBsHQnETOccbQT85qSBy5NAMAICtOd15iXYfmul0eFeSHoQr1H3IAXT0if6ANxXOm8/Z2rlRNthOEgsjDQU9foNxQ4wksygy5epKmbEhMqbFZjuj4zYfStPzE/gkFSE9QjhKMWaJmyLFfq9f8DnC+TTE41K5iGbtramr7qHSWsKKy75XV6MZZLLFExrQqlYDlLA2V0aYezCql3fB96KJmf6GJRT3j3Y7oWaj7gEzMCycA2QgP8ZNFL/2Q1qgvQRc6I46/HUiOh3IT8LVDdo2ZUn9qrNameQ1zR7a+wBvYIV Insecure M-CORD keypair"
diff --git a/xos-services/vspgwu/values.yaml b/xos-services/vspgwu/values.yaml
index db88f26..ad4a277 100644
--- a/xos-services/vspgwu/values.yaml
+++ b/xos-services/vspgwu/values.yaml
@@ -29,8 +29,8 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
-vnfImageURL: "http://www.vicci.org/cord/image-spgwu.qcow2.20180511"
-vnfImageVersion: "v0.1"
+vnfImageURL: "https://github.com/opencord/vspgwu/releases/download/vms/image-spgwu.qcow2.v0.1.1"
+vnfImageVersion: "v0.1.1"
 vnfImageFlavor: "m1.xlarge"
 
 publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL5L5vDsQ1bmSeisxMf/GZEqv85oHHu6RFE17VYoTAuBBsHQnETOccbQT85qSBy5NAMAICtOd15iXYfmul0eFeSHoQr1H3IAXT0if6ANxXOm8/Z2rlRNthOEgsjDQU9foNxQ4wksygy5epKmbEhMqbFZjuj4zYfStPzE/gkFSE9QjhKMWaJmyLFfq9f8DnC+TTE41K5iGbtramr7qHSWsKKy75XV6MZZLLFExrQqlYDlLA2V0aYezCql3fB96KJmf6GJRT3j3Y7oWaj7gEzMCycA2QgP8ZNFL/2Q1qgvQRc6I46/HUiOh3IT8LVDdo2ZUn9qrNameQ1zR7a+wBvYIV Insecure M-CORD keypair"