Modify user guide for ODU deployment via tacker. 62/14862/1
authorAshutosh Mishra <ashutosh.mishra1@india.nec.com>
Fri, 29 Aug 2025 06:37:27 +0000 (06:37 +0000)
committerAshutosh Mishra <ashutosh.mishra1@india.nec.com>
Fri, 29 Aug 2025 06:38:39 +0000 (06:38 +0000)
Modify user guideline for ODU deployment using tacker V2-API.

Change-Id: I838d4caec975151d54acd55d4d8afaf1e71d9654
Signed-off-by: Ashutosh Mishra <ashutosh.mishra1@india.nec.com>
17 files changed:
docs/tacker-user-guide-odu-v2.rst
tacker/samples/packages/odu_v2/Definitions/sample_cnf_df_simple.yaml
tacker/samples/packages/odu_v2/Definitions/sample_cnf_top.vnfd.yaml
tacker/samples/packages/odu_v2/Definitions/sample_cnf_types.yaml
tacker/samples/packages/odu_v2/Files/kubernetes/du.tgz [new file with mode: 0644]
tacker/samples/packages/odu_v2/Files/kubernetes/du/Chart.yaml [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/Chart.yaml with 100% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/templates/NOTES.txt [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/templates/NOTES.txt with 100% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/templates/_helpers.tpl [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/templates/_helpers.tpl with 100% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/templates/deployment.yaml [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/templates/deployment.yaml with 74% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/templates/hpa.yaml [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/templates/hpa.yaml with 100% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/templates/ingress.yaml [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/templates/ingress.yaml with 100% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/templates/service.yaml [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/templates/service.yaml with 100% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/templates/serviceaccount.yaml [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/templates/serviceaccount.yaml with 100% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/templates/tests/test-connection.yaml [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/templates/tests/test-connection.yaml with 100% similarity]
tacker/samples/packages/odu_v2/Files/kubernetes/du/values.yaml [moved from tacker/samples/packages/odu_v2/Files/kubernetes/test-chart/values.yaml with 98% similarity]
tacker/samples/packages/odu_v2/TOSCA-Metadata/TOSCA.meta
tacker/samples/packages/odu_v2/inst.json

index b05467e..923ca23 100644 (file)
@@ -227,17 +227,14 @@ Create and Instantiate VNF
            }
         },
         "additionalParams": {
-          "helm_chart_path": "Files/kubernetes/test-chart-0.1.0.tgz",
+          "helm_chart_path": "Files/kubernetes/du.tgz",
           "helm_parameters": {
             "service.port": 8081,
             "service.type": "NodePort"
           },
           "helm_value_names": {
-            "VDU1": {
-              "replica": "replicaCountVdu1"
-             },
-             "odu": {
-               "replica": "replicaCountodu"
+            "odu1": {
+              "replica": "replicaCount"
              }
           },
           "namespace": "default"
@@ -270,8 +267,8 @@ Check ODU status
 
       $ kubectl get pods
 
-      NAME                                                     READY   STATUS    RESTARTS   AGE
-      vnff770aa831a9c4c8e9bcefc9d1e652c25-du-d5887d5dc-gh6xg   1/1     Running   0          7d4h
+      NAME                                                       READY   STATUS    RESTARTS   AGE
+      odu1-vnff770aa831a9c4c8e9bcefc9d1e652c25-d5887d5dc-gh6xg   1/1     Running   0          7d4h
 
 3. VNF Status
 
index 987126f..233bb6f 100644 (file)
@@ -68,20 +68,11 @@ topology_template:
           type: tosca.artifacts.Implementation.Python
           file: ../Scripts/sample_script.py
 
-    VDU1:
+    ODU1:
       type: tosca.nodes.nfv.Vdu.Compute
       properties:
-        name: vdu1
-        description: VDU1 compute node
-        vdu_profile:
-          min_number_of_instances: 1
-          max_number_of_instances: 3
-
-    ODU:
-      type: tosca.nodes.nfv.Vdu.Compute
-      properties:
-        name: odu
-        description: ODU compute node
+        name: odu1
+        description: ODU1 compute node
         vdu_profile:
           min_number_of_instances: 1
           max_number_of_instances: 3
@@ -91,50 +82,28 @@ topology_template:
         type: tosca.policies.nfv.ScalingAspects
         properties:
           aspects:
-            vdu1_aspect:
-              name: vdu1_aspect
-              description: vdu1 scaling aspect
+            odu1_aspect:
+              name: odu1_aspect
+              description: odu1 scaling aspect
               max_scale_level: 2
               step_deltas:
                 - delta_1
-            odu_aspect:
-              name: odu_aspect
-              description: odu scaling aspect
-              max_scale_level: 2
-              step_deltas:
-                - delta_1
-
-    - VDU1_initial_delta:
-        type: tosca.policies.nfv.VduInitialDelta
-        properties:
-          initial_delta:
-            number_of_instances: 1
-        targets: [ VDU1 ]
-
-    - VDU1_scaling_aspect_deltas:
-        type: tosca.policies.nfv.VduScalingAspectDeltas
-        properties:
-          aspect: vdu1_aspect
-          deltas:
-            delta_1:
-              number_of_instances: 1
-        targets: [ VDU1 ]
 
-    - ODU_initial_delta:
+    - odu1_initial_delta:
         type: tosca.policies.nfv.VduInitialDelta
         properties:
           initial_delta:
             number_of_instances: 1
-        targets: [ ODU ]
+        targets: [ ODU1 ]
 
-    - ODU_scaling_aspect_deltas:
+    - ODU1_scaling_aspect_deltas:
         type: tosca.policies.nfv.VduScalingAspectDeltas
         properties:
-          aspect: odu_aspect
+          aspect: odu1_aspect
           deltas:
             delta_1:
               number_of_instances: 1
-        targets: [ ODU ]
+        targets: [ ODU1 ]
 
     - instantiation_levels:
         type: tosca.policies.nfv.InstantiationLevels
@@ -143,30 +112,16 @@ topology_template:
             instantiation_level_1:
               description: Smallest size
               scale_info:
-                vdu1_aspect:
-                  scale_level: 0
-                odu_aspect:
+                odu1_aspect:
                   scale_level: 0
             instantiation_level_2:
               description: Largest size
               scale_info:
-                vdu1_aspect:
-                  scale_level: 2
-                odu_aspect:
+                odu1_aspect:
                   scale_level: 2
           default_level: instantiation_level_1
 
-    - VDU1_instantiation_levels:
-        type: tosca.policies.nfv.VduInstantiationLevels
-        properties:
-          levels:
-            instantiation_level_1:
-              number_of_instances: 1
-            instantiation_level_2:
-              number_of_instances: 3
-        targets: [ VDU1 ]
-
-    - ODU_instantiation_levels:
+    - ODU1_instantiation_levels:
         type: tosca.policies.nfv.VduInstantiationLevels
         properties:
           levels:
@@ -174,4 +129,4 @@ topology_template:
               number_of_instances: 1
             instantiation_level_2:
               number_of_instances: 3
-        targets: [ ODU ]
+        targets: [ ODU1 ]
index bbcfbab..d9bb98d 100644 (file)
@@ -19,7 +19,7 @@ topology_template:
       type: company.provider.VNF
       properties:
         flavour_id: { get_input: selected_flavour }
-        descriptor_id: 6fd8696a-2c3a-48e9-8f59-3cbb250844c3
+        descriptor_id: 56f4eb23-4075-4a2f-a3e1-329c93d656c0
         provider: Company
         product_name: Sample VNF
         software_version: '1.0'
index 41207ba..7124a2a 100644 (file)
@@ -12,8 +12,8 @@ node_types:
     properties:
       descriptor_id:
         type: string
-        constraints: [ valid_values: [ 6fd8696a-2c3a-48e9-8f59-3cbb250844c3 ] ]
-        default: 6fd8696a-2c3a-48e9-8f59-3cbb250844c3
+        constraints: [ valid_values: [ 56f4eb23-4075-4a2f-a3e1-329c93d656c0 ] ]
+        default: 56f4eb23-4075-4a2f-a3e1-329c93d656c0
       descriptor_version:
         type: string
         constraints: [ valid_values: [ '1.0' ] ]
@@ -46,8 +46,10 @@ node_types:
     requirements:
       - virtual_link_external:
           capability: tosca.capabilities.nfv.VirtualLinkable
+          occurrences: [0, UNBOUNDED]
       - virtual_link_internal:
           capability: tosca.capabilities.nfv.VirtualLinkable
+          occurrences: [0, UNBOUNDED]
     interfaces:
       Vnflcm:
         type: tosca.interfaces.nfv.Vnflcm
diff --git a/tacker/samples/packages/odu_v2/Files/kubernetes/du.tgz b/tacker/samples/packages/odu_v2/Files/kubernetes/du.tgz
new file mode 100644 (file)
index 0000000..291bad3
Binary files /dev/null and b/tacker/samples/packages/odu_v2/Files/kubernetes/du.tgz differ
@@ -1,7 +1,7 @@
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: {{ include "du.fullname" . }}
+  name: odu1-{{ .Release.Name }}
   labels:
     {{- include "du.labels" . | nindent 4 }}
 spec:
@@ -34,24 +34,15 @@ spec:
         - name: {{ .Chart.Name }}
           securityContext:
             {{- toYaml .Values.securityContext | nindent 12 }}
-          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+          image:  "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
           imagePullPolicy: {{ .Values.image.pullPolicy }}
-          command: [ "/bin/bash", "-c", "--"]
-          #args: [ "sleep 60; /root/docker-entrypoint.sh" ]
-          args: [ "sleep 60000000000000000000;"]
-            #ports:
-            #- name: http
-            #  containerPort: {{ .Values.service.port }}
-            #  protocol: {{ .Values.service.protocol }}
+          command: [ "/bin/bash", "-c"]
+          args: [ "sleep infinity" ]
           env:
             {{- range .Values.env }}
             - name: {{ .name }}
               value: {{ .value | quote }}
             {{- end }}
-          livenessProbe:
-            {{- toYaml .Values.livenessProbe | nindent 12 }}
-          readinessProbe:
-            {{- toYaml .Values.readinessProbe | nindent 12 }}
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
           {{- with .Values.volumeMounts }}
@@ -6,7 +6,7 @@ replicaCount: 1
 
 image:
   repository: ashu2022/new-du-container
-    # pullPolicy: IfNotPresent
+  pullPolicy: IfNotPresent
   # Overrides the image tag whose default is the chart appVersion.
   tag: v1
 
@@ -43,6 +43,7 @@ securityContext:
 
 service:
   type: ClusterIP
+  port: 80
   f1port: 38472
   f1protocol: SCTP
   f1targetPort: 38472
index 337123b..30b3e88 100644 (file)
@@ -3,7 +3,7 @@ Created-by: dummy_user
 CSAR-Version: 1.1
 Entry-Definitions: Definitions/sample_cnf_top.vnfd.yaml
 
-Name: Files/kubernetes/test-chart-0.1.0.tgz
+Name: Files/kubernetes/du.tgz
 Content-Type: test-data
 Algorithm: SHA-256
-Hash: 6bf4fc7feeb9e4ab1e02acbe852272b3fd0813569442a1bbfaef7baba85d026f
+Hash: 7076a4fe28da395d5928a1d855155220667aab028f73636918079d7f30fb7a0c
index 3938a60..923c18b 100644 (file)
@@ -7,17 +7,14 @@
     }
   },
   "additionalParams": {
-    "helm_chart_path": "Files/kubernetes/test-chart-0.1.0.tgz",
+    "helm_chart_path": "Files/kubernetes/du.tgz",
     "helm_parameters": {
       "service.port": 8081,
       "service.type": "NodePort"
     },
     "helm_value_names": {
-      "VDU1": {
-        "replica": "replicaCountVdu1"
-      },
-      "odu": {
-        "replica": "replicaCountodu"
+      "odu1": {
+        "replica": "replicaCount"
       }
     },
     "namespace": "default"