See : https://onap.readthedocs.io/en/latest/guides/onap-user/cloud_site/index.html


Following is maybe obsolete...


When  a VIM/Cloud instance is used to deploy an ONAP instance, it will be registered to that ONAP instance by default. However, it is somehow tricky to add additional VIM/Cloud instance to ONAP instance with Amsterdam Release. This page is trying to share the practice to do so and the goal is to allow users deploy VNF/VF-Modules to the additional VIM/Cloud instance.

There are 3 places to store information of a VIM/Cloud instance: A&AI, SO, Robot. And it is very important to associate the VIM/Cloud instance with subscriber's service subscription, otherwise you will not able to deploy the subscriber's VNF/VF-Modules to that VIM/Cloud instance .


Prerequisite: Complex object and Subscribe object are created in the AAI

     Complex object in A&AI represent the physical location of a VIM/Cloud instance, there are one-to-many association between them, so creating the complex object is out of scope of this practice. But I would like to share the POSTMAN script to do create complex named clli2 for your reference:


Create a Complex Object
PUT /aai/v11/cloud-infrastructure/complexes/complex/clli2 HTTP/1.1
Host: <AAI_VM1_IP>:8443
X-TransactionId: 9999
X-FromAppId: jimmy-postman
Real-Time: true
Authorization: Basic QUFJOkFBSQ==
Content-Type: application/json
Accept: application/json
Cache-Control: no-cache
Postman-Token: 734b5a2e-2a89-1cd3-596d-d69904bcda0a
 
        {
            "physical-location-id": "clli2",
            "data-center-code": "example-data-center-code-val-6667",
            "complex-name": "clli2",
            "identity-url": "example-identity-url-val-28399",
            "physical-location-type": "example-physical-location-type-val-28399",
            "street1": "example-street1-val-28399",
            "street2": "example-street2-val-28399",
            "city": "example-city-val-28399",
            "state": "example-state-val-28399",
            "postal-code": "example-postal-code-val-28399",
            "country": "example-country-val-28399",
            "region": "example-region-val-28399",
            "latitude": "1111",
            "longitude": "2222",
            "elevation": "example-elevation-val-28399",
            "lata": "example-lata-val-28399"
        }


Subscriber registration and subscription to service is out of scope of this practice, a default subscriber "Demonstration" and service subscriptions are populated by Robot service. 

Here are the commands to find out subscribers and their subscriptions.

List subscribers
curl -X GET \
  https://<AAI_VM1_IP>:8443/aai/v11/business/customers \
  -H 'accept: application/json' \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: eb104518-1ce2-5fc8-a475-97890dbc36e0' \
  -H 'real-time: true' \
  -H 'x-fromappid: jimmy-postman' \
  -H 'x-transactionid: 9999'
List subscriptions of a subscriber
curl -X GET \
  'https://<AAI_VM1_IP>:8443/aai/v11/business/customers/customer/Demonstration?depth=all' \
  -H 'accept: application/json' \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 87a35cc3-5411-1f0c-3caa-21c11f83b79a' \
  -H 'real-time: true' \
  -H 'x-fromappid: jimmy-postman' \
  -H 'x-transactionid: 9999'


1, Register VIM/Cloud instance into A&AI

The VIM/Cloud instance are represented as a cloud region object in A&AI. This representation will be used by VID,APPC, VFC, DCAEgen2, MultiCloud,etc.


Assuming you have a OpenStack ocata instance with Region ID is RegionTwo, Registering it into A&AI basically refers to following actions:


  • Action 1: create a cloud region object

There are at least 2 approaches to create a cloud region object: Post curl commands to A&AI directly, or utilize ESR VIM registration portal.


Approach 1: curl commands to A&AI

e.g. Create a OpenStack Ocata instance as a cloud region identified by "CloudOwner/RegionTwo" into AAI,

