Merge "adding helm test rcord-lite E2E service chain test"
diff --git a/xos-profiles/container-vnf/.helmignore b/xos-profiles/base-kubernetes/.helmignore
similarity index 100%
rename from xos-profiles/container-vnf/.helmignore
rename to xos-profiles/base-kubernetes/.helmignore
diff --git a/xos-profiles/container-vnf/Chart.yaml b/xos-profiles/base-kubernetes/Chart.yaml
similarity index 88%
rename from xos-profiles/container-vnf/Chart.yaml
rename to xos-profiles/base-kubernetes/Chart.yaml
index e99deb2..71e6297 100644
--- a/xos-profiles/container-vnf/Chart.yaml
+++ b/xos-profiles/base-kubernetes/Chart.yaml
@@ -16,6 +16,6 @@
apiVersion: v1
appVersion: "1.0"
-description: A Helm chart for XOS's "container-vnf" profile
-name: container-vnf
+description: A Helm chart for XOS's "base-kubernetes" profile
+name: base-kubernetes
version: 0.1.0
diff --git a/xos-profiles/container-vnf/requirements.yaml b/xos-profiles/base-kubernetes/requirements.yaml
similarity index 91%
rename from xos-profiles/container-vnf/requirements.yaml
rename to xos-profiles/base-kubernetes/requirements.yaml
index c9053d7..928424a 100644
--- a/xos-profiles/container-vnf/requirements.yaml
+++ b/xos-profiles/base-kubernetes/requirements.yaml
@@ -36,7 +36,5 @@
- name: kubernetes
version: 0.1.0
repository: file://../../xos-services/kubernetes
-- name: simpleexampleservice
- version: 0.1.0
- repository: file://../../xos-services/simpleexampleservice
+
diff --git a/xos-profiles/container-vnf/templates/_helpers.tpl b/xos-profiles/base-kubernetes/templates/_helpers.tpl
similarity index 92%
rename from xos-profiles/container-vnf/templates/_helpers.tpl
rename to xos-profiles/base-kubernetes/templates/_helpers.tpl
index 9ff6d05..75cb5bd 100644
--- a/xos-profiles/container-vnf/templates/_helpers.tpl
+++ b/xos-profiles/base-kubernetes/templates/_helpers.tpl
@@ -17,7 +17,7 @@
{{/*
Expand the name of the chart.
*/}}
-{{- define "container-vnf.name" -}}
+{{- define "base-kubernetes.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -26,7 +26,7 @@
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 "container-vnf.fullname" -}}
+{{- define "base-kubernetes.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
@@ -42,7 +42,7 @@
{{/*
Create chart name and version as used by the chart label.
*/}}
-{{- define "container-vnf.chart" -}}
+{{- define "base-kubernetes.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
diff --git a/xos-profiles/container-vnf/templates/tosca-configmap.yaml b/xos-profiles/base-kubernetes/templates/tosca-configmap.yaml
similarity index 96%
rename from xos-profiles/container-vnf/templates/tosca-configmap.yaml
rename to xos-profiles/base-kubernetes/templates/tosca-configmap.yaml
index a84a875..b8c4fab 100644
--- a/xos-profiles/container-vnf/templates/tosca-configmap.yaml
+++ b/xos-profiles/base-kubernetes/templates/tosca-configmap.yaml
@@ -17,7 +17,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: container-vnf-tosca
+ name: base-kubernetes-tosca
data:
010-fixtures.yaml: |
{{ toYaml .Values.toscaRecipes.fixtures | indent 4 }}
diff --git a/xos-profiles/container-vnf/templates/tosca-job.yaml b/xos-profiles/base-kubernetes/templates/tosca-job.yaml
similarity index 82%
rename from xos-profiles/container-vnf/templates/tosca-job.yaml
rename to xos-profiles/base-kubernetes/templates/tosca-job.yaml
index e7a612c..fbc8ed0 100644
--- a/xos-profiles/container-vnf/templates/tosca-job.yaml
+++ b/xos-profiles/base-kubernetes/templates/tosca-job.yaml
@@ -17,10 +17,10 @@
apiVersion: batch/v1
kind: Job
metadata:
- name: {{ template "container-vnf.fullname" . }}-tosca-loader
+ name: {{ template "base-kubernetes.fullname" . }}-tosca-loader
labels:
- app: {{ template "container-vnf.name" . }}
- chart: {{ template "container-vnf.chart" . }}
+ app: {{ template "base-kubernetes.name" . }}
+ chart: {{ template "base-kubernetes.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
@@ -28,7 +28,7 @@
template:
metadata:
labels:
- app: {{ template "container-vnf.name" . }}
+ app: {{ template "base-kubernetes.name" . }}
release: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/tosca-configmap.yaml") . | sha256sum }}
@@ -49,9 +49,9 @@
echo ''
done
volumeMounts:
- - name: container-vnf-tosca
+ - name: base-kubernetes-tosca
mountPath: /opt/tosca
volumes:
- - name: container-vnf-tosca
+ - name: base-kubernetes-tosca
configMap:
- name: container-vnf-tosca
+ name: base-kubernetes-tosca
diff --git a/xos-profiles/container-vnf/values.yaml b/xos-profiles/base-kubernetes/values.yaml
similarity index 89%
rename from xos-profiles/container-vnf/values.yaml
rename to xos-profiles/base-kubernetes/values.yaml
index dce790d..0fcd2bb 100644
--- a/xos-profiles/container-vnf/values.yaml
+++ b/xos-profiles/base-kubernetes/values.yaml
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Default values for the container-vnf profile.
+# Default values for the base-kubernetes profile.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
@@ -178,7 +178,6 @@
tosca_definitions_version: tosca_simple_yaml_1_0
description: Set up VOLT, AddressManager, and RCORD services
imports:
- - custom_types/simpleexampleservice.yaml
- custom_types/fabricservice.yaml
- custom_types/image.yaml
- custom_types/kubernetesservice.yaml
@@ -289,38 +288,6 @@
- provider_service:
node: service#ONOS_Fabric
relationship: tosca.relationships.BelongsToOne
- httpd_image:
- type: tosca.nodes.Image
- properties:
- name: "httpd"
- tag: "2.4"
- service#simpleexampleservice:
- type: tosca.nodes.SimpleExampleService
- properties:
- name: simpleexampleservice
- service_message: hello
- mysite:
- type: tosca.nodes.Site
- properties:
- name: "mysite"
- must-exist: true
- simpleexampleservice_slice:
- type: tosca.nodes.Slice
- properties:
- name: "mysite_simpleexampleservice"
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.BelongsToOne
- - trust_domain:
- node: default_trustdomain
- relationship: tosca.relationships.BelongsToOne
- - default_image:
- node: httpd_image
- relationship: tosca.relationships.BelongsToOne
- - service:
- node: service#simpleexampleservice
- relationship: tosca.relationships.BelongsToOne
serviceGraphConstraints:
tosca_definitions_version: tosca_simple_yaml_1_0
diff --git a/xos-profiles/container-vnf/Chart.yaml b/xos-profiles/demo-simpleexampleservice/Chart.yaml
similarity index 79%
copy from xos-profiles/container-vnf/Chart.yaml
copy to xos-profiles/demo-simpleexampleservice/Chart.yaml
index e99deb2..10e3b26 100644
--- a/xos-profiles/container-vnf/Chart.yaml
+++ b/xos-profiles/demo-simpleexampleservice/Chart.yaml
@@ -16,6 +16,6 @@
apiVersion: v1
appVersion: "1.0"
-description: A Helm chart for XOS's "container-vnf" profile
-name: container-vnf
+description: A Helm chart that launches and configures SimpleExampleService. It's assumed that base-kubernetes profile is installed.
+name: demo-simpleexampleservice
version: 0.1.0
diff --git a/xos-profiles/container-vnf/Chart.yaml b/xos-profiles/demo-simpleexampleservice/requirements.yaml
similarity index 81%
copy from xos-profiles/container-vnf/Chart.yaml
copy to xos-profiles/demo-simpleexampleservice/requirements.yaml
index e99deb2..dcd90c4 100644
--- a/xos-profiles/container-vnf/Chart.yaml
+++ b/xos-profiles/demo-simpleexampleservice/requirements.yaml
@@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: v1
-appVersion: "1.0"
-description: A Helm chart for XOS's "container-vnf" profile
-name: container-vnf
-version: 0.1.0
+dependencies:
+- name: simpleexampleservice
+ version: 0.1.0
+ repository: file://../../xos-services/simpleexampleservice
diff --git a/xos-profiles/container-vnf/templates/_helpers.tpl b/xos-profiles/demo-simpleexampleservice/templates/_helpers.tpl
similarity index 88%
copy from xos-profiles/container-vnf/templates/_helpers.tpl
copy to xos-profiles/demo-simpleexampleservice/templates/_helpers.tpl
index 9ff6d05..99ca409 100644
--- a/xos-profiles/container-vnf/templates/_helpers.tpl
+++ b/xos-profiles/demo-simpleexampleservice/templates/_helpers.tpl
@@ -17,7 +17,7 @@
{{/*
Expand the name of the chart.
*/}}
-{{- define "container-vnf.name" -}}
+{{- define "demo-simpleexampleservice.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -26,7 +26,7 @@
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 "container-vnf.fullname" -}}
+{{- define "demo-simpleexampleservice.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
@@ -42,11 +42,6 @@
{{/*
Create chart name and version as used by the chart label.
*/}}
-{{- define "container-vnf.chart" -}}
+{{- define "demo-simpleexampleservice.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
-
-{{/*
-The R-CORD synchronizer loads R-CORD-specific models into the core
-*/}}
-
diff --git a/xos-profiles/container-vnf/Chart.yaml b/xos-profiles/demo-simpleexampleservice/templates/tosca-configmap.yaml
similarity index 74%
copy from xos-profiles/container-vnf/Chart.yaml
copy to xos-profiles/demo-simpleexampleservice/templates/tosca-configmap.yaml
index e99deb2..9ed3020 100644
--- a/xos-profiles/container-vnf/Chart.yaml
+++ b/xos-profiles/demo-simpleexampleservice/templates/tosca-configmap.yaml
@@ -15,7 +15,9 @@
# limitations under the License.
apiVersion: v1
-appVersion: "1.0"
-description: A Helm chart for XOS's "container-vnf" profile
-name: container-vnf
-version: 0.1.0
+kind: ConfigMap
+metadata:
+ name: demo-simpleexampleservice-tosca
+data:
+ 010-simpleexampleservice-service.yaml: |
+{{ include "simpleexampleservice.serviceTosca" .Values.simpleexampleservice | indent 4 }}
diff --git a/xos-profiles/container-vnf/templates/tosca-job.yaml b/xos-profiles/demo-simpleexampleservice/templates/tosca-job.yaml
similarity index 79%
copy from xos-profiles/container-vnf/templates/tosca-job.yaml
copy to xos-profiles/demo-simpleexampleservice/templates/tosca-job.yaml
index e7a612c..7de92a2 100644
--- a/xos-profiles/container-vnf/templates/tosca-job.yaml
+++ b/xos-profiles/demo-simpleexampleservice/templates/tosca-job.yaml
@@ -17,18 +17,17 @@
apiVersion: batch/v1
kind: Job
metadata:
- name: {{ template "container-vnf.fullname" . }}-tosca-loader
+ name: {{ template "demo-simpleexampleservice.fullname" . }}-tosca-loader
labels:
- app: {{ template "container-vnf.name" . }}
- chart: {{ template "container-vnf.chart" . }}
+ app: {{ template "demo-simpleexampleservice.name" . }}
+ chart: {{ template "demo-simpleexampleservice.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
- backoffLimit: 12
template:
metadata:
labels:
- app: {{ template "container-vnf.name" . }}
+ app: {{ template "demo-simpleexampleservice.name" . }}
release: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/tosca-configmap.yaml") . | sha256sum }}
@@ -49,9 +48,9 @@
echo ''
done
volumeMounts:
- - name: container-vnf-tosca
+ - name: demo-simpleexampleservice-tosca
mountPath: /opt/tosca
volumes:
- - name: container-vnf-tosca
+ - name: demo-simpleexampleservice-tosca
configMap:
- name: container-vnf-tosca
+ name: demo-simpleexampleservice-tosca
diff --git a/xos-profiles/container-vnf/Chart.yaml b/xos-profiles/demo-simpleexampleservice/values.yaml
similarity index 60%
copy from xos-profiles/container-vnf/Chart.yaml
copy to xos-profiles/demo-simpleexampleservice/values.yaml
index e99deb2..e61ec52 100644
--- a/xos-profiles/container-vnf/Chart.yaml
+++ b/xos-profiles/demo-simpleexampleservice/values.yaml
@@ -1,5 +1,4 @@
---
-
# Copyright 2018-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: v1
-appVersion: "1.0"
-description: A Helm chart for XOS's "container-vnf" profile
-name: container-vnf
-version: 0.1.0
+# 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"
diff --git a/xos-services/kubernetes/templates/_helpers.tpl b/xos-services/kubernetes/templates/_helpers.tpl
index e4664e1..72c0a99 100644
--- a/xos-services/kubernetes/templates/_helpers.tpl
+++ b/xos-services/kubernetes/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.
diff --git a/xos-services/onos-service/templates/_helpers.tpl b/xos-services/onos-service/templates/_helpers.tpl
index 390c710..5c59ebc 100644
--- a/xos-services/onos-service/templates/_helpers.tpl
+++ b/xos-services/onos-service/templates/_helpers.tpl
@@ -53,6 +53,9 @@
username: {{ .Values.xosAdminUser | quote }}
password: {{ .Values.xosAdminPassword | quote }}
endpoint: xos-core:50051
+required_models:
+ - ONOSService
+ - ONOSApp
dependency_graph: "/opt/xos/synchronizers/onos/model-deps"
steps_dir: "/opt/xos/synchronizers/onos/steps"
sys_dir: "/opt/xos/synchronizers/onos/sys"
diff --git a/xos-services/simpleexampleservice/templates/_tosca.tpl b/xos-services/simpleexampleservice/templates/_tosca.tpl
new file mode 100644
index 0000000..a71153e
--- /dev/null
+++ b/xos-services/simpleexampleservice/templates/_tosca.tpl
@@ -0,0 +1,71 @@
+{{/* 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 "simpleexampleservice.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+ - custom_types/image.yaml
+ - custom_types/site.yaml
+ - custom_types/simpleexampleservice.yaml
+ - custom_types/slice.yaml
+ - custom_types/trustdomain.yaml
+
+description: Configures the simple example service
+
+topology_template:
+ node_templates:
+
+ default_trustdomain:
+ type: tosca.nodes.TrustDomain
+ properties:
+ name: "default"
+ must-exist: true
+
+ httpd_image:
+ type: tosca.nodes.Image
+ properties:
+ name: "httpd"
+ tag: "2.4"
+
+ service#simpleexampleservice:
+ type: tosca.nodes.SimpleExampleService
+ properties:
+ name: simpleexampleservice
+ service_message: hello
+ mysite:
+ type: tosca.nodes.Site
+ properties:
+ name: "mysite"
+ must-exist: true
+ simpleexampleservice_slice:
+ type: tosca.nodes.Slice
+ properties:
+ name: "mysite_simpleexampleservice"
+ requirements:
+ - site:
+ node: mysite
+ relationship: tosca.relationships.BelongsToOne
+ - trust_domain:
+ node: default_trustdomain
+ relationship: tosca.relationships.BelongsToOne
+ - default_image:
+ node: httpd_image
+ relationship: tosca.relationships.BelongsToOne
+ - service:
+ node: service#simpleexampleservice
+ relationship: tosca.relationships.BelongsToOne
+{{- end -}}