fc290cb27aab70c3567b49d915e6058a31ff27d8
[doc.git] / docs / guides / onap-user / design / service-design / index.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2019 ONAP Contributors. All rights reserved.
4
5 .. _doc_guide_user_des_ser-des:
6
7 Service Design
8 ==============
9
10 **Goal:** Add models and other artifacts required to create, configure,
11 instantiate, and manage services. Validate and certify the services.
12
13 **Tool:** SDC
14
15 **SDC user roles:** Designer
16
17 |image1|
18
19 **Figure: Workflow for Service design**
20
21 **Steps**
22
23    #. `Create Service`_
24    #. `Create a Management Workflow [optional]`_
25    #. `Create a Network Callflow [optional]`_
26    #. `Add Service Inputs [optional]`_
27    #. `Update Service [optional]`_
28    #. `Certify Service`_
29
30 .. _doc_guide_user_des_ser-cre_serv:
31
32 Create Service
33 --------------
34
35 **Prerequisites:** Create VF/PNFs required for this service (see :ref:`doc_guide_user_des_vf-cre`).
36
37 #. From the SDC HOME page, hover over Add and select *ADD SERVICE*.
38
39    |image0|
40
41 #. In the General section, complete all fields.
42
43    |image5|
44
45 #. Click Create.
46
47    A message displays when Service creation is complete.
48
49 #. Click Composition.
50
51    |image6|
52
53    For a description of the Composition section (see SDC User Guide ).
54
55 #. Drag one or more elements from the Elements palette to the canvas.
56 #. To connect elements:
57
58    #. Hover over an element and then hover over \ |image2|.
59
60       Other elements that can connect to this element are highlighted.
61
62    #. Drag to a highlighted element on the canvas.
63    #. Select options for Requirements and Capabilities.
64    #. Click Connect.
65
66 #. To add artifacts at the service level:
67
68    #. Click an empty area in the canvas and click *Deployment Artifacts*
69       (right pane).
70    #. Click \ |image3|.
71    #. Select the type.
72    #. Click Browse, locate a file to upload, and click Open.
73    #. Complete all other fields.
74    #. Click Done.
75
76    Use this function to add YANG artifacts for distribution to SDNC.
77
78 #. [Optional]  At any time before checking in the Service, click
79    these options to update Service information:
80
81    .. note:: These tasks can be done only before certifying the Service.
82
83    - **General->Icon** change the icon associated with the Service
84    - **TOSCA Artifacts** view and edit artifacts, such as the .csar file
85      and TOSCA template
86    - **Composition** view or edit the graphical representation of the
87      service-level TOSCA model
88    - **Activity Log** view activity related to the Service
89      (displays the action, date, user, status, and any comments related to each
90      action)
91    - **Management Workflow** model service lifecycle workflows for execution
92      in SO (see `Create a Management Workflow [optional]`_)
93    - **Network Call Flow** model interactions among VFs (see `Create a
94       Network Callflow [optional]`_)
95    - **Deployment** view HEAT modules in VSPs
96    - **Properties Assignment** define or update properties,
97      policies and input parameters used during Service instantiation
98      (see `Add Service Inputs [optional]`_).
99    - **Monitoring** ...
100
101 #. Click *Check In* to save changes.
102
103    A box displays for confirming the changes.
104
105 #. Enter a comment and click OK.
106
107    A message displays when the Service is checked in and the
108    Home page is displayed.
109
110 #. After creating a service and configuring optional fields, certify it
111    (see `Certify Service`_).
112
113 Note: Create Service can also be invoked via External SDC API.
114 Refer SDC REST API reference for details of the API.
115 Currently, only a 'Partner Domain Service' category is supported
116 which cannot be created manually from SDC portal.
117
118 .. _doc_guide_user_des_ser-cre_wf:
119
120 Create a Management Workflow [optional]
121 ---------------------------------------
122
123 Create a workflow to model the SO recipes of the service life cycle such
124 as instantiation, upgrade, termination, or suspension of a service or
125 VNF. In the workflow each of the Activity, represent API calls to
126 various ONAP components (such as OOF, SDN-C, App-C, etc) that perform a
127 business function needed.
128
129 Note: The information collected in this section is represented in BPMN
130 format and included in distributed service model.
131
132 **Prerequisites:** All the required ActivitySpec as supported by SO
133  are registered in SDC.
134
135 #. From the SDC HOME page, click CATALOG and search for a service.
136 #. Click the service and click *Check Out*.
137 #. Select the panel *Management Workflow*.
138 #. Click *Add Workflow*.
139 #. The *Create New Workflow* box displays.
140 #. Complete all fields.
141 #. Click Create.
142
143    |image7|
144
145 #. Specify Inputs & Outputs of Workflow
146 #. Define the Composition of Workflow.
147
148    #. All the Tasks in the composition are expected to be ServiceTask
149       for using Activities defined in SO.
150    #. Select the Implementation in the Task "general" tab to Activity.
151    #. Select the required ActivitySpec.
152
153 #. Mark the workflow as executable by selecting the Executable flag in
154    the workflow "general" tab.
155 #. Click Save.
156 #. Certify the Workflow.
157
158 .. _doc_guide_user_des_ser-cre_nfw:
159
160 Create a Network Callflow [optional]
161 ------------------------------------
162
163 Create a network callflow to model the interactions among VFs within a
164 service, such how VFs interact to deliver a service while the service is
165 being consumed. In the model, lifelines represent VFs.
166
167 Note: The information collected in this section is not distributed with
168 the service model.
169
170 **Prerequisites:** `Create service`_
171
172 #. From the SDC HOME page, click CATALOG and search for the service.
173 #. Click the service and click *Check Out*.
174 #. Click Network Call Flow.
175 #. Click Add Workflow.
176    The Create New Workflow box displays.
177 #. Complete all fields.
178 #. Click Save.
179 #. In the new workflow pane, click the Lifelines icon.
180
181    The LIFELINES/STEPS view displays.
182
183 #. To add a lifeline (component), do the following:
184
185    #. Click LIFELINES to expand the pane.
186    #. Click Add Lifeline.
187    #. In the [Unnamed Lifeline field], enter a name for the lifeline.
188    #. To add other lifelines to the workflow, repeat the actions above.
189
190 #. After creating all required lifelines, do the following to add a step
191    (showing an action between two lifelines):
192
193    #. Under STEPS (left pane), click Add Message.
194       An unnamed step is added under STEPS.
195    #. In the [Unnamed Message] field, enter a name or message for the
196       step.
197    #. From the component and arrow dropdown lists, select the two
198       components that communicate in this step, and the arrow to show in
199       which direction the communication flows.
200    #. To add another step, repeat the actions above.
201
202 #. [Optional] Change the order of steps by clicking a step and dragging
203    it to the preferred position.
204 #. Click *Save*.
205 #. Click *Check In* to save changes.
206
207 .. _doc_guide_user_des_ser-para_in:
208
209 Add Service Inputs [optional]
210 -----------------------------
211
212 Select parameters as input fields during Service instantiation.
213
214
215 **Prerequisites:** `Create service`_
216
217 #. From the SDC HOME page, click CATALOG and search for a service.
218 #. Click the service and click *Check Out*.
219 #. Click *Properties Assignment*.
220
221    |image8|
222
223 #. From the *Composition* pane, select the *SELF* object
224    representing the service.
225 #. In the *Properties* the existing Service properites are shown
226 #. With *+Add Property* you can add a new property
227 #. To set a property as *Input* parameter, select the parameter
228    by clicking the check box in each row as required.
229    Note: Do not select inputs that are already in the ENV file (this
230    overwrites values specified in the ENV).
231
232    |image9|
233
234 #. Click *Declare Input* to add the selected parameter to the
235    Service *Input* pane.
236 #. Click *Check In* to save changes.
237
238 .. _doc_guide_user_des_ser-upd_serv:
239
240 Update Service [optional]
241 -------------------------
242
243 Update service information and artifacts.
244
245 Update the version of a VF referenced in the service whenever the VF is
246 updated (see step 4).
247
248 **Prerequisites:**
249
250 -  Create a service.
251 -  If a VF included in the service was updated:
252    see :ref:`doc_guide_user_des_vf-cre_vf-upd`
253
254 #. From the SDC HOME page, click CATALOG and search for the service.
255 #. Click the service and click *Check Out*.
256 #. Click Composition.
257 #. To update the version of a VF referenced in the service:
258
259    #. Click Composition.
260    #. Click the VF in the canvas.
261    #. On the *General Info* tab (right pane), select the VF version.
262
263 #. To update artifacts at the service level:
264
265    #. Click an empty area in the canvas and click *Deployment Artifacts*
266       (right pane).
267    #. View, add, delete, or download artifacts as required.
268
269 #. [Optional] Add, edit, or remove VFs that comprise the service
270    reference architecture (see steps 4 to 6 in \ `Create Service`_).
271 #. [Optional] Click *Operations* to edit Service Operations.
272
273    #. Create/Edit Operations
274    #. Assign Workflow
275    #. Click Save
276
277 #. [Optional] Click *Management Workflow* to edit, upload, or delete
278    associated deployment artifacts
279    (see `Create a Management Workflow [optional]`_).
280 #. [Optional] Click *Network Callflow* to edit the interactions among VFs
281    that comprise the service (see `Create a Network Callflow [optional]`_).
282 #. [Optional] Click *Properties Assignement* to select parameters as
283    input fields during Service instantiation
284    (see `Add Service Inputs [optional]`_).
285 #. Click *Check In* to save changes.
286 #. After updating a service and configuring optional fields, certify it
287    (see `Certify Service`_).
288
289 .. _doc_guide_user_des_ser-cfy_serv:
290
291 Certify Service
292 ---------------
293
294 Note: A service cannot be submitted for testing if the reference
295 architecture contains uncertified resources.
296
297 **Prerequisites:** `Create Service`_
298
299 **Steps**
300
301 #. When a Service is ready for certification,
302    click *CATALOG* and search for the checked-in Service.
303 #. Click the Service and click *Certify*.
304
305 #. Enter a comment and click *OK*.
306
307 #. A Message appears, that the Service is certified.
308
309
310 .. |image0| image:: media/sdc-home.png
311 .. |image1| image:: media/sdc-service-workflow.png
312 .. |image2| image:: media/design_asdccanvas_connect_elements.png
313 .. |image3| image:: media/design_service_adddeploymentartifact.png
314 .. |image4| image:: media/design_service_inputs_move.png
315 .. |image5| image:: media/sdc-service-general.png
316 .. |image6| image:: media/sdc-service-composition.png
317 .. |image7| image:: media/sdc-service-workflow.png
318 .. |image8| image:: media/sdc-service-properties.png
319 .. |image9| image:: media/sdc-service-properties-input.png