2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
15 packetgen_deployment_name=packetgen
16 sink_deployment_name=sink
17 firewall_deployment_name=firewall
18 image_name=virtlet.cloud/ubuntu/16.04
19 kubevirt_image=integratedcloudnative/fedora:33
20 multus_deployment_name=multus-deployment
21 virtlet_image=virtlet.cloud/fedora
22 virtlet_deployment_name=virtlet-deployment
23 kubevirt_vmi_name=kubevirt-vmi
24 plugin_deployment_name=plugin-deployment
25 plugin_service_name=plugin-service
26 ovn4nfv_deployment_name=ovn4nfv-deployment
27 onap_private_net=onap-private-net
28 unprotected_private_net=unprotected-private-net
29 protected_private_net=protected-private-net
30 ovn_multus_network_name=ovn-networkobj
31 rbd_metadata=rbd_metatada.json
32 rbp_metadata=rbp_metatada.json
33 rbp_instance=rbp_instance.json
36 demo_artifacts_version=1.5.0
37 vfw_private_ip_0='192.168.10.3'
38 vfw_private_ip_1='192.168.20.2'
39 vfw_private_ip_2='10.10.100.3'
40 vpg_private_ip_0='192.168.10.2'
41 vpg_private_ip_1='10.0.100.2'
42 vsn_private_ip_0='192.168.20.3'
43 vsn_private_ip_1='10.10.100.4'
44 dcae_collector_ip='10.0.4.1'
45 dcae_collector_port='8081'
46 protected_net_gw='192.168.20.100'
47 protected_net_cidr='192.168.20.0/24'
48 protected_private_net_cidr='192.168.10.0/24'
49 onap_private_net_cidr='10.10.0.0/16'
50 sink_ipaddr='192.168.20.250'
51 multus_private_net_cidr='10.20.0.0/16'
53 # populate_CSAR_containers_vFW() - This function creates the content of CSAR file
54 # required for vFirewal using only containers
55 function populate_CSAR_containers_vFW {
59 pushd ${CSAR_DIR}/${csar_id}
61 cat << META > metadata.yaml
64 - $unprotected_private_net.yaml
65 - $protected_private_net.yaml
66 - $onap_private_net.yaml
68 - $packetgen_deployment_name.yaml
69 - $firewall_deployment_name.yaml
70 - $sink_deployment_name.yaml
73 cat << NET > $unprotected_private_net.yaml
74 apiVersion: "k8s.cni.cncf.io/v1"
75 kind: NetworkAttachmentDefinition
77 name: $unprotected_private_net
80 "name": "unprotected",
84 "subnet": "$protected_private_net_cidr"
89 cat << NET > $protected_private_net.yaml
90 apiVersion: "k8s.cni.cncf.io/v1"
91 kind: NetworkAttachmentDefinition
93 name: $protected_private_net
100 "subnet": "$protected_net_cidr"
105 cat << NET > $onap_private_net.yaml
106 apiVersion: "k8s.cni.cncf.io/v1"
107 kind: NetworkAttachmentDefinition
109 name: $onap_private_net
115 "type": "host-local",
116 "subnet": "$onap_private_net_cidr"
121 cat << DEPLOYMENT > $packetgen_deployment_name.yaml
125 name: $packetgen_deployment_name
138 k8s.v1.cni.cncf.io/networks: '[
139 { "name": "$unprotected_private_net", "interfaceRequest": "eth1" },
140 { "name": "$onap_private_net", "interfaceRequest": "eth2" }
144 - name: $packetgen_deployment_name
145 image: electrocucaracha/packetgen
146 imagePullPolicy: IfNotPresent
154 cat << DEPLOYMENT > $firewall_deployment_name.yaml
158 name: $firewall_deployment_name
171 k8s.v1.cni.cncf.io/networks: '[
172 { "name": "$unprotected_private_net", "interfaceRequest": "eth1" },
173 { "name": "$protected_private_net", "interfaceRequest": "eth2" },
174 { "name": "$onap_private_net", "interfaceRequest": "eth3" }
178 - name: $firewall_deployment_name
179 image: electrocucaracha/firewall
180 imagePullPolicy: IfNotPresent
185 cat << DEPLOYMENT > $sink_deployment_name.yaml
189 name: $sink_deployment_name
204 k8s.v1.cni.cncf.io/networks: '[
205 { "name": "$protected_private_net", "interfaceRequest": "eth1" },
206 { "name": "$onap_private_net", "interfaceRequest": "eth2" }
210 - name: $sink_deployment_name
211 image: electrocucaracha/sink
212 imagePullPolicy: IfNotPresent
218 image: electrocucaracha/darkstat
219 imagePullPolicy: IfNotPresent
228 # populate_CSAR_vms_containers_vFW() - This function creates the content of CSAR file
229 # required for vFirewal using an hybrid combination between virtual machines and
231 function populate_CSAR_vms_containers_vFW {
233 ssh_key=$(cat $HOME/.ssh/id_rsa.pub)
235 _checks_args $csar_id
236 pushd ${CSAR_DIR}/${csar_id}
238 cat << META > metadata.yaml
241 - onap-ovn4nfvk8s-network.yaml
243 - $unprotected_private_net.yaml
244 - $protected_private_net.yaml
245 - $onap_private_net.yaml
247 - $packetgen_deployment_name.yaml
248 - $firewall_deployment_name.yaml
249 - $sink_deployment_name.yaml
254 cat << SERVICE > sink-service.yaml
269 cat << MULTUS_NET > onap-ovn4nfvk8s-network.yaml
270 apiVersion: "k8s.cni.cncf.io/v1"
271 kind: NetworkAttachmentDefinition
273 name: $ovn_multus_network_name
276 "cniVersion": "0.3.1",
277 "name": "ovn4nfv-k8s-plugin",
278 "type": "ovn4nfvk8s-cni"
282 cat << NET > $unprotected_private_net.yaml
283 apiVersion: k8s.plugin.opnfv.org/v1alpha1
287 name: $unprotected_private_net
291 - subnet: $protected_private_net_cidr
293 gateway: 192.168.10.1/24
296 cat << NET > $protected_private_net.yaml
297 apiVersion: k8s.plugin.opnfv.org/v1alpha1
300 name: $protected_private_net
304 - subnet: $protected_net_cidr
306 gateway: $protected_net_gw/24
309 cat << NET > $onap_private_net.yaml
310 apiVersion: k8s.plugin.opnfv.org/v1alpha1
313 name: $onap_private_net
317 - subnet: $onap_private_net_cidr
319 gateway: 10.10.0.1/16
324 - export demo_artifacts_version=$demo_artifacts_version
325 - export vfw_private_ip_0=$vfw_private_ip_0
326 - export vsn_private_ip_0=$vsn_private_ip_0
327 - export protected_net_cidr=$protected_net_cidr
328 - export dcae_collector_ip=$dcae_collector_ip
329 - export dcae_collector_port=$dcae_collector_port
330 - export protected_net_gw=$protected_net_gw
331 - export protected_private_net_cidr=$protected_private_net_cidr
332 - export sink_ipaddr=$sink_ipaddr
334 if [[ -n "${http_proxy+x}" ]]; then
336 http_proxy: $http_proxy"
338 - export http_proxy=$http_proxy"
340 if [[ -n "${https_proxy+x}" ]]; then
342 https_proxy: $https_proxy"
344 - export https_proxy=$https_proxy"
346 if [[ -n "${no_proxy+x}" ]]; then
348 - export no_proxy=$no_proxy"
351 cat << DEPLOYMENT > $packetgen_deployment_name.yaml
355 name: $packetgen_deployment_name
368 VirtletLibvirtCPUSetting: |
370 VirtletCloudInitUserData: |
377 sudo: ALL=(ALL) NOPASSWD:ALL
379 # the password is "admin"
380 passwd: "\$6\$rounds=4096\$QA5OCKHTE41\$jRACivoPMJcOjLRgxl3t.AMfU7LhCFwOWv2z66CQX.TSxBy50JoYtycJXSPr2JceG.8Tq/82QN9QYt3euYEZW/"
386 - wget -O - https://git.onap.org/multicloud/k8s/plain/kud/tests/vFW/$packetgen_deployment_name | sudo -E bash
389 VirtletRootVolumeSize: 5Gi
390 k8s.v1.cni.cncf.io/networks: '[{ "name": "$ovn_multus_network_name"}]'
391 k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [
392 { "name": "$unprotected_private_net", "ipAddress": "$vpg_private_ip_0", "interface": "eth1" , "defaultGateway": "false"},
393 { "name": "$onap_private_net", "ipAddress": "$vpg_private_ip_1", "interface": "eth2" , "defaultGateway": "false"}
395 kubernetes.io/target-runtime: virtlet.cloud
399 requiredDuringSchedulingIgnoredDuringExecution:
407 - name: $packetgen_deployment_name
409 imagePullPolicy: IfNotPresent
413 - containerPort: 8183
419 cat << DEPLOYMENT > $firewall_deployment_name.yaml
423 name: $firewall_deployment_name
436 VirtletLibvirtCPUSetting: |
438 VirtletCloudInitUserData: |
445 sudo: ALL=(ALL) NOPASSWD:ALL
447 # the password is "admin"
448 passwd: "\$6\$rounds=4096\$QA5OCKHTE41\$jRACivoPMJcOjLRgxl3t.AMfU7LhCFwOWv2z66CQX.TSxBy50JoYtycJXSPr2JceG.8Tq/82QN9QYt3euYEZW/"
454 - wget -O - https://git.onap.org/multicloud/k8s/plain/kud/tests/vFW/$firewall_deployment_name | sudo -E bash
457 VirtletRootVolumeSize: 5Gi
458 k8s.v1.cni.cncf.io/networks: '[{ "name": "$ovn_multus_network_name"}]'
459 k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [
460 { "name": "$unprotected_private_net", "ipAddress": "$vfw_private_ip_0", "interface": "eth1" , "defaultGateway": "false"},
461 { "name": "$protected_private_net", "ipAddress": "$vfw_private_ip_1", "interface": "eth2", "defaultGateway": "false" },
462 { "name": "$onap_private_net", "ipAddress": "$vfw_private_ip_2", "interface": "eth3" , "defaultGateway": "false"}
464 kubernetes.io/target-runtime: virtlet.cloud
468 requiredDuringSchedulingIgnoredDuringExecution:
476 - name: $firewall_deployment_name
478 imagePullPolicy: IfNotPresent
486 cat << CONFIGMAP > sink_configmap.yaml
492 protected_net_gw: $protected_net_gw
493 protected_private_net_cidr: $protected_private_net_cidr
496 cat << DEPLOYMENT > $sink_deployment_name.yaml
500 name: $sink_deployment_name
515 k8s.v1.cni.cncf.io/networks: '[{ "name": "$ovn_multus_network_name"}]'
516 k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [
517 { "name": "$protected_private_net", "ipAddress": "$vsn_private_ip_0", "interface": "eth1", "defaultGateway": "false" },
518 { "name": "$onap_private_net", "ipAddress": "$vsn_private_ip_1", "interface": "eth2" , "defaultGateway": "false"}
522 - name: $sink_deployment_name
523 image: rtsood/onap-vfw-demo-sink:0.2.0
527 imagePullPolicy: Always
534 image: electrocucaracha/darkstat
535 imagePullPolicy: IfNotPresent
544 # populate_CSAR_vms_vFW() - This function creates the content of CSAR file
545 # required for vFirewal using only virtual machines
546 function populate_CSAR_vms_vFW {
548 ssh_key=$(cat $HOME/.ssh/id_rsa.pub)
550 _checks_args $csar_id
551 pushd ${CSAR_DIR}/${csar_id}
553 cat << META > metadata.yaml
556 - $unprotected_private_net.yaml
557 - $protected_private_net.yaml
558 - $onap_private_net.yaml
560 - $packetgen_deployment_name.yaml
561 - $firewall_deployment_name.yaml
562 - $sink_deployment_name.yaml
565 cat << NET > $unprotected_private_net.yaml
566 apiVersion: "k8s.cni.cncf.io/v1"
567 kind: NetworkAttachmentDefinition
569 name: $unprotected_private_net
572 "name": "unprotected",
575 "type": "host-local",
576 "subnet": "$protected_private_net_cidr"
581 cat << NET > $protected_private_net.yaml
582 apiVersion: "k8s.cni.cncf.io/v1"
583 kind: NetworkAttachmentDefinition
585 name: $protected_private_net
591 "type": "host-local",
592 "subnet": "$protected_net_cidr"
597 cat << NET > $onap_private_net.yaml
598 apiVersion: "k8s.cni.cncf.io/v1"
599 kind: NetworkAttachmentDefinition
601 name: $onap_private_net
607 "type": "host-local",
608 "subnet": "$onap_private_net_cidr"
615 - export demo_artifacts_version=$demo_artifacts_version
616 - export vfw_private_ip_0=$vfw_private_ip_0
617 - export vsn_private_ip_0=$vsn_private_ip_0
618 - export protected_net_cidr=$protected_net_cidr
619 - export dcae_collector_ip=$dcae_collector_ip
620 - export dcae_collector_port=$dcae_collector_port
621 - export protected_net_gw=$protected_net_gw
622 - export protected_private_net_cidr=$protected_private_net_cidr
624 if [[ -n "${http_proxy+x}" ]]; then
626 http_proxy: $http_proxy"
628 - export http_proxy=$http_proxy"
630 if [[ -n "${https_proxy+x}" ]]; then
632 https_proxy: $https_proxy"
634 - export https_proxy=$https_proxy"
636 if [[ -n "${no_proxy+x}" ]]; then
638 - export no_proxy=$no_proxy"
641 cat << DEPLOYMENT > $packetgen_deployment_name.yaml
645 name: $packetgen_deployment_name
658 VirtletLibvirtCPUSetting: |
660 VirtletCloudInitUserData: |
667 sudo: ALL=(ALL) NOPASSWD:ALL
669 # the password is "admin"
670 passwd: "\$6\$rounds=4096\$QA5OCKHTE41\$jRACivoPMJcOjLRgxl3t.AMfU7LhCFwOWv2z66CQX.TSxBy50JoYtycJXSPr2JceG.8Tq/82QN9QYt3euYEZW/"
676 - wget -O - https://git.onap.org/multicloud/k8s/plain/kud/tests/vFW/$packetgen_deployment_name | sudo -E bash
679 VirtletRootVolumeSize: 5Gi
680 k8s.v1.cni.cncf.io/networks: '[
681 { "name": "$unprotected_private_net", "interfaceRequest": "eth1" },
682 { "name": "$onap_private_net", "interfaceRequest": "eth2" }
684 kubernetes.io/target-runtime: virtlet.cloud
688 requiredDuringSchedulingIgnoredDuringExecution:
696 - name: $packetgen_deployment_name
698 imagePullPolicy: IfNotPresent
702 - containerPort: 8183
708 cat << DEPLOYMENT > $firewall_deployment_name.yaml
712 name: $firewall_deployment_name
725 VirtletLibvirtCPUSetting: |
727 VirtletCloudInitUserData: |
734 sudo: ALL=(ALL) NOPASSWD:ALL
736 # the password is "admin"
737 passwd: "\$6\$rounds=4096\$QA5OCKHTE41\$jRACivoPMJcOjLRgxl3t.AMfU7LhCFwOWv2z66CQX.TSxBy50JoYtycJXSPr2JceG.8Tq/82QN9QYt3euYEZW/"
743 - wget -O - https://git.onap.org/multicloud/k8s/plain/kud/tests/vFW/$firewall_deployment_name | sudo -E bash
746 VirtletRootVolumeSize: 5Gi
747 k8s.v1.cni.cncf.io/networks: '[
748 { "name": "$unprotected_private_net", "interfaceRequest": "eth1" },
749 { "name": "$protected_private_net", "interfaceRequest": "eth2" },
750 { "name": "$onap_private_net", "interfaceRequest": "eth3" }
752 kubernetes.io/target-runtime: virtlet.cloud
756 requiredDuringSchedulingIgnoredDuringExecution:
764 - name: $firewall_deployment_name
766 imagePullPolicy: IfNotPresent
774 cat << DEPLOYMENT > $sink_deployment_name.yaml
778 name: $sink_deployment_name
791 VirtletLibvirtCPUSetting: |
793 VirtletCloudInitUserData: |
800 sudo: ALL=(ALL) NOPASSWD:ALL
802 # the password is "admin"
803 passwd: "\$6\$rounds=4096\$QA5OCKHTE41\$jRACivoPMJcOjLRgxl3t.AMfU7LhCFwOWv2z66CQX.TSxBy50JoYtycJXSPr2JceG.8Tq/82QN9QYt3euYEZW/"
809 - wget -O - https://git.onap.org/multicloud/k8s/plain/kud/tests/vFW/$sink_deployment_name | sudo -E bash
812 VirtletRootVolumeSize: 5Gi
813 k8s.v1.cni.cncf.io/networks: '[
814 { "name": "$protected_private_net", "interfaceRequest": "eth1" },
815 { "name": "$onap_private_net", "interfaceRequest": "eth2" }
817 kubernetes.io/target-runtime: virtlet.cloud
821 requiredDuringSchedulingIgnoredDuringExecution:
829 - name: $sink_deployment_name
831 imagePullPolicy: IfNotPresent
843 # populate_CSAR_multus() - This function creates the content of CSAR file
844 # required for testing Multus feature
845 function populate_CSAR_multus {
848 _checks_args $csar_id
849 pushd ${CSAR_DIR}/${csar_id}
851 cat << META > metadata.yaml
854 - bridge-network.yaml
856 - $multus_deployment_name.yaml
859 cat << NET > bridge-network.yaml
860 apiVersion: "k8s.cni.cncf.io/v1"
861 kind: NetworkAttachmentDefinition
866 "cniVersion": "0.3.0",
870 "type": "host-local",
871 "subnet": "$onap_private_net_cidr"
876 cat << DEPLOYMENT > $multus_deployment_name.yaml
880 name: $multus_deployment_name
893 k8s.v1.cni.cncf.io/networks: '[
894 { "name": "bridge-conf", "interfaceRequest": "eth1" },
895 { "name": "bridge-conf", "interfaceRequest": "eth2" }
899 - name: $multus_deployment_name
908 # populate_CSAR_virtlet() - This function creates the content of CSAR file
909 # required for testing Virtlet feature
910 function populate_CSAR_virtlet {
913 _checks_args $csar_id
914 pushd ${CSAR_DIR}/${csar_id}
916 cat << META > metadata.yaml
919 - $virtlet_deployment_name.yaml
922 cat << DEPLOYMENT > $virtlet_deployment_name.yaml
926 name: $virtlet_deployment_name
939 VirtletLibvirtCPUSetting: |
940 mode: host-passthrough
941 # This tells CRI Proxy that this pod belongs to Virtlet runtime
942 kubernetes.io/target-runtime: virtlet.cloud
943 VirtletCloudInitUserData: |
948 primary-group: testuser
952 # the password is "testuser"
953 passwd: "\$6\$rounds=4096\$wPs4Hz4tfs\$a8ssMnlvH.3GX88yxXKF2cKMlVULsnydoOKgkuStTErTq2dzKZiIx9R/pPWWh5JLxzoZEx7lsSX5T2jW5WISi1"
954 sudo: ALL=(ALL) NOPASSWD:ALL
960 requiredDuringSchedulingIgnoredDuringExecution:
968 - name: $virtlet_deployment_name
969 # This specifies the image to use.
970 # virtlet.cloud/ prefix is used by CRI proxy, the remaining part
971 # of the image name is prepended with https:// and used to download the image
972 image: $virtlet_image
973 imagePullPolicy: IfNotPresent
974 # tty and stdin required for "kubectl attach -t" to work
979 # This memory limit is applied to the libvirt domain definition
985 # populate_CSAR_kubevirt() - This function creates the content of CSAR file
986 # required for testing Kubevirt feature
987 function populate_CSAR_kubevirt {
990 _checks_args $csar_id
991 pushd ${CSAR_DIR}/${csar_id}
993 cat << META > metadata.yaml
995 virtualmachineinstance:
996 - $kubevirt_vmi_name.yaml
999 cat << DEPLOYMENT > $kubevirt_vmi_name.yaml
1000 apiVersion: kubevirt.io/v1
1001 kind: VirtualMachineInstance
1003 name: $kubevirt_vmi_name
1007 model: host-passthrough
1028 image: $kubevirt_image
1029 imagePullPolicy: IfNotPresent
1038 primary-group: testuser
1042 # the password is "testuser"
1043 passwd: "\$6\$rounds=4096\$wPs4Hz4tfs\$a8ssMnlvH.3GX88yxXKF2cKMlVULsnydoOKgkuStTErTq2dzKZiIx9R/pPWWh5JLxzoZEx7lsSX5T2jW5WISi1"
1044 sudo: ALL=(ALL) NOPASSWD:ALL
1051 # populate_CSAR_plugin()- Creates content used for Plugin functional tests
1052 function populate_CSAR_plugin {
1055 _checks_args $csar_id
1056 pushd ${CSAR_DIR}/${csar_id}
1058 cat << META > metadata.yaml
1061 - $plugin_deployment_name.yaml
1066 cat << DEPLOYMENT > $plugin_deployment_name.yaml
1070 name: $plugin_deployment_name
1082 - name: $plugin_deployment_name
1089 cat << SERVICE > service.yaml
1093 name: $plugin_service_name
1104 # populate_CSAR_ovn4nfv() - Create content used for OVN4NFV functional test
1105 function populate_CSAR_ovn4nfv {
1108 _checks_args $csar_id
1109 pushd ${CSAR_DIR}/${csar_id}
1111 cat << META > metadata.yaml
1117 - onap-ovn4nfvk8s-network.yaml
1119 - $ovn4nfv_deployment_name.yaml
1122 cat << MULTUS_NET > onap-ovn4nfvk8s-network.yaml
1123 apiVersion: "k8s.cni.cncf.io/v1"
1124 kind: NetworkAttachmentDefinition
1126 name: $ovn_multus_network_name
1129 "cniVersion": "0.3.1",
1130 "name": "ovn4nfv-k8s-plugin",
1131 "type": "ovn4nfvk8s-cni"
1135 cat << NETWORK > ovn-port-net.yaml
1136 apiVersion: k8s.plugin.opnfv.org/v1alpha1
1143 - subnet: 172.16.33.0/24
1145 gateway: 172.16.33.1/24
1148 cat << NETWORK > ovn-priv-net.yaml
1149 apiVersion: k8s.plugin.opnfv.org/v1alpha1
1156 - subnet: 172.16.44.0/24
1158 gateway: 172.16.44.1/24
1161 cat << DEPLOYMENT > $ovn4nfv_deployment_name.yaml
1165 name: $ovn4nfv_deployment_name
1178 k8s.v1.cni.cncf.io/networks: '[{ "name": "$ovn_multus_network_name"}]'
1179 k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [{ "name": "ovn-port-net", "interface": "net2" , "defaultGateway": "false"},
1180 { "name": "ovn-priv-net", "interface": "net3" , "defaultGateway": "false"}]}'
1183 - name: $ovn4nfv_deployment_name
1192 # populate_CSAR_rbdefinition() - Function that populates CSAR folder
1193 # for testing resource bundle definition
1194 function populate_CSAR_rbdefinition {
1196 pushd "${CSAR_DIR}/$1"
1197 print_msg "Create Helm Chart Archives"
1199 tar -czf rb_profile.tar.gz -C $test_folder/vnfs/testrb/helm/profile .
1200 #Creates vault-consul-dev-0.0.0.tgz
1201 helm package $test_folder/vnfs/testrb/helm/vault-consul-dev --version 0.0.0
1205 # populate_CSAR_edgex_rbdefinition() - Function that populates CSAR folder
1206 # for testing resource bundle definition of edgex scenario
1207 function populate_CSAR_edgex_rbdefinition {
1209 pushd "${CSAR_DIR}/$1"
1210 print_msg "Create Helm Chart Archives"
1212 tar -czf rb_profile.tar.gz -C $test_folder/vnfs/edgex/profile .
1213 tar -czf rb_definition.tar.gz -C $test_folder/vnfs/edgex/helm edgex
1217 # populate_CSAR_fw_rbdefinition() - Function that populates CSAR folder
1218 # for testing resource bundle definition of firewall scenario
1219 function populate_CSAR_fw_rbdefinition {
1221 pushd "${CSAR_DIR}/$1"
1222 print_msg "Create Helm Chart Archives for vFirewall"
1224 # Reuse profile from the edgeX case as it is an empty profile
1225 tar -czf rb_profile.tar.gz -C $test_folder/vnfs/edgex/profile .
1226 tar -czf rb_definition.tar.gz -C $test_folder/../demo firewall
1230 # populate_CSAR_eaa_rbdefinition() - Function that populates CSAR folder
1231 # for testing resource bundle definition of openness eaa scenario
1232 function populate_CSAR_eaa_rbdefinition {
1234 pushd "${CSAR_DIR}/$1"
1235 print_msg "Create Helm Chart Archives for Openness EAA"
1237 tar -czf rb_profile.tar.gz -C $test_folder/openness/eaa/profile .
1238 tar -czf rb_definition.tar.gz -C $test_folder/openness/eaa/helm eaa
1242 # populate_CSAR_eaa_sample_app_rbdefinition() - Function that populates CSAR folder
1243 # for testing resource bundle definition of openness sample-app scenario
1244 function populate_CSAR_eaa_sample_app_rbdefinition {
1246 pushd "${CSAR_DIR}/$1"
1247 print_msg "Create Helm Chart Archives for Openness EAA Sample Apps: producer and consumer"
1249 tar -czf rb_profile.tar.gz -C $test_folder/openness/sample-app/profile .
1250 tar -czf rb_definition.tar.gz -C $test_folder/openness/sample-app/helm sample-app
1254 function populate_CSAR_composite_app_helm {
1256 pushd "${CSAR_DIR}/$1"
1257 print_msg "Create Helm Chart Archives for compositeAppi with collectd and prometheus-grafana helm charts"
1259 tar -czf collectd.tar.gz -C $test_folder/vnfs/comp-app/collection/app1/helm .
1260 tar -czf prometheus-operator.tar.gz -C $test_folder/vnfs/comp-app/collection/app2/helm .
1261 tar -czf collectd_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/app1/profile .
1262 tar -czf prometheus-operator_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/app2/profile .
1263 export prometheus_helm_path="${CSAR_DIR}/$1/prometheus-operator.tar.gz"
1264 export collectd_helm_path="${CSAR_DIR}/$1/collectd.tar.gz"
1269 function populate_CSAR_operator_helm {
1271 pushd "${CSAR_DIR}/$1"
1272 print_msg "Create Helm Chart Archives for operators"
1274 #tar -czf operator.tar.gz -C $test_folder/vnfs/comp-app/collection/operators-latest/helm .
1275 #tar -czf operator_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/operators-latest/profile .
1276 tar -czf operator.tar.gz -C $test_folder/vnfs/comp-app/collection/operators/helm .
1277 tar -czf operator_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/operators/profile .
1278 export operator_helm_path="${CSAR_DIR}/$1/operator.tar.gz"
1283 function populate_CSAR_m3db_helm {
1285 pushd "${CSAR_DIR}/$1"
1286 print_msg "Create Helm Chart Archives for m3db"
1288 #tar -czf m3db.tar.gz -C $test_folder/vnfs/comp-app/collection/app3-latest/helm .
1289 #tar -czf m3db_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/app3-latest/profile .
1290 tar -czf m3db.tar.gz -C $test_folder/vnfs/comp-app/collection/m3db/helm .
1291 tar -czf m3db_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/m3db/profile .
1292 export m3db_helm_path="${CSAR_DIR}/$1/m3db.tar.gz"