4a68a9c6cfa2d2da1df2b72aad34ae66fededce7
[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, Tester
16
17 |image1|
18
19 **Figure: Workflow for Service design**
20
21 **Steps**
22
23    #. `Create a Service`_
24    #. `Create a Workflow [optional]`_
25    #. `Create a Network Callflow [optional]`_
26    #. `Select VID Inputs [optional]`_
27    #. `Update a Service [optional]`_
28    #. `Submit a Service for Testing`_
29    #. `Test a Service`_
30    #. `Assign an IP Address Plan`_
31
32 Create a Service
33 ----------------
34
35 **Prerequisites:** Create VFs 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 #. In the General section, complete all fields.
39
40    Note: Use the letters "Svc" in the name to indicate that the
41    component is a service.
42
43 #. Click Create.
44
45    A message displays when VF creation is complete.
46
47 #. Click Composition.
48
49    For a description of the Composition section (see \ `Composition
50    (Service design) <https://wiki.onap.org/x/lIwP>`__ ).
51
52 #. Drag one or more elements from the Elements palette to the canvas.
53 #. To connect elements:
54
55    #. Hover over an element and then hover over \ |image2|.
56
57       Other elements that can connect to this element are highlighted.
58
59    #. Drag to a highlighted element on the canvas.
60    #. Select options for Requirements and Capabilities.
61    #. Click Connect.
62
63 #. To add artifacts at the service level:
64
65    #. Click an empty area in the canvas and click Deployment Artifacts
66       (right pane).
67    #. Click \ |image3|.
68    #. Select the type.
69    #. Click Browse, locate a file to upload, and click Open.
70    #. Complete all other fields.
71    #. Click Done.
72
73    Use this function to add YANG artifacts for distribution to SDNC.
74
75 #. Click Check In to save changes.
76
77    A box displays for confirming the changes.
78
79 #. Enter a comment and click OK.
80
81    A message displays when the VF is checked in.
82
83 #. [Optional] At any time before submitting the service for testing,
84    click these options to update service information:
85
86    -  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    -  Workflow — model service lifecycle workflows for execution in SO
93       (see `Create a Workflow [optional]`_)
94    -  Network Call Flow — model interactions among VFs (see `Create a
95       Network Callflow [optional]`_)
96    -  Deployment — view HEAT modules in VSPs
97    -  Inputs — select parameters as input fields during VID
98       instantiation (see `Select VID Inputs [optional]`_).
99
100 #. After creating a service and configuring optional fields, submit it
101    for testing (see `Submit a Service for Testing`_).
102
103 Note: Create Service can now be invoked via External SDC API also.
104 Refer SDC REST API reference for details of the API.
105 Currently, only a 'Partner Domain Service' category is supported
106 which cannot be created manually from SDC portal.
107
108 Create a Workflow [optional]
109 ----------------------------
110
111 Create a workflow to model the SO recipes of the service life cycle such
112 as instantiation, upgrade, termination, or suspension of a service or
113 VNF. In the workflow each of the Activity, represent API calls to
114 various ONAP components (such as OOF, SDN-C, App-C, etc) that perform a
115 business function needed.
116
117 Note: The information collected in this section is represented in BPMN
118 format and included in distributed service model.
119
120 **Prerequisites:** All the required ActivitySpec as supported by SO
121  are registered in SDC.
122
123 #. From the SDC HOME page, click WORKFLOW.
124 #. Click Add Workflow.
125 #. The Create New Workflow box displays.
126 #. Complete all fields.
127 #. Click Create.
128 #. Specify Inputs & Outputs of Workflow
129 #. Define the Composition of Workflow.
130
131    #. All the Tasks in the composition are expected to be ServiceTask
132       for using Activities defined in SO.
133    #. Select the Implementation in the Task "general" tab to Activity.
134    #. Select the required ActivitySpec.
135
136 #. Mark the workflow as executable by selecting the Executable flag in
137    the workflow "general" tab.
138 #. Click Save.
139 #. Certify the Workflow.
140
141 Create a Network Callflow [optional]
142 ------------------------------------
143
144 Create a network callflow to model the interactions among VFs within a
145 service, such how VFs interact to deliver a service while the service is
146 being consumed. In the model, lifelines represent VFs.
147
148 Note: The information collected in this section is not distributed with
149 the service model.
150
151 **Prerequisites:** `Create a service`_
152
153 #. From the SDC HOME page, click CATALOG and search for a service.
154 #. Click the service and click Check Out.
155 #. Click Network Call Flow.
156 #. Click Add Workflow.
157    The Create New Workflow box displays.
158 #. Complete all fields.
159 #. Click Save.
160 #. In the new workflow pane, click the Lifelines icon.
161
162    The LIFELINES/STEPS view displays.
163
164 #. To add a lifeline (component), do the following:
165
166    #. Click LIFELINES to expand the pane.
167    #. Click Add Lifeline.
168    #. In the [Unnamed Lifeline field], enter a name for the lifeline.
169    #. To add other lifelines to the workflow, repeat the actions above.
170
171 #. After creating all required lifelines, do the following to add a step
172    (showing an action between two lifelines):
173
174    #. Under STEPS (left pane), click Add Message.
175       An unnamed step is added under STEPS.
176    #. In the [Unnamed Message] field, enter a name or message for the
177       step.
178    #. From the component and arrow dropdown lists, select the two
179       components that communicate in this step, and the arrow to show in
180       which direction the communication flows.
181    #. To add another step, repeat the actions above.
182
183 #. [Optional] Change the order of steps by clicking a step and dragging
184    it to the preferred position.
185 #. Click Save.
186 #. Click Check In to save changes.
187
188 Select VID Inputs [optional]
189 ----------------------------
190
191 Select parameters as input fields during
192 `VID <https://wiki.onap.org/display/DW/Glossary#Glossary-VID>`__
193 instantiation.
194
195 Note: For questions about how to use this section, contact the Service
196 Design and Creation team (see \ `Mailing
197 Lists <https://wiki.onap.org/display/DW/Mailing+Lists>`__).
198
199 **Prerequisites:** `Create a service`_
200
201 #. From the SDC HOME page, click CATALOG and search for a service.
202 #. Click the service and click Check Out.
203 #. Click Inputs.
204 #. From the Resource instance inputs pane, expand the name of a
205    resource.
206 #. Select inputs by clicking the check box in each row as required.
207    Note: Do not select inputs that are already in the ENV file (this
208    overwrites values specified in the ENV).
209 #. Click \ |image4| to move selected inputs to the Service inputs pane.
210 #. Click Check In to save changes.
211
212 Update a Service [optional]
213 ---------------------------
214
215 Update service information and artifacts.
216
217 Update the version of a VF referenced in the service whenever the VF is
218 updated (see step 4).
219
220 **Prerequisites:**
221
222 -  Create a service.
223 -  If a VF included in the service was updated: see "Update a VF
224    [optional]" and "Test a VF".
225
226 #. From the SDC HOME page, click CATALOG and search for a service.
227 #. Click the service and click Check Out.
228 #. Click Composition.
229 #. To update the version of a VF referenced in the service:
230
231    #. Click Composition.
232    #. Click the VF in the canvas.
233    #. On the General Info tab (right pane), select the VF version.
234
235 #. To update artifacts at the service level:
236
237    #. Click an empty area in the canvas and click Deployment Artifacts
238       (right pane).
239    #. View, add, delete, or download artifacts as required.
240
241 #. [Optional] Add, edit, or remove VFs that comprise the service
242    reference architecture (see steps 4 to 6 in \ `Create a Service`_).
243 #. [Optional] Click Operations to edit Service Operations.
244
245    #. Create/Edit Operations
246    #. Assign Workflow
247    #. Click Save
248
249 #. [Optional] Click Management Callflow to edit, upload, or delete
250    associated deployment artifacts (see "Create a Management Workflow [optional]").
251 #. [Optional] Click Network Callflow to edit the interactions among VFs
252    that comprise the service (see `Create a Network Callflow [optional]`_).
253 #. [Optional] Click Inputs to select parameters as input fields during
254    VID instantiation (see `Select VID Inputs [optional]`_).
255 #. Click Check In to save changes.
256 #. After updating a service and configuring optional fields, submit it
257    for testing (see `Submit a Service for Testing`_).
258
259 Submit a Service for Testing
260 ----------------------------
261
262 Note: A service cannot be submitted for testing if the reference
263 architecture contains uncertified resources.
264
265 **Prerequisites:** `Create a Service`_
266
267 #. When a service is ready for testing, click CATALOG and search for the
268    service.
269 #. Click the service and click Submit for Testing.
270    A box displays for sending a message to the testers.
271 #. Enter a message for the testers asking that they begin service
272    certification and click OK.
273
274    The default mail client launches with a draft email containing the
275    message from step 2.
276
277 #. Add the email addresses of the people on the Certification Group with
278    the Tester role and send the email.
279
280 Test a Service
281 --------------
282
283 Test the design and associated artifacts of a service.
284
285 **Prerequisites:** `Submit a Service for Testing`_.
286
287 #. Sign in to SDC as a Tester.
288 #. From the HOME page, select Ready For Testing under Active Projects.
289 #. In the right pane, click the service to test.
290 #. Click Start Testing.
291 #. Test the service.
292 #. When testing is complete, click Accept.
293
294 Assign an IP Address Plan
295 -------------------------
296
297 Assigning an IP address plan is specific to each OpenECOMP installation.
298 The object: to assign a Service's key to a "plan" for allocating IP
299 addresses.
300
301 .. |image1| image:: media/design_service_workflow.png
302 .. |image2| image:: media/design_asdccanvas_connect_elements.png
303 .. |image3| image:: media/design_service_adddeploymentartifact.png
304 .. |image4| image:: media/design_service_inputs_move.png