Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Got to msb https://{{master server ip}}:30284/iui/microservices/default.html
  • Select "Service Discover" from left panel
  • Click "Service Register" button
    • ADD the following info:
      Service Name: aai-business
      Url: /aai/v13/business
      Protocol: REST
      Enable SSL to True
      Version: v13
      Load balancer: round-robin
      Visualranfe: InSystem
    • Add host:
      AAI service ip and port (8443)
  • Save all

3. AAI Configuration

Create customer id  : 

curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H  "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k -d '{ 

"global-customer-id":"5GCustomer", 

"subscriber-name":"5GCustomer", 

"subscriber-type":"INFRA" 

}' "https://<worker-vm-ip>:30233/aai/v21/business/customers/customer/5GCustomer" 

Create service type:

curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H  "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://<worker-vm-ip>:30233/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G

4. SO

Copy subnetCapability.json to SO-API Handler pod to configure subnet capabilities at run time.

...

INSERT INTO `catalogdb`.`service_recipe`(`ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `SERVICE_PARAM_XSD`, `RECIPE_TIMEOUT`,
`SERVICE_TIMEOUT_INTERIM`, `SERVICE_MODEL_UUID`) VALUES ('createInstance', '1', 'Custom recipe to create slice\r\nservice-instance if no custom BPMN flow is found', '/mso/async/services/CreateSliceService', NULL, 180, NULL,'bfca8b32-3404-4e5c-a441-dc42b6823e88');
  
INSERT INTO `catalogdb`.`service_recipe`(`ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `SERVICE_PARAM_XSD`, `RECIPE_TIMEOUT`, `SERVICE_TIMEOUT_INTERIM`, `SERVICE_MODEL_UUID`) VALUES ('deleteInstance', '1', 'Custom recipe to create slice\r\nservice-instance if no custom BPMN flow is found', '/mso/async/services/DeleteSliceService', NULL, 180, NULL, 'bfca8b32-3404-4e5c-a441-dc42b6823e88');
  
