Versions Compared

Key

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

This page describes how to get the Istanbul release version of A1-Policy functions up and running using Docker.

...

The configuration must comply to the following JSON schema. There are several publicly available tools (e.g. online) where it is possible to validate JSON objects against their schema. 
The schema is available in the gerrit repo (application_configuration_schema.json (Kohnlondon))

Code Block
languageyml
titleapplication_configuration_schema.json
linenumberstrue
collapsetrue
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "//description": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "controller": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "baseUrl": {
                  "type": "string"
                },
                "userName": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "baseUrl",
                "userName",
                "password"
              ],
              "additionalProperties": false
            }
          ]
        },
        "ric": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "baseUrl": {
                  "type": "string"
                },
                "controller": {
                  "type": "string"
                },
                "customAdapterClass": {
                  "type": "string"
                },
                "managedElementIds": {
                  "type": "array",
                  "items": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              },
              "required": [
                "name",
                "baseUrl",
                "managedElementIds"
              ],
              "additionalProperties": false
            }
          ]
        },
      },
      "streams_publishesrequired": {
 [
        "typeric": "object",
          "properties": {
            "dmaap_publisher": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "dmaap_info": {
                  "type": "object",
                  "properties": {
                    "topic_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "topic_url"
                  ]
                }
              },
              "required": [
                "type",
                "dmaap_info"
              ]
            }
          },
          "required": [
            "dmaap_publisher"
          ]
        },
        "streams_subscribes": {
          "type": "object",
          "properties": {
            "dmaap_subscriber": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "dmaap_info": {
                  "type": "object",
                  "properties": {
                    "topic_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "topic_url"
                  ]
                }
              },
              "required": [
                "type",
                "dmaap_info"
              ]
            }
          },
          "required": [
            "dmaap_subscriber"
          ]
        }
      },
      "required": [
        "ric"
 
      ],
      "additionalProperties": falsetrue
    }
  },
  "required": [
    "config"
  ]
}

For more information on configuring the A1-Policy Management Service please see Kohn London - Component configuration

Running the functions

Note: Version numbers used in this page may not be the most recent ... you should verify the latest version numbers for released pre-built components in the docker image repository (https://nexus3.onap.org), and check the version number in appropriate POM files if building manually.

ComponentRelease image and version tagStaging images and version tagManual snapshot (only available if manually built)
and version tag
A1 Policy Management Service

nexus3.onap.org:10002/onap/ccsdk-oran-a1policymanagementservice:1.5.0

nexus3.onap.org:10004/onap/ccsdk-oran-a1policymanagementservice:1.6.0-STAGING-latest

onap/ccsdk-oran-a1policymanagementservice:1.6.0-SNAPSHOT

SDNC imagenexus3.onap.org:10002/onap/sdnc-image:2.5.5nexus3.onap.org:10004/onap/sdnc-image:2.5.5-STAGING-latestonap/sdnc-image:2.5.5-SNAPSHOT

...

Download and edit the docker compose file, oam/installation/src/main/yaml/docker-compose.yaml (Kohnlondon) and keep only sdnc and maria db images. The rest of the images are not need needed for A1 Policy testing.
In addition, remove or comment out the following two entries for sdnc in the docker-compose file: '- ansible' and  '- ansible:ansiblehost'. 
(However if you want to change the SLI DG graphs or run your own SLI DG graphs, then keep the dgbuilder image. If you wish to use the DMaaP interface then keep & configure the dmaaplistener SLI DG graphs, then keep the dgbuilder image.)

Download the sdnc-basic.yml file → https://gerrit.nordix.org/plugins/gitiles/onap/sdnc/oam/+/refs/heads/master/installation/src/main/yaml/sdnc-basic.yml  (Gerrit - london) (or) sdnc-basic.yaml (wiki)

If you have built the images locally you don't need any other change, however if the images have not been built locally, versions should be modified, from latest to the version that you would like to use, for example: nexus3.onap.org:10002/onap/sdnc-image:2.5.5

 Locally built
Release image from nexus
sdnc:    
image: onap/sdnc-image:latest
sdnc:
image: nexus3.onap.org:10002/onap/sdnc-image:2.5.5

...

(There is also a file named sdnc_basic.yaml that can be used instead, it only includes maria db and sdnc so it only needs to be modified when images have not been built locally so versions need to be updated from latest to a specific version, for example nexus3.onap.org:10002/onap/sdnc-image:2.5.5. In this case when using a different docker compose file you will use docker-compose -f sdnc-basic.yml up instead of the normal docker-compose up command in the code block below)

The docker-compose files above requires several environment variables to be set according to your environment.
Sample settings for these environment variables can be found here (Kohnlondon), but first check if these values are suitable for your environment.

...

For more details about running the OSC A1 Simulator see the related OSC NONRTRIC Wiki page (Release FH) and OSC A1 Simulator Documentation (F H Release)

Run ONAP A1 Policy Management Service Docker Container

  • Run A1 Policy Management Service docker container using the command below, after the A1-Controller and simulators have been fully started.
    It may be useful to set the logging level to TRACE level, where you can verify the A1-Controller, A1-Simualtors and A1 Policy Management Service is fully up and running.

    The configuration file (application_configuration.json described above) must be mounted as a volume into the container, so absolute path and name of the file must be substituted in the following command:

    Code Block
    languagebash
    titleDocker: Run the A1 Policy Management Service
    docker run -p 8081:8081 --network=nonrtric-docker-net --name=a1policymanagmentservice --volume **<Absolute path to application_configuration.json created above>**:/opt/app/policy-agent/data/application_configuration.json nexus3.onap.org:10002/onap/ccsdk-oran-a1policymanagementservice:1.65.0

    Note: Version numbers used in this page may not be the most recent ... you should verify the latest version numbers for released pre-built components in the docker image repository (https://nexus3.onap.org)

    Code Block
    languagebash
    titleOptional: Enable TRACE level logging in A1 Policy Management Service
    collapsetrue
    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, ric2, ric3, ric4) via the A1 Controller.

  • If the a1policymanagmentservice container is configured to log at TRACE level, the following logs entries should appear indicating that connection to the configured RICs has been established successfully via A1 Controller.

...

For troubleshooting/verification purposes you can view/access the A1 Policy Management Service swagger API from url: http://localhost:8081/swagger-ui.html  
(Note: the hostname may be different depending on your environment, port 8081 is configured in the docker command above)
Note: the hostname may be different depending on your environment, port 8081 is configured in the docker command above
)

Run OSC Non-RT RIC Control Panel Docker Container

...

Code Block
languagebash
docker run -p 9090:9090 --network=nonrtric-docker-net --name=nonrtric-gateway --volume <Absolute path to application_nonrtricgateway.yaml created above>:/opt/app/nonrtric-gateway/config/application.yaml:ro nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-gateway:1.2.0

Example:

docker run -p 9090:9090 --network=nonrtric-docker-net --name=nonrtric-gateway --volume /home/infra/workspace/application-nonrtricgateway.yaml:/opt/app/nonrtric-gateway/config/application.yaml:ro nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-gateway:1.0.0

In order to run docker container for control panel use the following command: 

Code Block
languagebash
docker run -p 8080:8080 --network=nonrtric-docker-net --name=nonrtric-control-panel nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-controlpanel:2.5.10

Open NONRTRIC / A1 Policy Control Panel UI

The Control Panel UI can be accessed by pointing the web-browser to this URL: http://localhost:8080/ (or) http://<yourclusterloginip>:8080/
Note: the hostname may be different depending on your environment. The port number is defined using the docker command above.

...

For more examples of using the NONRTRIC Control panel see Kohn London - Testing end-to-end call