diff --git a/hackfest_basic_service_kpi_ns/hackfest_basic_service_kpi_nsd.yaml b/hackfest_basic_service_kpi_ns/hackfest_basic_service_kpi_nsd.yaml new file mode 100755 index 0000000000000000000000000000000000000000..896da87d2bf1a0cb77a68439374af68b5a6f6950 --- /dev/null +++ b/hackfest_basic_service_kpi_ns/hackfest_basic_service_kpi_nsd.yaml @@ -0,0 +1,22 @@ +nsd: + nsd: + - description: Simple NS with a single VNF and a single VL + df: + - id: default-df + vnf-profile: + - id: '1' + virtual-link-connectivity: + - constituent-cpd-id: + - constituent-base-element-id: '1' + constituent-cpd-id: vnf-cp0-ext + virtual-link-profile-id: mgmtnet + vnfd-id: hackfest_basic_service_kpi-vnf + id: hackfest_basic_service_kpi-ns + name: hackfest_basic_service_kpi-ns + version: '1.0' + virtual-link-desc: + - id: mgmtnet + mgmt-network: false + vim-network-name: external + vnfd-id: + - hackfest_basic_service_kpi-vnf diff --git a/hackfest_basic_service_kpi_ns/icons/osm.png b/hackfest_basic_service_kpi_ns/icons/osm.png new file mode 100755 index 0000000000000000000000000000000000000000..62012d2a2b491bdcd536d62c3c3c863c0d8c1b33 Binary files /dev/null and b/hackfest_basic_service_kpi_ns/icons/osm.png differ diff --git a/hackfest_basic_service_kpi_vnf/cloud_init/cloud-config.txt b/hackfest_basic_service_kpi_vnf/cloud_init/cloud-config.txt new file mode 100755 index 0000000000000000000000000000000000000000..9e4d8479bd71849888b001480d22989240a43282 --- /dev/null +++ b/hackfest_basic_service_kpi_vnf/cloud_init/cloud-config.txt @@ -0,0 +1,9 @@ +#cloud-config +password: osm2022 +chpasswd: { expire: False } +ssh_pwauth: True + +runcmd: +- wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz +- tar xzvf node_exporter-0.18.1.linux-amd64.tar.gz +- nohup ./node_exporter-0.18.1.linux-amd64/node_exporter & diff --git a/hackfest_basic_service_kpi_vnf/exporter-endpoint/prometheus-job-template.j2 b/hackfest_basic_service_kpi_vnf/exporter-endpoint/prometheus-job-template.j2 new file mode 100755 index 0000000000000000000000000000000000000000..42f75b1b89d0045297195ebddcab9b19a57dc9da --- /dev/null +++ b/hackfest_basic_service_kpi_vnf/exporter-endpoint/prometheus-job-template.j2 @@ -0,0 +1,11 @@ +- job_name: '{{ JOB_NAME }}' + static_configs: + - targets: + - {{ TARGET_IP }}:{{TARGET_PORT}} + metrics_path: {{ METRIC_PATH }} + metric_relabel_configs: + - source_labels: [__name__] + regex: '(.*)' + replacement: 'osm_${1}' + target_label: __name__ + diff --git a/hackfest_basic_service_kpi_vnf/hackfest_basic_service_kpi_vnfd.yaml b/hackfest_basic_service_kpi_vnf/hackfest_basic_service_kpi_vnfd.yaml new file mode 100755 index 0000000000000000000000000000000000000000..6d3f7931ede1072fce3b9b7b45ed805b4c26d2bc --- /dev/null +++ b/hackfest_basic_service_kpi_vnf/hackfest_basic_service_kpi_vnfd.yaml @@ -0,0 +1,98 @@ +vnfd: + description: A basic VNF descriptor w/ one VDU + df: + - id: default-df + instantiation-level: + - id: default-instantiation-level + vdu-level: + - number-of-instances: 1 + vdu-id: hackfest_basic_service_kpi-VM + vdu-profile: + - id: hackfest_basic_service_kpi-VM + min-number-of-instances: 1 + max-number-of-instances: 3 + exporters-endpoints: + metric-path: /metrics + metric-port: 9100 + external-connection-point-ref: vnf-cp0-ext + scaling-aspect: + - aspect-delta-details: + deltas: + - id: vdu_autoscale-delta + vdu-delta: + - id: hackfest_basic_service_kpi-VM + number-of-instances: "1" + id: vdu_autoscale + max-scale-level: 1 + name: vdu_autoscale + scaling-policy: + - cooldown-time: 3 + name: cpu_util_above_threshold + scaling-criteria: + - name: cpu_util_above_threshold + scale-in-relational-operation: LT + scale-in-threshold: 47900000 + scale-out-relational-operation: GT + scale-out-threshold: 48000000 + vnf-monitoring-param-ref: vnf_memory_slab_util + scaling-type: automatic + threshold-time: 3 + + ext-cpd: + - id: vnf-cp0-ext + int-cpd: + cpd: vdu-eth0-int + vdu-id: hackfest_basic_service_kpi-VM + id: hackfest_basic_service_kpi-vnf + mgmt-cp: vnf-cp0-ext + product-name: hackfest_basic_service_kpi-vnf + sw-image-desc: + - id: ubuntu22.04 + name: ubuntu22.04 + image: ubuntu22.04 + - id: ubuntu22.04-aws + name: ubuntu22.04-aws + image: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20231025 + vim-type: aws + - id: ubuntu22.04-azure + name: ubuntu22.04-azure + image: Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest + vim-type: azure + - id: ubuntu22.04-gcp + name: ubuntu22.04-gcp + image: ubuntu-os-cloud:image-family:ubuntu-2004-lts + vim-type: gcp + vdu: + - cloud-init-file: cloud-config.txt + supplemental-boot-data: + boot-data-drive: true + id: hackfest_basic_service_kpi-VM + name: hackfest_basic_service_kpi-VM + sw-image-desc: ubuntu22.04 + alternative-sw-image-desc: + - ubuntu22.04-aws + - ubuntu22.04-azure + - ubuntu22.04-gcp + virtual-compute-desc: hackfest_basic_service_kpi-VM-compute + virtual-storage-desc: + - hackfest_basic_service_kpi-VM-storage + int-cpd: + - id: vdu-eth0-int + virtual-network-interface-requirement: + - name: vdu-eth0 + virtual-interface: + type: PARAVIRT + monitoring-parameter: + - id: vnf_memory_slab_util + name: vnf_memory_slab_util + performance-metric: kpi_node_memory_Slab_bytes + version: 1.0 + virtual-compute-desc: + - id: hackfest_basic_service_kpi-VM-compute + virtual-cpu: + num-virtual-cpu: 1 + virtual-memory: + size: 1.0 + virtual-storage-desc: + - id: hackfest_basic_service_kpi-VM-storage + size-of-storage: 10 \ No newline at end of file diff --git a/hackfest_basic_service_kpi_vnf/icons/osm.png b/hackfest_basic_service_kpi_vnf/icons/osm.png new file mode 100755 index 0000000000000000000000000000000000000000..62012d2a2b491bdcd536d62c3c3c863c0d8c1b33 Binary files /dev/null and b/hackfest_basic_service_kpi_vnf/icons/osm.png differ