INSERT INTO `catalogdb`.`service_recipe`(`ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `SERVICE_PARAM_XSD`, `RECIPE_TIMEOUT`, `SERVICE_TIMEOUT_INTERIM`, `SERVICE_MODEL_UUID`) VALUES ('activateInstance', '1.0', 'Gr api recipe to activate service-instance', '/mso/async/services/ActivateSliceService', NULL, 180, NULL, 'bfca8b32-3404-4e5c-a441-dc42b6823e88');

 

5. Core NF Simulator Setup

  • We need a KUD vm with kubernetes installed, please follow below link to setup a KUD VM.

           https://wiki.onap.org/display/DW/Kubernetes+Baremetal+deployment+setup+instructions/

  • Please find below script with required data to be populated in AAI, provide the tenant id of the openstack project 


    Expand
    titlepopulate-init-data-to-AAI

    #!/bin/bash 

    echo "Enter NFS Server: "
    read nfsServer

    echo "======== RUNNING AAI Data Populate ======="
    echo $nfsServer

    echo "===== Populating Customer"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v21/business/customers/customer/5GCustomer' \
    --header 'X-TransactionId: 42d3461d-074e-400e-93b1-c7ab5f48ce89' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "global-customer-id": "5GCustomer",
        "subscriber-name": "5GCustomer",
        "subscriber-type": "INFRA"
    }'

    echo "===== Populating owningEntity"


    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/business/owning-entities/owning-entity/67f2e84c-734d-4e90-a1e4-d2ffa2e75849' \
    --header 'X-TransactionId: 3656171c-3188-4a3d-b29a-284d2ba97ede' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "owning-entity-id": "67f2e84c-734d-4e90-a1e4-d2ffa2e75849",
        "owning-entity-name": "OE-5GCustomer"
    }'

    echo "===== Populating Platforms"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/business/platforms/platform/test' \
    --header 'X-TransactionId: 3c215f06-6ca5-4de4-8b75-bb06d002c922' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "platform-name": "test"
    }'

    echo "===== Populating Projects"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/business/projects/project/Project-5GCustomer' \
    --header 'X-TransactionId: 40c3addb-c661-4bd2-bf80-5160e4223776' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "project-name": "Project-5GCustomer"
    }'

    echo "====== Populating Line of Business"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/business/lines-of-business/line-of-business/LOB-5GCustomer' \
    --header 'X-TransactionId: ffed7201-15ab-41ab-8960-6db2cd16a264' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "line-of-business-name": "LOB-5GCustomer"
    }'

    echo "======== Populating Complex"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/cloud-infrastructure/complexes/complex/clli2' \
    --header 'X-TransactionId: 79ec2b55-0e1a-4a8a-904c-02d87a43fdc5' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "physical-location-id": "clli2",
        "physical-location-type": "office",
        "street1": "Dummy 1",
        "city": "Kraków",
        "postal-code": "30-000",
        "country": "Poland",
        "region": "Smaller Poland"
    }'


    echo "======== Populating Cloud Region"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner4/k8sregionfour' \
    --header 'X-TransactionId: 34cac914-d32c-4523-ac75-008db129bcc6' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-raw '{
        "cloud-owner": "k8scloudowner4",
        "cloud-region-id": "k8sregionfour",
        "cloud-type": "k8s",
        "owner-defined-type": "t1",
        "cloud-region-version": "1.0",
        "complex-name": "clli2",
        "cloud-zone": "CloudZone",
        "sriov-automation": false
    }'


    echo "======== Populating Complex Cloud Region Relationship"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner4/k8sregionfour/relationship-list/relationship' \
    --header 'X-TransactionId: 1d651697-0c65-4d21-bad5-299f95e4ddb6' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "related-to": "complex",
        "related-link": "/aai/v16/cloud-infrastructure/complexes/complex/clli2",
        "relationship-data": [
            {
                "relationship-key": "complex.physical-location-id",
                "relationship-value": "clli2"
            }
        ]
    }'

    echo "======== Populating Service"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/service-design-and-creation/services/service/5G' \
    --header 'X-TransactionId: db58cf73-f420-4f07-8cab-801474c9303c' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
            "service-description": "5GCore on K8s",
            "service-id": "5G"
    }'

    echo "======== Populating Service Subscription"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G' \
    --header 'X-TransactionId: c385a48c-cf4b-4fcd-976c-2d9cad40b19e' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
            "service-type": "5G"
    }'

    echo "======== Populating Tenant"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner4/k8sregionfour/tenants/tenant/3d5819f1542e4ef9a4ccb0bcb278ca10' \
    --header 'X-TransactionId: c229f2aa-ea0f-4057-a9dd-0144b6e0e72a' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "tenant-id": "3d5819f1542e4ef9a4ccb0bcb278ca10",
        "tenant-name": "ONAP-tm",
        "relationship-list": {
            "relationship": [
                {
                    "related-to": "service-subscription",
                    "relationship-label": "org.onap.relationships.inventory.Uses",
                    "related-link": "/aai/v16/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G",
                    "relationship-data": [
                        {
                            "relationship-key": "customer.global-customer-id",
                            "relationship-value": "5GCustomer"
                        },
                        {
                            "relationship-key": "service-subscription.service-type",
                            "relationship-value": "5G"
                        }
                    ]
                }
            ]
        }
    }'


    echo "======== Populating availability zone name"

    curl -k --location -g --request PUT 'https://'$nfsServer':30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner4/k8sregionfour/availability-zones/availability-zone/k8savz' \
    --header 'X-TransactionId: c229f2aa-ea0f-4057-a9dd-0144b6e0e72a' \
    --header 'X-FromAppId: jimmy-postman' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Basic QUFJOkFBSQ==' \
    --data-raw '{
        "availability-zone-name": "k8savz",
        "hypervisor-type": "k8s"
    }'


    echo "=========================== Finished Populating AAI Data ============="


  • After KUD setup and AAI data entries, update the connectivity Info: <port: msb-iag port>

          curl -k -i -F "metadata=<post.json;type=application/json" -F file=@/root/.kube/config -X POST https://{{k8s}}:32330/api/multicloud-k8s/v1/v1/connectivity-info

          Please find post.json below,

       

Expand
titlepost.json

        {
           "cloud-region": "k8sregionfour",
           "cloud-owner": "k8scloudowner4"
          }

  • We need to load the dictionary data using the dd.sh script,

...