VNFRQTS - Changing diagrams to PlantUML
[vnfrqts/usecases.git] / docs / manual_use_case.rst
1 .. Modifications Copyright © 2017-2018 AT&T Intellectual Property.
2
3 .. Licensed under the Creative Commons License, Attribution 4.0 Intl.
4    (the "License"); you may not use this documentation except in compliance
5    with the License. You may obtain a copy of the License at
6
7 .. https://creativecommons.org/licenses/by/4.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 implied.
12    See the License for the specific language governing permissions and
13    limitations under the License.
14
15 Manual Scale Out Use Case
16 =========================
17
18 .. contents:: Table of Contents
19    :depth: 4
20    :backlinks: entry
21
22
23 Overview
24 --------
25
26 In the Casablanca release, ONAP will support the ability to both manually and
27 automatically scale out a VNF component.  Below is the sequence diagram
28 for how scaling will work.
29
30
31 Design Time Diagram
32 ^^^^^^^^^^^^^^^^^^^
33
34 .. uml::
35    :align: center
36    :caption: **Scale Out Sequence Diagram** - Design Time
37
38    @startuml
39
40    title Message Style - Scale Out Sequence Diagram - Design Time
41
42    skinparam sequenceMessageAlign center
43
44    Participant "Service Designer" as SD
45    Participant SDC
46    Participant CLAMP
47    Participant CDT
48    Participant APPC
49    Participant SDNC
50    Participant Policy
51    Participant SO
52    Participant DCAE
53
54    SD -> SDC: <back:white>Onboarding Package</back>
55    SD -> SDC: <back:white>Set Scaling Parameters</back>
56
57    SDC -> SO: <back:white>Send Heat Templates and Image Files</back>
58    SDC -> SDNC: <back:white>Send Heat Templates and Image Files</back>
59    SDC -> SDNC: <back:white>Send Preload files</back>
60    SDC -> DCAE: <back:white>Threshold Scaling Events</back>
61
62    SD -> CLAMP: <back:white>Gaurd Policies</back>
63    SD -> CLAMP: <back:white>Operational Policies</back>
64    SD -> CLAMP: <back:white>Configuration Data</back>
65
66    CLAMP -> Policy: <back:white>Send Policies to Policy Engine Including VNF Configuration Data and VF_Module Name</back>
67
68    SD -> CDT: <back:white>Parameter definition template for each LCM action (ConfigScaleOut, Healthcheck)</back>
69
70    CDT -> APPC: <back:white>Save Parameter Definition Template to APPC</back>
71
72    @enduml
73
74
75
76 Run Time Diagram
77 ^^^^^^^^^^^^^^^^
78
79 .. uml::
80    :align: center
81    :caption: **Scaling Use Case Sequence Diagram** - Run Time
82
83    @startuml
84
85    title Message Style - Scaling Use Case Sequence Diagram - Run Time
86
87    skinparam sequenceMessageAlign center
88
89    Participant DCAE
90    Participant Policy
91    Participant VID
92    Participant SO
93    Participant Controller
94    Participant SDNC
95    Participant AAI
96    Participant VNF
97
98    group Manual Scaling
99        VID -> SO: Manual Scale Out Request\n(Via DMaaP)
100    end
101
102    group Closed Loop Scaling
103        DCAE -> Policy: Trigger Scale Out Event
104        activate Policy
105        |||
106        Policy -> Policy: Sanity Check (Guard Policies)
107        |||
108        Policy -> SO: <back:white>Closed Loop Scale Out Request</back>
109        deactivate Policy
110        activate SO
111    end
112
113    group Healthcheck
114        SO -> AAI: <back:white>Retrieve VNF Level ipv4-oam-address</back>
115        note left
116            Prerequisite: Heatbridge will update
117            AAI with all IP addresses on initial
118            instantiation
119        end note
120        AAI -> SO: <back:white>Return VNF Level ipv4-oam-address</back>
121        |||
122        SO -> SO: Controller Look up
123        activate Controller
124        SO -> Controller: Healthcheck
125        Controller -> VNF: Healthcheck (REST)
126        deactivate Controller
127    end
128
129    group Instantiation
130        SO -> AAI: Create VF-Module in AAI
131        note left
132            Homing and Capacity is
133            not shown in this
134            diagram. If H&C check is
135            done then SO will call
136            OOF prior to calling
137            SDNC for resource
138            assignment.
139        end note
140        activate AAI
141        deactivate AAI
142        SO -> SDNC: <back:white>VF-Module Resource Assignment</back>
143        activate SDNC
144        SDNC -> SDNC: Heat & Resource Assignment
145        |||
146        SDNC -> AAI: Create VF-Module Relationship & Retrieve Networks
147        deactivate SDNC
148        SO -> VNF: <back:white>Create VF_Module in Cloud environment via Heatstack</back>
149        note left
150            SO will call the Rainy Day
151            Handling and/or Manual
152            Handling building blocks
153            whenever it detects a
154            failure in the WorkFlow
155        end note
156        SO -> AAI: Update the Heatstack ID
157    end
158
159    group Configuration
160        SO -> SDNC: <back:white>Request Configuration Parameter Values</back>
161        SDNC -> SO: <back:white>Return Configuration Parameter Values</back>
162        |||
163        SO -> SO: Build ConfigScaleOut Payload
164        SO -> SO: Contoller Look up
165        SO -> Controller: ConfigScaleOut
166        activate Controller
167        Controller -> Controller: Construct VNF ScaleOut Request
168        Controller -> VNF: Configure VNF (Netconf)
169        deactivate Controller
170    end
171
172    group Healthcheck
173        SO -> AAI: <back:white>Retrieve VNF Level ipv4-oam-address</back>
174        AAI -> SO: <back:white>Return VNF Level ipv4-oam-address</back>
175        |||
176        SO -> SO: Controller Look up
177        activate Controller
178        SO -> Controller: Healthcheck
179        Controller -> VNF: Healthcheck (REST)
180        deactivate Controller
181        deactivate SO
182    end
183
184    @enduml
185
186
187
188 Description of Workflow
189 -----------------------
190
191 At a high level the way Scale Out will work is:
192
193 1. ``VF_Modules`` (VNFC’s) may be scaled out with either one of two methods:
194
195    a. Using VID, the operator will choose to scale out a VNFC by picking
196       a ``VF_Module`` to scale
197    b. An operator may define an operating policy (and associated guard
198       policies) to trigger a scaling operation automatically.
199
200       * As an example, the operating policy may be when the output of an
201         application load balancer crosses a bandwidth threshold, then increase
202         the number of instances of the application.
203       * Examples of a guard policies:
204
205          1. If a scaling operation has run within the past X minutes, then do
206             not scale.
207          2. If the number of instance is <= ``MIN_INSTANCES``
208             or >= ``MAX_INSTANCES``, then do not scale.
209
210 2. VID or Policy sends the Scale Out Request to SO.
211 3. When SO receives the Scaling request it will first send a request to the
212    appropriate controller (APPC or SDNC) to execute a health check on the VNF.
213 4. Once the health check has been run, SO executes the Heat Template associated
214    with the VF Module requested by the VID Operator or the operational policy.
215 5. After the new component(s) have been instantiated SO calls the responsible
216    controller (via DMaaP) to configure the new instances using Ansible, Chef,
217    or Netconf.
218 6. Finally a health check is run to ensure that the entire VNF is Operating
219    as it should.
220
221
222 VNF Impacts
223 -----------
224
225 For VNFs to make use of the Manual Scaling Capabilities of ONAP, they must
226 support the following functionality:
227
228    1. VNFs must support a Healthcheck as described in:
229       :ref:`onap_management_requirements`.
230
231       a. R-41430  is the requirement dictating the need for VNF Healthchecks.
232       b. The health check may be supported using REST, Ansible, or Chef
233
234          * REST health check requirements can be found in the :ref:`xnf_rest_apis`
235          * The Ansible health check playbook can be found in the :ref:`ansible_playbook_requirements`
236
237    2. R-43413 states that a "VNF MUST utilize a modular Heat Orchestration
238       Template design to support scaling". The description of this design may
239       be found in the :ref:`heat_onap_vnf_modularity_overview`
240       of the Heat Requirements.
241
242       a. The ``VF_Module`` to be scaled must be built according to the VNF
243          Modularity Rules for Incremental Modules
244
245    3. Configuration of the VNF must be done via NETCONF, Chef, or Ansible as
246       described in the :ref:`vnf_configuration_management`