Table of Contents |
---|
Creating a Service Instance
In this tutorial we show how to take a service design that has been distributed and create a running instance of the service.
To simplify this we are going to use scripts (with some selenium robot scripts) to create the design, pre-load customer and network information, and orchestrate parts of the virtual firewall closed loop example. The following steps assume that you have completed and understand basic concepts from the setting up the platform and using the portal tutorials.
Let's start by finding the IP Address of vm1-robot in the Rackspace list of servers. Use this vm1-robot IP address, your Rackspace private key, and the PuTTY client to login to vm1-robot as root.
Note: The current default LCP Region is IAD - to use DFW switch the example zip in the last section - currently though we have hardcoding that must be fixed:
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
...
osx$ ssh-add onap_rsa
osx$ ssh root@104.130.170.232
Run Robot demo.sh init
At the command prompt type
...
root@vm1-robot:~# cd /opt
root@vm1-robot:/opt# ./demo.sh init
Wait for all steps to complete (will take 60-120 sec) as shown below
If you want to see the details of what ran, you can open report.html in a browser. (located within openecompete_container docker container)
...
root@vm1-robot:/opt# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f99954f00ab2 nexus3.onap.org:10001/openecomp/testsuite:1.0-STAGING-latest "lighttpd -D -f /e..." 19 hours ago Up 19 hours 0.0.0.0:88->88/tcp openecompete_container
root@vm1-robot:/opt# docker exec -it openecompete_container bash
root@f99954f00ab2:/# cat /share/logs/demo/InitDemo/
log.html output.xml report.html
Deploy Service Instance in VID
From the ONAP portal, login to the VID application using demo user, browse to locate the demo SDC Service Models, and Deploy an instance of the service you created - not the pre-populated demoVFW.
(Note: deploy your "service" above - not demoVFW or demoVLB - these 2 are leftover pre-population artifacts of the init script and will be removed)
Fill in the information (Instance Name=DemoInstance, Demonstration, vFW) for a Service Instance as shown below and press Confirm.
Wait for a response and close the window
You should now see a service instance displayed.
Add a Virtual Network Function under the Service Instance in VID
Add a VNF using the drop down button, complete, and enter the following information. The tenant and LCP region drop down choices may be different for your Rackspace account. Both IAD and DFW support heat templates.
Wait for and close the response window.
Run Robot demo.sh preload of DemoModule
Return to the PuTTY/ssh window and type the command to load VNF configuration information
DO NOT Navigate from the Deploy page before adding the VF Module below - or you will need to search for it - then hit edit
./demo.sh preload <vnf_name> <module_name>
example
./demo.sh preload DemoVNF DemoModule
Wait for the results as shown below
For any error/debug logs looks into
...
Table of Contents |
---|
Creating a Service Instance
In this tutorial we show how to take a service design that has been distributed and create a running instance of the service.
To simplify this we are going to use scripts (with some selenium robot scripts) to create the design, pre-load customer and network information, and orchestrate parts of the virtual firewall closed loop example. The following steps assume that you have completed and understand basic concepts from the setting up the platform and using the portal tutorials.
Let's start by finding the IP Address of vm1-robot in the Rackspace list of servers. Use this vm1-robot IP address, your Rackspace private key, and the PuTTY client to login to vm1-robot as root.
Note: The current default LCP Region is IAD - to use DFW switch the example zip in the last section - currently though we have hardcoding that must be fixed:
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
osx$ ssh-add onap_rsa osx$ ssh root@104.130.170.232 |
---|
Run Robot demo.sh init
At the command prompt type
root@vm1-robot:~# cd /opt root@vm1-robot:/opt# ./demo.sh init |
---|
Wait for all steps to complete (will take 60-120 sec) as shown below
If you want to see the details of what ran, you can open report.html in a browser. (located within openecompete_container docker container)
root@vm1-robot:/opt# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f99954f00ab2 nexus3.onap.org:10001/openecomp/testsuite:1.0-STAGING-latest "lighttpd -D -f /e..." 19 hours ago Up 19 hours 0.0.0.0:88->88/tcp openecompete_container root@vm1-robot:/opt# docker exec -it openecompete_container bash root@f99954f00ab2:/# cat /share/logs/demo/InitDemo/ log.html output.xml report.html |
---|
Deploy Service Instance in VID
From the ONAP portal, login to the VID application using demo user, browse to locate the demo SDC Service Models, and Deploy an instance of the service you created - not the pre-populated demoVFW.
(Note: deploy your "service" above - not demoVFW or demoVLB - these 2 are leftover pre-population artifacts of the init script and will be removed)
Fill in the information (Instance Name=DemoInstance, Demonstration, vFW) for a Service Instance as shown below and press Confirm.
Wait for a response and close the window
You should now see a service instance displayed.
Add a Virtual Network Function under the Service Instance in VID
Add a VNF using the drop down button, complete, and enter the following information. The tenant and LCP region drop down choices may be different for your Rackspace account. Both IAD and DFW support heat templates.
Wait for and close the response window.
Run Robot demo.sh preload of DemoModule
Return to the PuTTY/ssh window and type the command to load VNF configuration information
DO NOT Navigate from the Deploy page before adding the VF Module below - or you will need to search for it - then hit edit
./demo.sh preload <vnf_name> <module_name>
example
./demo.sh preload DemoVNF DemoModule
Wait for the results as shown below
For any error/debug logs looks into
Code Block |
---|
/opt/eteshare/logs/demo/PreloadDemo/output.xml |
Preload Flow
see overall Tutorial: Verifying and Observing a deployed Service Instance#vFirewallFlow
demo.sh calls runTags.sh in the docker container in robot - which runs the robot test framework scripts starting with PreLoad VNF in demo.robot
Preload VNF
Preload User Model ${VNF_NAME} ${MODULE_NAME}
which calls demo_preload.robot (although it screen scrapes the Service ID previously from VID - in this call it does a rest call to VID to package up the vm modules list) and calls SDNC preload with these (the diagram needs a 25-2 for robot to VID as well for this sub-step)
Preload User Model
Login To VID GUI
${vf_modules}= Get Module Names from VID ${invariantUUID}
Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${service} demo
which calls sdngc_interface.robot (logs in and posts to sdnc/mobility/addVnfProfile)
Preload Vnf Profile
Login To SDNGC Admin GUI
Go To ${SDNGC_ADMIN_VNF_PROFILE_URL}
Click Button xpath=//button[@data-target='#add_vnf_profile']
Click Button xpath=//button[contains(.,'Submit')]
which calls the post form
<form name="addForm" role="form" action="/mobility/addVnfProfile" method="POST">
http://sdnc:8843/mobility/getVnfProfile
which runs a backend DB insert operation on SDNC (calling the DB directly here is likely not advised, also there is no parameter checking on the resultant SQL, we should also be using an ORM framework)
/sdnc-oam/admportal/mobility.js router.post('/addVnfNetwork', csp.checkAuth, function(req,res){ |
---|
Add a VF Module in VID
Add a VF Module using the drop down button.
...