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