--- /dev/null
+# 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
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
--- /dev/null
+apiVersion: v2
+name: ics-consumer
+description: A Helm chart for Kubernetes
+type: application
+version: 0.1.0
+appVersion: "1.16.0"
--- /dev/null
+#
+# ========================LICENSE_START=================================
+# O-RAN-SC
+#
+# Copyright (C) 2024: OpenInfra Foundation Europe
+#
+# 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.
+# ========================LICENSE_END===================================
+#
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ .Values.consumer.name }}
+spec:
+ replicas: {{ .Values.consumer.replicaCount }}
+ selector:
+ matchLabels:
+ app: {{ .Values.consumer.name }}
+ template:
+ metadata:
+ labels:
+ app: {{ .Values.consumer.name }}
+ spec:
+ containers:
+ - name: {{ .Values.consumer.name }}
+ image: "{{ .Values.consumer.image.repository }}:{{ .Values.consumer.image.tag }}"
+ ports:
+ - containerPort: {{ .Values.consumer.service.port }}
+ env:
+ - name: SPRING_KAFKA_SERVER
+ value: "{{ .Values.kafka.host }}:{{ .Values.kafka.port }}"
--- /dev/null
+#
+# ========================LICENSE_START=================================
+# O-RAN-SC
+#
+# Copyright (C) 2024: OpenInfra Foundation Europe
+#
+# 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.
+# ========================LICENSE_END===================================
+#
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ .Values.consumer.name }}
+spec:
+ type: NodePort
+ ports:
+ - port: {{ .Values.consumer.service.port }}
+ targetPort: {{ .Values.consumer.service.port }}
+ nodePort: {{ .Values.consumer.service.nodePort }}
+ selector:
+ app: {{ .Values.consumer.name }}
--- /dev/null
+#
+# ========================LICENSE_START=================================
+# O-RAN-SC
+#
+# Copyright (C) 2024: OpenInfra Foundation Europe
+#
+# 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.
+# ========================LICENSE_END===================================
+#
+consumer:
+ name: kafka-consumer
+ replicaCount: 1
+ image:
+ repository: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-sample-simple-icsconsumer
+ tag: 0.0.1
+ service:
+ port: 9090
+ nodePort: 31112
+
+kafka:
+ host: kafka.default.svc.cluster.local
+ port: 9092
--- /dev/null
+# ============LICENSE_START=======================================================\r
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.\r
+# ================================================================================\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+#\r
+# SPDX-License-Identifier: Apache-2.0\r
+# ============LICENSE_END=========================================================\r
+\r
+tosca_definitions_version: tosca_simple_yaml_1_2\r
+\r
+description: rApp ICS Consumer\r
+\r
+imports:\r
+ - asd_types.yaml\r
+\r
+topology_template:\r
+ node_templates:\r
+ applicationServiceDescriptor:\r
+ type: tosca.nodes.asd\r
+ description: "rapp-ics-consumer"\r
+ properties:\r
+ descriptor_id: 9be3038d-d0ed-4d8a-b3f8-13c5329aae17\r
+ descriptor_invariant_id: 9be3038d-d0ed-4d8a-b3f8-13c5329aae18\r
+ descriptor_version: 1.0\r
+ schema_version: 2.0\r
+ function_description: rApp description\r
+ provider: Ericsson Software Technology (O-RAN SC NONRTRIC team)\r
+ application_name: rapp-ics-consumer\r
+ application_version: 1.0\r
+ artifacts:\r
+ consumer:\r
+ type: tosca.artifacts.asd.deploymentItem\r
+ file: "Artifacts/Deployment/HELM/ics-consumer-0.1.0.tgz"\r
+ properties:\r
+ artifact_type: "helm_chart"\r
+ target_server: "chartmuseum"\r
+ target_server_uri: "UPDATE_THIS_CHART_MUSEUM_POST_CHARTS_URI"\r
+ item_id: 1\r
--- /dev/null
+# ============LICENSE_START=======================================================\r
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.\r
+# ================================================================================\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+#\r
+# SPDX-License-Identifier: Apache-2.0\r
+# ============LICENSE_END=========================================================\r
+\r
+tosca_definitions_version: tosca_simple_yaml_1_2\r
+description: ASD types definitions version 0.1\r
+node_types:\r
+ tosca.nodes.asd:\r
+ derived_from: tosca.nodes.Root\r
+ description: "The ASD node type"\r
+ version: 0.1\r
+ properties:\r
+ descriptor_id:\r
+ type: string # UUID\r
+ required: true\r
+ description: Identifier of this ASD. It is in UUID format as specified in RFC 4122\r
+ descriptor_invariant_id:\r
+ type: string # UUID\r
+ required: true\r
+ description: >\r
+ Identifier of this descriptor in a version independent manner. This attribute\r
+ is invariant across versions of ASD. It is in UUID format as specified in RFC 4122\r
+ descriptor_version:\r
+ type: string\r
+ required: true\r
+ description: Identifies the version of the ASD.\r
+ schema_version:\r
+ type: string\r
+ required: true\r
+ description: Identifies the Identifies the version of this ASD’s schema.\r
+ function_description:\r
+ type: string\r
+ required: false\r
+ description: Description of the application service described by this ASD.\r
+ provider:\r
+ type: string\r
+ required: true\r
+ description: Identifies the provider of the ASD.\r
+ application_name:\r
+ type: string\r
+ required: true\r
+ description: Name to identify the application service described by this ASD\r
+ application_version:\r
+ type: string\r
+ required: true\r
+ description: Identifies the version of the application service described by this ASD.\r
+\r
+artifact_types:\r
+tosca.artifacts.asd.deploymentItem:\r
+ version: 0.1\r
+ derived_from: tosca.artifacts.Root\r
+ description: "Describes the artifact type of asd deployment item"\r
+ file: "Relative path of the artifact in the package"\r
+ properties:\r
+ item_id:\r
+ description: "The identifier of this asd deployment item"\r
+ required: true\r
+ type: string\r
+ artifact_type:\r
+ description: >\r
+ Specify artifact type.\r
+ required: true\r
+ type: string\r
+ constraints:\r
+ - valid_values: ["helm_chart"]\r
+ target_server:\r
+ description: >\r
+ Specify target server for artifact.\r
+ required: true\r
+ type: string\r
+ constraints:\r
+ - valid_values: [ "chartmuseum" ]\r
+ target_server_uri:\r
+ description: "URI of the target server"\r
+ required: true\r
+ type: string
\ No newline at end of file
--- /dev/null
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_3",
+ "data_types": {
+ "onap.datatypes.ToscaConceptIdentifier": {
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "name": {
+ "type": "string",
+ "required": true
+ },
+ "version": {
+ "type": "string",
+ "required": true
+ }
+ }
+ },
+ "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest": {
+ "version": "1.0.0",
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "restRequestId": {
+ "type": "onap.datatypes.ToscaConceptIdentifier",
+ "type_version": "0.0.0",
+ "required": true,
+ "description": "The name and version of a REST request to be sent to a REST endpoint"
+ },
+ "httpMethod": {
+ "type": "string",
+ "required": true,
+ "constraints": [
+ {
+ "valid_values": [
+ "POST",
+ "PUT",
+ "GET",
+ "DELETE"
+ ]
+ }
+ ],
+ "description": "The REST method to use"
+ },
+ "path": {
+ "type": "string",
+ "required": true,
+ "description": "The path of the REST request relative to the base URL"
+ },
+ "body": {
+ "type": "string",
+ "required": false,
+ "description": "The body of the REST request for PUT and POST requests"
+ },
+ "expectedResponse": {
+ "type": "integer",
+ "required": true,
+ "constraints": [
+ {
+ "in_range": [
+ 100,
+ 599
+ ]
+ }
+ ],
+ "description": "THe expected HTTP status code for the REST request"
+ }
+ }
+ },
+ "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity": {
+ "version": "1.0.0",
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "configurationEntityId": {
+ "type": "onap.datatypes.ToscaConceptIdentifier",
+ "type_version": "0.0.0",
+ "required": true,
+ "description": "The name and version of a Configuration Entity to be handled by the HTTP Automation Composition Element"
+ },
+ "restSequence": {
+ "type": "list",
+ "entry_schema": {
+ "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest",
+ "type_version": "1.0.0"
+ },
+ "description": "A sequence of REST commands to send to the REST endpoint"
+ }
+ }
+ }
+ },
+ "node_types": {
+ "org.onap.policy.clamp.acm.Participant": {
+ "version": "1.0.1",
+ "derived_from": "tosca.nodetypes.Root",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "required": false
+ }
+ }
+ },
+ "org.onap.policy.clamp.acm.AutomationCompositionElement": {
+ "version": "1.0.1",
+ "derived_from": "tosca.nodetypes.Root",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "required": false
+ },
+ "participantType": {
+ "type": "onap.datatypes.ToscaConceptIdentifier",
+ "required": true
+ },
+ "startPhase": {
+ "type": "integer",
+ "required": false,
+ "constraints": [
+ {
+ "greater-or-equal": 0
+ }
+ ],
+ "metadata": {
+ "common": true
+ },
+ "description": "A value indicating the start phase in which this automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously"
+ },
+ "passiveToRunningTimeout": {
+ "type": "integer",
+ "required": false,
+ "constraints": [
+ {
+ "greater_or_equal": 0
+ }
+ ],
+ "default": 60,
+ "metadata": {
+ "common": true
+ },
+ "description": "The maximum time in seconds to wait for a state chage from passive to running"
+ },
+ "runningToPassiveTimeout": {
+ "type": "integer",
+ "required": false,
+ "constraints": [
+ {
+ "greater_or_equal": 0
+ }
+ ],
+ "default": 60,
+ "metadata": {
+ "common": true
+ },
+ "description": "The maximum time in seconds to wait for a state chage from running to passive"
+ },
+ "passiveToUninitializedTimeout": {
+ "type": "integer",
+ "required": false,
+ "constraints": [
+ {
+ "greater_or_equal": 0
+ }
+ ],
+ "default": 60,
+ "metadata": {
+ "common": true
+ },
+ "description": "The maximum time in seconds to wait for a state chage from passive to uninitialized"
+ }
+ }
+ },
+ "org.onap.policy.clamp.acm.AutomationComposition": {
+ "version": "1.0.1",
+ "derived_from": "tosca.nodetypes.Root",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "required": false,
+ "metadata": {
+ "common": true
+ }
+ },
+ "elements": {
+ "type": "list",
+ "required": true,
+ "metadata": {
+ "common": true
+ },
+ "entry_schema": {
+ "type": "onap.datatypes.ToscaConceptIdentifier"
+ }
+ }
+ }
+ },
+ "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement": {
+ "version": "1.0.0",
+ "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",
+ "properties": {
+ "chart": {
+ "type": "string",
+ "required": true
+ },
+ "configs": {
+ "type": "list",
+ "required": false
+ },
+ "requirements": {
+ "type": "string",
+ "required": false
+ },
+ "templates": {
+ "type": "list",
+ "required": false,
+ "entry_schema": null
+ },
+ "values": {
+ "type": "string",
+ "required": true
+ }
+ }
+ },
+ "org.onap.policy.clamp.acm.HttpAutomationCompositionElement": {
+ "version": "1.0.0",
+ "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",
+ "properties": {
+ "baseUrl": {
+ "type": "string",
+ "required": true,
+ "description": "The base URL to be prepended to each path, identifies the host for the REST endpoints."
+ },
+ "httpHeaders": {
+ "type": "map",
+ "required": false,
+ "entry_schema": {
+ "type": "string"
+ },
+ "description": "HTTP headers to send on REST requests"
+ },
+ "configurationEntities": {
+ "type": "map",
+ "required": true,
+ "entry_schema": {
+ "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity",
+ "type_version": "1.0.0"
+ },
+ "description": "The connfiguration entities the Automation Composition Element is managing and their associated REST requests"
+ }
+ }
+ }
+ },
+ "topology_template": {
+ "node_templates": {
+ "org.onap.k8s.acm.K8SAutomationCompositionParticipant": {
+ "version": "2.3.4",
+ "type": "org.onap.policy.clamp.acm.Participant",
+ "type_version": "1.0.1",
+ "description": "Participant for K8S",
+ "properties": {
+ "provider": "ONAP"
+ }
+ },
+ "org.onap.k8s.acm.HttpAutomationCompositionParticipant": {
+ "version": "1.2.3",
+ "type": "org.onap.policy.clamp.acm.Participant",
+ "type_version": "1.0.1",
+ "description": "Participant for Http requests",
+ "properties": {
+ "provider": "ONAP"
+ }
+ },
+ "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement": {
+ "version": "1.2.3",
+ "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
+ "type_version": "1.0.0",
+ "description": "Automation composition element for the K8S microservice for AC Element Starter",
+ "properties": {
+ "provider": "ONAP",
+ "startPhase": 0,
+ "uninitializedToPassiveTimeout": 500,
+ "podStatusCheckInterval": 30
+ }
+ },
+ "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement": {
+ "version": "1.2.3",
+ "type": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
+ "type_version": "1.0.0",
+ "description": "Automation composition element for the http requests of AC Element Starter microservice",
+ "properties": {
+ "provider": "ONAP",
+ "uninitializedToPassiveTimeout": 300,
+ "startPhase": 1
+ }
+ },
+ "onap.policy.clamp.ac.element.AutomationCompositionDefinition": {
+ "version": "1.2.3",
+ "type": "org.onap.policy.clamp.acm.AutomationComposition",
+ "type_version": "1.0.1",
+ "description": "Automation composition for rapp deployment",
+ "properties": {
+ "provider": "ONAP",
+ "elements": [
+ {
+ "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ {
+ "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ }
+ ]
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "name": "icsConsumerInstance",
+ "version": "1.0.1",
+ "compositionId": "DO_NOT_CHANGE_THIS_COMPOSITION_ID",
+ "description": "Demo automation composition instance consumer",
+ "elements": {
+ "d425fb6d-ebe3-432d-ba30-1d5ed9df58f0": {
+ "id": "d425fb6d-ebe3-432d-ba30-1d5ed9df58f0",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Starter Automation Composition Element for ICS Consumer",
+ "properties": {
+ "startPhase": 0,
+ "chart": {
+ "chartId": {
+ "name": "ics-consumer",
+ "version": "0.1.0"
+ },
+ "namespace": "nonrtric",
+ "releaseName": "ics-consumer",
+ "podName": "kafka-consumer",
+ "repository": {
+ "repoName": "local",
+ "address": "UPDATE_THIS_CHART_MUSEUM_GET_CHARTS_URI"
+ }
+ }
+ }
+ },
+ "94f1af01-c759-48ca-91f2-f0b48c12fcee": {
+ "id": "94f1af01-c759-48ca-91f2-f0b48c12fcee",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Starter Automation Composition Element for the Demo ICS-Consumer",
+ "properties": {
+ "provider": "ONAP",
+ "uninitializedToPassiveTimeout": 180,
+ "startPhase": 1,
+ "baseUrl": "http://UPDATE_THIS_MACHINE_IP:31112",
+ "httpHeaders": {
+ "Content-Type": "application/json"
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "oran.demo.ics.consumer",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request1",
+ "version": "1.0.1"
+ },
+ "httpMethod": "GET",
+ "path": "/start",
+ "expectedResponse": 200
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "info_job_data_schema": {
+ "$schema":"http://json-schema.org/draft-07/schema#",
+ "title":"STD_Type1_1.0.0",
+ "description":"Type 1",
+ "topic": "mytopic",
+ "bootStrapServers": "kafka.default.svc.cluster.local:9092"
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "info_type_id": "type1",
+ "job_owner": "demo",
+ "job_definition": {
+ "deliveryInfo": {
+ "topic": "mytopic",
+ "bootStrapServers": "kafka.default.svc.cluster.local:9092"
+ }
+ },
+ "job_result_uri": "http://kafka-producer:8080/info-job",
+ "status_notification_uri": "http://kafka-producer:9090/info-type-status"
+}
\ No newline at end of file
--- /dev/null
+TOSCA-Meta-File-Version: 1.0\r
+CSAR-Version: 1.0\r
+Created-By: Ericsson Software Technology (O-RAN SC NONRTRIC team)\r
+Entry-Definitions: Definitions/asd.yaml\r
+ETSI-Entry-Manifest: asd.mf
\ No newline at end of file
--- /dev/null
+metadata:
+ application_name: rapp-simple-ics-consumer
+ application_provider: Ericsson Software Technology (O-RAN SC NONRTRIC team)
+ release_date_time: 2024-05-23T12:00:00+00:00
+ entry_definition_type: asd
+
+Source: asd.mf
+Source: Artifacts/Deployment/HELM/ics-consumer-0.1.0.tgz
+Source: Definitions/asd.yaml
+Source: Definitions/asd_types.yaml
+Source: TOSCA-Metadata/TOSCA.meta
+Source: Files/Dme/infoconsumers/ics-simple-consumer.json
+Source: Files/Dme/consumerinfotypes/type1.json
+Source: Files/Acm/definition/compositions.json
+Source: Files/Acm/instances/k8s-instance.json
\ No newline at end of file
--- /dev/null
+# 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
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
--- /dev/null
+apiVersion: v2
+name: ics-producer
+description: A Helm chart for Kubernetes
+type: application
+version: 0.1.0
+appVersion: "1.16.0"
--- /dev/null
+#
+# ========================LICENSE_START=================================
+# O-RAN-SC
+#
+# Copyright (C) 2024: OpenInfra Foundation Europe
+#
+# 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.
+# ========================LICENSE_END===================================
+#
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ .Values.producer.name }}
+spec:
+ replicas: {{ .Values.producer.replicaCount }}
+ selector:
+ matchLabels:
+ app: {{ .Values.producer.name }}
+ template:
+ metadata:
+ labels:
+ app: {{ .Values.producer.name }}
+ spec:
+ containers:
+ - name: {{ .Values.producer.name }}
+ image: "{{ .Values.producer.image.repository }}:{{ .Values.producer.image.tag }}"
+ ports:
+ - containerPort: {{ .Values.producer.service.port }}
+ env:
+ - name: SPRING_KAFKA_SERVER
+ value: "{{ .Values.kafka.host }}:{{ .Values.kafka.port }}"
--- /dev/null
+#
+# ========================LICENSE_START=================================
+# O-RAN-SC
+#
+# Copyright (C) 2024: OpenInfra Foundation Europe
+#
+# 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.
+# ========================LICENSE_END===================================
+#
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ .Values.producer.name }}
+spec:
+ type: NodePort
+ ports:
+ - port: {{ .Values.producer.service.port }}
+ targetPort: {{ .Values.producer.service.port }}
+ nodePort: {{ .Values.producer.service.nodePort }}
+ selector:
+ app: {{ .Values.producer.name }}
--- /dev/null
+#
+# ========================LICENSE_START=================================
+# O-RAN-SC
+#
+# Copyright (C) 2024: OpenInfra Foundation Europe
+#
+# 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.
+# ========================LICENSE_END===================================
+#
+producer:
+ name: kafka-producer
+ replicaCount: 1
+ image:
+ repository: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-sample-simple-icsproducer
+ tag: 0.0.1
+ service:
+ port: 8080
+ nodePort: 31111
+
+kafka:
+ host: kafka.default.svc.cluster.local
+ port: 9092
--- /dev/null
+# ============LICENSE_START=======================================================\r
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.\r
+# ================================================================================\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+#\r
+# SPDX-License-Identifier: Apache-2.0\r
+# ============LICENSE_END=========================================================\r
+\r
+tosca_definitions_version: tosca_simple_yaml_1_2\r
+\r
+description: rApp ICS Producer\r
+\r
+imports:\r
+ - asd_types.yaml\r
+\r
+topology_template:\r
+ node_templates:\r
+ applicationServiceDescriptor:\r
+ type: tosca.nodes.asd\r
+ description: "rapp-ics-producer"\r
+ properties:\r
+ descriptor_id: 2cd6a567-2e33-4960-8ef7-1cc519c998c5\r
+ descriptor_invariant_id: 3f8a5e1b-68f1-42e5-89d0-47090dd0ef5b\r
+ descriptor_version: 1.0\r
+ schema_version: 2.0\r
+ function_description: rApp description\r
+ provider: Ericsson Software Technology (O-RAN SC NONRTRIC team)\r
+ application_name: rapp-ics-producer\r
+ application_version: 1.0\r
+ artifacts:\r
+ producer:\r
+ type: tosca.artifacts.asd.deploymentItem\r
+ file: "Artifacts/Deployment/HELM/ics-producer-0.1.0.tgz"\r
+ properties:\r
+ artifact_type: "helm_chart"\r
+ target_server: "chartmuseum"\r
+ target_server_uri: "UPDATE_THIS_CHART_MUSEUM_POST_CHARTS_URI"\r
+ item_id: 1\r
--- /dev/null
+# ============LICENSE_START=======================================================\r
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.\r
+# ================================================================================\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+#\r
+# SPDX-License-Identifier: Apache-2.0\r
+# ============LICENSE_END=========================================================\r
+\r
+tosca_definitions_version: tosca_simple_yaml_1_2\r
+description: ASD types definitions version 0.1\r
+node_types:\r
+ tosca.nodes.asd:\r
+ derived_from: tosca.nodes.Root\r
+ description: "The ASD node type"\r
+ version: 0.1\r
+ properties:\r
+ descriptor_id:\r
+ type: string # UUID\r
+ required: true\r
+ description: Identifier of this ASD. It is in UUID format as specified in RFC 4122\r
+ descriptor_invariant_id:\r
+ type: string # UUID\r
+ required: true\r
+ description: >\r
+ Identifier of this descriptor in a version independent manner. This attribute\r
+ is invariant across versions of ASD. It is in UUID format as specified in RFC 4122\r
+ descriptor_version:\r
+ type: string\r
+ required: true\r
+ description: Identifies the version of the ASD.\r
+ schema_version:\r
+ type: string\r
+ required: true\r
+ description: Identifies the Identifies the version of this ASD’s schema.\r
+ function_description:\r
+ type: string\r
+ required: false\r
+ description: Description of the application service described by this ASD.\r
+ provider:\r
+ type: string\r
+ required: true\r
+ description: Identifies the provider of the ASD.\r
+ application_name:\r
+ type: string\r
+ required: true\r
+ description: Name to identify the application service described by this ASD\r
+ application_version:\r
+ type: string\r
+ required: true\r
+ description: Identifies the version of the application service described by this ASD.\r
+\r
+artifact_types:\r
+tosca.artifacts.asd.deploymentItem:\r
+ version: 0.1\r
+ derived_from: tosca.artifacts.Root\r
+ description: "Describes the artifact type of asd deployment item"\r
+ file: "Relative path of the artifact in the package"\r
+ properties:\r
+ item_id:\r
+ description: "The identifier of this asd deployment item"\r
+ required: true\r
+ type: string\r
+ artifact_type:\r
+ description: >\r
+ Specify artifact type.\r
+ required: true\r
+ type: string\r
+ constraints:\r
+ - valid_values: ["helm_chart"]\r
+ target_server:\r
+ description: >\r
+ Specify target server for artifact.\r
+ required: true\r
+ type: string\r
+ constraints:\r
+ - valid_values: [ "chartmuseum" ]\r
+ target_server_uri:\r
+ description: "URI of the target server"\r
+ required: true\r
+ type: string
\ No newline at end of file
--- /dev/null
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_3",
+ "data_types": {
+ "onap.datatypes.ToscaConceptIdentifier": {
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "name": {
+ "type": "string",
+ "required": true
+ },
+ "version": {
+ "type": "string",
+ "required": true
+ }
+ }
+ },
+ "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest": {
+ "version": "1.0.0",
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "restRequestId": {
+ "type": "onap.datatypes.ToscaConceptIdentifier",
+ "type_version": "0.0.0",
+ "required": true,
+ "description": "The name and version of a REST request to be sent to a REST endpoint"
+ },
+ "httpMethod": {
+ "type": "string",
+ "required": true,
+ "constraints": [
+ {
+ "valid_values": [
+ "POST",
+ "PUT",
+ "GET",
+ "DELETE"
+ ]
+ }
+ ],
+ "description": "The REST method to use"
+ },
+ "path": {
+ "type": "string",
+ "required": true,
+ "description": "The path of the REST request relative to the base URL"
+ },
+ "body": {
+ "type": "string",
+ "required": false,
+ "description": "The body of the REST request for PUT and POST requests"
+ },
+ "expectedResponse": {
+ "type": "integer",
+ "required": true,
+ "constraints": [
+ {
+ "in_range": [
+ 100,
+ 599
+ ]
+ }
+ ],
+ "description": "THe expected HTTP status code for the REST request"
+ }
+ }
+ },
+ "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity": {
+ "version": "1.0.0",
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "configurationEntityId": {
+ "type": "onap.datatypes.ToscaConceptIdentifier",
+ "type_version": "0.0.0",
+ "required": true,
+ "description": "The name and version of a Configuration Entity to be handled by the HTTP Automation Composition Element"
+ },
+ "restSequence": {
+ "type": "list",
+ "entry_schema": {
+ "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest",
+ "type_version": "1.0.0"
+ },
+ "description": "A sequence of REST commands to send to the REST endpoint"
+ }
+ }
+ }
+ },
+ "node_types": {
+ "org.onap.policy.clamp.acm.Participant": {
+ "version": "1.0.1",
+ "derived_from": "tosca.nodetypes.Root",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "required": false
+ }
+ }
+ },
+ "org.onap.policy.clamp.acm.AutomationCompositionElement": {
+ "version": "1.0.1",
+ "derived_from": "tosca.nodetypes.Root",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "required": false
+ },
+ "participantType": {
+ "type": "onap.datatypes.ToscaConceptIdentifier",
+ "required": true
+ },
+ "startPhase": {
+ "type": "integer",
+ "required": false,
+ "constraints": [
+ {
+ "greater-or-equal": 0
+ }
+ ],
+ "metadata": {
+ "common": true
+ },
+ "description": "A value indicating the start phase in which this automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously"
+ },
+ "passiveToRunningTimeout": {
+ "type": "integer",
+ "required": false,
+ "constraints": [
+ {
+ "greater_or_equal": 0
+ }
+ ],
+ "default": 60,
+ "metadata": {
+ "common": true
+ },
+ "description": "The maximum time in seconds to wait for a state chage from passive to running"
+ },
+ "runningToPassiveTimeout": {
+ "type": "integer",
+ "required": false,
+ "constraints": [
+ {
+ "greater_or_equal": 0
+ }
+ ],
+ "default": 60,
+ "metadata": {
+ "common": true
+ },
+ "description": "The maximum time in seconds to wait for a state chage from running to passive"
+ },
+ "passiveToUninitializedTimeout": {
+ "type": "integer",
+ "required": false,
+ "constraints": [
+ {
+ "greater_or_equal": 0
+ }
+ ],
+ "default": 60,
+ "metadata": {
+ "common": true
+ },
+ "description": "The maximum time in seconds to wait for a state chage from passive to uninitialized"
+ }
+ }
+ },
+ "org.onap.policy.clamp.acm.AutomationComposition": {
+ "version": "1.0.1",
+ "derived_from": "tosca.nodetypes.Root",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "required": false,
+ "metadata": {
+ "common": true
+ }
+ },
+ "elements": {
+ "type": "list",
+ "required": true,
+ "metadata": {
+ "common": true
+ },
+ "entry_schema": {
+ "type": "onap.datatypes.ToscaConceptIdentifier"
+ }
+ }
+ }
+ },
+ "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement": {
+ "version": "1.0.0",
+ "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",
+ "properties": {
+ "chart": {
+ "type": "string",
+ "required": true
+ },
+ "configs": {
+ "type": "list",
+ "required": false
+ },
+ "requirements": {
+ "type": "string",
+ "required": false
+ },
+ "templates": {
+ "type": "list",
+ "required": false,
+ "entry_schema": null
+ },
+ "values": {
+ "type": "string",
+ "required": true
+ }
+ }
+ },
+ "org.onap.policy.clamp.acm.HttpAutomationCompositionElement": {
+ "version": "1.0.0",
+ "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",
+ "properties": {
+ "baseUrl": {
+ "type": "string",
+ "required": true,
+ "description": "The base URL to be prepended to each path, identifies the host for the REST endpoints."
+ },
+ "httpHeaders": {
+ "type": "map",
+ "required": false,
+ "entry_schema": {
+ "type": "string"
+ },
+ "description": "HTTP headers to send on REST requests"
+ },
+ "configurationEntities": {
+ "type": "map",
+ "required": true,
+ "entry_schema": {
+ "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity",
+ "type_version": "1.0.0"
+ },
+ "description": "The connfiguration entities the Automation Composition Element is managing and their associated REST requests"
+ }
+ }
+ }
+ },
+ "topology_template": {
+ "node_templates": {
+ "org.onap.k8s.acm.K8SAutomationCompositionParticipant": {
+ "version": "2.3.4",
+ "type": "org.onap.policy.clamp.acm.Participant",
+ "type_version": "1.0.1",
+ "description": "Participant for K8S",
+ "properties": {
+ "provider": "ONAP"
+ }
+ },
+ "org.onap.k8s.acm.HttpAutomationCompositionParticipant": {
+ "version": "1.2.3",
+ "type": "org.onap.policy.clamp.acm.Participant",
+ "type_version": "1.0.1",
+ "description": "Participant for Http requests",
+ "properties": {
+ "provider": "ONAP"
+ }
+ },
+ "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement": {
+ "version": "1.2.3",
+ "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
+ "type_version": "1.0.0",
+ "description": "Automation composition element for the K8S microservice for AC Element Starter",
+ "properties": {
+ "provider": "ONAP",
+ "startPhase": 0,
+ "uninitializedToPassiveTimeout": 500,
+ "podStatusCheckInterval": 30
+ }
+ },
+ "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement": {
+ "version": "1.2.3",
+ "type": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
+ "type_version": "1.0.0",
+ "description": "Automation composition element for the http requests of AC Element Starter microservice",
+ "properties": {
+ "provider": "ONAP",
+ "uninitializedToPassiveTimeout": 300,
+ "startPhase": 1
+ }
+ },
+ "onap.policy.clamp.ac.element.AutomationCompositionDefinition": {
+ "version": "1.2.3",
+ "type": "org.onap.policy.clamp.acm.AutomationComposition",
+ "type_version": "1.0.1",
+ "description": "Automation composition for rapp deployment",
+ "properties": {
+ "provider": "ONAP",
+ "elements": [
+ {
+ "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ {
+ "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ }
+ ]
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "name": "icsProducerInstance",
+ "version": "1.0.1",
+ "compositionId": "DO_NOT_CHANGE_THIS_COMPOSITION_ID",
+ "description": "Demo automation composition instance 0",
+ "elements": {
+ "ea40d074-17c6-4f34-a6ea-6e464ac4cc38": {
+ "id": "ea40d074-17c6-4f34-a6ea-6e464ac4cc38",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Starter Automation Composition Element for ICS Producer",
+ "properties": {
+ "startPhase": 0,
+ "chart": {
+ "chartId": {
+ "name": "ics-producer",
+ "version": "0.1.0"
+ },
+ "namespace": "nonrtric",
+ "releaseName": "ics-producer",
+ "podName": "kafka-producer",
+ "repository": {
+ "repoName": "local",
+ "address": "UPDATE_THIS_CHART_MUSEUM_GET_CHARTS_URI"
+ }
+ }
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c24": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c24",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Starter Automation Composition Element for the Demo ICS-Producer",
+ "properties": {
+ "provider": "ONAP",
+ "uninitializedToPassiveTimeout": 180,
+ "startPhase": 1,
+ "baseUrl": "http://UPDATE_THIS_MACHINE_IP:31111",
+ "httpHeaders": {
+ "Content-Type": "application/json"
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "oran.demo.ics.producer",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request1",
+ "version": "1.0.1"
+ },
+ "httpMethod": "GET",
+ "path": "/publish/A",
+ "expectedResponse": 200
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "info_producer_supervision_callback_url": "http://kafka-producer:8080/health-check",
+ "supported_info_types": [
+ "type1"
+ ],
+ "info_job_callback_url": "http://kafka-producer:8080/info-job"
+}
\ No newline at end of file
--- /dev/null
+{
+ "info_job_data_schema": {
+ "$schema":"http://json-schema.org/draft-07/schema#",
+ "title":"STD_Type1_1.0.0",
+ "description":"Type 1",
+ "topic": "mytopic",
+ "bootStrapServers": "kafka.default.svc.cluster.local:9092"
+ }
+}
\ No newline at end of file
--- /dev/null
+TOSCA-Meta-File-Version: 1.0\r
+CSAR-Version: 1.0\r
+Created-By: Ericsson Software Technology (O-RAN SC NONRTRIC team)\r
+Entry-Definitions: Definitions/asd.yaml\r
+ETSI-Entry-Manifest: asd.mf
\ No newline at end of file
--- /dev/null
+metadata:\r
+ application_name: rapp-simple-ics-producer\r
+ application_provider: Ericsson Software Technology (O-RAN SC NONRTRIC team)\r
+ release_date_time: 2024-05-03T12:00:00+00:00\r
+ entry_definition_type: asd\r
+\r
+Source: asd.mf\r
+Source: Artifacts/Deployment/HELM/ics-producer-0.1.0.tgz\r
+Source: Definitions/asd.yaml\r
+Source: Definitions/asd_types.yaml\r
+Source: TOSCA-Metadata/TOSCA.meta\r
+Source: Files/Dme/infoproducers/ics-simple-producer.json\r
+Source: Files/Dme/producerinfotypes/type1.json
\ No newline at end of file
#
echo "######### Patching Sample rApps #########"
-
+echo "Replacing hardcoded variables inside sample-rapp-generator:"
+echo "UPDATE_THIS_MACHINE_IP"
+echo "UPDATE_THIS_CHART_MUSEUM_GET_CHARTS_URI"
+echo "UPDATE_THIS_CHART_MUSEUM_POST_CHARTS_URI"
CWD=$(pwd)
export WORKSPACE="$CWD/../../sample-rapp-generator"
fi
done
-echo "Replacing charts repo get url in json files....."
+echo "Replacing charts repo get url and machine ip in json files....."
echo "Chart repository get URI : $CHART_REPO_GET_URI"
for file in $(find $WORKSPACE -type f -name "*.json"); do
sed -i "s|UPDATE_THIS_CHART_MUSEUM_GET_CHARTS_URI|${CHART_REPO_GET_URI}|g" "$file"
if grep -q "$CHART_REPO_GET_URI" "$file"; then
echo "$file is updated."
fi
-done
+ sed -i "s/UPDATE_THIS_MACHINE_IP/$IP_ADDRESS/g" "$file"
+ if grep -q "$IP_ADDRESS" "$file"; then
+ echo "UPDATE_THIS_MACHINE_IP updated in file: $file"
+ fi
+done
+echo "UPDATE_THIS_MACHINE_IP=$IP_ADDRESS"
+echo "UPDATE_THIS_CHART_MUSEUM_GET_CHARTS_URI=$CHART_REPO_GET_URI"
+echo "UPDATE_THIS_CHART_MUSEUM_POST_CHARTS_URI=$CHART_REPO_POST_URI"
echo "Patching Sample rApps completed."