blob: 069198b50e5d749c51fb2244a79428839a9cdb38 [file] [log] [blame]
garciaale76f6a622020-11-19 17:57:42 -03001# 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
16vnfd:
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:
garciaale0a517b92021-01-12 15:44:44 -030026 - id: mgmtVM-compute
garciaale76f6a622020-11-19 17:57:42 -030027 virtual-cpu:
28 num-virtual-cpu: 1
29 virtual-memory:
30 size: 1
garciaale0a517b92021-01-12 15:44:44 -030031 - id: dataVM-compute
garciaale76f6a622020-11-19 17:57:42 -030032 virtual-cpu:
33 num-virtual-cpu: 1
34 virtual-memory:
35 size: 1
36
37 virtual-storage-desc:
garciaale0a517b92021-01-12 15:44:44 -030038 - id: mgmtVM-storage
garciaale76f6a622020-11-19 17:57:42 -030039 size-of-storage: 10
garciaale0a517b92021-01-12 15:44:44 -030040 - id: dataVM-storage
garciaale76f6a622020-11-19 17:57:42 -030041 size-of-storage: 10
42
43 sw-image-desc:
44 - id: hackfest3-mgmt
45 name: hackfest3-mgmt
garciaale0a517b92021-01-12 15:44:44 -030046 image: hackfest3-mgmt
garciaale76f6a622020-11-19 17:57:42 -030047
48 vdu:
49 - id: mgmtVM
50 name: mgmtVM
51 cloud-init-file: cloud-config.txt
52 sw-image-desc: hackfest3-mgmt
garciaale0a517b92021-01-12 15:44:44 -030053 virtual-compute-desc: mgmtVM-compute
garciaale76f6a622020-11-19 17:57:42 -030054 virtual-storage-desc:
garciaale0a517b92021-01-12 15:44:44 -030055 - mgmtVM-storage
garciaale76f6a622020-11-19 17:57:42 -030056 int-cpd:
garciaale0a517b92021-01-12 15:44:44 -030057 - id: mgmtVM-eth0-int
garciaale76f6a622020-11-19 17:57:42 -030058 virtual-network-interface-requirement:
59 - name: mgmtVM-eth0
60 position: 1
61 virtual-interface:
62 type: VIRTIO
garciaale0a517b92021-01-12 15:44:44 -030063 - id: mgmtVM-eth1-int
garciaale76f6a622020-11-19 17:57:42 -030064 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
garciaale0a517b92021-01-12 15:44:44 -030073 virtual-compute-desc: dataVM-compute
garciaale76f6a622020-11-19 17:57:42 -030074 virtual-storage-desc:
garciaale0a517b92021-01-12 15:44:44 -030075 - dataVM-storage
garciaale76f6a622020-11-19 17:57:42 -030076 int-cpd:
garciaale0a517b92021-01-12 15:44:44 -030077 - id: dataVM-eth0-int
garciaale76f6a622020-11-19 17:57:42 -030078 int-virtual-link-desc: internal
79 virtual-network-interface-requirement:
garciaale0a517b92021-01-12 15:44:44 -030080 - name: dataVM-eth0
garciaale76f6a622020-11-19 17:57:42 -030081 position: 1
82 virtual-interface:
83 type: VIRTIO
garciaale0a517b92021-01-12 15:44:44 -030084 - id: dataVM-xe0-int
garciaale76f6a622020-11-19 17:57:42 -030085 virtual-network-interface-requirement:
garciaale0a517b92021-01-12 15:44:44 -030086 - name: dataVM-xe0
garciaale76f6a622020-11-19 17:57:42 -030087 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
garciaale0a517b92021-01-12 15:44:44 -0300102 cpd: mgmtVM-eth0-int
garciaale76f6a622020-11-19 17:57:42 -0300103 - id: vnf-data-ext
104 int-cpd: # Connection to int-cpd
105 vdu-id: dataVM
garciaale0a517b92021-01-12 15:44:44 -0300106 cpd: dataVM-xe0-int
garciaale76f6a622020-11-19 17:57:42 -0300107
108 df:
garciaale0a517b92021-01-12 15:44:44 -0300109 - id: default-df
110 vnf-configuration-id: default-vnf-configuration
garciaale76f6a622020-11-19 17:57:42 -0300111 vdu-profile:
112 - id: mgmtVM
113 min-number-of-instances: 1
114 - id: dataVM
115 min-number-of-instances: 1
garciaale0a517b92021-01-12 15:44:44 -0300116 max-number-of-instances: 11
garciaale76f6a622020-11-19 17:57:42 -0300117 instantiation-level:
garciaale0a517b92021-01-12 15:44:44 -0300118 - id: default-instantiation-level
garciaale76f6a622020-11-19 17:57:42 -0300119 vdu-level:
120 - vdu-id: mgmtVM
121 number-of-instances: 1
122 - vdu-id: dataVM
123 number-of-instances: 1
124 scaling-aspect:
125 - id: scale_dataVM
126 name: scale_dataVM
127 max-scale-level: 10
128 aspect-delta-details:
129 deltas:
garciaale0a517b92021-01-12 15:44:44 -0300130 - id: scale_dataVM-delta
garciaale76f6a622020-11-19 17:57:42 -0300131 vdu-delta:
garciaale0a517b92021-01-12 15:44:44 -0300132 - id: dataVM
garciaale76f6a622020-11-19 17:57:42 -0300133 number-of-instances: 1
134 scaling-policy:
135 - name: auto_cpu_util_above_threshold
136 scaling-type: automatic
137 enabled: true
138 threshold-time: 0
139 cooldown-time: 60
140 scaling-criteria:
141 - name: cpu_util_above_threshold
142 scale-in-relational-operation: LE
143 scale-in-threshold: '15.0000000000'
144 scale-out-relational-operation: GE
145 scale-out-threshold: '60.0000000000'
146 vnf-monitoring-param-ref: dataVM_cpu_util
147 scaling-config-action:
148 - trigger: post-scale-out
149 vnf-config-primitive-name-ref: touch
150 - trigger: pre-scale-in
151 vnf-config-primitive-name-ref: touch
152
153 vnf-configuration:
garciaale0a517b92021-01-12 15:44:44 -0300154 - id: default-vnf-configuration
garciaale76f6a622020-11-19 17:57:42 -0300155 initial-config-primitive:
156 - seq: "1"
157 name: config
158 parameter:
159 - name: ssh-hostname
160 value: <rw_mgmt_ip>
161 - name: ssh-username
162 value: ubuntu
163 - name: ssh-password
164 value: osm4u
165 - seq: "2"
166 name: touch
167 parameter:
168 - name: filename
169 value: <touch_filename>
170 config-primitive:
171 - name: touch
172 parameter:
173 - data-type: STRING
174 default-value: <touch_filename2>
175 name: filename
176 juju:
177 charm: simple