Create a Cloud Region Object
curl -X PUT \
  'https://<AAI_VM1_IP>:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionTwo' \
  -H 'accept: application/json' \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: f7c57ec5-ac01-7672-2014-d8dfad883cea' \
  -H 'real-time: true' \
  -H 'x-fromappid: jimmy-postman' \
  -H 'x-transactionid: 9999' \
  -d '{
    "cloud-owner": "CloudOwner",
    "cloud-region-id": "RegionTwo",
    "cloud-type": "openstack",
    "owner-defined-type": "t1",
    "cloud-region-version": "ocata",
    "cloud-zone": "z1",
    "complex-name": "clli2",
    "identity-url": "<keystone auth url, e.g. http://10.12.25.2:5000/v3> or <multicloud plugin service auth url, e.g. http://10.0.14.1/api/multicloud-ocata/v0/CloudOwner_RegionTwo/identity/v2.0>"
    "sriov-automation": false,
    "cloud-extra-info": "",
    "tenants": {
        "tenant": [
            {
                "tenant-id": "48271fcc571449959d7d881a72f4ba10",
                "tenant-name": "onap-01"
            }
        ]
    },
	"esr-system-info-list": 
	{        
		"esr-system-info": 
		[
            {
                "esr-system-info-id": "<uuid, e.g. 432ac032-e996-41f2-84ed-9c7a1766eb29>",
                "service-url": "keystone auth url, e.g. http://10.12.25.2:5000/v3",
                "user-name": "<your username>",
                "password": "<your password>",
                "system-type": "VIM",
                "ssl-cacert": "",
                "ssl-insecure": true,
                "cloud-domain": "<openstack domain name,e.g. Default>",
                "default-tenant": "onap-01"
            }
        ]
    }
}'


Approach 2: utilize ESR VIM registration portal

open the portal by url:  http://<multi-service VM IP>/iui/aai-esr-gui/extsys/vim/vimView.html

Click the "register button", the registration portal will show up.



Caveat: approach 2 which utilizes ESR VIM register portal will trigger MultiCloud to discover resources of VIM/Cloud instance and populate them into AAI. Right now with Amsterdam Release, it supports OpenStack ocata, Wind River Titanium Cloud, and VMware VIO.  More options will be available in future releases.


  • Action 2: associate this cloud region object with a complex object

This association will be important for ONAP Beijing Release when OOF needs to find out the location approximity of different cloud regions.


