From: ambrishest Date: Fri, 1 Mar 2024 13:30:49 +0000 (+0000) Subject: rApp - Hello World SME Invoker X-Git-Tag: 0.1.0~18^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=refs%2Fchanges%2F87%2F12587%2F4;p=nonrtric%2Fplt%2Frappmanager.git rApp - Hello World SME Invoker Issue-ID: NONRTRIC-965 Change-Id: Icd743e0012215c2a3e9c10da506ebd4e0d21714b Signed-off-by: ambrishest --- diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz b/sample-rapp-generator/rapp-hello-world-sme-invoker/Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz new file mode 100644 index 0000000..3dfa1bb Binary files /dev/null and b/sample-rapp-generator/rapp-hello-world-sme-invoker/Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz differ diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd.yaml b/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd.yaml new file mode 100644 index 0000000..6e921c0 --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd.yaml @@ -0,0 +1,48 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================ +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +tosca_definitions_version: tosca_simple_yaml_1_2 + +description: rApp Hello World SME Invoker + +imports: + - asd_types.yaml + +topology_template: + node_templates: + applicationServiceDescriptor: + type: tosca.nodes.asd + description: "rapp-hello-world-sme-invoker" + properties: + descriptor_id: 2cd6a567-2e33-5970-8ef7-1cc519c998c4 + descriptor_invariant_id: 3f8a5e1b-78g1-42e5-89d0-47090dd0ef5a + descriptor_version: 1.0 + schema_version: 2.0 + function_description: rApp description + provider: Ericsson Software Technology (O-RAN SC NONRTRIC team) + application_name: rapp-hello-world-sme-invoker + application_version: 1.0 + artifacts: + helloworld: + type: tosca.artifacts.asd.deploymentItem + file: "Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz" + properties: + artifact_type: "helm_chart" + target_server: "chartmuseum" + target_server_uri: "UPDATE_THIS_CHART_MUSEUM_POST_CHARTS_URI" + item_id: 1 diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd_types.yaml b/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd_types.yaml new file mode 100644 index 0000000..c4de6ad --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd_types.yaml @@ -0,0 +1,90 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================ +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +tosca_definitions_version: tosca_simple_yaml_1_2 +description: ASD types definitions version 0.1 +node_types: + tosca.nodes.asd: + derived_from: tosca.nodes.Root + description: "The ASD node type" + version: 0.1 + properties: + descriptor_id: + type: string # UUID + required: true + description: Identifier of this ASD. It is in UUID format as specified in RFC 4122 + descriptor_invariant_id: + type: string # UUID + required: true + description: > + Identifier of this descriptor in a version independent manner. This attribute + is invariant across versions of ASD. It is in UUID format as specified in RFC 4122 + descriptor_version: + type: string + required: true + description: Identifies the version of the ASD. + schema_version: + type: string + required: true + description: Identifies the Identifies the version of this ASD’s schema. + function_description: + type: string + required: false + description: Description of the application service described by this ASD. + provider: + type: string + required: true + description: Identifies the provider of the ASD. + application_name: + type: string + required: true + description: Name to identify the application service described by this ASD + application_version: + type: string + required: true + description: Identifies the version of the application service described by this ASD. + +artifact_types: +tosca.artifacts.asd.deploymentItem: + version: 0.1 + derived_from: tosca.artifacts.Root + description: "Describes the artifact type of asd deployment item" + file: "Relative path of the artifact in the package" + properties: + item_id: + description: "The identifier of this asd deployment item" + required: true + type: string + artifact_type: + description: > + Specify artifact type. + required: true + type: string + constraints: + - valid_values: ["helm_chart"] + target_server: + description: > + Specify target server for artifact. + required: true + type: string + constraints: + - valid_values: [ "chartmuseum" ] + target_server_uri: + description: "URI of the target server" + required: true + type: string \ No newline at end of file diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/definition/compositions.json b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/definition/compositions.json new file mode 100644 index 0000000..f7b0401 --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/definition/compositions.json @@ -0,0 +1,189 @@ +{ + "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 + } + } + } + }, + "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 + } + } + } + }, + "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" + } + }, + "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": 300, + "podStatusCheckInterval": 30 + } + }, + "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" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/instances/k8s-instance.json b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/instances/k8s-instance.json new file mode 100644 index 0000000..917497e --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/instances/k8s-instance.json @@ -0,0 +1,35 @@ +{ + "name": "K8SmeInvokerDemoInstance0", + "version": "1.0.1", + "compositionId": "DO_NOT_CHANGE_THIS_COMPOSITION_ID", + "description": "Demo automation composition instance 0", + "elements": { + "d7be552e-bdd5-2233-b64d-797dbaec8f55": { + "id": "d7be552e-bdd5-2233-b64d-797dbaec8f55", + "definition": { + "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement", + "version": "1.2.3" + }, + "description": "Starter Automation Composition Element for the Hello World", + "properties": { + "chart": { + "chartId": { + "name": "hello-world-sme-invoker", + "version": "0.1.0" + }, + "namespace": "nonrtric", + "releaseName": "hello-world-sme-invoker", + "podName": "hello-world-sme-invoker", + "repository": { + "repoName": "local", + "address": "UPDATE_THIS_CHART_MUSEUM_GET_CHARTS_URI" + }, + "overrideParams": { + "appId": "DO_NOT_CHANGE_THIS_RAPP_INSTANCE_ID", + "smeDiscoveryEndpoint": "DO_NOT_CHANGE_THIS_SME_DISCOVERY_ENDPOINT" + } + } + } + } + } +} diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Sme/invokers/invoker-app1.json b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Sme/invokers/invoker-app1.json new file mode 100644 index 0000000..a9d3cf6 --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Sme/invokers/invoker-app1.json @@ -0,0 +1,14 @@ +[ + { + "apiInvokerInformation": "DO_NOT_CHANGE_THIS_RAPP_INSTANCE_ID", + "apiList": [ + { "apiName": "Hello World API Set 1" } + ], + "notificationDestination": "NOT USED here", + "onboardingInformation": { + "apiInvokerPublicKey": "{PUBLIC_KEY_INVOKER_1}", + "apiInvokerCertificate": "apiInvokerCertificate" + }, + "requestTestNotification": true + } +] \ No newline at end of file diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/TOSCA-Metadata/TOSCA.meta b/sample-rapp-generator/rapp-hello-world-sme-invoker/TOSCA-Metadata/TOSCA.meta new file mode 100644 index 0000000..3da5f0d --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/TOSCA-Metadata/TOSCA.meta @@ -0,0 +1,5 @@ +TOSCA-Meta-File-Version: 1.0 +CSAR-Version: 1.0 +Created-By: Ericsson Software Technology (O-RAN SC NONRTRIC team) +Entry-Definitions: Definitions/asd.yaml +ETSI-Entry-Manifest: asd.mf \ No newline at end of file diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/asd.mf b/sample-rapp-generator/rapp-hello-world-sme-invoker/asd.mf new file mode 100644 index 0000000..c6936a9 --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/asd.mf @@ -0,0 +1,14 @@ +metadata: + application_name: rapp-hello-world-sme-invoker + application_provider: Ericsson Software Technology (O-RAN SC NONRTRIC team) + release_date_time: 2024-03-04T11:30:00+00:00 + entry_definition_type: asd + +Source: asd.mf +Source: Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz +Source: Definitions/asd.yaml +Source: Definitions/asd_types.yaml +Source: TOSCA-Metadata/TOSCA.meta +Source: Files/Acm/definition/compositions.json +Source: Files/Acm/instances/k8s-instance.json +Source: Files/Sme/invokers/invoker-app1.json diff --git a/sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz b/sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz index 141ad8a..e0e67c3 100644 Binary files a/sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz and b/sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz differ