Versions Compared

Key

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

...

All four components of the Non-RT RIC run inside as docker containers and communicate via a private docker network. Details of the architecture can be found from Guilin Release page.

...

  • Copy the file oran/a1-policy-management/config/application_configuration.json  to the current directory and update it with the configuration below.

  • The controller hostname and port values come from and must match those defined in in the sdnc/oam repo oam/installation/src/main/yaml/docker-compose.yml (see the step "Build A1 Controller" further below). The port for http is 8181.

  • Any defined ric host names (in the name and baseUrl for each ric) must match the given docker container names in Near-RT RIC A1 simulator startup described further down - port is always the simulator's internal port 8085 for http or 8185 for https (see the step "Build A1 Controller" further below).


Code Block
languageyml
titleapplication_configuration.json
{
  "config": {
    "//description": "Application configuration",
    "controller": [
      {
        "name": "controller1",
        "baseUrl": "http://sdnc_controller_container:8181",
        "userName": "admin",
        "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
      }
    ],
    "ric": [
      {
        "name": "ric1",
        "baseUrl": "http://ric1:8085/",
        "controller": "controller",
        "managedElementIds": [
          "kista_1",
          "kista_2"
        ]
      },
      {
        "name": "ric2",
        "baseUrl": "http://ric2:8085/",
        "controller": "controller",
        "managedElementIds": [
          "kista_3",
          "kista_4"
        ]
      }
    ]
  }
}

...

A1 Policy Adapter is a feature developed within CCSDK which is then installed in SDNC Karaf Server. To build & run the A1 AdapterController, you need to build the ccsdk & sdnc repo's.

The A1 Policy Controller provides a Northbound Interface for A1 operations to do policy management in Near-RealTime RICs.

...

If the builds are successful, images with following name and tag shall be exist, use the command 'docker images' to view the newly built the image images in the local docker registry.

...

To view the A1 policy operations, you need to run the SDNC docker image. This image has few other docker image dependency dependencies but not all are important for A1 policy testing. To bring up the sdnc container for A1 Policy Management testing you can do below change to a number of the not needed services can be removed from the docker compose file.

Edit the docker compose file, oam/installation/src/main/yaml/docker-compose.yaml and keep only sdnc, maria db and ansible images. Rest The rest of the images are not necessary for A1 Policy testing. However if you want to change the DG and run your own DG, you may need to keep the Directed Graph image.

...

  • Start docker containers for each ric defined in oran/a1-policy-management/config/application_configuration.jsonin previous steps json in the step for "Configuration Policy Management Service" (in this example for ric1 and ric2) and providing A1 interface version OSC_2.1.0 with the following commands (use separate shells):

    Code Block
    languagebash
    $ docker run -p 8085:8085 -p 8185:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric1 nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
    $ docker run -p 8086:8085 -p 8186:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric2 nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0


  • Create a policy type json to load into the A1 simulators

    Code Block
    languagebash
    titlept1.json
    {
      "name": "pt1",
      "description": "pt1 policy type",
      "policy_type_id": 1,
      "create_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "OSC_Type1_1.0.0",
        "description": "Type 1 policy type",
        "type": "object",
        "properties": {
          "scope": {
            "type": "object",
            "properties": {
              "ueId": {
                "type": "string"
              },
              "qosId": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "ueId",
              "qosId"
            ]
          },
          "qosObjectives": {
            "type": "object",
            "properties": {
              "priorityLevel": {
                "type": "number"
              }
            },
            "additionalProperties": false,
            "required": [
              "priorityLevel"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "scope", "qosObjectives"
        ]
      }
    }


  • Put the example policy type into the started A1 simulator instances by running these curl commands (in this example to ric1 exposed to port 8085 and ric2 exposed to port 8086):

    Code Block
    languagebash
    $ curl -X PUT -v "http://localhost:8085/a1-p/policytypes/1" -H "accept: application/json" \
     -H "Content-Type: application/json" --data-binary @pt1.json
    $ curl -X PUT -v "http://localhost:8086/a1-p/policytypes/1" -H "accept: application/json" \
     -H "Content-Type: application/json" --data-binary @pt1.json


...

  • Run docker container using this command once the A1 Controller and simulators have been fully started and optionally set the logging level to trace (the curl command will not work until the container is fully up and running).
    The configuration, application_configuration.json,  of the controller and rics must be mounted as a volume to the container.

    Code Block
    languagebash
    $ docker run -p 8081:8081 --network=nonrtric-docker-net --name=policy-agent-container --volume <Absolute path to application_configuration.json created above>:/opt/app/policy-agent/data/application_configuration.json onap/ccsdk-oran-a1policymanagementservice:1.0.2-SNAPSHOT


    Code Block
    languagebash
    $ curl -X POST  http://localhost:8081/actuator/loggers/org.onap.ccsdk.oran.a1policymanagementservice -H "Content-Type:application/json" -d {\"configuredLevel\":\"trace\"}


  • Once the Policy Management Service is up and running, it establishes connections to all configured Near-RT RICs (ric1 and ric2) via the A1 Controller.

  • If the policy-agent-container is configured to log at DEBUG trace level, the following logs entries should appear to log to show indicating that connection to the configured RICs has been established successfully via A1 Controller.

...

Open NONRTRIC / A1 Policy Control Panel UI

Dashboard The Control Panel UI can be accessed by pointing the web-browser to this URL: 

http://localhost:8080/

Thee policy type loaded in the simulator should be visible in the table. Instances of the policy type can now be created, updated and deleted.