diff --git a/wiki_webserver_autoscale_nsd/wiki_webserver_autoscale_nsd.yaml b/wiki_webserver_autoscale_nsd/wiki_webserver_autoscale_nsd.yaml new file mode 100644 index 0000000000000000000000000000000000000000..995235ddd54c9f8c7c63a2fc4e14415738e55b07 --- /dev/null +++ b/wiki_webserver_autoscale_nsd/wiki_webserver_autoscale_nsd.yaml @@ -0,0 +1,33 @@ +nsd: + nsd: + - description: Scaling wiki web server with load balancer NS + designer: Altran + df: + - id: default-df + vnf-profile: + - id: '1' + virtual-link-connectivity: + - constituent-cpd-id: + - constituent-base-element-id: '1' + constituent-cpd-id: haproxy_mgmt-ext + - constituent-base-element-id: '1' + constituent-cpd-id: apache_mgmt-ext + virtual-link-profile-id: mgmt_vld + - constituent-cpd-id: + - constituent-base-element-id: '1' + constituent-cpd-id: haproxy_public-ext + virtual-link-profile-id: public_vld + vnfd-id: wiki_webserver_autoscale_vnf + id: wiki_webserver_autoscale_ns + name: wiki_webserver_autoscale_ns + version: '1.0' + virtual-link-desc: + - id: mgmt_vld + mgmt-network: 'true' + vim-network-name: mgntnet + - id: public_vld + mgmt-network: 'true' + vim-network-name: osm-ext + vnfd-id: + - wiki_webserver_autoscale_vnf + diff --git a/wiki_webserver_autoscale_vnfd/cloud_init/.DS_Store b/wiki_webserver_autoscale_vnfd/cloud_init/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 Binary files /dev/null and b/wiki_webserver_autoscale_vnfd/cloud_init/.DS_Store differ diff --git a/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_apache b/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_apache new file mode 100644 index 0000000000000000000000000000000000000000..92dcba0c8d0cf8b602a523616c962641d103547f --- /dev/null +++ b/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_apache @@ -0,0 +1,5 @@ +#cloud-config +hostname: apachevdu +password: osm2021 +chpasswd: { expire: False } +ssh_pwauth: True diff --git a/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_haproxy b/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_haproxy new file mode 100644 index 0000000000000000000000000000000000000000..8995804f53e6e074d66a83e6994411977fa8fd5a --- /dev/null +++ b/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_haproxy @@ -0,0 +1,5 @@ +#cloud-config +hostname: haproxyvdu +password: osm2021 +chpasswd: { expire: False } +ssh_pwauth: True diff --git a/wiki_webserver_autoscale_vnfd/wiki_webserver_autoscale_vnfd.yaml b/wiki_webserver_autoscale_vnfd/wiki_webserver_autoscale_vnfd.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7f10921e99ed2b712e84016539bfbd25fccb8278 --- /dev/null +++ b/wiki_webserver_autoscale_vnfd/wiki_webserver_autoscale_vnfd.yaml @@ -0,0 +1,158 @@ +vnfd: + description: Scaling wiki web server with load balancer and metrics + df: + - id: default-df + instantiation-level: + - id: default-instantiation-level + vdu-level: + - number-of-instances: 1 + vdu-id: haproxy_vdu + - number-of-instances: 1 + vdu-id: apache_vdu + scaling-aspect: + - aspect-delta-details: + deltas: + - id: apache_vdu_autoscale-delta + vdu-delta: + - id: apache_vdu + number-of-instances: 1 + id: apache_vdu_autoscale + max-scale-level: 10 + name: apache_vdu_autoscale + scaling-policy: + - cooldown-time: 180 + name: apache_cpu_util_above_threshold + scaling-criteria: + - name: apache_cpu_util_above_threshold + scale-in-relational-operation: LT + scale-in-threshold: 20 + scale-out-relational-operation: GT + scale-out-threshold: 80 + vnf-monitoring-param-ref: apache_vnf_cpu_util + scaling-type: automatic + threshold-time: 10 + vdu-profile: + - id: haproxy_vdu + min-number-of-instances: 1 + - id: apache_vdu + max-number-of-instances: 11 + min-number-of-instances: 1 + virtual-link-profile: + - flavour: '' + id: internal_services + virtual-link-protocol-data: + l3-protocol-data: + cidr: 192.168.30.0/24 + description: Services Subnet + dhcp-enabled: true + gateway-ip: 192.168.30.1 + ip-version: ipv4 + name: internal_services-l3-protocol-data + ext-cpd: + - id: haproxy_public-ext + int-cpd: + cpd: haproxy_vdu_eth1-int + vdu-id: haproxy_vdu + - id: haproxy_mgmt-ext + int-cpd: + cpd: haproxy_vdu_eth0-int + vdu-id: haproxy_vdu + - id: apache_mgmt-ext + int-cpd: + cpd: apache_vdu_eth0-int + vdu-id: apache_vdu + id: wiki_webserver_autoscale_vnf + int-virtual-link-desc: + - id: internal_services + mgmt-cp: haproxy_mgmt-ext + product-name: wiki_webserver_autoscale_vnf + provider: Altran + sw-image-desc: + - id: haproxy_ubuntu + image: haproxy_ubuntu + name: haproxy_ubuntu + - id: apache_ubuntu + image: apache_ubuntu + name: apache_ubuntu + vdu: + - cloud-init-file: cloud_init_haproxy + description: haproxy_vdu + id: haproxy_vdu + int-cpd: + - id: haproxy_vdu_eth1-int + virtual-network-interface-requirement: + - name: haproxy_vdu_eth1 + position: 1 + virtual-interface: + type: VIRTIO + - id: haproxy_vdu_eth0-int + virtual-network-interface-requirement: + - name: haproxy_vdu_eth0 + position: 2 + virtual-interface: + type: VIRTIO + - id: haproxy_vdu_eth2-int + int-virtual-link-desc: internal_services + virtual-network-interface-requirement: + - name: haproxy_vdu_eth2 + position: 3 + virtual-interface: + type: VIRTIO + name: haproxy_vdu + sw-image-desc: haproxy_ubuntu + virtual-compute-desc: haproxy_vdu-compute + virtual-storage-desc: + - haproxy_vdu-storage + - cloud-init-file: cloud_init_apache + description: apache_vdu + id: apache_vdu + int-cpd: + - id: apache_vdu_eth0-int + virtual-network-interface-requirement: + - name: apache_vdu_eth0 + position: 1 + virtual-interface: + type: VIRTIO + - id: apache_vdu_eth1-int + int-virtual-link-desc: internal_services + virtual-network-interface-requirement: + - name: apache_vdu_eth1 + position: 2 + virtual-interface: + type: VIRTIO + monitoring-parameter: + - id: apache_vnf_cpu_util + name: apache_vnf_cpu_util + performance-metric: cpu_utilization + - id: apache_vnf_memory_util + name: apache_vnf_memory_util + performance-metric: average_memory_utilization + - id: apache_vnf_packets_sent + name: apache_vnf_packets_sent + performance-metric: packets_sent + - id: apache_vnf_packets_received + name: apache_vnf_packets_received + performance-metric: packets_received + name: apache_vdu + sw-image-desc: apache_ubuntu + virtual-compute-desc: apache_vdu-compute + virtual-storage-desc: + - apache_vdu-storage + version: '2.1' + virtual-compute-desc: + - id: haproxy_vdu-compute + virtual-cpu: + num-virtual-cpu: 4 + virtual-memory: + size: 4.0 + - id: apache_vdu-compute + virtual-cpu: + num-virtual-cpu: 1 + virtual-memory: + size: 1.0 + virtual-storage-desc: + - id: haproxy_vdu-storage + size-of-storage: 10 + - id: apache_vdu-storage + size-of-storage: 10 +