vDNS on Azure
Introduction
This document explains the steps to on-board and instantiate vDNS on Azure
Pre-requisites
ONAP environment should be available as mentioned here
Demo Video
Refer to the video on how to on-board and instantiate vDNS on Azure(E2E)
The detailed steps are provided below:
Onboarding and Service Design
Onboard the vDNS VNF using the TOSCA designed using Simple profile nodes. TOSCA csar is available on Github: https://github.com/onapdemo/demo/blob/beijing/tosca/aria_csars/simple_vdns.csar?raw=true
Import the vDNS VSP and create the VNF as shown in the video
After creating the VNF, use the deployment artifact link to add the Azure specific TOSCA in the OTHER folder.
Azure specific TOSCA for base vDNS is available on Github: https://github.com/onapdemo/demo/blob/beijing/tosca/aria_csars/azurevdns.csar?raw=true
Azure specific TOSCA for DNS scaling is available on Github: https://github.com/onapdemo/demo/blob/beijing/tosca/aria_csars/dnsscaling.csar?raw=true
Using SDC catalog, create the vDNS service by adding two VNFs that were imported.
Distribute the service to SO and AAI
Service Provisioning
Once the service model gets distributed to SO & AAI, service instantiation can be done using VID UI
Pre-requisites
Refer to vDNS on Azure page
Steps to instantiate
Login to VID and click on Browse Service Models(Left menu)
Click on Deploy and then enter the service instance name and other details to create the service.
Once created, you can see the service instance details with an option to "Add VNF".
Click on Add VNF and select the VNF module.Enter the VNF name and other details to create the VNF.
Preload SDNC data by capturing the VNF model data information
POST /restconf/operations/VNF-API:preload-vnf-topology-operation
vDNS Preload Request Body
{ "input": { "vnf-topology-information": { "vnf-topology-identifier": { "service-type": "{{vdns_vnf_id}}", "vnf-name": "Vfmodule_vLB_BASE_140902", "vnf-type": "AzureVdnsVsp..base_vlb..module-0", "generic-vnf-name": "zdfw1lb01lb01", "generic-vnf-type": "azure-vdns-service/azure-vdns-vsp 0" }, "vnf-assignments": { "availability-zones": [], "vnf-networks": [], "vnf-vms": [] }, "vnf-parameters": [{ "vnf-parameter-name": "vlb_image_name", "vnf-parameter-value": "ubuntu16-ecomp.qcow2" }, { "vnf-parameter-name": "vlb_flavor_name", "vnf-parameter-value": "m1.medium" }, { "vnf-parameter-name": "vlb_private_net_id", "vnf-parameter-value": "vlb_vdns_vsubnet" }, { "vnf-parameter-name": "pktgen_private_net_id", "vnf-parameter-value": "vpg_vlb_vsubnet" }, { "vnf-parameter-name": "onap_private_subnet_id", "vnf-parameter-value": "public_vsubnet" }, { "vnf-parameter-name": "vlb_private_net_cidr", "vnf-parameter-value": "172.23.10.0/24" }, { "vnf-parameter-name": "pktgen_private_net_cidr", "vnf-parameter-value": "172.23.9.0/24" }, { "vnf-parameter-name": "onap_private_net_cidr", "vnf-parameter-value": "172.23.8.0/24" }, { "vnf-parameter-name": "vlb_private_ip_0", "vnf-parameter-value": "172.23.10.111" }, { "vnf-parameter-name": "vlb_private_ip_1", "vnf-parameter-value": "172.23.8.1" }, { "vnf-parameter-name": "vlb_private_ip_2", "vnf-parameter-value": "172.23.9.111" }, { "vnf-parameter-name": "vdns_private_ip_0", "vnf-parameter-value": "172.23.10.211" }, { "vnf-parameter-name": "vdns_private_ip_1", "vnf-parameter-value": "172.23.8.3" }, { "vnf-parameter-name": "vpg_private_ip_0", "vnf-parameter-value": "172.23.9.110" }, { "vnf-parameter-name": "vpg_private_ip_1", "vnf-parameter-value": "172.23.8.2" }, { "vnf-parameter-name": "vlb_name_0", "vnf-parameter-value": "zdfw1lb01lb01" }, { "vnf-parameter-name": "vdns_name_0", "vnf-parameter-value": "zdfw1lb01dns01" }, { "vnf-parameter-name": "vpg_name_0", "vnf-parameter-value": "zdfw1lb01pg01" }, { "vnf-parameter-name": "dcae_collector_ip", "vnf-parameter-value": "{{sdnc_ip}}" }, { "vnf-parameter-name": "dcae_collector_port", "vnf-parameter-value": "30235" }, { "vnf-parameter-name": "repo_url_blob", "vnf-parameter-value": "https://raw.githubusercontent.com/onapdemo/onap-scripts/beijing/usecases" }, { "vnf-parameter-name": "repo_url_artifacts", "vnf-parameter-value": "https://nexus.onap.org/content/groups/public" }, { "vnf-parameter-name": "demo_artifacts_version", "vnf-parameter-value": "1.1.1" }, { "vnf-parameter-name": "install_script_version", "vnf-parameter-value": "1.1.1" }, { "vnf-parameter-name": "pub_key", "vnf-parameter-value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+nbU5EGLqxaArpZYl5zzLCZaJf+U8ycmUNNHabgIBpngdv77cCVE7lT8ajs/Y6O4amUgAIXKPWcaYolhcV9IfLFY3Wt8LcKd97NSAaq5wlTFinsofC9L65MTqgK7vVQ6gvRWrekmHjeCgsfi20gQWmMKOXJhD+Mz4S0v9JHsWinY6xrxgzabFlDE0giasxFXQzBbmWtZwn9443NrpNkKA2phKjXQM6v7Pi9Th6gOUMPSVo8sxfYJ1WUkLI7Qxrcb+mfPQkHAJpTvxIot+cHdDY61l2QuIDbV4FFO4Cn3P3mFrrBnu99h1fxa8klmPDv7APcpbZoo/O7CyapQt78Jn" }, { "vnf-parameter-name": "cloud_env", "vnf-parameter-value": "azure" } ] }, "request-information": { "request-id": "robot19", "order-version": "1", "notification-url": "openecomp.org", "order-number": "1", "request-action": "PreloadVNFRequest" }, "sdnc-request-header": { "svc-request-id": "robot19", "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify", "svc-action": "reserve" } } }
Click on Add VF module.The vf-module should match the naming convention : "Vfmodule_<ANY_STRING>". This ensures the Policy to create the vf-module name for the scaling by replacing "Vfmodule_" to "vDNS_"
Enter the details and submit the request. This will instantiate the PG(Packet Generator), LB(Load Balancer) and DNS VMs on Azure
Testing vDNS Instantiation
SSH to PG VM.
ssh ubuntu@vpgtestapp.eastus.cloudapp.azure.com
Password: Qwertyuiop@@1
Execute the command: nslookup host1.dnsdemo.onap.org 172.23.9.111
sudo tcpdump -i eth1
ClosedLoop Execution
The closed loop flow in case vDNS spawn a new DNS server based on the event trigger generated by DCAE.
Steps to create ClosedLoop
Push policies
First go through below link and validate the health of the policy pods.
https://lf-onap.atlassian.net/wiki/display/DW/Policy+on+OOM
Then do these steps
Go to pap container
Go to /tmp/policy-install/config/
execute command "export PRELOAD_POLICIES=true"
execute push-policies.sh (./push-policies.sh)
Preload vDNS scaling data in SDNC. As mentioned in earlier section, the vnf-name should prepend with "vDNS_"
DNS scaling Preload request body
{ "input": { "vnf-topology-information": { "vnf-topology-identifier": { "service-type": "{{vdns_vnf_id}}", "vnf-name": "vDNS_vLB_BASE_140902", "vnf-type": "AzureVdnsVsp..dnsscaling..module-1", "generic-vnf-name": "zdfw1lb01lb01", "generic-vnf-type": "azure-vdns-service/azure-vdns-vsp 0" }, "vnf-assignments": { "availability-zones": [], "vnf-networks": [], "vnf-vms": [] }, "vnf-parameters": [{ "vnf-parameter-name": "vlb_image_name", "vnf-parameter-value": "ubuntu16-ecomp.qcow2" }, { "vnf-parameter-name": "vlb_flavor_name", "vnf-parameter-value": "m1.medium" }, { "vnf-parameter-name": "vlb_private_net_id", "vnf-parameter-value": "vlb_vdns_vsubnet" }, { "vnf-parameter-name": "onap_private_subnet_id", "vnf-parameter-value": "public_vsubnet" }, { "vnf-parameter-name": "vlb_private_net_cidr", "vnf-parameter-value": "172.23.10.0/24" }, { "vnf-parameter-name": "onap_private_net_cidr", "vnf-parameter-value": "172.23.8.0/24" }, { "vnf-parameter-name": "vlb_private_ip_0", "vnf-parameter-value": "172.23.10.111" }, { "vnf-parameter-name": "vlb_private_ip_1", "vnf-parameter-value": "172.23.8.1" }, { "vnf-parameter-name": "vdns_private_ip_0", "vnf-parameter-value": "172.23.10.212" }, { "vnf-parameter-name": "vdns_private_ip_1", "vnf-parameter-value": "172.23.8.3" }, { "vnf-parameter-name": "vdns_name_0", "vnf-parameter-value": "zdfw1lb01dns02" }, { "vnf-parameter-name": "repo_url_blob", "vnf-parameter-value": "https://raw.githubusercontent.com/onapdemo/onap-scripts/beijing/usecases" }, { "vnf-parameter-name": "repo_url_artifacts", "vnf-parameter-value": "https://nexus.onap.org/content/groups/public" }, { "vnf-parameter-name": "demo_artifacts_version", "vnf-parameter-value": "1.1.1" }, { "vnf-parameter-name": "install_script_version", "vnf-parameter-value": "1.1.1" }, { "vnf-parameter-name": "pub_key", "vnf-parameter-value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+nbU5EGLqxaArpZYl5zzLCZaJf+U8ycmUNNHabgIBpngdv77cCVE7lT8ajs/Y6O4amUgAIXKPWcaYolhcV9IfLFY3Wt8LcKd97NSAaq5wlTFinsofC9L65MTqgK7vVQ6gvRWrekmHjeCgsfi20gQWmMKOXJhD+Mz4S0v9JHsWinY6xrxgzabFlDE0giasxFXQzBbmWtZwn9443NrpNkKA2phKjXQM6v7Pi9Th6gOUMPSVo8sxfYJ1WUkLI7Qxrcb+mfPQkHAJpTvxIot+cHdDY61l2QuIDbV4FFO4Cn3P3mFrrBnu99h1fxa8klmPDv7APcpbZoo/O7CyapQt78Jn" }, { "vnf-parameter-name": "cloud_env", "vnf-parameter-value": "azure" } ] }, "request-information": { "request-id": "robot19", "order-version": "1", "notification-url": "openecomp.org", "order-number": "1", "request-action": "PreloadVNFRequest" }, "sdnc-request-header": { "svc-request-id": "robot19", "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify", "svc-action": "reserve" } } }Heat bridge creation - In case of Openstack, heat bridge creation involves fetching the data from Openstack stack details and creating the vservers in AAI. In case of Azure, we will execute a CURL request to AAI to create vservers directly.
AAI -Add vserver bulk
PUT /aai/v11/bulkadd { "transactions": [{ "put": [{ "uri": "/cloud-infrastructure/cloud-regions/cloud-region/ATT/EastUS/tenants/tenant/56487312973496734634634/vservers/vserver/61a4361c-bced-4354-8e55-e266bf6173c0", "body": { "vserver-id": "61a4361c-bced-4354-8e55-e266bf6173c0", "vserver-name": "zdfw1lb01lb01", "vserver-name2": "zdfw1lb01lb01", "prov-status": "ACTIVE", "in-maint": false, "is-closed-loop-disabled": false, "vserver-selflink": "", "relationship-list": { "relationship": [{ "related-to": "generic-vnf", "relationship-data": [{ "relationship-key": "generic-vnf.vnf-id", "relationship-value": "{{vdns_vnf_id}}" }] }] } } }] }, { "put": [{ "uri": "/cloud-infrastructure/cloud-regions/cloud-region/ATT/EastUS/tenants/tenant/56487312973496734634634/vservers/vserver/6daff648-77ee-4bc5-bc50-df6e6c3c182b", "body": { "vserver-id": "6daff648-77ee-4bc5-bc50-df6e6c3c182b", "vserver-name": "zdfw1lb01pg01", "vserver-name2": "zdfw1lb01pg01", "prov-status": "ACTIVE", "in-maint": false, "is-closed-loop-disabled": false, "vserver-selflink": "", "relationship-list": { "relationship": [{ "related-to": "generic-vnf", "relationship-data": [{ "relationship-key": "generic-vnf.vnf-id", "relationship-value": "{{vdns_vnf_id}}" }] }] } } }] }, { "put": [{ "uri": "/cloud-infrastructure/cloud-regions/cloud-region/ATT/EastUS/tenants/tenant/56487312973496734634634/vservers/vserver/6bcd939d-cd0b-4eaa-bc46-e2ea4163276f", "body": { "vserver-id": "6bcd939d-cd0b-4eaa-bc46-e2ea4163276f", "vserver-name": "zdfw1lb01dns01", "vserver-name2": "zdfw1lb01dns01", "prov-status": "ACTIVE", "in-maint": false, "is-closed-loop-disabled": false, "vserver-selflink": "", "relationship-list": { "relationship": [{ "related-to": "generic-vnf", "relationship-data": [{ "relationship-key": "generic-vnf.vnf-id", "relationship-value": "{{vdns_vnf_id}}" }] }] } } }] } ] }Create a dummy vf-module in AAI - This ensures Policy to pick the vf-module model data and will send the same in request body to SO create Vf-Module request.
AAI - Create vf-module Dummy
PUT /aai/v11/network/generic-vnfs/generic-vnf/{{vdns_vnf_id}}/vf-modules/vf-module/dummy_{{vdns_vnf_id}} { "is-base-vf-module": false, "model-invariant-id": "972f1ca6-4b23-478d-9c6f-a6137146569f", "model-version-id": "e8bdc61d-2a89-4bc8-917c-e0e624150dcb", "vf-module-id": "dummy_{{vdns_vnf_id}}", "vf-module-name": "dummy_{{vdns_vnf_id}}" }
Running vDNS with Robot Framework
This vDNS automation handles model creation and instantiation.
Run the vDNS script as following:
Connect to the Azure VM where ONAP is deployed via SSH and execute the following commands
[root@onap-tanmay:/home/ubuntu/oom/kubernetes/robot]# cd /opt/aee/oom/kubernetes/robot/ [root@onap-tanmay:/home/ubuntu/oom/kubernetes/robot]# ./demo-k8s.sh instantiateAzureVDNS