Merge "CORD-3162 Create demo-exampleservice profile"
diff --git a/examples/adminuser-values.yaml b/examples/adminuser-values.yaml
index 4395e74..bdad17b 100644
--- a/examples/adminuser-values.yaml
+++ b/examples/adminuser-values.yaml
@@ -41,6 +41,9 @@
 kubernetes:
   xosAdminUser: *adminuser
   xosAdminPassword: *adminpass
+exampleservice:
+  xosAdminUser: *adminuser
+  xosAdminPassword: *adminpass
 simpleexampleservice:
   xosAdminUser: *adminuser
   xosAdminPassword: *adminpass
\ No newline at end of file
diff --git a/examples/api-test-values.yaml b/examples/api-test-values.yaml
index dc43f9b..98251d4 100644
--- a/examples/api-test-values.yaml
+++ b/examples/api-test-values.yaml
@@ -59,6 +59,9 @@
 kubernetes:
   kubernetes_synchronizerImage: "xosproject/kubernetes-synchronizer:candidate"
   imagePullPolicy: 'IfNotPresent'
+exampleservice:
+  exampleservice_synchronizerImage: "xosproject/exampleservice-synchronizer:candidate"
+  imagePullPolicy: 'IfNotPresent'
 simpleexampleservice:
   simpleexampleservice_synchronizerImage: "xosproject/simpleexampleservice-synchronizer:candidate"
   imagePullPolicy: 'IfNotPresent'
diff --git a/examples/filter-images.yaml b/examples/filter-images.yaml
index fb00f79..ed40c95 100644
--- a/examples/filter-images.yaml
+++ b/examples/filter-images.yaml
@@ -59,5 +59,6 @@
 
 # others
 - xosproject/kubernetes-synchronizer
+- xosproject/exampleservice-synchronizer
 - xosproject/simpleexampleservice-synchronizer
 - xosproject/xos-api-tester
diff --git a/examples/image-tag-candidate.yaml b/examples/image-tag-candidate.yaml
index 79441b6..7e5ee1f 100644
--- a/examples/image-tag-candidate.yaml
+++ b/examples/image-tag-candidate.yaml
@@ -73,6 +73,8 @@
 # others  
 kubernetes:
   kubernetes_synchronizerImage: 'xosproject/kubernetes-synchronizer:candidate'
+exampleservice:
+  exampleservice_synchronizerImage: 'xosproject/exampleservice-synchronizer:candidate'
 simpleexampleservice:
   simpleexampleservice_synchronizerImage: 'xosproject/simpleexampleservice-synchronizer:candidate'
 hippieOSS:
diff --git a/examples/imagePullPolicy-IfNotPresent.yaml b/examples/imagePullPolicy-IfNotPresent.yaml
index 713d0f4..ee306e6 100644
--- a/examples/imagePullPolicy-IfNotPresent.yaml
+++ b/examples/imagePullPolicy-IfNotPresent.yaml
@@ -67,6 +67,8 @@
 # others
 kubernetes:
   imagePullPolicy: 'IfNotPresent'
+exampleservice:
+  imagePullPolicy: 'IfNotPresent'
 simpleexampleservice:
   imagePullPolicy: 'IfNotPresent'
 hippieOSS:
