| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 1 | # Copyright 2020 Whitestack LLC |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 12 | # implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | vnfd: |
| 17 | id: hackfest3charmed-vnf |
| 18 | description: >- |
| 19 | A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with |
| 20 | cloud-init |
| 21 | product-name: hackfest3charmed-vnf |
| 22 | version: '1.0' |
| 23 | mgmt-cp: vnf-mgmt-ext |
| 24 | |
| 25 | virtual-compute-desc: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 26 | - id: mgmtVM-compute |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 27 | virtual-cpu: |
| 28 | num-virtual-cpu: 1 |
| 29 | virtual-memory: |
| 30 | size: 1 |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 31 | - id: dataVM-compute |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 32 | virtual-cpu: |
| 33 | num-virtual-cpu: 1 |
| 34 | virtual-memory: |
| 35 | size: 1 |
| 36 | |
| 37 | virtual-storage-desc: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 38 | - id: mgmtVM-storage |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 39 | size-of-storage: 10 |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 40 | - id: dataVM-storage |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 41 | size-of-storage: 10 |
| 42 | |
| 43 | sw-image-desc: |
| 44 | - id: hackfest3-mgmt |
| 45 | name: hackfest3-mgmt |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 46 | image: hackfest3-mgmt |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 47 | |
| 48 | vdu: |
| 49 | - id: mgmtVM |
| 50 | name: mgmtVM |
| 51 | cloud-init-file: cloud-config.txt |
| 52 | sw-image-desc: hackfest3-mgmt |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 53 | virtual-compute-desc: mgmtVM-compute |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 54 | virtual-storage-desc: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 55 | - mgmtVM-storage |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 56 | int-cpd: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 57 | - id: mgmtVM-eth0-int |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 58 | virtual-network-interface-requirement: |
| 59 | - name: mgmtVM-eth0 |
| 60 | position: 1 |
| 61 | virtual-interface: |
| 62 | type: VIRTIO |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 63 | - id: mgmtVM-eth1-int |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 64 | int-virtual-link-desc: internal |
| 65 | virtual-network-interface-requirement: |
| 66 | - name: mgmtVM-eth1 |
| 67 | position: 2 |
| 68 | virtual-interface: |
| 69 | type: VIRTIO |
| 70 | - id: dataVM |
| 71 | name: dataVM |
| 72 | sw-image-desc: hackfest3-mgmt |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 73 | virtual-compute-desc: dataVM-compute |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 74 | virtual-storage-desc: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 75 | - dataVM-storage |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 76 | int-cpd: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 77 | - id: dataVM-eth0-int |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 78 | int-virtual-link-desc: internal |
| 79 | virtual-network-interface-requirement: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 80 | - name: dataVM-eth0 |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 81 | position: 1 |
| 82 | virtual-interface: |
| 83 | type: VIRTIO |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 84 | - id: dataVM-xe0-int |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 85 | virtual-network-interface-requirement: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 86 | - name: dataVM-xe0 |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 87 | position: 2 |
| 88 | virtual-interface: |
| 89 | type: VIRTIO |
| 90 | monitoring-parameter: |
| 91 | - id: dataVM_cpu_util |
| 92 | name: dataVM_cpu_util |
| 93 | performance-metric: cpu_utilization |
| 94 | |
| 95 | int-virtual-link-desc: |
| 96 | - id: internal |
| 97 | |
| 98 | ext-cpd: |
| 99 | - id: vnf-mgmt-ext |
| 100 | int-cpd: # Connection to int-cpd |
| 101 | vdu-id: mgmtVM |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 102 | cpd: mgmtVM-eth0-int |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 103 | - id: vnf-data-ext |
| 104 | int-cpd: # Connection to int-cpd |
| 105 | vdu-id: dataVM |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 106 | cpd: dataVM-xe0-int |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 107 | |
| 108 | df: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 109 | - id: default-df |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 110 | vdu-profile: |
| 111 | - id: mgmtVM |
| 112 | min-number-of-instances: 1 |
| 113 | - id: dataVM |
| 114 | min-number-of-instances: 1 |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 115 | max-number-of-instances: 11 |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 116 | instantiation-level: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 117 | - id: default-instantiation-level |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 118 | vdu-level: |
| 119 | - vdu-id: mgmtVM |
| 120 | number-of-instances: 1 |
| 121 | - vdu-id: dataVM |
| 122 | number-of-instances: 1 |
| 123 | scaling-aspect: |
| 124 | - id: scale_dataVM |
| 125 | name: scale_dataVM |
| 126 | max-scale-level: 10 |
| 127 | aspect-delta-details: |
| 128 | deltas: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 129 | - id: scale_dataVM-delta |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 130 | vdu-delta: |
| garciaale | 0a517b9 | 2021-01-12 15:44:44 -0300 | [diff] [blame] | 131 | - id: dataVM |
| garciaale | 76f6a62 | 2020-11-19 17:57:42 -0300 | [diff] [blame] | 132 | number-of-instances: 1 |
| 133 | scaling-policy: |
| 134 | - name: auto_cpu_util_above_threshold |
| 135 | scaling-type: automatic |
| 136 | enabled: true |
| 137 | threshold-time: 0 |
| 138 | cooldown-time: 60 |
| 139 | scaling-criteria: |
| 140 | - name: cpu_util_above_threshold |
| 141 | scale-in-relational-operation: LE |
| 142 | scale-in-threshold: '15.0000000000' |
| 143 | scale-out-relational-operation: GE |
| 144 | scale-out-threshold: '60.0000000000' |
| 145 | vnf-monitoring-param-ref: dataVM_cpu_util |
| 146 | scaling-config-action: |
| 147 | - trigger: post-scale-out |
| 148 | vnf-config-primitive-name-ref: touch |
| 149 | - trigger: pre-scale-in |
| 150 | vnf-config-primitive-name-ref: touch |
| bravof | 2eccea2 | 2021-02-12 16:17:54 -0300 | [diff] [blame] | 151 | lcm-operations-configuration: |
| 152 | operate-vnf-op-config: |
| 153 | day1-2: |
| 154 | - id: hackfest3charmed-vnf |
| bravof | 850d961 | 2021-05-05 20:37:03 -0400 | [diff] [blame] | 155 | execution-environment-list: |
| 156 | - id: simple-ee |
| 157 | juju: |
| 158 | charm: simple |
| bravof | 2eccea2 | 2021-02-12 16:17:54 -0300 | [diff] [blame] | 159 | initial-config-primitive: |
| 160 | - seq: "1" |
| bravof | 850d961 | 2021-05-05 20:37:03 -0400 | [diff] [blame] | 161 | execution-environment-ref: simple-ee |
| bravof | 2eccea2 | 2021-02-12 16:17:54 -0300 | [diff] [blame] | 162 | name: config |
| 163 | parameter: |
| 164 | - name: ssh-hostname |
| 165 | value: <rw_mgmt_ip> |
| 166 | - name: ssh-username |
| 167 | value: ubuntu |
| 168 | - name: ssh-password |
| 169 | value: osm4u |
| 170 | - seq: "2" |
| bravof | 850d961 | 2021-05-05 20:37:03 -0400 | [diff] [blame] | 171 | execution-environment-ref: simple-ee |
| bravof | 2eccea2 | 2021-02-12 16:17:54 -0300 | [diff] [blame] | 172 | name: touch |
| 173 | parameter: |
| 174 | - name: filename |
| 175 | value: <touch_filename> |
| 176 | config-primitive: |
| 177 | - name: touch |
| bravof | 850d961 | 2021-05-05 20:37:03 -0400 | [diff] [blame] | 178 | execution-environment-ref: simple-ee |
| bravof | 2eccea2 | 2021-02-12 16:17:54 -0300 | [diff] [blame] | 179 | parameter: |
| 180 | - data-type: STRING |
| 181 | default-value: <touch_filename2> |
| bravof | 850d961 | 2021-05-05 20:37:03 -0400 | [diff] [blame] | 182 | name: filename |