Associate cloud region with complex "clli2"
curl -X PUT \
  https://<AAI_VM1_IP>:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionTwo/relationship-list/relationship \
  -H 'accept: application/json' \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: e68fd260-5cac-0570-9b48-c69c512b034f' \
  -H 'real-time: true' \
  -H 'x-fromappid: jimmy-postman' \
  -H 'x-transactionid: 9999' \
  -d '{
{
"related-to": "complex",
"related-link": "/aai/v11/cloud-infrastructure/complexes/complex/clli2",
"relationship-data": [
{
	"relationship-key": "complex.physical-location-id",
	"relationship-value": "clli2"
}
]
}'



  • Action 3: associate this cloud region object with a subscriber's service subscription

With this association,  this cloud region will be populated into list of selection for deploying VNF/VF-Modules from VID.


e.g. associate the cloud region "CloudOwner/RegionTwo" with subscriber "Demonstration" which subscribe to service "vFWCL"

Associate cloud region with a subscriber's subscription
curl -X PUT \
  https://<AAI_VM1_IP>:8443/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL/relationship-list/relationship \
  -H 'accept: application/json' \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 4e6e55b9-4d84-6429-67c4-8c96144d1c52' \
  -H 'real-time: true' \
  -H 'x-fromappid: jimmy-postman' \
  -H 'x-transactionid: 9999' \
  -d '{
	"related-to": "tenant",
	"related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionTwo/tenants/tenant/48271fcc571449959d7d881a72f4ba10",
	"relationship-data": [
		{
			"relationship-key": "cloud-region.cloud-owner",
			"relationship-value": "CloudOwner"
		},
		{
			"relationship-key": "cloud-region.cloud-region-id",
			"relationship-value": "RegionTwo"
		},
		{
			"relationship-key": "tenant.tenant-id",
			"relationship-value": "48271fcc571449959d7d881a72f4ba10"
		}
	],
	"related-to-property": [
		{
			"property-key": "tenant.tenant-name",
			"property-value": "onap-01"
		}
	]
}
'


2, Register VIM/Cloud instance into SO

SO does not utilize the cloud region representation in A&AI. It stores information of the VIM/Cloud instances inside of the container as configuration file. So to add a VIM/Cloud instance to SO, you need attach to the SO service container and then update the configuration file "/etc/mso/config.d/cloud_config.json" accordingly.

Below is the template for adding a new cloud site and the associate identity service.

Add the VIM/Cloud info by updating cloud_sites
ubuntu@vm0-so:~$ sudo docker exec -it testlab_mso_1 bash
root@mso:/# apt-get install vim
root@mso:/# vi /etc/mso/config.d/cloud_config.json


{
  "cloud_config":
  {
    "identity_services":
    {
        "DEFAULT_KEYSTONE":
        {
          "identity_url": "http://10.12.25.2:5000/v2.0",
          "mso_id": "demonstrable",
          "mso_pass": "9f0933d3664e07961856781c9add38bc",
          "admin_tenant": "service",
          "member_role": "admin",
          "tenant_metadata": true,
          "identity_server_type": "KEYSTONE",
          "identity_authentication_type": "USERNAME_PASSWORD"
        },
        "DEFAULT_KEYSTONE2":
        {
          "identity_url": "<keystone auth url, support only keystone API v2.0>",
          "mso_id": "<username>",
          "mso_pass": "<encrypted password by http://<MSO VM IP>:8080/networks/rest/cloud/encryptPassword/<password> >",
          "admin_tenant": "service",
          "member_role": "admin",
          "tenant_metadata": true,
          "identity_server_type": "KEYSTONE",
          "identity_authentication_type": "USERNAME_PASSWORD"
        }
    },
    "cloud_sites":
    {
        "RegionOne":
        {
          "region_id": "RegionOne",
          "clli": "RegionOne",
          "aic_version": "2.5",
          "identity_service_id": "DEFAULT_KEYSTONE"
        },
        "<cloud_site name, must align to cloud-region-id in AAI>":
        {
          "region_id": "cloud_site name, must align to cloud-region-id in AAI",
          "clli": "cloud_site name, must align to cloud-region-id in AAI",
          "aic_version": "2.5",
          "identity_service_id": "DEFAULT_KEYSTONE2"
        }
    }
  }
}




## check the new config:

http://<so-vm-ip>:8080/networks/rest/cloud/showConfig


3, Change Robot service to operate with the VIM/Cloud instance

By default the Robot service supports the pre-populated cloud region of which the cloud-owner is "CloudOwner" and cloud-region-id is specified via the parameters "openstack_region" for deploying this ONAP instance. All cloud region information can be found at "/share/config/vm_properties.py" .

Robot service supports the hacking operations to populate subscribers, service models, and preload VNF data, bridge heat instance into AAI, as well as APPC mount. Most of operation are tightly coupled with the default cloud region. So if you would like to perform such hacking operations with additional cloud region, you'd better to launch another robot VM with corresponding cloud region parameters in order to get expected results.


Please refer to the template additional_robot.zip to create additional robot for new cloud region

Hint: Take care of following parameters which should reflect the new cloud region information, while others reflect the cloud region where ONAP runs

parameters reflecting info of new cloud region
  openstack_tenant_id: PUT YOUR OPENSTACK PROJECT ID HERE

  openstack_username: PUT YOUR OPENSTACK USERNAME HERE

  openstack_api_key: PUT YOUR OPENSTACK PASSWORD HERE

  openstack_region: PUT YOUR OPENSTACK Region ID HERE, e.g. RegionOne

  keystone_url: PUT THE KEYSTONE URL HERE (do not include version number)

  cloud_env: openstack


Launch robot VM by heat template:

Launch additional robot VM for new cloud region
openstack stack create -t additional_robot_vm.yaml -e additional_robot_vm.env onap.robot.1


To verify if the new robot service works well, you could check the ONAP service health from the new robot VM.

Verify the health of new Robot VM
*** ssh to Robot VM and perform following command, it is expected the same output as you can get from the original Robot VM***


sudo docker exec -it openecompete_container /var/opt/OpenECOMP_ETE/runTags.sh -i health h -d ./html -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py -V /share/config/vm_properties.py

  • No labels

28 Comments

  1. Hello Bin Yang,

                            I am facing some issues in creating the complex object. It would be helpful if you provide some example for the same. 

    Thanks, 

    dhebeha

    1. There is a complex object created by robot vm, name and id: clli1

      1. Thanks. It worked, Can you tell what is esr-system-info id ?

        1. it is just uuid to differentiate one esr entry from another one. It is generated automatically by ESR portal, so anyone wants to register cloud region with curl command need to generate it and make sure it is unique.

  2. Can I use the same cloud instance on which ONAP is installed to deploy/instantiate VNFs?  In other words, is it mandatory to add another cloud instance to deploy/instantiate VNFs?


    1. Q: "Can I use the same cloud instance on which ONAP is installed to deploy/instantiate VNFs?"

      A:  Yes, it is exactly how use cases works: ONAP and VNF are deployed to the same cloud instance.

  3. Hi Bin,

    i deployed ONAP on AWS cloud instance and want instantiate VNFs on openstack which is deployed on another AWS EC2 instance. i am trying to run vFWCL usecase and facing some issues to instantiate VNFs. issue is with network configuration i am doing in firewall template could you please help me to setting up correct values for template as seem template is based on openstack ONAP deployment. 

    Thanks,

    Vijendra


  4. Hi,

    I am performing the steps to add a new vim and i am facing a problem after updating the /etc/mso/config.d/cloud_config.json file.

    In fact, when i check the new config (http://<so-vm-ip>:8080/networks/rest/cloud/showConfig), nothing changed and when verifying the cloud_config.json file, i did not find my updates.

    I restarted the mso docker but the problem persists.

    Do you have any idea about the problem ?

    Thanks,

    Badr Eddine

    1. Not sure what is the deployment approach for your case, assuming it is HEAT based ONAP deployment, then this might help:

      login to SO VM, edit "mso-po-adapter-config" part of the config file "/opt/test_lab/volumes/mso/chef-config/mso-docker.json":

       $vi /opt/test_lab/volumes/mso/chef-config/mso-docker.json


      Restart SO container:

      $sudo docker restart testlab_mso_1


  5. Thanks Bin,

    I added the new region, but i am now wondering where to deploy the new robot. Is it recommended to deploy it in the same tenant as the onap instance or in the newly added tenant ? What changes when running the vFW CloseLoop and vCPE use-cases?

    All may onap components have floating ips.


    Thanks,

    1. I would suggest you deploy the new robot to the same tenant as the one where onap instance is deployed. The reason is that the robot script might access to the private network of onap instance.
      I don't understand the question about " changes when running vFW CL and vCPE"

  6. Hi Bin Yang

    I saw the onap VoLTE demo on youtube. Is the customer you create here (in AAI) same as the one you select from the drop box in the UUI in the demo?


    1. Hi Ramya,

      I do not know about the drop box in UUI, but I believe that one should be the same one I created here in AAI.

      Please also raise this question to Yan Yang, the PTL of VFC project. Thanks

  7. Hi Bin Yang,

    nice setup. Although I'm struggling to find ESR GUI in OOM Deployment. Any ideas?


    Regards

    1. cannot access to esr gui in oom deployment, either.

      when i try to access ESR GUI, i got 502 bad gateway. http://10.190.59.95:30281/iui/aai-esr-gui/extsys/vnfm/vnfmView.html

      10.190.59.95 is the k8s-node ip,and the 30281 is the service nodeport

        1. i have not change the msb chart in oom, but it seems we have diff port configuration. when i change port from 30281 to 30280, it's ok.

          http://10.190.59.95:30280/iui/aai-esr-gui/extsys/vnfm/vnfmView.html

  8. Hi, I am getting following error while trying to create complex object via Postman:

    {
    "requestError": {
    "serviceException": {
    "messageId": "SVC3002",
    "text": "Error writing output performing %1 on %2 (msg=%3) (ec=%4)",
    "variables": [
    "PUT",
    "cloud-infrastructure/complexes/complex/clli2",
    "Internal Error:java.lang.NullPointerException",
    "ERR.5.4.4000"
    ]
    }

    1. For those following along, this is raised as  AAI-1928 - Getting issue details... STATUS

      Problem identified as typo in the data shown in this wiki page.

  9. Hi,

    I am trying  to register the cloud using esr, and I could able to see the cloud registered information's in AAI.

    As per the document  OANP_MultiCloud_openstack_proxy_design.docx in Multi VIM/Cloud Documents, after registering the cloud, I am not seeing the "identity url" populated in the cloud store in AAI.

    Is there any logical registration should happen apart from the above mentioned step , to have that "identity url"

    1. The ESR will invoke MultiCloud to update the AAI cloud region object by populating the identity URL property. If there is none such property updated, there must be something wrong with either ESR or MultiCloud. You need check with MultiCloud broker/plugin logs for confirmation

  10. Venkata Harish Kajur  Keong Lim  PFB screenshots for AAI pods, all pods r running fine but still i am getting '502 Bad Gateway' while trying to create complex object from POSTMAN:


    Please let me know how to solve it without re-creating Rancher-Kubernetes cluster.

    I am using R2 release (Beijing) and as of now i do not want to update it to Casablanca.

    1. Suryansh Pratap  what is the URL and port number that you are using for your call?

      From the error response, I think you are calling through the MSB service rather than directly to AAI service. The parameters in the HTTP headers is different for each service.


  11. HI Bin Yang


    I am registering multicloud VIM setup with ONAP (R3 Latest code).


     I am stuck at credentials when using below link for login:

    http://<so-vm-ip>:8080/networks/rest/cloud/showConfig

    It is asking for credentials but which credentials  to use and from where I can get these login credentials?


    At same page there is process of modifying: /etc/mso/config.d/cloud_config.json

    Where I will get this "cloud_config.json" file or at which container should I login for same?

    Since in my setup /etc/mso/ path does not exist ? 

    Is the above doc is compatible with Casablanca release? If not, could you please share the updated relevant doc link for Casablanca release.


    1. Hi Abhay Narayan Katare I believe you are doing such operations with OOM deployed ONAP which I have no experience to share. You may drop a question to onap-discuss mail list for seeking help. Good luck