diff --git a/xos-profiles/demo-exampleservice/Chart.yaml b/xos-profiles/demo-exampleservice/Chart.yaml
new file mode 100644
index 0000000..926af58
--- /dev/null
+++ b/xos-profiles/demo-exampleservice/Chart.yaml
@@ -0,0 +1,21 @@
+---
+
+# Copyright 2018-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.
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart that launches and configures ExampleService. It's assumed that base-kubernetes profile is installed.
+name: demo-exampleservice
+version: 0.1.0
diff --git a/xos-profiles/demo-exampleservice/requirements.yaml b/xos-profiles/demo-exampleservice/requirements.yaml
new file mode 100644
index 0000000..b398892
--- /dev/null
+++ b/xos-profiles/demo-exampleservice/requirements.yaml
@@ -0,0 +1,20 @@
+---
+
+# Copyright 2018-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.
+
+dependencies:
+- name: exampleservice
+  version: 0.1.0
+  repository: file://../../xos-services/exampleservice
diff --git a/xos-profiles/demo-exampleservice/templates/_helpers.tpl b/xos-profiles/demo-exampleservice/templates/_helpers.tpl
new file mode 100644
index 0000000..abeb4d4
--- /dev/null
+++ b/xos-profiles/demo-exampleservice/templates/_helpers.tpl
@@ -0,0 +1,47 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2018-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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "demo-exampleservice.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 "demo-exampleservice.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 "demo-exampleservice.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/xos-profiles/demo-exampleservice/templates/_tosca.tpl b/xos-profiles/demo-exampleservice/templates/_tosca.tpl
new file mode 100644
index 0000000..7747670
--- /dev/null
+++ b/xos-profiles/demo-exampleservice/templates/_tosca.tpl
@@ -0,0 +1,67 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2018-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 "demo-exampleservice.publicNetworkTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Setup public network
+imports:
+  - custom_types/networktemplate.yaml
+  - custom_types/network.yaml
+  - custom_types/site.yaml
+  - custom_types/slice.yaml
+topology_template:
+  node_templates:
+    mysite:
+      type: tosca.nodes.Site
+      properties:
+        name: {{ .Values.cordSiteName }}
+        must-exist: true
+
+    public_networking_slice:
+      description: This slice exists solely to own the public network
+      type: tosca.nodes.Slice
+      properties:
+        network: noauto
+        name: public_networking
+      requirements:
+        - site:
+            node: mysite
+            relationship: tosca.relationships.BelongsToOne
+
+    # public network
+    public_template:
+      type: tosca.nodes.NetworkTemplate
+      properties:
+        name: public_template
+        visibility: public
+        translation: none
+        vtn_kind: PUBLIC
+
+    public:
+      type: tosca.nodes.Network
+      properties:
+        name: public
+        permit_all_slices: true
+        subnet: {{ .Values.addresspool_public_cidr }}
+        # ip_version: 4
+      requirements:
+        - template:
+            node: public_template
+            relationship: tosca.relationships.BelongsToOne
+        - owner:
+            node: public_networking_slice
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
diff --git a/xos-profiles/demo-exampleservice/templates/tosca-configmap.yaml b/xos-profiles/demo-exampleservice/templates/tosca-configmap.yaml
new file mode 100644
index 0000000..1c7f0a7
--- /dev/null
+++ b/xos-profiles/demo-exampleservice/templates/tosca-configmap.yaml
@@ -0,0 +1,25 @@
+---
+
+# Copyright 2018-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.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: demo-exampleservice-tosca
+data:
+  010-publicnet.yaml: |
+{{ include "demo-exampleservice.publicNetworkTosca" . | indent 4 }}
+  050-exampleservice-service.yaml: |
+{{ include "exampleservice.serviceTosca" .Values.exampleservice | indent 4 }}
diff --git a/xos-profiles/demo-exampleservice/templates/tosca-job.yaml b/xos-profiles/demo-exampleservice/templates/tosca-job.yaml
new file mode 100644
index 0000000..6b9b529
--- /dev/null
+++ b/xos-profiles/demo-exampleservice/templates/tosca-job.yaml
@@ -0,0 +1,56 @@
+---
+
+# Copyright 2018-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.
+
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: {{ template "demo-exampleservice.fullname" . }}-tosca-loader
+  labels:
+    app: {{ template "demo-exampleservice.name" . }}
+    chart: {{ template "demo-exampleservice.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  template:
+    metadata:
+      labels:
+        app: {{ template "demo-exampleservice.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/tosca-configmap.yaml") . | sha256sum }}
+    spec:
+      restartPolicy: OnFailure
+      containers:
+        - name: {{ .Chart.Name }}-tosca-loader
+          image: {{ .Values.httpieImage | quote }}
+          imagePullPolicy: {{ .Values.imagePullPolicy }}
+          command: ["/bin/sh"]
+          args:
+            - "-c"
+            - |
+              for recipe in /opt/tosca/*
+              do
+                echo $recipe
+                http --check-status --ignore-stdin POST http://xos-tosca:$XOS_TOSCA_SERVICE_PORT/run xos-username:{{ .Values.xosAdminUser }} xos-password:{{ .Values.xosAdminPassword }} @$recipe || exit 1
+                echo ''
+              done
+          volumeMounts:
+            - name: demo-exampleservice-tosca
+              mountPath: /opt/tosca
+      volumes:
+        - name: demo-exampleservice-tosca
+          configMap:
+            name: demo-exampleservice-tosca
diff --git a/xos-profiles/demo-exampleservice/values.yaml b/xos-profiles/demo-exampleservice/values.yaml
new file mode 100644
index 0000000..a9fc768
--- /dev/null
+++ b/xos-profiles/demo-exampleservice/values.yaml
@@ -0,0 +1,39 @@
+---
+# Copyright 2018-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.
+
+# Default values for the base-openstack profile.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+imagePullPolicy: 'IfNotPresent'
+
+httpieImage: "clue/httpie:latest"
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+
+cordSiteName: "mysite"
+cordDeploymentName: "mydeployment"
+
+addresspool_public_cidr: "10.8.1.0/24"
+
+global:
+  proxySshEnabled: true
+  proxySshUser: root
diff --git a/xos-services/exampleservice/files/id_rsa b/xos-services/exampleservice/files/id_rsa
new file mode 100644
index 0000000..c840002
--- /dev/null
+++ b/xos-services/exampleservice/files/id_rsa
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpgIBAAKCAQEAy+S+bw7ENW5knorMTH/xmRKr/OaBx7ukRRNe1WKEwLgQbB0J
+xEznHG0E/OakgcuTQDACArTndeYl2H5rpdHhXkh6EK9R9yAF09In+gDcVzpvP2dq
+5UTbYThILIw0FPX6DcUOMJLMoMuXqSpmxITKmxWY7o+M2H0rT8xP4JBUhPUI4SjF
+miZsixX6vX/A5wvk0xONSuYhm7a2pq+6h0lrCisu+V1ejGWSyxRMa0KpWA5SwNld
+GmHswqpd3wfeiiZn+hiUU9492O6Fmo+4BMzAsnANkID/GTRS/9kNaoL0EXOiOOvx
+1IjodyE/C1Q3aNmVJ/aqzWpnkNc0e2vsAb2CFQIDAQABAoIBAQDGRZByCtf+ZXVv
+PuXgVmKoSiH5cmYtxmi9y1JjCsSxa8x8ddhzjZ0IZXN+QwMiPMbamlS6MRUL71xK
+JNWlkG0p9CzPYM3CFN/V1f2N/ZxHLsnTzEuE2+rBpat5tnVHFNOu5DsiPP7ENncq
+x9Lbs44aNWxcQDfkpgOiO7pJU9D84FYuJbH6EhHCt1nuyUeHaG7qqsDYnaGo6NSc
+qqnmrvoSBOQ+CIXgqRwGuetN9kNF/nKOWxWiZ+VAYIXb7cnkmOWTg5ojPifCWMeE
+xiV9agFzEEJhPxhivFtIq0XvsiSlAZvZcREXKayw6zFx9JTgpOXYln+xg0pQEVXr
+MLWv7BTZAoGBAPLy1Z7qjeR9PwTZen970AS3BsATQAcAh4aEHGPxwLmWDkhzJTW7
+C2U4dSyjB1W6OL6y4u7aggO5nshsEUZ73hE37b1/sr1PYC+NXuXuThDYDFD3f5LA
+HwU0Xvx+uibV75+XpOkClSBkf2k6eBFD68PaLyjfCSnEkzukWPtngxRTAoGBANbY
+zXFKIrcQtAz2p3+txU9Xqa5xK2rQfLurc66xxxC3KO8oMhYP2htieYRygwg91JR2
+Bu6sX8+t5MNYSso1t8CSO36tcgUDowo+2XuvY9FwQUgViHNKOb7cFrNSgWMVhbng
+/ZgxKrnVl1NPBivDV5kPg+jD1BIOUlQimyrD6sL3AoGBAOnnRCZpWs1GjHrly5ub
+n846TMR2hCl5qAGphg/vfIbxYrT8LzII8FK2xZGBMJmn3eQ0JGqkc5KUjrwV15gN
+v+LB/yF4JaVAG7IMoPYstnpfF5SIhQnL8NG4906P0Dd9t+PmQz6XXu4987FjOqAc
+zYvVr5vhCFhvSvWcKJN7uGbDAoGBAKvJequlLZDXCEB9UHzkwymn3IMg9ihYQAQH
+GV6Lw7H34gEoULQXRLw0xxlCPsduOPXkUbKxnYJ/drVDebmprh2KT4wAv3SG7eyZ
+SGh/Wv7yFSDAJvSYWwfjDzufMtm5Mc3oupzgY1toD7GLNFH1xasbHswVGRK+5NFl
+QlC1ipcNAoGBAIxqGyCai6btwDlbpkdI+ck2j7k9ndZ8sosc0G2se9d58sfsHdWe
+1wpqe62t7mQZr+IgEyq7RuuEtRR6Xqb8RQqAuEdSms1zcWc30SJJhPiwxIeLL0dx
+ly/HBBqnozD4BN3ENiqnIhOgeZE7XHaS43luYkYpBOuBaWYs5IIZWcct
+-----END RSA PRIVATE KEY-----
diff --git a/xos-services/exampleservice/templates/_helpers.tpl b/xos-services/exampleservice/templates/_helpers.tpl
index 56ecf89..5087738 100644
--- a/xos-services/exampleservice/templates/_helpers.tpl
+++ b/xos-services/exampleservice/templates/_helpers.tpl
@@ -31,13 +31,9 @@
 {{- .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.
@@ -52,16 +48,6 @@
   username: {{ .Values.xosAdminUser | quote }}
   password: {{ .Values.xosAdminPassword | quote }}
   endpoint: xos-core:50051
-required_models:
-  - ExampleService
-  - ExampleServiceInstance
-  - ServiceDependency
-  - ServiceMonitoringAgentInfo
-dependency_graph: "/opt/xos/synchronizers/exampleservice/model-deps"
-steps_dir: "/opt/xos/synchronizers/exampleservice/steps"
-sys_dir: "/opt/xos/synchronizers/exampleservice/sys"
-model_policies_dir: "/opt/xos/synchronizers/exampleservice/model_policies"
-models_dir: "/opt/xos/synchronizers/exampleservice/models"
 logging:
   version: 1
   handlers:
@@ -78,4 +64,7 @@
           - console
           - file
       level: DEBUG
+proxy_ssh:
+  enabled: {{ .Values.global.proxySshEnabled }}
+  user: {{ .Values.global.proxySshUser }}
 {{- end -}}
diff --git a/xos-services/exampleservice/templates/_tosca.tpl b/xos-services/exampleservice/templates/_tosca.tpl
new file mode 100644
index 0000000..eeb8e20
--- /dev/null
+++ b/xos-services/exampleservice/templates/_tosca.tpl
@@ -0,0 +1,161 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2018-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 "exampleservice.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+   - custom_types/slice.yaml
+   - custom_types/site.yaml
+   - custom_types/image.yaml
+   - custom_types/flavor.yaml
+   - custom_types/network.yaml
+   - custom_types/networktemplate.yaml
+   - custom_types/networkslice.yaml
+   - custom_types/exampleservice.yaml
+   - custom_types/exampleserviceinstance.yaml
+
+description: configure exampleservice
+
+topology_template:
+  node_templates:
+
+# site, image, fully created in deployment.yaml
+    mysite:
+      type: tosca.nodes.Site
+      properties:
+        must-exist: true
+        name: {{ .cordSiteName }}
+
+    m1.small:
+      type: tosca.nodes.Flavor
+      properties:
+        name: m1.small
+        must-exist: true
+
+    trusty-server-multi-nic:
+      type: tosca.nodes.Image
+      properties:
+        name: "trusty-server-multi-nic"
+        container_format: "BARE"
+        disk_format: "QCOW2"
+        path: "https://github.com/opencord/platform-install/releases/download/vms/trusty-server-cloudimg-amd64-disk1.img.20170201"
+
+# private network template, fully created somewhere else
+    private:
+      type: tosca.nodes.NetworkTemplate
+      properties:
+        must-exist: true
+        name: Private
+
+# management networks, fully created in management-net.yaml
+    management_network:
+      type: tosca.nodes.Network
+      properties:
+        must-exist: true
+        name: management
+
+# public network, fully created somewhere else
+    public_network:
+      type: tosca.nodes.Network
+      properties:
+        must-exist: true
+        name: public
+
+    exampleservice_network:
+      type: tosca.nodes.Network
+      properties:
+          name: exampleservice_network
+          labels: exampleservice_private_network
+      requirements:
+          - template:
+              node: private
+              relationship: tosca.relationships.BelongsToOne
+          - owner:
+              node: exampleservice_slice
+              relationship: tosca.relationships.BelongsToOne
+
+# ExampleService Slices
+    exampleservice_slice:
+      description: Example Service Slice
+      type: tosca.nodes.Slice
+      properties:
+          name: exampleservice
+          default_isolation: vm
+          network: noauto
+      requirements:
+          - site:
+              node: mysite
+              relationship: tosca.relationships.BelongsToOne
+          - service:
+              node: exampleservice
+              relationship: tosca.relationships.BelongsToOne
+          - default_image:
+              node: trusty-server-multi-nic
+              relationship: tosca.relationships.BelongsToOne
+          - default_flavor:
+              node: m1.small
+              relationship: tosca.relationships.BelongsToOne
+
+# ExampleService NetworkSlices
+    exampleservice_slice_management_network:
+      type: tosca.nodes.NetworkSlice
+      requirements:
+        - network:
+            node: management_network
+            relationship: tosca.relationships.BelongsToOne
+        - slice:
+            node: exampleservice_slice
+            relationship: tosca.relationships.BelongsToOne
+
+    exampleservice_slice_public_network:
+      type: tosca.nodes.NetworkSlice
+      requirements:
+        - network:
+            node: public_network
+            relationship: tosca.relationships.BelongsToOne
+        - slice:
+            node: exampleservice_slice
+            relationship: tosca.relationships.BelongsToOne
+
+    exampleservice_slice_exampleservice_network:
+      type: tosca.nodes.NetworkSlice
+      requirements:
+        - network:
+            node: exampleservice_network
+            relationship: tosca.relationships.BelongsToOne
+        - slice:
+            node: exampleservice_slice
+            relationship: tosca.relationships.BelongsToOne
+
+    exampleservice:
+      type: tosca.nodes.ExampleService
+      properties:
+        name: exampleservice
+        public_key: {{ .publicKey | quote }}
+        private_key_fn: /opt/xos/services/exampleservice/keys/id_rsa
+        service_message: hello
+
+    exampletenant1:
+      type: tosca.nodes.ExampleServiceInstance
+      properties:
+        name: exampletenant1
+        tenant_message: world
+      requirements:
+        - owner:
+            node: exampleservice
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
diff --git a/xos-services/exampleservice/templates/deployment.yaml b/xos-services/exampleservice/templates/deployment.yaml
index 4509f9b..e8fac2f 100644
--- a/xos-services/exampleservice/templates/deployment.yaml
+++ b/xos-services/exampleservice/templates/deployment.yaml
@@ -42,24 +42,38 @@
 {{ toYaml .Values.resources | indent 12 }}
           volumeMounts:
             - name: exampleservice-config
-              mountPath: /opt/xos/synchronizers/exampleservice/exampleservice_config.yaml
-              subPath: exampleservice_config.yaml
+              mountPath: /opt/xos/synchronizers/exampleservice/mounted_config.yaml
+              subPath: mounted_config.yaml
             - name: certchain-volume
               mountPath: /usr/local/share/ca-certificates/local_certs.crt
               subPath: config/ca_cert_chain.pem
+            - name: exampleservice-keys
+              mountPath: /opt/xos/services/exampleservice/keys
+              readOnly: true
+            - name: node-key
+              mountPath: /opt/cord_profile
+              readOnly: true
       volumes:
         - name: exampleservice-config
           configMap:
             name: exampleservice
             items:
               - key: serviceConfig
-                path: exampleservice_config.yaml
+                path: mounted_config.yaml
         - name: certchain-volume
           configMap:
             name: ca-certificates
             items:
               - key: chain
                 path: config/ca_cert_chain.pem
+        - name: exampleservice-keys
+          secret:
+            secretName: exampleservice-keys
+        - name: node-key
+          secret:
+            secretName: node-key
+            defaultMode: 256
+            optional: true
     {{- with .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml . | indent 8 }}
diff --git a/xos-services/exampleservice/templates/secret.yaml b/xos-services/exampleservice/templates/secret.yaml
new file mode 100644
index 0000000..9ffe719
--- /dev/null
+++ b/xos-services/exampleservice/templates/secret.yaml
@@ -0,0 +1,23 @@
+---
+# 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.
+
+apiVersion: v1
+kind: Secret
+metadata:
+  name: exampleservice-keys
+  namespace: default
+type: Opaque
+data:
+  id_rsa: {{ .Files.Get .Values.privateKeyFile | b64enc }}
\ No newline at end of file
diff --git a/xos-services/exampleservice/values.yaml b/xos-services/exampleservice/values.yaml
index 80389ba..a10289d 100644
--- a/xos-services/exampleservice/values.yaml
+++ b/xos-services/exampleservice/values.yaml
@@ -29,6 +29,8 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
+cordSiteName: "mysite"
+
 resources: {}
 
 nodeSelector: {}
@@ -36,3 +38,11 @@
 tolerations: []
 
 affinity: {}
+
+publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL5L5vDsQ1bmSeisxMf/GZEqv85oHHu6RFE17VYoTAuBBsHQnETOccbQT85qSBy5NAMAICtOd15iXYfmul0eFeSHoQr1H3IAXT0if6ANxXOm8/Z2rlRNthOEgsjDQU9foNxQ4wksygy5epKmbEhMqbFZjuj4zYfStPzE/gkFSE9QjhKMWaJmyLFfq9f8DnC+TTE41K5iGbtramr7qHSWsKKy75XV6MZZLLFExrQqlYDlLA2V0aYezCql3fB96KJmf6GJRT3j3Y7oWaj7gEzMCycA2QgP8ZNFL/2Q1qgvQRc6I46/HUiOh3IT8LVDdo2ZUn9qrNameQ1zR7a+wBvYIV Insecure M-CORD keypair"
+privateKeyFile: "files/id_rsa"
+
+# These variables can be overridden by the profile chart
+global:
+  proxySshEnabled: true
+  proxySshUser: "root"