1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License. http://creativecommons.org/licenses/by/4.0
3 .. Copyright © 2017-2020 Aarna Networks, Inc.
5 vFW Service Deployment Tutorial
6 ###############################
8 In this tutorial, we will deploy the service created in the previous Service Design tutorial onto OpenStack.
9 We will do so by using the VID GUI from the ONAP Portal. Login as user demo.
11 In this section, you will learn the following through VID GUI
13 * How to Instantiate a Service
14 * How to Instantiate a VNF
15 * How to Instantiate VF Module
16 * How to Instantiate Network
18 Let us start by running Robot init script
20 1. Run Robot init script to populate demo models.
24 cd ~/oom/kubernetes/robot
25 ./demo-k8s.sh onap init
28 All tests must pass, below is sample output.
34 ++ kubectl --namespace onap get pods
37 + POD=dev-robot-578b965f4d-vlk8b
38 ++ dirname ./demo-k8s.sh
40 + SCRIPTDIR=scripts/demoscript
41 + ETEHOME=/var/opt/ONAP
43 ++ kubectl --namespace onap exec dev-robot-578b965f4d-vlk8b -- bash -c 'ls -1q /share/logs/ | wc -l'
44 + export GLOBAL_BUILD_NUMBER=3
45 + GLOBAL_BUILD_NUMBER=3
47 + OUTPUT_FOLDER=0003_demo_init
49 + VARIABLEFILES='-V /share/config/robot_properties.py'
50 + kubectl --namespace onap exec dev-robot-578b965f4d-vlk8b -- /var/opt/ONAP/runTags.sh -V /share/config/robot_properties.py
51 -d /share/logs/0003_demo_init -i InitDemo --display 93
52 Starting Xvfb on display :93 with res 1280x1024x24
53 Executing robot tests at log level TRACE
54 ==============================================================================
56 ==============================================================================
57 Testsuites.Demo :: Executes the VNF Orchestration Test cases including setu...
58 ==============================================================================
59 Initialize Customer And Models | PASS |
60 ------------------------------------------------------------------------------
61 Initialize SO Openstack Identity For V3 | PASS |
62 ------------------------------------------------------------------------------
63 Testsuites.Demo :: Executes the VNF Orchestration Test cases inclu... | PASS |
64 2 critical tests, 2 passed, 0 failed
65 2 tests total, 2 passed, 0 failed
66 ==============================================================================
68 2 critical tests, 2 passed, 0 failed
69 2 tests total, 2 passed, 0 failed
70 ==============================================================================
71 Output: /share/logs/0003_demo_init/output.xml
72 Log: /share/logs/0003_demo_init/log.html
73 Report: /share/logs/0003_demo_init/report.html
75 2. Create vFW_demo_service Instance
77 A. Login into the ONAP portal as user demo / demo123456!
81 B. Go to Home and select Virtual Infrastructure Deployment (VID) application
85 If you see VID reporting a Security failure, and the browser does not give option to Allow Exception button as below
89 Apply the below workaround for the above issue
91 Copy the vid.api.simpledemo.onap.org:30200 from the above window, open new tab and paste the copied URL
92 as https://vid.api.simpledemo.onap.org:30200 and click on Advanced then click on Accept the Risk and Continue tab
96 Then Close the tab, go to the ONAP Home page and load the VID UI again, you will see VID home page
100 C. Select Test API for A-la-carte as VNF_API(old) then click Browse SDC Service Models (Left side panel)
104 D. Search for the service to instantiate, select a service (vfw_demo_service) distributed in SDC and click Deploy
108 E. Complete the fields indicated by the red star and click Confirm
110 * Instance Name = vFW_service_00
111 * Subscriber Name = Demonstration
113 * Owning Entity = OE-Demonstration
117 F. Select Confirm Button
119 We should see the “Service instance was created successfully” message
123 G. Click Close and the next screen should appear. It will allow you to declare VNF(s) and Network(s)
124 that are part of the service model composition
130 A. click on “Add node instance” and select the VNF you want to instantiate in the list
134 B. Complete the fields indicated by the red star and click Confirm
136 * Instance Name = vFW_demo_VNF
137 * Product Family = vFW
138 * Region = RegionOne(CLOUDOWNER)
140 * Line Of Business = LOB-Demonstration
141 * Platform = Platform-Demonstration
145 You will get a status complete dialog message
149 C. Click on close button, the following screen then should appear
153 4. Instantiate VF Module
155 Note: Before creating VF module get the required parameter values to prepare SDNC preload data
157 A. Copy the following VNF attributes from VNF instance detail screen
159 * generic-vnf-name = vFW_demo_VNF (value must be equal to the VNF instance name value)
163 * generic-vnf-type = vFW_demo_service/vFW_demo 0 (value must be equal to VNF Type value)
167 * service-type = f7c80167-ed06-48ef-a991-61b43196f98f (value must be equal to the service instance id value)
171 B. Copy the following attributes From Create VF Module screen
173 * vnf-name = lfn_vf_module (value must be equal to the VF module instance name value)
174 * vnf-type = VfwDemo..base_vfw..module-0 (value must be equal to the “Model Name” value - see create VF module screen)
178 C. Get the required vnf-parameters values from Heat env file imported while SDC design
179 (refer https://github.com/onap/demo/blob/master/heat/vFW/base_vfw.env)
181 Login to Openstack and execute the below commands and get the required openstack related parameter values
182 to update in SDNC preload data
184 * download the image ubuntu-14.04 from cloud images & create an image with "ubuntu-14-04-cloud-amd6" name
185 * create the flavor with m1.medium
186 * create OAM_NETWORK ID & OAM_SUBNET ID (use subnet range from base_vfw.env file)
187 * execute openstack security group rule to open all ports for onap
189 D. Run the SDNC preload curl command
190 Below is the sample curl command updated with all the required parameters
194 curl -k -X POST https://sdnc.api.simpledemo.onap.org:30267/restconf/operations/GENERIC-RESOURCE-API:preload-vf-module-topology-operation \
195 -H 'Accept: application/json' \
196 -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
197 -H 'Content-Type: application/json' \
198 -H 'X- FromAppId: API client' \
199 -H 'cache-control: no-cache' \
200 -d @vFW_sdnc_VF_preload.json
202 Below is the json file payload content
203 cat vFW_sdnc_VF_preload.json
206 "request-information": {
207 "notification-url": "onap.org",
209 "order-version": "1",
210 "request-action": "PreloadVfModuleRequest",
213 "sdnc-request-header": {
214 "svc-action": "reserve",
215 "svc-notification-url": "http:\/\/onap.org:8080\/adapters\/rest\/SDNCNotify",
216 "svc-request-id": "test"
218 "preload-vf-module-topology-information": {
219 "vnf-resource-assignments": {
220 "availability-zones": {
221 "availability-zone": [
230 "vf-module-topology": {
231 "vf-module-topology-identifier": {
232 "vf-module-name": "lfn_vf_module"
234 "vf-module-parameters": {
236 "name": "vfw_image_name",
237 "value": "ubuntu-14-04-cloud-amd6"
240 "name": "vfw_flavor_name",
244 "name": "vfw_name_0",
245 "value": "zdfw1fwl01fwl09"
248 "name": "vfw_int_unprotected_private_ip_0",
249 "value": "192.168.10.109"
252 "name": "vfw_int_protected_private_ip_0",
253 "value": "192.168.20.109"
256 "name": "vfw_onap_private_ip_0",
257 "value": "10.10.10.15"
260 "name": "vfw_int_protected_private_floating_ip",
261 "value": "192.168.10.209"
264 "name": "vpg_int_unprotected_private_ip_0",
265 "value": "192.168.10.209"
268 "name": "vpg_image_name",
269 "value": "ubuntu-14-04-cloud-amd6"
272 "name": "vpg_flavor_name",
276 "name": "vpg_name_0",
277 "value": "zdfw1fwl01pgn09"
280 "name": "vpg_onap_private_ip_0",
281 "value": "10.10.10.16"
284 "name": "vsn_image_name",
285 "value": "ubuntu-14-04-cloud-amd6"
288 "name": "vsn_flavor_name",
292 "name": "vsn_name_0",
293 "value": "zdfw1fwl01snk09"
296 "name": "vsn_int_protected_private_ip_0",
297 "value": "192.168.20.251"
300 "name": "vsn_onap_private_ip_0",
301 "value": "10.10.10.17"
304 "name": "public_net_id",
305 "value": "9af666a2-73db-4dd4-bdad-a5dd82f6fddc"
308 "name": "unprotected_private_net_id",
309 "value": "zdfw1fwl09_unprotected"
312 "name": "unprotected_private_net_cidr",
313 "value": "192.168.10.0/24"
316 "name": "protected_private_net_id",
317 "value": "zdfw1fwl09_protected"
320 "name": "protected_private_net_cidr",
321 "value": "192.168.20.0/24"
324 "name": "onap_private_net_id",
325 "value": "OAM_NETWORK"
328 "name": "onap_private_subnet_id",
329 "value": "OAM_SUBNET"
332 "name": "onap_private_net_cidr",
333 "value": "10.10.10.0/24"
337 "value": "vFW_demo_VNF"
341 "value": "vFirewall_demo_app"
344 "name": "vf_module_id:",
348 "name": "dcae_collector_ip",
352 "name": "dcae_collector_port",
356 "name": "demo_artifacts_version",
357 "value": "1.6.0-SNAPSHOT"
360 "name": "install_script_version",
361 "value": "1.6.0-SNAPSHOT"
369 "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD1Bv4Vb3RzfKoW3R6j+bk4fqCVkrHSqnK2Xo1A2139jGm6wvUocQznaawoL5kfqTATPOl1kwi6EvWgy+aVV7UmELdm2nFPUErcPT8B73hfFImpNkz6q93TCmx4lJNz+5k6nemUn+K4fz7a1ggLYahTOTzJsNBffaVE7LA/ahGxzK7zVqWrdO0hoJAxnENp46qEtrQk3PIoWn4MRy2xj4hnnLFETWxYcktIdV6YQzJUlK/wZOWrGdkPdnjLaIO84ZxjPedxgGl1BOuUKAWqlC0g9I1Q9tcCrBnahVFLt3ibloFcLSEl1zrzYtJtF2w1i/SDBSpqxIr68TEo7/FPfAP1"
380 "name": "nexus_artifact_repo",
381 "value": "https://nexus.onap.org"
387 "vnf-topology-identifier-structure": {
388 "vnf-name": "vFW_demo_VNF",
389 "vnf-type": "vFW_demo_service/vFW_demo 0"
395 Output looks somthing like below
396 {"output":{"response-message":"success","ack-final-indicator":"Y","svc-request-id":"test","response-code":"200"}}
398 E. Now click on Add VF-Module with the same name as updated through SDNC preload, click on SDN-C Preload
399 check box then press confirm
403 You will get a status complete dialog message
407 F. Click on close, now the following screen should appear
411 5. Instantiate Network
413 A. Prepare the “SDNC preload” data before creating network instance
415 * network-role = integration_test_net (provide any value)
416 * network-technology = neutron (use “neutron” as this example will instantiate a network using openstack neutron application)
417 * service-type = vFW_demo_service (value must be equal to “Service Name” (=service model name) displayed on VID screen)
421 * network-name = lfn_nwt_001 (value must be equal to the desired network instance name)
425 * network-type = Generic NeutronNet (value must be equal to “Model Name”“Generic NeutronNet” displayed on VID screen)
429 B. Run the below SDNC preload curl command
433 curl -k -X POST https://sdnc.api.simpledemo.onap.org:30267/restconf/operations/GENERIC-RESOURCE-API:preload-network-topology-operation \
434 -H 'Accept: application/json' \
435 -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
436 -H 'Content-Type: application/json' \
437 -H 'X- FromAppId: API client' \
438 -H 'cache-control: no-cache' \
439 -d @vFW_sdnc_Network_preload.json
441 Below is the json file payload content
442 cat vFW_sdnc_Network_preload.json
446 "preload-network-topology-information": {
447 "network-policy": [],
448 "route-table-reference": [],
450 "network-topology-identifier-structure": {
451 "network-role": "integration_test_net",
452 "network-technology": "neutron",
453 "network-name": "lfn_nwt_001",
454 "network-type": "Generic NeutronNet"
456 "is-external-network": false,
457 "is-shared-network": false,
458 "is-provider-network": false,
459 "physical-network-name": "Not Aplicable",
463 "gateway-address": "10.10.10.1",
465 "start-address": "10.10.10.20",
466 "subnet-name": "test-subnet-005"
469 "sdnc-request-header": {
470 "svc-request-id": "test",
471 "svc-notification-url": "http:\/\/onap.org:8080\/adapters\/rest\/SDNCNotify",
472 "svc-action": "reserve"
477 Output looks something like below
478 {"output":{"response-message":"success","ack-final-indicator":"Y","svc-request-id":"test","response-code":"200"}}
480 C. Click on “Add Network” and select the Network you want to instantiate in the list
484 D. Click Confirm, We will get a status complete dialog message
488 E. Click close, the following screen should appear
492 At this point, the Network and subnets are now instantiated in the cloud platform
494 6. Now login to OpenStack Horizon dashboard, see stacks created in Openstack
496 A. Go to Project → Orchestration → Stacks
497 We can see the VF module and Network stacks status
501 B. Now we can go to Admin → Compute → Instances to check the instances status
506 .. |image4| image:: media/image4.png
507 .. |image11| image:: media/image11.png
508 .. |image22| image:: media/image22.png
509 .. |image13| image:: media/image13.png
510 .. |image17| image:: media/image17.png
511 .. |image10| image:: media/image10.png
512 .. |image1| image:: media/image1.png
513 .. |image24| image:: media/image24.png
514 .. |image15| image:: media/image15.png
515 .. |image29| image:: media/image29.png
516 .. |image9| image:: media/image9.png
517 .. |image6| image:: media/image6.png
518 .. |image18| image:: media/image18.png
519 .. |image16| image:: media/image16.png
520 .. |image25| image:: media/image25.png
521 .. |image20| image:: media/image20.png
522 .. |image26| image:: media/image26.png
523 .. |image27| image:: media/image27.png
524 .. |image28| image:: media/image28.png
525 .. |image2| image:: media/image2.png
526 .. |image19| image:: media/image19.png
527 .. |image5| image:: media/image5.png
528 .. |image7| image:: media/image7.png
529 .. |image8| image:: media/image8.png
530 .. |image12| image:: media/image12.png
531 .. |image14| image:: media/image14.png
532 .. |image3| image:: media/image3.png
533 .. |image23| image:: media/image23.png
534 .. |image21| image:: media/image21.png