diff options
author | Konrad Bańka <k.banka@samsung.com> | 2019-10-21 11:04:31 +0200 |
---|---|---|
committer | Marco Platania <platania@research.att.com> | 2019-11-04 14:01:54 +0000 |
commit | 68042495ef1e1e6dff7fed7fc2691b01cf672fe1 (patch) | |
tree | 7c84d170b19f3674586d268dda3671378471ec00 /heat/vFW_CNF_CDS/templates/helm/packetgen | |
parent | 5e1fea9785cad165c17e1b4bc2b79c671e8cd951 (diff) |
Provide vFW CNF use case csar content
Issue-ID: INT-1259
Change-Id: I0bcd85725e7f102bdcdf813db0c0260526b5807d
Signed-off-by: Konrad Bańka <k.banka@samsung.com>
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/helm/packetgen')
6 files changed, 168 insertions, 0 deletions
diff --git a/heat/vFW_CNF_CDS/templates/helm/packetgen/.helmignore b/heat/vFW_CNF_CDS/templates/helm/packetgen/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/packetgen/.helmignore @@ -0,0 +1,22 @@ +# 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 +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/heat/vFW_CNF_CDS/templates/helm/packetgen/Chart.yaml b/heat/vFW_CNF_CDS/templates/helm/packetgen/Chart.yaml new file mode 100644 index 00000000..a9cdca1f --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/packetgen/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart to deploy packet generator for vFirewall +name: packetgen +version: 0.2.0 diff --git a/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/configmap.yaml b/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/configmap.yaml new file mode 100644 index 00000000..5dd1a2df --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/configmap.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.vpg_name_0 }}-configmap + labels: + release: {{ .Release.Name }} + app: {{ .Values.vnf_name }} + chart: {{ .Chart.Name }} +data: + vfw_private_ip_0: {{ .Values.vfw_int_private1_ip_0 | quote }} + vsn_private_ip_0: {{ .Values.vsn_int_private2_ip_0 | quote }} + protected_net_cidr: {{ .Values.int_private2_net_cidr | quote }} + demo_artifacts_version: {{ .Values.demo_artifacts_version | quote }} + dcae_collector_ip: {{ .Values.dcae_collector_ip | quote }} + dcae_collector_port: {{ .Values.dcae_collector_port | quote }} diff --git a/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/deployment.yaml b/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/deployment.yaml new file mode 100644 index 00000000..0f1ced50 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/deployment.yaml @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.vpg_name_0 }} + labels: + release: {{ .Release.Name }} + app: {{ .Values.vnf_name }} + chart: {{ .Chart.Name }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + annotations: + VirtletLibvirtCPUSetting: | + mode: host-model + VirtletSSHKeySource: "secret/{{ .Values.key_name }}" + VirtletCloudInitUserData: | + ssh_pwauth: True #FIXME Remove after troubleshooting + users: + #- default #FIXME Check working key auth or remove + - name: admin + gecos: User + primary-group: admin + groups: users + sudo: ALL=(ALL) NOPASSWD:ALL + # FIXME Remove after troubleshooting + # Password is "testuser" + passwd: "$6$rounds=4096$D6cf92nq$cgBveQHTP7IK3CIYTNkVJyzd0Vze6l1QlV9sWSXiTma2hOCTl7bFSh4nvK5qPMvNlnDtlIm03arG5Uh866E9w." + lock_passwd: False + runcmd: + - wget -O packetgen.sh https://git.onap.org/multicloud/k8s/plain/kud/tests/vFW/packetgen + - bash -c 'set -a; . /etc/cloud/environment; bash packetgen.sh' + VirtletRootVolumeSize: 5Gi + k8s.v1.cni.cncf.io/networks: "{{ .Values.vnf_name }}-ovn-attachment" + k8s.plugin.opnfv.org/nfn-network: | + { "type": "ovn4nfv", + "interface": [ + { "name": {{ .Values.int_private1_net_id | quote }}, + "ipAddress": {{ .Values.vpg_int_private1_ip_0 | quote }}, + "interface": "eth1" , + "defaultGateway": "false"}, + { "name": {{ .Values.onap_private_net_id | quote }}, + "ipAddress": {{ .Values.vpg_onap_private_ip_0 | quote }}, + "interface": "eth2", + "defaultGateway": "false" } + ] + } + kubernetes.io/target-runtime: virtlet.cloud + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: extraRuntime + operator: In + values: + - virtlet + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + tty: true + stdin: true + envFrom: + - configMapRef: + name: {{ .Values.vpg_name_0 }}-configmap + resources: + limits: + memory: {{ .Values.resources.limits.memory }} diff --git a/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/service.yaml b/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/service.yaml new file mode 100644 index 00000000..51237692 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/packetgen/templates/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Values.vpg_name_0 }}-service" + labels: + app: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.ports.port }} + nodePort: {{ .Values.service.ports.nodePort }} + selector: + app: {{ .Values.vnf_name }} + release: {{ .Release.Name }} diff --git a/heat/vFW_CNF_CDS/templates/helm/packetgen/values.yaml b/heat/vFW_CNF_CDS/templates/helm/packetgen/values.yaml new file mode 100644 index 00000000..de106fab --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/packetgen/values.yaml @@ -0,0 +1,33 @@ +# Static Defaults +replicaCount: 1 +image: + repository: virtlet.cloud/ubuntu/16.04 + tag: latest + pullPolicy: IfNotPresent +resources: + limits: + memory: 4Gi +service: +#service port value for packetgen service + type: NodePort + ports: + port: 2831 + nodePort: 30831 + +# OPENSTACK PARAMETERS +# Names +vpg_name_0: test-vnf-vpg +vnf_name: test-vnf +key_name: ssh-pub-key +int_private1_net_id: unprotected-net +onap_private_net_id: onap-private-net +# Own Addresses +vpg_int_private1_ip_0: 192.168.10.2 +vpg_onap_private_ip_0: 10.10.100.2 +# Env variables +dcae_collector_ip: 10.0.4.1 #Placeholder +dcae_collector_port: 8081 #FIXME set to 30235? +demo_artifacts_version: 1.5.0 +vfw_int_private1_ip_0: 192.168.10.3 +vsn_int_private2_ip_0: 192.168.20.3 +int_private2_net_cidr: 192.168.20.0/24 |