diff options
author | VENKATESH KUMAR <vv770d@att.com> | 2020-04-29 18:53:53 -0400 |
---|---|---|
committer | VENKATESH KUMAR <vv770d@att.com> | 2020-05-05 18:24:22 -0400 |
commit | 64559741f071b37556b7745ffa2cdcc25f40af94 (patch) | |
tree | 3a397957c3d6a3d9073d8945097068556aee6eed /docs/sections/design-components | |
parent | b9245647657dfcde55315667c911130155b9dc1e (diff) |
dcae design doc updates
Change-Id: I7145f840d9a7de34bb6a615fe992ba22e1ff0380
Signed-off-by: VENKATESH KUMAR <vv770d@att.com>
Issue-ID: DCAEGEN2-2024
Issue-ID: DCAEGEN2-1865
Signed-off-by: VENKATESH KUMAR <vv770d@att.com>
Diffstat (limited to 'docs/sections/design-components')
51 files changed, 7444 insertions, 0 deletions
diff --git a/docs/sections/design-components/DCAE-MOD/DCAE-MOD-Architecture.rst b/docs/sections/design-components/DCAE-MOD/DCAE-MOD-Architecture.rst new file mode 100644 index 00000000..64bd4dc2 --- /dev/null +++ b/docs/sections/design-components/DCAE-MOD/DCAE-MOD-Architecture.rst @@ -0,0 +1,178 @@ +===================== +DCAE MOD Architecture +===================== + + +DCAE MOD is composed of a mix of components developed in ONAP and other +components taken from the Apache Nifi project and modified for +appropriate use. The MOD architecture and design was intended to simplify the onboarding +and design experience in ONAP addressing below goals. + +.. toctree:: + :maxdepth: 1 + + ./DCAE-MOD-goals.rst + + +MOD aims to streamline the construction, management, +and evolution of DCAE flows from role to role, from environment to +environment, and from release to release. MOD is composed of three functional areas: onboarding, design, and +distribution and caters to different `user group <./Roles>`__ + + +The below illustrations describe the architecture of DCAE-MOD and show the +usage flow in DCAE MOD + +|image0| + +|image1| + +Onboarding API +-------------- + +It is a component developed to onboard +models/components/microservices (spec files) into DCAE MOD. + +Genprocessor +------------ + +It has been developed in Java. This project is a tool to +experiment with generating a Nifi Processor POJO from a DCAE component +spec. + +Nifi Web UI +----------- + +It is a component taken from the Apache Nifi Project but modified for +use in the MOD project. + +Apache NiFi is a dataflow system based on the concepts of flow-based +programming. It supports powerful and scalable directed graphs of data +routing, transformation, and system mediation logic. NiFi has a +web-based user interface for design, control, feedback, and monitoring +of dataflows. It is highly configurable along several dimensions of +quality of service, such as loss-tolerant versus guaranteed delivery, +low latency versus high throughput, and priority-based queuing. NiFi +provides fine-grained data provenance for all data received, forked, +joined cloned, modified, sent, and ultimately dropped upon reaching its +configured end-state. + +The NiFi UI provides mechanisms for creating automated dataflows, as +well as visualizing, editing, monitoring, and administering those +dataflows. The UI can be broken down into several segments, each +responsible for different functionality of the application. This section +provides screenshots of the application and highlights the different +segments of the UI. Each segment is discussed in further detail later in +the document. + +The users of Apache Nifi will find that it is used very differently than +intended to serve our purpose in the DCAE-MOD project. + + +Registry API +------------ + +This component taken from the Apache Nifi project, is a REST API that +provides an interface to a registry with operations for saving, +versioning, reading NiFi flows and components. + +Distributor API +--------------- + +It is a component developed using the Flask framework in Python. +It is a HTTP API to manage distribution targets for DCAE design. +Distribution targets are DCAE runtime environments that have been +registered and are enabled to accept flow design changes that are to be +orchestrated in that environment. + +Flow Based Programming (FBP) +---------------------------- + +NiFi’s fundamental design concepts closely relate to the main ideas of +Flow Based +Programming `[fbp] <https://nifi.apache.org/docs/nifi-docs/html/overview.html#fbp>`__. + +For more information on how some of the main NiFi concepts map to FBP, +check out https://nifi.apache.org/docs/nifi-docs/html/overview.html + +Runtime API +----------- + +It is developed in Java’s Spring Boot framework. It +is a HTTP API to support runtime environment for DCAE-MOD. It has two +major functionalities: + +1. It accepts changes on the flow-graph via fbp protocol + +2. It generates and distributes blueprints based on the change made on + the flow-graph + +Blueprint Generator +------------------- + +This tool allows the user to create a blueprint from a component spec json file. +This tool is used by the runtime api. + +Inventory API +------------- + +DCAE Inventory is a web +service that provides the following: + +1. Real-time data on all DCAE services and their components + +2. Comprehensive details on available DCAE service types + +DCAE Inventory is a composite API that relies on other APIs to obtain +resources on underlying components and uses these resources to compose a +DCAE service resource. In addition, DCAE Inventory will store data that +is unique to the DCAE service level including: + +1. DCAE service metadata + +2. DCAE service type description and composition details + +3. Relationships between DCAE service and DCAE service types and their + respective VNF and VNF types + +DCAE Inventory has a REST interface to service client requests. It has a +well-defined query interface that would filter result sets based upon +resource attributes. + +Here, think of it as a back end API for the DCAE dashboard. The runtime +posts Cloudify Blueprints to this API so they show up in the DCAE +dashboard. + +DCAE Dashboard +-------------- + +The DCAE dashboard provides visibility into running DCAE services for +operational purposes. It queries the DCAE Inventory for aggregate +details on all the running DCAE services and for getting up-to-date +status information on DCAE services and their components. + +End-to-End Flow +--------------- + +A model/component/microservice can be onboarded by a ms Developer by +posting a spec file on the onboarding API. Alternatively, an Acumos +model can be onboarded using the Acumos Adapter. Once successfully +onboarded, the genprocessor converts converts them to jars and onboards +them into Nifi i.e DCAE MOD. These artifacts are now available to use +from the Modified Nifi Web UI i.e DCAE Designer. + +The registry api offers version control and retrieval for flows. The +distributor api can be used to set distribution targets. Once a flow is +designed and distributed, it goes to the distributor api which is +supposed to post graph changes (in accordance with fbp) to the runtime +api. The runtime api generates and distributes blueprints based on the +change made on the flow-graph. These blueprints received by the DCAE +inventory can then be viewed and deployed from the DCAE dashboard. + + + +.. |image0| image:: ../images/DCAE-Mod-Architecture.png + +.. |image1| image:: ../images/Onboarding-with-DCAE-MOD.png + +.. |image2| image:: ../images/nifi-toolbar-components.png diff --git a/docs/sections/design-components/DCAE-MOD/DCAE-MOD-User-Guide.rst b/docs/sections/design-components/DCAE-MOD/DCAE-MOD-User-Guide.rst new file mode 100644 index 00000000..25bf0957 --- /dev/null +++ b/docs/sections/design-components/DCAE-MOD/DCAE-MOD-User-Guide.rst @@ -0,0 +1,443 @@ +=================== +DCAE MOD User Guide +=================== + + + +- `Types of Users and Usage + Instructions: <#DCAEMODUserGuide(draft)-TypesofUsersand>`__ + +- `1. Deployment of DCAE MOD components via Helm + charts <#DCAEMODUserGuide(draft)-1.DeploymentofD>`__ + + - `Using DCAE MOD without an Ingress + Controller <#DCAEMODUserGuide(draft)-UsingDCAEMODwit>`__ + +- `2. Configuring DCAE + mod <#DCAEMODUserGuide(draft)-2.ConfiguringDC>`__ + +- `3. Design & Distribution + Flow <#DCAEMODUserGuide(draft)-3.Design&Distri>`__ + + +Types of Users and Usage Instructions: +====================================== + ++-------+-----------------------------+-----------------------------+ +| Sr.No | User | Usage Instructions | ++=======+=============================+=============================+ +| 1. | Developers who are looking | - Access the Nifi | +| | to onboard their mS | Web UI url provided to you | +| | | | +| | | - Follow steps 2.c | +| | | to 2.f | +| | | | +| | | - You should be able | +| | | to see your microservices | +| | | in the Nifi Web UI by | +| | | clicking and dragging | +| | | ‘Processor’ on the canvas, | +| | | and searching for the name | +| | | of the | +| | | micros | +| | | ervice/component/processor. | ++-------+-----------------------------+-----------------------------+ +| 2. | Designers who are building | - Access the Nifi | +| | the flows through UI and | Web UI url provided to you | +| | triggering distribution | | +| | | - Follow steps 3 to | +| | | the end of the document | ++-------+-----------------------------+-----------------------------+ +| 3. | Infrastructure/ Admins who | - Follow start to | +| | want to stand up DCAE Mod | the end | +| | and validate it | | ++-------+-----------------------------+-----------------------------+ + + +1. Deployment of DCAE MOD components via Helm charts +======================================================= + +The DCAE MOD components are deployed using the standard ONAP OOM +deployment process. When deploying ONAP using the helm deploy command, +DCAE MOD components are deployed when the dcaemod.enabled flag is set to +true, either via a --set option on the command line or by an entry in an +overrides file. In this respect, DCAE MOD is no different from any +other ONAP subsystem. + +The default DCAE MOD deployment relies on an nginx ingress controller +being available in the Kubernetes cluster where DCAE MOD is being +deployed. The Rancher RKE installation process sets up a suitable +ingress controller. In order to enable the use of the ingress +controller, it is necessary to override the OOM default global settings +for ingress configuration. Specifically, the installation needs to set +the following configuration in an override file:: + + global: + ingress: + enabled: true + virtualhost: + enabled: false + +When DCAE MOD is deployed with an ingress controller, several endpoints +are exposed outside the cluster at the ingress controller's external IP +address and port. (In the case of a Rancher RKE installation, there is +an ingress controller on every worker node, listening at the the +standard HTTP port (80).) These exposed endpoints are needed by users +using machines outside the Kubernetes cluster. + ++--------------+--------------------------------------------------+--------------------------+ +| **Endpoint** | ** Routes to (cluster | **Description** | +| | internal address)** | | ++==============+==================================================+==========================+ +| /nifi | http://dcaemod-designtool:8080/nifi | Design tool Web UI | +| | | | ++--------------+--------------------------------------------------+--------------------------+ +| /nifi-api | http://dcaemod-designtool:8080/nifi-api | Design tool API | +| | | | ++--------------+--------------------------------------------------+--------------------------+ +| /nifi-jars | http://dcaemod-nifi-registry:18080/nifi-jars | Flow registry listing of | +| | | JAR files built from | +| | | component specs | ++--------------+--------------------------------------------------+--------------------------+ +| /onboarding | http://dcaemod-onboarding-api:8080/onboarding | Onboarding API | +| | | | ++--------------+--------------------------------------------------+--------------------------+ +| /distributor | http://dcaemod-distributor-api:8080/distributor | Distributor API | +| | | | ++--------------+--------------------------------------------------+--------------------------+ + +| To access the design Web UI, for example, a user would use the URL : + http://*ingress_controller_address:ingress_controller_port*/nifi. +| *ingress_controller_address* is the the IP address or DNS FQDN of the + ingress controller and +| *ingress_controller_port* is the port on which the ingress controller + is listening for HTTP requests. (If the port is 80, the HTTP default, + then there is no need to specify a port.) + +There are two additional *internal* endpoints that users need to know, +in order to configure a registry client and a distribution target in the +design tool's controller settings. + ++------------------------+--------------------------------------------+ +| **Configuration Item** | **Endpoint URL** | ++========================+============================================+ +| Registry client | http://dcaemod-nifi-registry:18080 | ++------------------------+--------------------------------------------+ +| Distribution target | http://dcaemod-runtime-api:9090 | ++------------------------+--------------------------------------------+ + +Using DCAE MOD without an Ingress Controller + + +Not currently supported + +2. Configuring DCAE mod +========================== + +**a. Configure Nifi Registry url** + +Next check Nifi settings by selecting the Hamburger button in the Nifi +UI. It should lead you to the Nifi Settings screen + +|image16| + +|image3| + +Add a registry client. The Registry client url will be +http://dcaemod-nifi-registry:18080 + +|image4| + + +**b. Add distribution target which will be the runtime api url** + +Set the distribution target in the controller settings + +|image17| + +Distribution target URL will be +`http://dcaemod-runtime-api:9090 <http://dcaemod-runtime-api:9090/>`__ + + + +Now let’s access the Nifi (DCAE designer) UI - http://<IPAddress>/nifi + +IPAddress is the host address or the DNS FQDN, if there is one, for one of the Kubernetes nodes. + +|image0| + + +**c. Get the artifacts to test and onboard.** + +Let's fetch the artifacts/ spec files + +**Sample Component DCAE-VES-Collector :** https://git.onap.org/dcaegen2/collectors/ves/tree/dpo/spec/vescollector-componentspec.json + +**Sample Data Format :** https://git.onap.org/dcaegen2/collectors/ves/tree/dpo/data-formats/VES-5.28.4-dataformat.json + +For the purpose of onboarding, a Sample Request body should be of the type -:: + + { "owner": "<some value>", "spec": <some json object> } + +where the json object inside the spec field can be a component spec json. + +Request bodies of this type will be used in the onboarding requests you make using curl or the onboarding swagger interface. + +**The prepared Sample Request body for a component dcae-ves-collector looks like +so –** + +See :download:`VES Collector Spec <./Sample-Input-Files/Request-body-of-Sample-Component.json>` + +**The prepared Sample request body for a sample data format looks like so -** + +See :download:`VES data Format <./Sample-Input-Files/Request-body-of-Sample-Data-Format.json>` + + + +**d. To onboard a data format and a component** + +Each component has a description that tells what it does. + +These requests would be of the type + +curl -X POST http://<onboardingapi host>/onboarding/dataformats -H "Content-Type: application/json" -d +@<filepath to request> + +curl -X POST http://<onboardingapi host>/onboarding/components -H "Content-Type: application/json" -d +@<filepath to request> + +In our case, + +curl -X POST http://<IPAddress>/onboarding/dataformats -H "Content-Type: application/json" -d @<filepath to request> + +curl -X POST http://<IPAddress>/onboarding/components -H "Content-Type: application/json" -d @<filepath to request> + + + + +**e. Verify the resources were created using** + +curl -X GET http://<IPAddress>/onboarding/dataformats + +curl -X GET http://<IPAddress>/onboarding/components + +**f. Verify the genprocessor (which polls onboarding periodically to convert component specs to nifi processor), converted the component** + +Open http://<IPAddress>/nifi-jars in a browser. + +These jars should now be available for you to use in the nifi UI as +processors + +|image1| + +3. Design & Distribution Flow +================================ + + +**a**. To start creating flows, we need to create a process group first. The +name of the process group will be the name of the flow. Drag and Drop on +the canvas, the ‘Processor Group’ icon from the DCAE Designer bar on the +top. + +|image2| + + +Now enter the process group by double clicking it, + +You can now drag and drop on the canvas ‘Processor’ icon from the top +DCAE Designer tab. You can search for a particular component in the +search box that appears when you attempt to drag the ‘Processor’ icon to +the canvas. + +|image5| + +If the Nifi registry linking worked, you should see the “Import” button +when you try to add a Processor or Process group to the Nifi canvas, +like so- + +|image6| + +By clicking on the import button, we can import already created saved +and version controlled flows from the Nifi registry, if they are +present. + +|image7| + +We can save created flows by version controlling them like so starting +with a 'right click' anywhere on the canvas- + +|image8| + +Ideally you would name the flow and process group the same, because +functionally they are similar. + +|image9| + +When the flow is checked in, the bar at the bottom shows a green +checkmark + +|image10| + +Note: Even if you move a component around on the canvas, and its +position on the canvas changes, it is recognized as a change, and it +will have to recommitted. + +You can add additional components in your flow and connect them. + +DcaeVesCollector connects to DockerTcagen2. + +|image11| + +|image12| + +|image13| + +Along the way you need to also provide topic names in the settings +section. These can be arbitrary names. + +|image14| + +To recap, see how DcaeVesCollector connects to DockerTcagen2. Look at +the connection relationships. Currently there is no way to validate +these relationships. Notice how it is required to name the topics by +going to Settings. + +The complete flow after joining our components looks like so + +|image15| + + +**b. Submit/ Distribute the flow:** + +Once your flow is complete and saved in the Nifi registry, you can +choose to submit it for distribution. + +|image18| + +If the flow was submitted successfully to the runtime api, you should +get a pop up a success message like so - + +|image19| + +At this step, the design was packaged and sent to Runtime api. + +The runtime is supposed to generate the blueprint out of the packaged +design/flow and push it to the DCAE inventory and the DCAE Dasboard. + +**c. Checking the components in the DCAE Dashboard** + +You should see the generated artifact/ blueprint in the DCAE Dashboard +dashboard at https://<IPAddress>:30418/ccsdk-app/login_external.htm in +our deployment. The name for each component will be appended by the flow +name followed by underscore followed by the component’s name. + +The credentials to access the DCAE Dashboard are- + +:: + +Login: su1234 + +Password: fusion + + +|image20| + +|image21| + +|image22| + +The generated Blueprint can be viewed. + +|image23| + +Finally, the generated Blueprint can be deployed. + +|image24| + +You can use/import the attached input configurations files to deploy. Drag and Drop these sample JSON files to fill in the configuration values. +See :download:`VES Collector Input Configuration <./Sample-Input-Files/ves-deploy.input.json>` +See :download:`Tcagen2 Input Configuration <./Sample-Input-Files/tca-deploy.input.json>` + +|image25| + +|image26| + +.. |image0| image:: ../images/1.png + :width: 6.5in + :height: 1.08333in +.. |image1| image:: ../images/2.png + :width: 6.5in + :height: 1.58333in +.. |image2| image:: ../images/3.png + :width: 5.83333in + :height: 3.58333in +.. |image3| image:: ../images/4.png + :width: 4.91667in + :height: 2.16667in +.. |image4| image:: ../images/5.png + :width: 6.5in + :height: 2.66667in +.. |image5| image:: ../images/6.png + :width: 6.5in + :height: 3.33333in +.. |image6| image:: ../images/7.png + :width: 4.91667in + :height: 2.25in +.. |image7| image:: ../images/8.png + :width: 4.91667in + :height: 2.58333in +.. |image8| image:: ../images/9.png + :width: 6.5in + :height: 4.58333in +.. |image9| image:: ../images/10.png + :width: 6.5in + :height: 4in +.. |image10| image:: ../images/11.png + :width: 4.91667in + :height: 0.41667in +.. |image11| image:: ../images/12.png + :width: 6.33333in + :height: 3.16667in +.. |image12| image:: ../images/13.png + :width: 6in + :height: 2.66667in +.. |image13| image:: ../images/14.png + :width: 6.5in + :height: 3.41667in +.. |image14| image:: ../images/15.png + :width: 6.5in + :height: 3.58333in +.. |image15| image:: ../images/16.png + :width: 6.5in + :height: 2.25in +.. |image16| image:: ../images/17.png + :width: 6.5in + :height: 2.83333in +.. |image17| image:: ../images/18.png + :width: 6.5in + :height: 3.08333in +.. |image18| image:: ../images/19.png + :width: 4.91667in + :height: 1.91667in +.. |image19| image:: ../images/20.png + :width: 4.91667in + :height: 2.41667in +.. |image20| image:: ../images/21.png + :width: 6.5in + :height: 2.41667in +.. |image21| image:: ../images/22.png + :width: 6.5in + :height: 3in +.. |image22| image:: ../images/23.png + :width: 6.5in + :height: 2.16667in +.. |image23| image:: ../images/24.png + :width: 6.5in + :height: 2.83333in +.. |image24| image:: ../images/25.png + :width: 6.5in + :height: 3in +.. |image25| image:: ../images/26.png +.. |image26| image:: ../images/27.png + + diff --git a/docs/sections/design-components/DCAE-MOD/DCAE-MOD-goals.rst b/docs/sections/design-components/DCAE-MOD/DCAE-MOD-goals.rst new file mode 100644 index 00000000..23d393b1 --- /dev/null +++ b/docs/sections/design-components/DCAE-MOD/DCAE-MOD-goals.rst @@ -0,0 +1,43 @@ +============== +MOD Objectives +============== + +MOD stands for "micro-service onboarding and design" and the project is +an effort to reboot the onboarding and design experience in DCAE. + + +**Goals and Stretch Goals** +--------------------------- + + +- Due to resource constraints, there are mismatched capabilities between SDC/DCAE-DS and DCAE mS deployment. + +- Due to #1, mS developers upload handcrafted blueprint, and stay involved throughout the deployment process. This also ties mS development to specific Cloudify implementation. + +- There is no Service Assurance flow design in SDC/DCAE-DS, and so there are no reusable flow designs for the Service Designer. + +- There is extensive reliance on developers’ involvement in providing [Inputs.json] as runtime configurations for mS deployment. + +- There is no E2E tracking of the microservice lifecycle. + + +**To address these problems, the new DCAE MOD, replacing the mS onboarding & DCAE-DS in SDC, aims to -** + + + +- Move DCAE mS onboarding & design from SDC project to DCAE Project. + +- Provide simplified mS Onboarding, Service Assurance flow design, & mS microservice design time & runtime configurations to support developers, service designers, and operations. + +- Auto-generate blueprint at the end of the design process, not onboarded before the design process. + +- Support Policy onboarding & artifact distribution to Policy/CLAMP to support Self Service Control Loop. + +- Streamline the process of constructing to deploying flows, Provide the ability to track flows - capture and store the progress and evolution of flows and Provide clear coordination and accountability i.e Provide catalog & data for microservice lifecycle tracking. It fits the ECOMP's release process and must provide clear visibility along the entire process and across different environments. + +- Support automated adaptation of ML model from Acumos to DCAE design & runtime environment through the Acumos Adapter. + +- DCAE-MOD is developed by the DCAE team to ensure consistency across all DCAE implementation, with the long term objective to integrate with SDC as part of the Design Platform. + +- Integrate with ONAP User Experience portals (initially ONAP portal, later SDC portal). + diff --git a/docs/sections/design-components/DCAE-MOD/Roles.rst b/docs/sections/design-components/DCAE-MOD/Roles.rst new file mode 100644 index 00000000..c3460841 --- /dev/null +++ b/docs/sections/design-components/DCAE-MOD/Roles.rst @@ -0,0 +1,168 @@ +===== +Roles +===== + + +Here is master list of all roles involved in ECOMP with DCAE: + +- System engineer + +- Component developer/expert - components are also referred to as + micro-services but include collectors, analytics + +- Designer + +- Tester + +- Operations + +- Platform developer + +- Manager + + +System engineer +--------------- + +Person who knows the high-level technical requirements for DCAE's +upcoming release cycle and dictates the development needs. This person +is responsible for the service assurance flows. This person expresses +the nodes and connections of a flow at a high level in a new graph or an +existing graph and assigns nodes to component developer/experts to be +implemented. + +This person must know: + +- What newly added flows should look like at a high level + +- What changes that are needed to existing flows + +- Target environments/sites/locations that need the flows at what SLA + +- Data requirements e.g. volume, rate, format, retention + +This person creates a top-level representation of the flow and assigns +the pieces to developers or experts for implementation. + + +Component developer/expert +-------------------------- + +Person who is responsible for defining an assigned node's subgraph. +This person can be: + +- A developer who might be onboarding a new component or a new version + of an existing component to fulfill the system engineer's + requirements + +- A domain expert who selects a suitable existing component, wires and + configures. This expert knows the intricacies of a class of + components (e.g. Acumos machine learning). + +Developers +---------- + +They must know: + +- The target DCAE runtime and can develop a component to successfully + run on the runtime + +- The DCAE onboarding process for components including the development + testing procedure + +- Best practices of data flow management (data provenance?) + +- Lifecycle of DCAE components specifically impact of changes to + existing running instances globally + +- The resource requirement of the developed component + +Experts +------- + +They must know: + +- The target DCAE runtime + +- The technical capabilities of a set of components in order to best + select + +- The technical needs of the set of components in order to properly + configure and connect + +Designer +-------- + + +Person who is responsible for connecting remote nodes to flows and +configuring all nodes in a flow in the context of the flow and in the +context of the greater graph. An example of the former is connecting a +flow with a collector to a black boxed vMME. An example of the latter +is assigning the threshold to a threshold-crossing-analytics component +when it is connected to a specific VES collector who is connected to a +specific vMME. + +This person knows: + +- The VNFs to monitor and the technical details to correctly connect + with them + +- Enough about the capability of a component and understands the + characteristics and requirements of a flow to properly + assign designer_editable configuration parameters + +This person has the ability to promote flows through the development +process (i.e. FTL to IST to ETE) and will coordinate with testers to +make sure the progression happens. + +Tester +------ + +Person who is responsible for testing a promoted new flow or newly +edited flow. Once the designer has promoted a flow to a tester's +environment, the tester will have ready access to the deployment +artifacts necessary to apply the runtime changes that will reflect the +flow design and verify the resulting functionality matches to the system +engineer's expectations. + +Person knows and owns a DCAE runtime. + +Read access to the design tool would be useful for troubleshooting. + + +Operations +---------- + +Person who is responsible that DCAE both platform and service assurance +flows are all operational in production environments and locations. +Once a flow has been fully certified, the required deployment artifact +is provided to operations and operations is responsible for applying the +runtime changes to reflect the flow design. + +Person knows and owns a DCAE runtime. + +Read access to the design tool would be useful for troubleshooting. + + + +Manager +------- + + +Person who are accountable to the business of the successful delivery of +a set of service assurance flows. Read access to the design tool +specifically high level reports are useful to understand if goals are +being met and to better measure project success. + +Platform developer +------------------ + + +Person who is responsible for the development of the DCAE platform which +ranges from onboarding, design, and runtime. In the scope of onboarding +and design, they are also responsible (unless there's an internal +operational team) for the operational concerns which means the tooling +built in this effort will need to be continually supported. +Their **users** are all the above. The design tool is intended to span +across multiple environments thus must run where all the required +parties have access. diff --git a/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/Request-body-of-Sample-Component.json b/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/Request-body-of-Sample-Component.json new file mode 100644 index 00000000..68667836 --- /dev/null +++ b/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/Request-body-of-Sample-Component.json @@ -0,0 +1,328 @@ +{ + "owner": "mS-Developer", + "spec": { + "self": { + "version": "1.5.4", + "name": "dcae-ves-collector", + "description": "Collector for receiving VES events through restful interface", + "component_type": "docker" + }, + "streams": { + "subscribes": [], + "publishes": [ + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-fault" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-measurement" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-syslog" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-heartbeat" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-other" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-mobileflow" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-statechange" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-thresholdCrossingAlert" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-voicequality" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves-sipsignaling" + }, + { + "format": "VES_specification", + "version": "7.30.1", + "type": "message router", + "config_key": "ves-pnfRegistration" + }, + { + "format": "VES_specification", + "version": "7.30.1", + "type": "message router", + "config_key": "ves-notification" + }, + { + "format": "VES_specification", + "version": "7.30.1", + "type": "message router", + "config_key": "ves-perf3gpp" + } + ] + }, + "services": { + "calls": [], + "provides": [ + { + "route": "/eventListener/v1", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v2", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v3", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v4", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v5", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "5.28.4" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v7", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "7.30.1" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + } + ] + }, + "parameters": [ + { + "name": "collector.service.port", + "value": 8080, + "description": "standard http port collector will open for listening;", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "collector.service.secure.port", + "value": 8443, + "description": "secure http port collector will open for listening ", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": true + }, + { + "name": "collector.keystore.file.location", + "value": "/opt/app/dcae-certificate/cert.jks", + "description": "fs location of keystore file in vm", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "collector.keystore.passwordfile", + "value": "/opt/app/dcae-certificate/jks.pass", + "description": "location of keystore password file in vm", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "collector.truststore.file.location", + "value": "/opt/app/dcae-certificate/trust.jks", + "description": "fs location of truststore file in vm", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "collector.truststore.passwordfile", + "value": "/opt/app/dcae-certificate/trust.pass", + "description": "location of truststore password file in vm", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "collector.dmaap.streamid", + "value": "fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|measurement=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|perf3gpp=ves-perf3gpp", + "description": "domain-to-streamid mapping used by VESCollector to distributes events based on domain. Both primary and secondary config_key are included for resilency (multiple streamid can be included commma separated). The streamids MUST match to topic config_keys. For single site without resiliency deployment - configkeys with -secondary suffix can be removed", + "sourced_at_deployment": true, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "auth.method", + "value": "noAuth", + "description": "Property to manage application mode, possible configurations: noAuth - default option - no security (http) , certOnly - auth by certificate (https), basicAuth - auth by basic auth username and password (https),certBasicAuth - auth by certificate and basic auth username / password (https),", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "header.authlist", + "value": "sample1,$2a$10$pgjaxDzSuc6XVFEeqvxQ5u90DKJnM/u7TJTcinAlFJVaavXMWf/Zi|userid1,$2a$10$61gNubgJJl9lh3nvQvY9X.x4e5ETWJJ7ao7ZhJEvmfJigov26Z6uq|userid2,$2a$10$G52y/3uhuhWAMy.bx9Se8uzWinmbJa.dlm1LW6bYPdPkkywLDPLiy", + "description": "List of id and base 64 encoded password.For each onboarding VNF - unique userid and password should be assigned and communicated to VNF owner. Password value should be base64 encoded in config here", + "policy_editable": false, + "sourced_at_deployment": true, + "designer_editable": true + }, + { + "name": "collector.schema.checkflag", + "value": 1, + "description": "Schema check validation flag. When enabled, collector will validate input VES events against VES Schema defined on collector.schema.file ", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "collector.schema.file", + "value": "{\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.1.1.json\"}", + "description": "VES schema file name per version used for validation", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false + }, + { + "name": "event.transform.flag", + "value": 1, + "description": "flag to enable tranformation rules defined under eventTransform.json; this is applicable when event tranformation rules preset should be activated for transforming <VES5.4 events to 5.4", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + }, + { + "name": "tomcat.maxthreads", + "value": "200", + "description": "Tomcat control for concurrent request", + "sourced_at_deployment": false, + "policy_editable": false, + "designer_editable": false + } + ], + "auxilary": { + "healthcheck": { + "type": "http", + "interval": "15s", + "timeout": "1s", + "endpoint": "/healthcheck" + }, + "volumes": [ + { + "container": { + "bind": "/opt/app/dcae-certificate" + }, + "host": { + "path": "/opt/app/dcae-certificate" + } + }, + { + "container": { + "bind": "/opt/app/VESCollector/logs" + }, + "host": { + "path": "/opt/logs/DCAE/VESCollector/logs" + } + }, + { + "container": { + "bind": "/opt/app/VESCollector/etc" + }, + "host": { + "path": "/opt/logs/DCAE/VESCollector/etc" + } + } + ], + "ports": [ + "8080:0", + "8443:0" + ], + "log_info": { + "log_directory": "/opt/app/VESCollector/logs/" + }, + "tls_info": { + "cert_directory": "/opt/app/dcae-certificate/", + "use_tls": true + } + }, + "artifacts": [ + { + "type": "docker image", + "uri": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest" + } + ] + } +}
\ No newline at end of file diff --git a/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/Request-body-of-Sample-Data-Format.json b/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/Request-body-of-Sample-Data-Format.json new file mode 100644 index 00000000..ebf73150 --- /dev/null +++ b/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/Request-body-of-Sample-Data-Format.json @@ -0,0 +1,2124 @@ +{ + "owner": "mS-Developer", + "spec": { + "self": { + "name": "VES_specification", + "version": "5.28.4", + "description": "VES spec for 5.4.1" + }, + "dataformatversion": "1.0.0", + "jsonschema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "VES Event Listener", + "type": "object", + "properties": { + "event": { + "$ref": "#/definitions/event" + }, + "eventList": { + "$ref": "#/definitions/eventList" + } + }, + "definitions": { + "schemaHeaderBlock": { + "description": "schema date, version, author and associated API", + "type": "object", + "properties": { + "associatedApi": { + "description": "VES Event Listener", + "type": "string" + }, + "lastUpdatedBy": { + "description": "re2947", + "type": "string" + }, + "schemaDate": { + "description": "September 12, 2017", + "type": "string" + }, + "schemaVersion": { + "description": "28.4", + "type": "number" + } + } + }, + "schemaLicenseAndCopyrightNotice": { + "description": "Copyright (c) 2017, AT&T Intellectual Property. All rights reserved", + "type": "object", + "properties": { + "apacheLicense2.0": { + "description": "Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at:", + "type": "string" + }, + "licenseUrl": { + "description": "http://www.apache.org/licenses/LICENSE-2.0", + "type": "string" + }, + "asIsClause": { + "description": "Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "type": "string" + }, + "permissionsAndLimitations": { + "description": "See the License for the specific language governing permissions and limitations under the License.", + "type": "string" + } + } + }, + "codecsInUse": { + "description": "number of times an identified codec was used over the measurementInterval", + "type": "object", + "properties": { + "codecIdentifier": { + "type": "string" + }, + "numberInUse": { + "type": "integer" + } + }, + "required": [ + "codecIdentifier", + "numberInUse" + ] + }, + "command": { + "description": "command from an event collector toward an event source", + "type": "object", + "properties": { + "commandType": { + "type": "string", + "enum": [ + "heartbeatIntervalChange", + "measurementIntervalChange", + "provideThrottlingState", + "throttlingSpecification" + ] + }, + "eventDomainThrottleSpecification": { + "$ref": "#/definitions/eventDomainThrottleSpecification" + }, + "heartbeatInterval": { + "type": "integer" + }, + "measurementInterval": { + "type": "integer" + } + }, + "required": [ + "commandType" + ] + }, + "commandList": { + "description": "array of commands from an event collector toward an event source", + "type": "array", + "items": { + "$ref": "#/definitions/command" + }, + "minItems": 0 + }, + "commonEventHeader": { + "description": "fields common to all events", + "type": "object", + "properties": { + "domain": { + "description": "the eventing domain associated with the event", + "type": "string", + "enum": [ + "fault", + "heartbeat", + "measurementsForVfScaling", + "mobileFlow", + "other", + "sipSignaling", + "stateChange", + "syslog", + "thresholdCrossingAlert", + "voiceQuality" + ] + }, + "eventId": { + "description": "event key that is unique to the event source", + "type": "string" + }, + "eventName": { + "description": "unique event name", + "type": "string" + }, + "eventType": { + "description": "for example - applicationVnf, guestOS, hostOS, platform", + "type": "string" + }, + "internalHeaderFields": { + "$ref": "#/definitions/internalHeaderFields" + }, + "lastEpochMicrosec": { + "description": "the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds", + "type": "number" + }, + "nfcNamingCode": { + "description": "3 character network function component type, aligned with vfc naming standards", + "type": "string" + }, + "nfNamingCode": { + "description": "4 character network function type, aligned with vnf naming standards", + "type": "string" + }, + "priority": { + "description": "processing priority", + "type": "string", + "enum": [ + "High", + "Medium", + "Normal", + "Low" + ] + }, + "reportingEntityId": { + "description": "UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the ATT enrichment process", + "type": "string" + }, + "reportingEntityName": { + "description": "name of the entity reporting the event, for example, an EMS name; may be the same as sourceName", + "type": "string" + }, + "sequence": { + "description": "ordering of events communicated by an event source instance or 0 if not needed", + "type": "integer" + }, + "sourceId": { + "description": "UUID identifying the entity experiencing the event issue; must be populated by the ATT enrichment process", + "type": "string" + }, + "sourceName": { + "description": "name of the entity experiencing the event issue", + "type": "string" + }, + "startEpochMicrosec": { + "description": "the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds", + "type": "number" + }, + "version": { + "description": "version of the event header", + "type": "number" + } + }, + "required": [ + "domain", + "eventId", + "eventName", + "lastEpochMicrosec", + "priority", + "reportingEntityName", + "sequence", + "sourceName", + "startEpochMicrosec", + "version" + ] + }, + "counter": { + "description": "performance counter", + "type": "object", + "properties": { + "criticality": { + "type": "string", + "enum": [ + "CRIT", + "MAJ" + ] + }, + "name": { + "type": "string" + }, + "thresholdCrossed": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "criticality", + "name", + "thresholdCrossed", + "value" + ] + }, + "cpuUsage": { + "description": "usage of an identified CPU", + "type": "object", + "properties": { + "cpuIdentifier": { + "description": "cpu identifer", + "type": "string" + }, + "cpuIdle": { + "description": "percentage of CPU time spent in the idle task", + "type": "number" + }, + "cpuUsageInterrupt": { + "description": "percentage of time spent servicing interrupts", + "type": "number" + }, + "cpuUsageNice": { + "description": "percentage of time spent running user space processes that have been niced", + "type": "number" + }, + "cpuUsageSoftIrq": { + "description": "percentage of time spent handling soft irq interrupts", + "type": "number" + }, + "cpuUsageSteal": { + "description": "percentage of time spent in involuntary wait which is neither user, system or idle time and is effectively time that went missing", + "type": "number" + }, + "cpuUsageSystem": { + "description": "percentage of time spent on system tasks running the kernel", + "type": "number" + }, + "cpuUsageUser": { + "description": "percentage of time spent running un-niced user space processes", + "type": "number" + }, + "cpuWait": { + "description": "percentage of CPU time spent waiting for I/O operations to complete", + "type": "number" + }, + "percentUsage": { + "description": "aggregate cpu usage of the virtual machine on which the VNFC reporting the event is running", + "type": "number" + } + }, + "required": [ + "cpuIdentifier", + "percentUsage" + ] + }, + "diskUsage": { + "description": "usage of an identified disk", + "type": "object", + "properties": { + "diskIdentifier": { + "description": "disk identifier", + "type": "string" + }, + "diskIoTimeAvg": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the average over the measurement interval", + "type": "number" + }, + "diskIoTimeLast": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskIoTimeMax": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskIoTimeMin": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadAvg": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadLast": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadMax": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadMin": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteAvg": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteLast": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteMax": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteMin": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadAvg": { + "description": "number of octets per second read from a disk or partition; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadLast": { + "description": "number of octets per second read from a disk or partition; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadMax": { + "description": "number of octets per second read from a disk or partition; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadMin": { + "description": "number of octets per second read from a disk or partition; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteAvg": { + "description": "number of octets per second written to a disk or partition; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteLast": { + "description": "number of octets per second written to a disk or partition; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteMax": { + "description": "number of octets per second written to a disk or partition; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteMin": { + "description": "number of octets per second written to a disk or partition; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadAvg": { + "description": "number of read operations per second issued to the disk; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadLast": { + "description": "number of read operations per second issued to the disk; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadMax": { + "description": "number of read operations per second issued to the disk; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadMin": { + "description": "number of read operations per second issued to the disk; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteAvg": { + "description": "number of write operations per second issued to the disk; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteLast": { + "description": "number of write operations per second issued to the disk; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteMax": { + "description": "number of write operations per second issued to the disk; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteMin": { + "description": "number of write operations per second issued to the disk; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsAvg": { + "description": "queue size of pending I/O operations per second; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsLast": { + "description": "queue size of pending I/O operations per second; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsMax": { + "description": "queue size of pending I/O operations per second; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsMin": { + "description": "queue size of pending I/O operations per second; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadAvg": { + "description": "milliseconds a read operation took to complete; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadLast": { + "description": "milliseconds a read operation took to complete; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadMax": { + "description": "milliseconds a read operation took to complete; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadMin": { + "description": "milliseconds a read operation took to complete; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteAvg": { + "description": "milliseconds a write operation took to complete; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteLast": { + "description": "milliseconds a write operation took to complete; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteMax": { + "description": "milliseconds a write operation took to complete; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteMin": { + "description": "milliseconds a write operation took to complete; provide the minimum measurement within the measurement interval", + "type": "number" + } + }, + "required": [ + "diskIdentifier" + ] + }, + "endOfCallVqmSummaries": { + "description": "provides end of call voice quality metrics", + "type": "object", + "properties": { + "adjacencyName": { + "description": " adjacency name", + "type": "string" + }, + "endpointDescription": { + "description": "Either Caller or Callee", + "type": "string", + "enum": [ + "Caller", + "Callee" + ] + }, + "endpointJitter": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsDiscarded": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsReceived": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsSent": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsDiscarded": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsReceived": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsSent": { + "description": "", + "type": "number" + }, + "localJitter": { + "description": "", + "type": "number" + }, + "localRtpOctetsDiscarded": { + "description": "", + "type": "number" + }, + "localRtpOctetsReceived": { + "description": "", + "type": "number" + }, + "localRtpOctetsSent": { + "description": "", + "type": "number" + }, + "localRtpPacketsDiscarded": { + "description": "", + "type": "number" + }, + "localRtpPacketsReceived": { + "description": "", + "type": "number" + }, + "localRtpPacketsSent": { + "description": "", + "type": "number" + }, + "mosCqe": { + "description": "1-5 1dp", + "type": "number" + }, + "packetsLost": { + "description": "", + "type": "number" + }, + "packetLossPercent": { + "description": "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)", + "type": "number" + }, + "rFactor": { + "description": "0-100", + "type": "number" + }, + "roundTripDelay": { + "description": "millisecs", + "type": "number" + } + }, + "required": [ + "adjacencyName", + "endpointDescription" + ] + }, + "event": { + "description": "the root level of the common event format", + "type": "object", + "properties": { + "commonEventHeader": { + "$ref": "#/definitions/commonEventHeader" + }, + "faultFields": { + "$ref": "#/definitions/faultFields" + }, + "heartbeatFields": { + "$ref": "#/definitions/heartbeatFields" + }, + "measurementsForVfScalingFields": { + "$ref": "#/definitions/measurementsForVfScalingFields" + }, + "mobileFlowFields": { + "$ref": "#/definitions/mobileFlowFields" + }, + "otherFields": { + "$ref": "#/definitions/otherFields" + }, + "sipSignalingFields": { + "$ref": "#/definitions/sipSignalingFields" + }, + "stateChangeFields": { + "$ref": "#/definitions/stateChangeFields" + }, + "syslogFields": { + "$ref": "#/definitions/syslogFields" + }, + "thresholdCrossingAlertFields": { + "$ref": "#/definitions/thresholdCrossingAlertFields" + }, + "voiceQualityFields": { + "$ref": "#/definitions/voiceQualityFields" + } + }, + "required": [ + "commonEventHeader" + ] + }, + "eventDomainThrottleSpecification": { + "description": "specification of what information to suppress within an event domain", + "type": "object", + "properties": { + "eventDomain": { + "description": "Event domain enum from the commonEventHeader domain field", + "type": "string" + }, + "suppressedFieldNames": { + "description": "List of optional field names in the event block that should not be sent to the Event Listener", + "type": "array", + "items": { + "type": "string" + } + }, + "suppressedNvPairsList": { + "description": "Optional list of specific NvPairsNames to suppress within a given Name-Value Field", + "type": "array", + "items": { + "$ref": "#/definitions/suppressedNvPairs" + } + } + }, + "required": [ + "eventDomain" + ] + }, + "eventDomainThrottleSpecificationList": { + "description": "array of eventDomainThrottleSpecifications", + "type": "array", + "items": { + "$ref": "#/definitions/eventDomainThrottleSpecification" + }, + "minItems": 0 + }, + "eventList": { + "description": "array of events", + "type": "array", + "items": { + "$ref": "#/definitions/event" + } + }, + "eventThrottlingState": { + "description": "reports the throttling in force at the event source", + "type": "object", + "properties": { + "eventThrottlingMode": { + "description": "Mode the event manager is in", + "type": "string", + "enum": [ + "normal", + "throttled" + ] + }, + "eventDomainThrottleSpecificationList": { + "$ref": "#/definitions/eventDomainThrottleSpecificationList" + } + }, + "required": [ + "eventThrottlingMode" + ] + }, + "faultFields": { + "description": "fields specific to fault events", + "type": "object", + "properties": { + "alarmAdditionalInformation": { + "description": "additional alarm information", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "alarmCondition": { + "description": "alarm condition reported by the device", + "type": "string" + }, + "alarmInterfaceA": { + "description": "card, port, channel or interface name of the device generating the alarm", + "type": "string" + }, + "eventCategory": { + "description": "Event category, for example: license, link, routing, security, signaling", + "type": "string" + }, + "eventSeverity": { + "description": "event severity", + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "NORMAL" + ] + }, + "eventSourceType": { + "description": "type of event source; examples: card, host, other, port, portThreshold, router, slotThreshold, switch, virtualMachine, virtualNetworkFunction", + "type": "string" + }, + "faultFieldsVersion": { + "description": "version of the faultFields block", + "type": "number" + }, + "specificProblem": { + "description": "short description of the alarm or problem", + "type": "string" + }, + "vfStatus": { + "description": "virtual function status enumeration", + "type": "string", + "enum": [ + "Active", + "Idle", + "Preparing to terminate", + "Ready to terminate", + "Requesting termination" + ] + } + }, + "required": [ + "alarmCondition", + "eventSeverity", + "eventSourceType", + "faultFieldsVersion", + "specificProblem", + "vfStatus" + ] + }, + "featuresInUse": { + "description": "number of times an identified feature was used over the measurementInterval", + "type": "object", + "properties": { + "featureIdentifier": { + "type": "string" + }, + "featureUtilization": { + "type": "integer" + } + }, + "required": [ + "featureIdentifier", + "featureUtilization" + ] + }, + "field": { + "description": "name value pair", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ] + }, + "filesystemUsage": { + "description": "disk usage of an identified virtual machine in gigabytes and/or gigabytes per second", + "type": "object", + "properties": { + "blockConfigured": { + "type": "number" + }, + "blockIops": { + "type": "number" + }, + "blockUsed": { + "type": "number" + }, + "ephemeralConfigured": { + "type": "number" + }, + "ephemeralIops": { + "type": "number" + }, + "ephemeralUsed": { + "type": "number" + }, + "filesystemName": { + "type": "string" + } + }, + "required": [ + "blockConfigured", + "blockIops", + "blockUsed", + "ephemeralConfigured", + "ephemeralIops", + "ephemeralUsed", + "filesystemName" + ] + }, + "gtpPerFlowMetrics": { + "description": "Mobility GTP Protocol per flow metrics", + "type": "object", + "properties": { + "avgBitErrorRate": { + "description": "average bit error rate", + "type": "number" + }, + "avgPacketDelayVariation": { + "description": "Average packet delay variation or jitter in milliseconds for received packets: Average difference between the packet timestamp and time received for all pairs of consecutive packets", + "type": "number" + }, + "avgPacketLatency": { + "description": "average delivery latency", + "type": "number" + }, + "avgReceiveThroughput": { + "description": "average receive throughput", + "type": "number" + }, + "avgTransmitThroughput": { + "description": "average transmit throughput", + "type": "number" + }, + "durConnectionFailedStatus": { + "description": "duration of failed state in milliseconds, computed as the cumulative time between a failed echo request and the next following successful error request, over this reporting interval", + "type": "number" + }, + "durTunnelFailedStatus": { + "description": "Duration of errored state, computed as the cumulative time between a tunnel error indicator and the next following non-errored indicator, over this reporting interval", + "type": "number" + }, + "flowActivatedBy": { + "description": "Endpoint activating the flow", + "type": "string" + }, + "flowActivationEpoch": { + "description": "Time the connection is activated in the flow (connection) being reported on, or transmission time of the first packet if activation time is not available", + "type": "number" + }, + "flowActivationMicrosec": { + "description": "Integer microseconds for the start of the flow connection", + "type": "number" + }, + "flowActivationTime": { + "description": "time the connection is activated in the flow being reported on, or transmission time of the first packet if activation time is not available; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800", + "type": "string" + }, + "flowDeactivatedBy": { + "description": "Endpoint deactivating the flow", + "type": "string" + }, + "flowDeactivationEpoch": { + "description": "Time for the start of the flow connection, in integer UTC epoch time aka UNIX time", + "type": "number" + }, + "flowDeactivationMicrosec": { + "description": "Integer microseconds for the start of the flow connection", + "type": "number" + }, + "flowDeactivationTime": { + "description": "Transmission time of the first packet in the flow connection being reported on; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800", + "type": "string" + }, + "flowStatus": { + "description": "connection status at reporting time as a working / inactive / failed indicator value", + "type": "string" + }, + "gtpConnectionStatus": { + "description": "Current connection state at reporting time", + "type": "string" + }, + "gtpTunnelStatus": { + "description": "Current tunnel state at reporting time", + "type": "string" + }, + "ipTosCountList": { + "description": "array of key: value pairs where the keys are drawn from the IP Type-of-Service identifiers which range from '0' to '255', and the values are the count of packets that had those ToS identifiers in the flow", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "ipTosList": { + "description": "Array of unique IP Type-of-Service values observed in the flow where values range from '0' to '255'", + "type": "array", + "items": { + "type": "string" + } + }, + "largePacketRtt": { + "description": "large packet round trip time", + "type": "number" + }, + "largePacketThreshold": { + "description": "large packet threshold being applied", + "type": "number" + }, + "maxPacketDelayVariation": { + "description": "Maximum packet delay variation or jitter in milliseconds for received packets: Maximum of the difference between the packet timestamp and time received for all pairs of consecutive packets", + "type": "number" + }, + "maxReceiveBitRate": { + "description": "maximum receive bit rate", + "type": "number" + }, + "maxTransmitBitRate": { + "description": "maximum transmit bit rate", + "type": "number" + }, + "mobileQciCosCountList": { + "description": "array of key: value pairs where the keys are drawn from LTE QCI or UMTS class of service strings, and the values are the count of packets that had those strings in the flow", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "mobileQciCosList": { + "description": "Array of unique LTE QCI or UMTS class-of-service values observed in the flow", + "type": "array", + "items": { + "type": "string" + } + }, + "numActivationFailures": { + "description": "Number of failed activation requests, as observed by the reporting node", + "type": "number" + }, + "numBitErrors": { + "description": "number of errored bits", + "type": "number" + }, + "numBytesReceived": { + "description": "number of bytes received, including retransmissions", + "type": "number" + }, + "numBytesTransmitted": { + "description": "number of bytes transmitted, including retransmissions", + "type": "number" + }, + "numDroppedPackets": { + "description": "number of received packets dropped due to errors per virtual interface", + "type": "number" + }, + "numGtpEchoFailures": { + "description": "Number of Echo request path failures where failed paths are defined in 3GPP TS 29.281 sec 7.2.1 and 3GPP TS 29.060 sec. 11.2", + "type": "number" + }, + "numGtpTunnelErrors": { + "description": "Number of tunnel error indications where errors are defined in 3GPP TS 29.281 sec 7.3.1 and 3GPP TS 29.060 sec. 11.1", + "type": "number" + }, + "numHttpErrors": { + "description": "Http error count", + "type": "number" + }, + "numL7BytesReceived": { + "description": "number of tunneled layer 7 bytes received, including retransmissions", + "type": "number" + }, + "numL7BytesTransmitted": { + "description": "number of tunneled layer 7 bytes transmitted, excluding retransmissions", + "type": "number" + }, + "numLostPackets": { + "description": "number of lost packets", + "type": "number" + }, + "numOutOfOrderPackets": { + "description": "number of out-of-order packets", + "type": "number" + }, + "numPacketErrors": { + "description": "number of errored packets", + "type": "number" + }, + "numPacketsReceivedExclRetrans": { + "description": "number of packets received, excluding retransmission", + "type": "number" + }, + "numPacketsReceivedInclRetrans": { + "description": "number of packets received, including retransmission", + "type": "number" + }, + "numPacketsTransmittedInclRetrans": { + "description": "number of packets transmitted, including retransmissions", + "type": "number" + }, + "numRetries": { + "description": "number of packet retries", + "type": "number" + }, + "numTimeouts": { + "description": "number of packet timeouts", + "type": "number" + }, + "numTunneledL7BytesReceived": { + "description": "number of tunneled layer 7 bytes received, excluding retransmissions", + "type": "number" + }, + "roundTripTime": { + "description": "round trip time", + "type": "number" + }, + "tcpFlagCountList": { + "description": "array of key: value pairs where the keys are drawn from TCP Flags and the values are the count of packets that had that TCP Flag in the flow", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "tcpFlagList": { + "description": "Array of unique TCP Flags observed in the flow", + "type": "array", + "items": { + "type": "string" + } + }, + "timeToFirstByte": { + "description": "Time in milliseconds between the connection activation and first byte received", + "type": "number" + } + }, + "required": [ + "avgBitErrorRate", + "avgPacketDelayVariation", + "avgPacketLatency", + "avgReceiveThroughput", + "avgTransmitThroughput", + "flowActivationEpoch", + "flowActivationMicrosec", + "flowDeactivationEpoch", + "flowDeactivationMicrosec", + "flowDeactivationTime", + "flowStatus", + "maxPacketDelayVariation", + "numActivationFailures", + "numBitErrors", + "numBytesReceived", + "numBytesTransmitted", + "numDroppedPackets", + "numL7BytesReceived", + "numL7BytesTransmitted", + "numLostPackets", + "numOutOfOrderPackets", + "numPacketErrors", + "numPacketsReceivedExclRetrans", + "numPacketsReceivedInclRetrans", + "numPacketsTransmittedInclRetrans", + "numRetries", + "numTimeouts", + "numTunneledL7BytesReceived", + "roundTripTime", + "timeToFirstByte" + ] + }, + "heartbeatFields": { + "description": "optional field block for fields specific to heartbeat events", + "type": "object", + "properties": { + "additionalFields": { + "description": "additional heartbeat fields if needed", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "heartbeatFieldsVersion": { + "description": "version of the heartbeatFields block", + "type": "number" + }, + "heartbeatInterval": { + "description": "current heartbeat interval in seconds", + "type": "integer" + } + }, + "required": [ + "heartbeatFieldsVersion", + "heartbeatInterval" + ] + }, + "internalHeaderFields": { + "description": "enrichment fields for internal VES Event Listener service use only, not supplied by event sources", + "type": "object" + }, + "jsonObject": { + "description": "json object schema, name and other meta-information along with one or more object instances", + "type": "object", + "properties": { + "objectInstances": { + "description": "one or more instances of the jsonObject", + "type": "array", + "items": { + "$ref": "#/definitions/jsonObjectInstance" + } + }, + "objectName": { + "description": "name of the JSON Object", + "type": "string" + }, + "objectSchema": { + "description": "json schema for the object", + "type": "string" + }, + "objectSchemaUrl": { + "description": "Url to the json schema for the object", + "type": "string" + }, + "nfSubscribedObjectName": { + "description": "name of the object associated with the nfSubscriptonId", + "type": "string" + }, + "nfSubscriptionId": { + "description": "identifies an openConfig telemetry subscription on a network function, which configures the network function to send complex object data associated with the jsonObject", + "type": "string" + } + }, + "required": [ + "objectInstances", + "objectName" + ] + }, + "jsonObjectInstance": { + "description": "meta-information about an instance of a jsonObject along with the actual object instance", + "type": "object", + "properties": { + "objectInstance": { + "description": "an instance conforming to the jsonObject schema", + "type": "object" + }, + "objectInstanceEpochMicrosec": { + "description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds", + "type": "number" + }, + "objectKeys": { + "description": "an ordered set of keys that identifies this particular instance of jsonObject", + "type": "array", + "items": { + "$ref": "#/definitions/key" + } + } + }, + "required": [ + "objectInstance" + ] + }, + "key": { + "description": "tuple which provides the name of a key along with its value and relative order", + "type": "object", + "properties": { + "keyName": { + "description": "name of the key", + "type": "string" + }, + "keyOrder": { + "description": "relative sequence or order of the key with respect to other keys", + "type": "integer" + }, + "keyValue": { + "description": "value of the key", + "type": "string" + } + }, + "required": [ + "keyName" + ] + }, + "latencyBucketMeasure": { + "description": "number of counts falling within a defined latency bucket", + "type": "object", + "properties": { + "countsInTheBucket": { + "type": "number" + }, + "highEndOfLatencyBucket": { + "type": "number" + }, + "lowEndOfLatencyBucket": { + "type": "number" + } + }, + "required": [ + "countsInTheBucket" + ] + }, + "measurementsForVfScalingFields": { + "description": "measurementsForVfScaling fields", + "type": "object", + "properties": { + "additionalFields": { + "description": "additional name-value-pair fields", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "additionalMeasurements": { + "description": "array of named name-value-pair arrays", + "type": "array", + "items": { + "$ref": "#/definitions/namedArrayOfFields" + } + }, + "additionalObjects": { + "description": "array of JSON objects described by name, schema and other meta-information", + "type": "array", + "items": { + "$ref": "#/definitions/jsonObject" + } + }, + "codecUsageArray": { + "description": "array of codecs in use", + "type": "array", + "items": { + "$ref": "#/definitions/codecsInUse" + } + }, + "concurrentSessions": { + "description": "peak concurrent sessions for the VM or VNF over the measurementInterval", + "type": "integer" + }, + "configuredEntities": { + "description": "over the measurementInterval, peak total number of: users, subscribers, devices, adjacencies, etc., for the VM, or subscribers, devices, etc., for the VNF", + "type": "integer" + }, + "cpuUsageArray": { + "description": "usage of an array of CPUs", + "type": "array", + "items": { + "$ref": "#/definitions/cpuUsage" + } + }, + "diskUsageArray": { + "description": "usage of an array of disks", + "type": "array", + "items": { + "$ref": "#/definitions/diskUsage" + } + }, + "featureUsageArray": { + "description": "array of features in use", + "type": "array", + "items": { + "$ref": "#/definitions/featuresInUse" + } + }, + "filesystemUsageArray": { + "description": "filesystem usage of the VM on which the VNFC reporting the event is running", + "type": "array", + "items": { + "$ref": "#/definitions/filesystemUsage" + } + }, + "latencyDistribution": { + "description": "array of integers representing counts of requests whose latency in milliseconds falls within per-VNF configured ranges", + "type": "array", + "items": { + "$ref": "#/definitions/latencyBucketMeasure" + } + }, + "meanRequestLatency": { + "description": "mean seconds required to respond to each request for the VM on which the VNFC reporting the event is running", + "type": "number" + }, + "measurementInterval": { + "description": "interval over which measurements are being reported in seconds", + "type": "number" + }, + "measurementsForVfScalingVersion": { + "description": "version of the measurementsForVfScaling block", + "type": "number" + }, + "memoryUsageArray": { + "description": "memory usage of an array of VMs", + "type": "array", + "items": { + "$ref": "#/definitions/memoryUsage" + } + }, + "numberOfMediaPortsInUse": { + "description": "number of media ports in use", + "type": "integer" + }, + "requestRate": { + "description": "peak rate of service requests per second to the VNF over the measurementInterval", + "type": "number" + }, + "vnfcScalingMetric": { + "description": "represents busy-ness of the VNF from 0 to 100 as reported by the VNFC", + "type": "integer" + }, + "vNicPerformanceArray": { + "description": "usage of an array of virtual network interface cards", + "type": "array", + "items": { + "$ref": "#/definitions/vNicPerformance" + } + } + }, + "required": [ + "measurementInterval", + "measurementsForVfScalingVersion" + ] + }, + "memoryUsage": { + "description": "memory usage of an identified virtual machine", + "type": "object", + "properties": { + "memoryBuffered": { + "description": "kibibytes of temporary storage for raw disk blocks", + "type": "number" + }, + "memoryCached": { + "description": "kibibytes of memory used for cache", + "type": "number" + }, + "memoryConfigured": { + "description": "kibibytes of memory configured in the virtual machine on which the VNFC reporting the event is running", + "type": "number" + }, + "memoryFree": { + "description": "kibibytes of physical RAM left unused by the system", + "type": "number" + }, + "memorySlabRecl": { + "description": "the part of the slab that can be reclaimed such as caches measured in kibibytes", + "type": "number" + }, + "memorySlabUnrecl": { + "description": "the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes", + "type": "number" + }, + "memoryUsed": { + "description": "total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes", + "type": "number" + }, + "vmIdentifier": { + "description": "virtual machine identifier associated with the memory metrics", + "type": "string" + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "vmIdentifier" + ] + }, + "mobileFlowFields": { + "description": "mobileFlow fields", + "type": "object", + "properties": { + "additionalFields": { + "description": "additional mobileFlow fields if needed", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "applicationType": { + "description": "Application type inferred", + "type": "string" + }, + "appProtocolType": { + "description": "application protocol", + "type": "string" + }, + "appProtocolVersion": { + "description": "application protocol version", + "type": "string" + }, + "cid": { + "description": "cell id", + "type": "string" + }, + "connectionType": { + "description": "Abbreviation referencing a 3GPP reference point e.g., S1-U, S11, etc", + "type": "string" + }, + "ecgi": { + "description": "Evolved Cell Global Id", + "type": "string" + }, + "flowDirection": { + "description": "Flow direction, indicating if the reporting node is the source of the flow or destination for the flow", + "type": "string" + }, + "gtpPerFlowMetrics": { + "$ref": "#/definitions/gtpPerFlowMetrics" + }, + "gtpProtocolType": { + "description": "GTP protocol", + "type": "string" + }, + "gtpVersion": { + "description": "GTP protocol version", + "type": "string" + }, + "httpHeader": { + "description": "HTTP request header, if the flow connects to a node referenced by HTTP", + "type": "string" + }, + "imei": { + "description": "IMEI for the subscriber UE used in this flow, if the flow connects to a mobile device", + "type": "string" + }, + "imsi": { + "description": "IMSI for the subscriber UE used in this flow, if the flow connects to a mobile device", + "type": "string" + }, + "ipProtocolType": { + "description": "IP protocol type e.g., TCP, UDP, RTP...", + "type": "string" + }, + "ipVersion": { + "description": "IP protocol version e.g., IPv4, IPv6", + "type": "string" + }, + "lac": { + "description": "location area code", + "type": "string" + }, + "mcc": { + "description": "mobile country code", + "type": "string" + }, + "mnc": { + "description": "mobile network code", + "type": "string" + }, + "mobileFlowFieldsVersion": { + "description": "version of the mobileFlowFields block", + "type": "number" + }, + "msisdn": { + "description": "MSISDN for the subscriber UE used in this flow, as an integer, if the flow connects to a mobile device", + "type": "string" + }, + "otherEndpointIpAddress": { + "description": "IP address for the other endpoint, as used for the flow being reported on", + "type": "string" + }, + "otherEndpointPort": { + "description": "IP Port for the reporting entity, as used for the flow being reported on", + "type": "integer" + }, + "otherFunctionalRole": { + "description": "Functional role of the other endpoint for the flow being reported on e.g., MME, S-GW, P-GW, PCRF...", + "type": "string" + }, + "rac": { + "description": "routing area code", + "type": "string" + }, + "radioAccessTechnology": { + "description": "Radio Access Technology e.g., 2G, 3G, LTE", + "type": "string" + }, + "reportingEndpointIpAddr": { + "description": "IP address for the reporting entity, as used for the flow being reported on", + "type": "string" + }, + "reportingEndpointPort": { + "description": "IP port for the reporting entity, as used for the flow being reported on", + "type": "integer" + }, + "sac": { + "description": "service area code", + "type": "string" + }, + "samplingAlgorithm": { + "description": "Integer identifier for the sampling algorithm or rule being applied in calculating the flow metrics if metrics are calculated based on a sample of packets, or 0 if no sampling is applied", + "type": "integer" + }, + "tac": { + "description": "transport area code", + "type": "string" + }, + "tunnelId": { + "description": "tunnel identifier", + "type": "string" + }, + "vlanId": { + "description": "VLAN identifier used by this flow", + "type": "string" + } + }, + "required": [ + "flowDirection", + "gtpPerFlowMetrics", + "ipProtocolType", + "ipVersion", + "mobileFlowFieldsVersion", + "otherEndpointIpAddress", + "otherEndpointPort", + "reportingEndpointIpAddr", + "reportingEndpointPort" + ] + }, + "namedArrayOfFields": { + "description": "an array of name value pairs along with a name for the array", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "arrayOfFields": { + "description": "array of name value pairs", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + } + }, + "required": [ + "name", + "arrayOfFields" + ] + }, + "otherFields": { + "description": "fields for events belonging to the 'other' domain of the commonEventHeader domain enumeration", + "type": "object", + "properties": { + "hashOfNameValuePairArrays": { + "description": "array of named name-value-pair arrays", + "type": "array", + "items": { + "$ref": "#/definitions/namedArrayOfFields" + } + }, + "jsonObjects": { + "description": "array of JSON objects described by name, schema and other meta-information", + "type": "array", + "items": { + "$ref": "#/definitions/jsonObject" + } + }, + "nameValuePairs": { + "description": "array of name-value pairs", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "otherFieldsVersion": { + "description": "version of the otherFields block", + "type": "number" + } + }, + "required": [ + "otherFieldsVersion" + ] + }, + "requestError": { + "description": "standard request error data structure", + "type": "object", + "properties": { + "messageId": { + "description": "Unique message identifier of the format ABCnnnn where ABC is either SVC for Service Exceptions or POL for Policy Exception", + "type": "string" + }, + "text": { + "description": "Message text, with replacement variables marked with %n, where n is an index into the list of <variables> elements, starting at 1", + "type": "string" + }, + "url": { + "description": "Hyperlink to a detailed error resource e.g., an HTML page for browser user agents", + "type": "string" + }, + "variables": { + "description": "List of zero or more strings that represent the contents of the variables used by the message text", + "type": "string" + } + }, + "required": [ + "messageId", + "text" + ] + }, + "sipSignalingFields": { + "description": "sip signaling fields", + "type": "object", + "properties": { + "additionalInformation": { + "description": "additional sip signaling fields if needed", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "compressedSip": { + "description": "the full SIP request/response including headers and bodies", + "type": "string" + }, + "correlator": { + "description": "this is the same for all events on this call", + "type": "string" + }, + "localIpAddress": { + "description": "IP address on VNF", + "type": "string" + }, + "localPort": { + "description": "port on VNF", + "type": "string" + }, + "remoteIpAddress": { + "description": "IP address of peer endpoint", + "type": "string" + }, + "remotePort": { + "description": "port of peer endpoint", + "type": "string" + }, + "sipSignalingFieldsVersion": { + "description": "version of the sipSignalingFields block", + "type": "number" + }, + "summarySip": { + "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)", + "type": "string" + }, + "vendorVnfNameFields": { + "$ref": "#/definitions/vendorVnfNameFields" + } + }, + "required": [ + "correlator", + "localIpAddress", + "localPort", + "remoteIpAddress", + "remotePort", + "sipSignalingFieldsVersion", + "vendorVnfNameFields" + ] + }, + "stateChangeFields": { + "description": "stateChange fields", + "type": "object", + "properties": { + "additionalFields": { + "description": "additional stateChange fields if needed", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "newState": { + "description": "new state of the entity", + "type": "string", + "enum": [ + "inService", + "maintenance", + "outOfService" + ] + }, + "oldState": { + "description": "previous state of the entity", + "type": "string", + "enum": [ + "inService", + "maintenance", + "outOfService" + ] + }, + "stateChangeFieldsVersion": { + "description": "version of the stateChangeFields block", + "type": "number" + }, + "stateInterface": { + "description": "card or port name of the entity that changed state", + "type": "string" + } + }, + "required": [ + "newState", + "oldState", + "stateChangeFieldsVersion", + "stateInterface" + ] + }, + "suppressedNvPairs": { + "description": "List of specific NvPairsNames to suppress within a given Name-Value Field for event Throttling", + "type": "object", + "properties": { + "nvPairFieldName": { + "description": "Name of the field within which are the nvpair names to suppress", + "type": "string" + }, + "suppressedNvPairNames": { + "description": "Array of nvpair names to suppress within the nvpairFieldName", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "nvPairFieldName", + "suppressedNvPairNames" + ] + }, + "syslogFields": { + "description": "sysLog fields", + "type": "object", + "properties": { + "additionalFields": { + "description": "additional syslog fields if needed provided as name=value delimited by a pipe ‘|’ symbol, for example: 'name1=value1|name2=value2|…'", + "type": "string" + }, + "eventSourceHost": { + "description": "hostname of the device", + "type": "string" + }, + "eventSourceType": { + "description": "type of event source; examples: other, router, switch, host, card, port, slotThreshold, portThreshold, virtualMachine, virtualNetworkFunction", + "type": "string" + }, + "syslogFacility": { + "description": "numeric code from 0 to 23 for facility--see table in documentation", + "type": "integer" + }, + "syslogFieldsVersion": { + "description": "version of the syslogFields block", + "type": "number" + }, + "syslogMsg": { + "description": "syslog message", + "type": "string" + }, + "syslogPri": { + "description": "0-192 combined severity and facility", + "type": "integer" + }, + "syslogProc": { + "description": "identifies the application that originated the message", + "type": "string" + }, + "syslogProcId": { + "description": "a change in the value of this field indicates a discontinuity in syslog reporting", + "type": "number" + }, + "syslogSData": { + "description": "syslog structured data consisting of a structured data Id followed by a set of key value pairs", + "type": "string" + }, + "syslogSdId": { + "description": "0-32 char in format name@number for example ourSDID@32473", + "type": "string" + }, + "syslogSev": { + "description": "numerical Code for severity derived from syslogPri as remaider of syslogPri / 8", + "type": "string", + "enum": [ + "Alert", + "Critical", + "Debug", + "Emergency", + "Error", + "Info", + "Notice", + "Warning" + ] + }, + "syslogTag": { + "description": "msgId indicating the type of message such as TCPOUT or TCPIN; NILVALUE should be used when no other value can be provided", + "type": "string" + }, + "syslogVer": { + "description": "IANA assigned version of the syslog protocol specification - typically 1", + "type": "number" + } + }, + "required": [ + "eventSourceType", + "syslogFieldsVersion", + "syslogMsg", + "syslogTag" + ] + }, + "thresholdCrossingAlertFields": { + "description": "fields specific to threshold crossing alert events", + "type": "object", + "properties": { + "additionalFields": { + "description": "additional threshold crossing alert fields if needed", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "additionalParameters": { + "description": "performance counters", + "type": "array", + "items": { + "$ref": "#/definitions/counter" + } + }, + "alertAction": { + "description": "Event action", + "type": "string", + "enum": [ + "CLEAR", + "CONT", + "SET" + ] + }, + "alertDescription": { + "description": "Unique short alert description such as IF-SHUB-ERRDROP", + "type": "string" + }, + "alertType": { + "description": "Event type", + "type": "string", + "enum": [ + "CARD-ANOMALY", + "ELEMENT-ANOMALY", + "INTERFACE-ANOMALY", + "SERVICE-ANOMALY" + ] + }, + "alertValue": { + "description": "Calculated API value (if applicable)", + "type": "string" + }, + "associatedAlertIdList": { + "description": "List of eventIds associated with the event being reported", + "type": "array", + "items": { + "type": "string" + } + }, + "collectionTimestamp": { + "description": "Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800", + "type": "string" + }, + "dataCollector": { + "description": "Specific performance collector instance used", + "type": "string" + }, + "elementType": { + "description": "type of network element - internal ATT field", + "type": "string" + }, + "eventSeverity": { + "description": "event severity or priority", + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "NORMAL" + ] + }, + "eventStartTimestamp": { + "description": "Time closest to when the measurement was made; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800", + "type": "string" + }, + "interfaceName": { + "description": "Physical or logical port or card (if applicable)", + "type": "string" + }, + "networkService": { + "description": "network name - internal ATT field", + "type": "string" + }, + "possibleRootCause": { + "description": "Reserved for future use", + "type": "string" + }, + "thresholdCrossingFieldsVersion": { + "description": "version of the thresholdCrossingAlertFields block", + "type": "number" + } + }, + "required": [ + "additionalParameters", + "alertAction", + "alertDescription", + "alertType", + "collectionTimestamp", + "eventSeverity", + "eventStartTimestamp", + "thresholdCrossingFieldsVersion" + ] + }, + "vendorVnfNameFields": { + "description": "provides vendor, vnf and vfModule identifying information", + "type": "object", + "properties": { + "vendorName": { + "description": "VNF vendor name", + "type": "string" + }, + "vfModuleName": { + "description": "ASDC vfModuleName for the vfModule generating the event", + "type": "string" + }, + "vnfName": { + "description": "ASDC modelName for the VNF generating the event", + "type": "string" + } + }, + "required": [ + "vendorName" + ] + }, + "vNicPerformance": { + "description": "describes the performance and errors of an identified virtual network interface card", + "type": "object", + "properties": { + "receivedBroadcastPacketsAccumulated": { + "description": "Cumulative count of broadcast packets received as read at the end of the measurement interval", + "type": "number" + }, + "receivedBroadcastPacketsDelta": { + "description": "Count of broadcast packets received within the measurement interval", + "type": "number" + }, + "receivedDiscardedPacketsAccumulated": { + "description": "Cumulative count of discarded packets received as read at the end of the measurement interval", + "type": "number" + }, + "receivedDiscardedPacketsDelta": { + "description": "Count of discarded packets received within the measurement interval", + "type": "number" + }, + "receivedErrorPacketsAccumulated": { + "description": "Cumulative count of error packets received as read at the end of the measurement interval", + "type": "number" + }, + "receivedErrorPacketsDelta": { + "description": "Count of error packets received within the measurement interval", + "type": "number" + }, + "receivedMulticastPacketsAccumulated": { + "description": "Cumulative count of multicast packets received as read at the end of the measurement interval", + "type": "number" + }, + "receivedMulticastPacketsDelta": { + "description": "Count of multicast packets received within the measurement interval", + "type": "number" + }, + "receivedOctetsAccumulated": { + "description": "Cumulative count of octets received as read at the end of the measurement interval", + "type": "number" + }, + "receivedOctetsDelta": { + "description": "Count of octets received within the measurement interval", + "type": "number" + }, + "receivedTotalPacketsAccumulated": { + "description": "Cumulative count of all packets received as read at the end of the measurement interval", + "type": "number" + }, + "receivedTotalPacketsDelta": { + "description": "Count of all packets received within the measurement interval", + "type": "number" + }, + "receivedUnicastPacketsAccumulated": { + "description": "Cumulative count of unicast packets received as read at the end of the measurement interval", + "type": "number" + }, + "receivedUnicastPacketsDelta": { + "description": "Count of unicast packets received within the measurement interval", + "type": "number" + }, + "transmittedBroadcastPacketsAccumulated": { + "description": "Cumulative count of broadcast packets transmitted as read at the end of the measurement interval", + "type": "number" + }, + "transmittedBroadcastPacketsDelta": { + "description": "Count of broadcast packets transmitted within the measurement interval", + "type": "number" + }, + "transmittedDiscardedPacketsAccumulated": { + "description": "Cumulative count of discarded packets transmitted as read at the end of the measurement interval", + "type": "number" + }, + "transmittedDiscardedPacketsDelta": { + "description": "Count of discarded packets transmitted within the measurement interval", + "type": "number" + }, + "transmittedErrorPacketsAccumulated": { + "description": "Cumulative count of error packets transmitted as read at the end of the measurement interval", + "type": "number" + }, + "transmittedErrorPacketsDelta": { + "description": "Count of error packets transmitted within the measurement interval", + "type": "number" + }, + "transmittedMulticastPacketsAccumulated": { + "description": "Cumulative count of multicast packets transmitted as read at the end of the measurement interval", + "type": "number" + }, + "transmittedMulticastPacketsDelta": { + "description": "Count of multicast packets transmitted within the measurement interval", + "type": "number" + }, + "transmittedOctetsAccumulated": { + "description": "Cumulative count of octets transmitted as read at the end of the measurement interval", + "type": "number" + }, + "transmittedOctetsDelta": { + "description": "Count of octets transmitted within the measurement interval", + "type": "number" + }, + "transmittedTotalPacketsAccumulated": { + "description": "Cumulative count of all packets transmitted as read at the end of the measurement interval", + "type": "number" + }, + "transmittedTotalPacketsDelta": { + "description": "Count of all packets transmitted within the measurement interval", + "type": "number" + }, + "transmittedUnicastPacketsAccumulated": { + "description": "Cumulative count of unicast packets transmitted as read at the end of the measurement interval", + "type": "number" + }, + "transmittedUnicastPacketsDelta": { + "description": "Count of unicast packets transmitted within the measurement interval", + "type": "number" + }, + "valuesAreSuspect": { + "description": "Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other condtions", + "type": "string", + "enum": [ + "true", + "false" + ] + }, + "vNicIdentifier": { + "description": "vNic identification", + "type": "string" + } + }, + "required": [ + "valuesAreSuspect", + "vNicIdentifier" + ] + }, + "voiceQualityFields": { + "description": "provides statistics related to customer facing voice products", + "type": "object", + "properties": { + "additionalInformation": { + "description": "additional voice quality fields if needed", + "type": "array", + "items": { + "$ref": "#/definitions/field" + } + }, + "calleeSideCodec": { + "description": "callee codec for the call", + "type": "string" + }, + "callerSideCodec": { + "description": "caller codec for the call", + "type": "string" + }, + "correlator": { + "description": "this is the same for all events on this call", + "type": "string" + }, + "endOfCallVqmSummaries": { + "$ref": "#/definitions/endOfCallVqmSummaries" + }, + "phoneNumber": { + "description": "phone number associated with the correlator", + "type": "string" + }, + "midCallRtcp": { + "description": "Base64 encoding of the binary RTCP data excluding Eth/IP/UDP headers", + "type": "string" + }, + "vendorVnfNameFields": { + "$ref": "#/definitions/vendorVnfNameFields" + }, + "voiceQualityFieldsVersion": { + "description": "version of the voiceQualityFields block", + "type": "number" + } + }, + "required": [ + "calleeSideCodec", + "callerSideCodec", + "correlator", + "midCallRtcp", + "vendorVnfNameFields", + "voiceQualityFieldsVersion" + ] + } + } + } + } +} diff --git a/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/tca-deploy.input.json b/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/tca-deploy.input.json new file mode 100644 index 00000000..c3faf800 --- /dev/null +++ b/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/tca-deploy.input.json @@ -0,0 +1,21 @@ +{ + "spring.data.mongodb.uri": "mongodb://dcae-mongohost/dcae-tcagen2", + "tca.aai.enable_enrichment": true, + "docker-tcagen2_memory_request": "512Mi", + "replicas": 1, + "docker-tcagen2_cpu_limit": "250m", + "tca.aai.username": "DCAE", + "image": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.0.1", + "service_component_name_override": "dcaegen2-tcagen2", + "use_tls": true, + "always_pull_image": true, + "tca.aai.url": "http://aai.onap.svc.cluster.local", + "location_id": "", + "envs": {}, + "tca_handle_in_subscribe_url": "http://message-router:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT/", + "tca_handle_out_publish_url": "http://message-router:3904/events/unauthenticated.TCAGEN2_OUTPUT/", + "external_port_0": 0, + "docker-tcagen2_memory_limit": "512Mi", + "docker-tcagen2_cpu_request": "250m", + "tca.aai.password": "DCAE" +}
\ No newline at end of file diff --git a/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/ves-deploy.input.json b/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/ves-deploy.input.json new file mode 100644 index 00000000..d86ff0bc --- /dev/null +++ b/docs/sections/design-components/DCAE-MOD/Sample-Input-Files/ves-deploy.input.json @@ -0,0 +1,30 @@ +{ + "always_pull_image": true, + "collector.dmaap.streamid": "fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|measurement=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|perf3gpp=ves-perf3gpp", + "dcae-ves-collector_cpu_limit": "250m", + "dcae-ves-collector_cpu_request": "250m", + "dcae-ves-collector_memory_limit": "512Mi", + "dcae-ves-collector_memory_request": "512Mi", + "envs": {}, + "external_port_0": 30235, + "external_port_1": 0, + "header.authlist": "sample1,$2a$10$pgjaxDzSuc6XVFEeqvxQ5u90DKJnM/u7TJTcinAlFJVaavXMWf/Zi|userid1,$2a$10$61gNubgJJl9lh3nvQvY9X.x4e5ETWJJ7ao7ZhJEvmfJigov26Z6uq|userid2,$2a$10$G52y/3uhuhWAMy.bx9Se8uzWinmbJa.dlm1LW6bYPdPkkywLDPLiy", + "image": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.5.4", + "location_id": "", + "replicas": 1, + "service_component_name_override": "dcae-ves-collector-http", + "use_tls": true, + "ves_fault_publish_url": "http://message-router:3904/events/unauthenticated.SEC_FAULT_OUTPUT/", + "ves_heartbeat_publish_url": "http://message-router:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/", + "ves_measurement_publish_url": "http://message-router:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT/", + "ves_mobileflow_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/", + "ves_notification_publish_url": "http://message-router:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/", + "ves_other_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/", + "ves_perf3gpp_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/", + "ves_pnfRegistration_publish_url": "http://message-router:3904/events/unauthenticated.VES_PNFREG_OUTPUT/", + "ves_sipsignaling_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/", + "ves_statechange_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/", + "ves_syslog_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/", + "ves_thresholdCrossingAlert_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/", + "ves_voicequality_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/" +}
\ No newline at end of file diff --git a/docs/sections/design-components/blueprint_generator.rst b/docs/sections/design-components/blueprint_generator.rst new file mode 100644 index 00000000..7670bb2b --- /dev/null +++ b/docs/sections/design-components/blueprint_generator.rst @@ -0,0 +1,84 @@ + +Blueprint Generator +=================== + +What is Blueprint Generator? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The blueprint generator is java-based tool to take a component spec +for a given micro-service and translate that component spec into a +cloudify blueprint yaml file that can be used during deployment in DCAE +Runtime plaform. + +Service components to be deployed as stand-alone +(i.e not part of DCAE service composition flow) can use the blueprint-generator +utility to create deployment yaml. The generated blueprint can be uploaded +to inventory and deployed from Dashboard directly. + + +Steps to run the blueprint generator +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Download the `blueprint generator jar <https://nexus.onap.org/service/local/repositories/releases/content/org/onap/dcaegen2/platform/mod/blueprint-generator/1.3.1/blueprint-generator-1.3.1-executable.jar>`__ file from Nexus + +2. To execute the application, run the following command + + ``java -jar blueprint-generator-1.3.1-executable.jar blueprint`` + +3. This execution will provide the help, as you have not provided the required flags. + +4. When ready you can run the program again except with the required flags. + +5. OPTIONS + + - -p: The path to where the final blueprint yaml file will be created (required) + - -i: The path to the JSON spec file (required) + - -n: Name of the blueprint (optional) + - -t: the path to the import yaml file (optional) + - -d: If this flag is present the bp generator will be created with dmaap plugin (optional) + - -o: This flag will create a service component override for your deployment equal to the value you put (optional) + +6. An example running this program is shown below + + ``java -jar blueprint-generator-1.3.1-executable.jar -p blueprint_output -i ComponentSpecs/TestComponentSpec.json -n TestAppBlueprint`` + + +Extra information +----------------- + +1. The component spec must be compliant with `Component Spec json schema <https://git.onap.org/dcaegen2/platform/plain/mod/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json>`__ + +2. If the flag is marked required then the corresponding values must be provided for blueprint-generator execution + +3. If the flag is identified as optional then it is not mandatory for blueprint-generator execution + +4. If you do not add a -n flag the blueprint name will default to what it is in the component spec + +5. If the directory you specified in the -p flag does not already exist the directory will be created for you + +6. The -t flag will override the default imports set for the blueprints. To see an example of how the import yaml file should be structured see the testImports.yaml file under the folder TestCases + + +How to create policy models: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Policy model creation can be done with the same jar as downloaded for the blueprint generation. + +2. Run the same command as the blueprint generator except replace the ``blueprint`` positional with ``policy`` + +3. Example command + + ``java -jar blueprint-generator-1.3.1-executable.jar policy`` + +4. Options + + - -i: The path to the JSON spec file (required) + - -p: The Output path for all of the models (required) + + +Extra information +----------------- + +1. Not all component specs will be able to create policy models + +2. Multiple policy model files may be created from a single component spec
\ No newline at end of file diff --git a/docs/sections/design-components/component-specification/component-json-schema.rst b/docs/sections/design-components/component-specification/component-json-schema.rst new file mode 100644 index 00000000..18139598 --- /dev/null +++ b/docs/sections/design-components/component-specification/component-json-schema.rst @@ -0,0 +1,933 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +.. _dcae-component-schema: + +Component JSON Schema Definition +================================ + +The schema file used for DCAE onboarding is maintained in `gerrit <https://git.onap.org/dcaegen2/platform/plain/mod/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json>`__ +The same is provided below for documentation reference. + + +:: + + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Component specification schema", + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "version": { + "$ref": "#/definitions/version" + }, + "description": { + "type": "string" + }, + "component_type": { + "type": "string", + "enum": [ + "docker", + "cdap" + ] + }, + "name": { + "$ref": "#/definitions/name" + } + }, + "required": [ + "version", + "name", + "description", + "component_type" + ] + }, + "streams": { + "type": "object", + "properties": { + "publishes": { + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { "$ref": "#/definitions/publisher_http" }, + { "$ref": "#/definitions/publisher_message_router" }, + { "$ref": "#/definitions/publisher_data_router" } + ] + } + }, + "subscribes": { + "type": "array", + "uniqueItems": true, + "items": { + "oneOf": [ + { "$ref": "#/definitions/subscriber_http" }, + { "$ref": "#/definitions/subscriber_message_router" }, + { "$ref": "#/definitions/subscriber_data_router" } + ] + } + } + }, + "required": [ + "publishes", + "subscribes" + ] + }, + "services": { + "type": "object", + "properties": { + "calls": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/caller" + } + }, + "provides": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/provider" + } + } + }, + "required": [ + "calls", + "provides" + ] + }, + "parameters" : { + "anyOf" : [ + {"$ref": "#/definitions/docker-parameters"}, + {"$ref": "#/definitions/cdap-parameters"} + ] + }, + "auxilary": { + "oneOf" : [ + {"$ref": "#/definitions/auxilary_cdap"}, + {"$ref": "#/definitions/auxilary_docker"} + ] + }, + "artifacts": { + "type": "array", + "description": "List of component artifacts", + "items": { + "$ref": "#/definitions/artifact" + } + }, + "policy_info": { + "type": "object", + "properties": { + "policy": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "node_label": + { + "type": "string" + }, + "policy_id": + { + "type": "string" + }, + "policy_model_id": + { + "type": "string" + } + }, + "required": ["node_label", "policy_model_id"] + } + } + }, + "additionalProperties": false + } + }, + "required": [ + "self", + "streams", + "services", + "parameters", + "auxilary", + "artifacts" + ], + "additionalProperties": false, + "definitions": { + "cdap-parameters": { + "description" : "There are three seperate ways to pass parameters to CDAP: app config, app preferences, program preferences. These are all treated as optional.", + "type": "object", + "properties" : { + "program_preferences": { + "description" : "A list of {program_id, program_type, program_preference} objects where program_preference is an object passed into program_id of type program_type", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/program_preference" + } + }, + "app_preferences" : { + "description" : "Parameters Passed down to the CDAP preference API", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/parameter" + } + }, + "app_config" : { + "description" : "Parameters Passed down to the CDAP App Config", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/parameter" + } + } + } + }, + "program_preference": { + "type": "object", + "properties": { + "program_type": { + "$ref": "#/definitions/program_type" + }, + "program_id": { + "type": "string" + }, + "program_pref":{ + "description" : "Parameters that the CDAP developer wants pushed to this program's preferences API. Optional", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/parameter" + } + } + }, + "required": ["program_type", "program_id", "program_pref"] + }, + "program_type": { + "type": "string", + "enum": ["flows","mapreduce","schedules","spark","workflows","workers","services"] + }, + "docker-parameters": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/parameter" + } + }, + "parameter": { + "oneOf": [ + {"$ref": "#/definitions/parameter-list"}, + {"$ref": "#/definitions/parameter-other"} + ] + }, + "parameter-list": { + "properties": { + "name": { + "type": "string" + }, + "value": { + "description": "Default value for the parameter" + }, + "description": { + "description": "Description for the parameter.", + "type": "string" + }, + "type": { + "description": "Only valid type is list, the entry_schema is required - which contains the type of the list element. All properties set for the parameter apply to all elements in the list at this time", + "type": "string", + "enum": ["list"] + }, + "required": { + "description": "An optional key that declares a parameter as required (true) or not (false). Default is true.", + "type": "boolean", + "default": true + }, + "constraints": { + "description": "The optional list of sequenced constraint clauses for the parameter.", + "type": "array", + "items": { + "$ref": "#/definitions/parameter-constraints" + } + }, + "entry_schema": { + "description": "The optional property used to declare the name of the Datatype definition for entries of certain types. entry_schema must be defined when the type is list. This is the only type it is currently supported for.", + "type": "object", + "uniqueItems": true, + "items": {"$ref": "#/definitions/list-parameter"} + }, + "designer_editable": { + "description": "A required property that declares a parameter as editable by designer in SDC Tool (true) or not (false).", + "type": "boolean" + }, + "sourced_at_deployment": { + "description": "A required property that declares that a parameter is assigned at deployment time (true) or not (false).", + "type": "boolean" + }, + "policy_editable": { + "description": "A required property that declares a parameter as editable by DevOps in Policy UI (true) or not (false).", + "type": "boolean" + }, + "policy_group": { + "description": "An optional property used to group policy_editable parameters into groups. Each group will become it's own policy model. Any parameters without this property will be grouped together to form their own policy model", + "type": "string" + }, + "policy_schema" :{ + "type": "array", + "uniqueItems": true, + "items": {"$ref": "#/definitions/policy_schema_parameter"} + } + }, + "required": [ + "name", + "value", + "description", + "designer_editable", + "policy_editable", + "sourced_at_deployment", + "entry_schema" + ], + "additionalProperties": false, + "dependencies": { + "policy_schema": ["policy_editable"] + } + }, + "parameter-other": { + "properties": { + "name": { + "type": "string" + }, + "value": { + "description": "Default value for the parameter" + }, + "description": { + "description": "Description for the parameter.", + "type": "string" + }, + "type": { + "description": "The required data type for the parameter.", + "type": "string", + "enum": [ "string", "number", "boolean", "datetime" ] + }, + "required": { + "description": "An optional key that declares a parameter as required (true) or not (false). Default is true.", + "type": "boolean", + "default": true + }, + "constraints": { + "description": "The optional list of sequenced constraint clauses for the parameter.", + "type": "array", + "items": { + "$ref": "#/definitions/parameter-constraints" + } + }, + "designer_editable": { + "description": "A required property that declares a parameter as editable by designer in SDC Tool (true) or not (false).", + "type": "boolean" + }, + "sourced_at_deployment": { + "description": "A required property that declares that a parameter is assigned at deployment time (true) or not (false).", + "type": "boolean" + }, + "policy_editable": { + "description": "A required property that declares a parameter as editable in Policy UI (true) or not (false).", + "type": "boolean" + }, + "policy_group": { + "description": "An optional property used to group policy_editable parameters into groups. Each group will become it's own policy model. Any parameters without this property will be grouped together to form their own policy model", + "type": "string" + }, + "policy_schema" :{ + "description": "An optional property used to define policy_editable parameters as lists or maps", + "type": "array", + "uniqueItems": true, + "items": {"$ref": "#/definitions/policy_schema_parameter"} + } + }, + "required": [ + "name", + "value", + "description", + "designer_editable", + "sourced_at_deployment", + "policy_editable" + ], + "additionalProperties": false, + "dependencies": { + "policy_schema": ["policy_editable"] + } + }, + "list-parameter": { + "type": "object", + "properties": { + "type": { + "description": "The required data type for each parameter in the list.", + "type": "string", + "enum": ["string", "number"] + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "policy_schema_parameter": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "description": "Default value for the parameter" + }, + "description": { + "description": "Description for the parameter.", + "type": "string" + }, + "type": { + "description": "The required data type for the parameter.", + "type": "string", + "enum": [ "string", "number", "boolean", "datetime", "list", "map" ] + }, + "required": { + "description": "An optional key that declares a parameter as required (true) or not (false). Default is true.", + "type": "boolean", + "default": true + }, + "constraints": { + "description": "The optional list of sequenced constraint clauses for the parameter.", + "type": "array", + "items": { + "$ref": "#/definitions/parameter-constraints" + } + }, + "entry_schema": { + "description": "The optional key that is used to declare the name of the Datatype definition for entries of certain types. entry_schema must be defined when the type is either list or map. If the type is list and the entry type is a simple type (string, number, boolean, datetime), follow with a simple string to describe the entry type. If the type is list and the entry type is a map, follow with an array to describe the keys for the entry map. If the type is list and the entry type is also list, this is not currently supported here. If the type is map, then follow with an array to describe the keys for this map. ", + "type": "array", "uniqueItems": true, "items": {"$ref": "#/definitions/policy_schema_parameter"} + } + }, + "required": [ + "name", + "type" + ], + "additionalProperties": false + }, + "parameter-constraints": { + "type": "object", + "additionalProperties": false, + "properties": { + "equal": { + "description": "Constrains a property or parameter to a value equal to (‘=’) the value declared." + }, + "greater_than": { + "description": "Constrains a property or parameter to a value greater than (‘>’) the value declared.", + "type": "number" + }, + "greater_or_equal": { + "description": "Constrains a property or parameter to a value greater than or equal to (‘>=’) the value declared.", + "type": "number" + }, + "less_than": { + "description": "Constrains a property or parameter to a value less than (‘<’) the value declared.", + "type": "number" + }, + "less_or_equal": { + "description": "Constrains a property or parameter to a value less than or equal to (‘<=’) the value declared.", + "type": "number" + }, + "valid_values": { + "description": "Constrains a property or parameter to a value that is in the list of declared values.", + "type": "array" + }, + "length": { + "description": "Constrains the property or parameter to a value of a given length.", + "type": "number" + }, + "min_length": { + "description": "Constrains the property or parameter to a value to a minimum length.", + "type": "number" + }, + "max_length": { + "description": "Constrains the property or parameter to a value to a maximum length.", + "type": "number" + } + } + }, + "stream_message_router": { + "type": "object", + "properties": { + "format": { + "$ref": "#/definitions/name" + }, + "version": { + "$ref": "#/definitions/version" + }, + "config_key": { + "type": "string" + }, + "type": { + "description": "Type of stream to be used", + "type": "string", + "enum": [ + "message router", "message_router" + ] + } + }, + "required": [ + "format", + "version", + "config_key", + "type" + ] + }, + "publisher_http": { + "type": "object", + "properties": { + "format": { + "$ref": "#/definitions/name" + }, + "version": { + "$ref": "#/definitions/version" + }, + "config_key": { + "type": "string" + }, + "type": { + "description": "Type of stream to be used", + "type": "string", + "enum": [ + "http", + "https" + ] + } + }, + "required": [ + "format", + "version", + "config_key", + "type" + ] + }, + "publisher_message_router": { + "$ref": "#/definitions/stream_message_router" + }, + "publisher_data_router": { + "type": "object", + "properties": { + "format": { + "$ref": "#/definitions/name" + }, + "version": { + "$ref": "#/definitions/version" + }, + "config_key": { + "type": "string" + }, + "type": { + "description": "Type of stream to be used", + "type": "string", + "enum": [ + "data router", "data_router" + ] + } + }, + "required": [ + "format", + "version", + "config_key", + "type" + ] + }, + "subscriber_http": { + "type": "object", + "properties": { + "format": { + "$ref": "#/definitions/name" + }, + "version": { + "$ref": "#/definitions/version" + }, + "route": { + "type": "string" + }, + "type": { + "description": "Type of stream to be used", + "type": "string", + "enum": [ + "http", + "https" + ] + } + }, + "required": [ + "format", + "version", + "route", + "type" + ] + }, + "subscriber_message_router": { + "$ref": "#/definitions/stream_message_router" + }, + "subscriber_data_router": { + "type": "object", + "properties": { + "format": { + "$ref": "#/definitions/name" + }, + "version": { + "$ref": "#/definitions/version" + }, + "route": { + "type": "string" + }, + "type": { + "description": "Type of stream to be used", + "type": "string", + "enum": [ + "data router", "data_router" + ] + }, + "config_key": { + "description": "Data router subscribers require config info to setup their endpoints to handle requests. For example, needs username and password", + "type": "string" + } + }, + "required": [ + "format", + "version", + "route", + "type", + "config_key" + ] + }, + "provider" : { + "oneOf" : [ + {"$ref": "#/definitions/docker-provider"}, + {"$ref": "#/definitions/cdap-provider"} + ] + }, + "cdap-provider" : { + "type": "object", + "properties" : { + "request": { + "$ref": "#/definitions/formatPair" + }, + "response": { + "$ref": "#/definitions/formatPair" + }, + "service_name" : { + "type" : "string" + }, + "service_endpoint" : { + "type" : "string" + }, + "verb" : { + "type": "string", + "enum": ["GET", "PUT", "POST", "DELETE"] + } + }, + "required" : [ + "request", + "response", + "service_name", + "service_endpoint", + "verb" + ] + }, + "docker-provider": { + "type": "object", + "properties": { + "request": { + "$ref": "#/definitions/formatPair" + }, + "response": { + "$ref": "#/definitions/formatPair" + }, + "route": { + "type": "string" + }, + "verb": { + "type": "string", + "enum": ["GET", "PUT", "POST", "DELETE"] + } + }, + "required": [ + "request", + "response", + "route" + ] + }, + "caller": { + "type": "object", + "properties": { + "request": { + "$ref": "#/definitions/formatPair" + }, + "response": { + "$ref": "#/definitions/formatPair" + }, + "config_key": { + "type": "string" + } + }, + "required": [ + "request", + "response", + "config_key" + ] + }, + "formatPair": { + "type": "object", + "properties": { + "format": { + "$ref": "#/definitions/name" + }, + "version": { + "$ref": "#/definitions/version" + } + } + }, + "name": { + "type": "string" + }, + "version": { + "type": "string", + "pattern": "^(\\d+\\.)(\\d+\\.)(\\*|\\d+)$" + }, + "artifact": { + "type": "object", + "description": "Component artifact object", + "properties": { + "uri": { + "type": "string", + "description": "Uri to artifact" + }, + "type": { + "type": "string", + "enum": ["jar", "docker image"] + } + }, + "required": ["uri", "type"] + }, + + "auxilary_cdap": { + "title": "cdap component specification schema", + "type": "object", + "properties": { + "streamname": { + "type": "string" + }, + "artifact_name" : { + "type": "string" + }, + "artifact_version" : { + "type": "string", + "pattern": "^(\\d+\\.)(\\d+\\.)(\\*|\\d+)$" + }, + "namespace":{ + "type": "string", + "description" : "optional" + }, + "programs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/cdap_program" + } + } + }, + "required": [ + "streamname", + "programs", + "artifact_name", + "artifact_version" + ] + }, + "cdap_program_type": { + "type": "string", + "enum": ["flows","mapreduce","schedules","spark","workflows","workers","services"] + }, + "cdap_program": { + "type": "object", + "properties": { + "program_type": { + "$ref": "#/definitions/cdap_program_type" + }, + "program_id": { + "type": "string" + } + }, + "required": ["program_type", "program_id"] + }, + + "auxilary_docker": { + "title": "Docker component specification schema", + "type": "object", + "properties": { + "healthcheck": { + "description": "Define the health check that Consul should perfom for this component", + "type": "object", + "oneOf": [ + { "$ref": "#/definitions/docker_healthcheck_http" }, + { "$ref": "#/definitions/docker_healthcheck_script" } + ] + }, + "ports": { + "description": "Port mapping to be used for Docker containers. Each entry is of the format <container port>:<host port>.", + "type": "array", + "items": { + "type": "string" + } + }, + "log_info": { + "description": "Component specific details for logging", + "type": "object", + "properties": { + "log_directory": { + "description": "The path in the container where the component writes its logs. If the component is following the EELF requirements, this would be the directory where the four EELF files are being written. (Other logs can be placed in the directory--if their names in '.log', they'll also be sent into ELK.)", + "type": "string" + }, + "alternate_fb_path": { + "description": "By default, the log volume is mounted at /var/log/onap/<component_type> in the sidecar container's file system. 'alternate_fb_path' allows overriding the default. Will affect how the log data can be found in the ELK system.", + "type": "string" + } + }, + "additionalProperties": false + }, + "tls_info": { + "description": "Component information to use tls certificates", + "type": "object", + "properties": { + "cert_directory": { + "description": "The path in the container where the component certificates will be placed by the init container", + "type": "string" + }, + "use_tls": { + "description": "Boolean flag to determine if the application is using tls certificates", + "type": "boolean" + } + }, + "required": [ + "cert_directory","use_tls" + ], + "additionalProperties": false + }, + "databases": { + "description": "The databases the application is connecting to using the pgaas", + "type": "object", + "additionalProperties": { + "type": "string", + "enum": [ + "postgres" + ] + } + }, + "policy": { + "properties": { + "trigger_type": { + "description": "Only value of docker is supported at this time.", + "type": "string", + "enum": ["docker"] + }, + "script_path": { + "description": "Script command that will be executed for policy reconfiguration", + "type": "string" + } + }, + "required": [ + "trigger_type","script_path" + ], + "additionalProperties": false + }, + "volumes": { + "description": "Volume mapping to be used for Docker containers. Each entry is of the format below", + "type": "array", + "items": { + "type": "object", + "properties": { + "host":{ + "type":"object", + "path": {"type": "string"} + }, + "container":{ + "type":"object", + "bind": { "type": "string"}, + "mode": { "type": "string"} + } + } + } + } + }, + "required": [ + "healthcheck" + ], + "additionalProperties": false + }, + "docker_healthcheck_http": { + "properties": { + "type": { + "description": "Consul health check type", + "type": "string", + "enum": [ + "http", + "https" + ] + }, + "interval": { + "description": "Interval duration in seconds i.e. 10s", + "default": "15s", + "type": "string" + }, + "timeout": { + "description": "Timeout in seconds i.e. 10s", + "default": "1s", + "type": "string" + }, + "endpoint": { + "description": "Relative endpoint used by Consul to check health by making periodic HTTP GET calls", + "type": "string" + } + }, + "required": [ + "type", + "endpoint" + ] + }, + "docker_healthcheck_script": { + "properties": { + "type": { + "description": "Consul health check type", + "type": "string", + "enum": [ + "script", + "docker" + ] + }, + "interval": { + "description": "Interval duration in seconds i.e. 10s", + "default": "15s", + "type": "string" + }, + "timeout": { + "description": "Timeout in seconds i.e. 10s", + "default": "1s", + "type": "string" + }, + "script": { + "description": "Script command that will be executed by Consul to check health", + "type": "string" + } + }, + "required": [ + "type", + "script" + ] + } + } + } + diff --git a/docs/sections/design-components/component-specification/component-type-docker.rst b/docs/sections/design-components/component-specification/component-type-docker.rst new file mode 100755 index 00000000..70412c0f --- /dev/null +++ b/docs/sections/design-components/component-specification/component-type-docker.rst @@ -0,0 +1,1437 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+.. _component_specification:
+
+What is Component Specification?
+================================
+
+This page will discuss categories defined in :any:`component specification schema <dcae-component-schema>` and their usage.
+
+
+Meta Schema Definition
+----------------------
+
+
+The “Meta Schema” implementation defines how component specification
+JSON schemas can be written to define user input. It is itself a JSON
+schema (thus it is a “meta schema”). It requires the name of the
+component entry, component type (either ‘cdap’ or ‘docker’) and a
+description under “self” object. The meta schema version must be
+specified as the value of the “version” key. Then the input schema
+itself is described.
+
+There are four types of schema descriptions objects - jsonschema for
+inline standard JSON Schema definitions of JSON inputs, delimitedschema
+for delimited data input using a JSON description defined by AT&T,
+unstructured for unstructured text, and reference that allows a pointer
+to another artifact for a schema. The reference allows for XML and Protocol Buffer schema,
+but can be used as a pointer to JSON, Delimited Format, and Unstructured
+schemas as well.
+
+.. _metadata:
+
+Component Metadata
+------------------
+
+Metadata refers to the properties found under the ``self`` JSON. This
+group of properties is used to uniquely identify this component
+specification and identify the component that this specification is used
+to capture.
+
+Example:
+
+::
+
+ "self": {
+ "version": "1.0.0",
+ "name": "yourapp.component.kpi_anomaly",
+ "description": "Classifies VNF KPI data as anomalous",
+ "component_type": "docker"
+ },
+
+``self`` Schema:
+
++-------------+--------+----------------+
+| Property | Type | Description |
+| Name | | |
++=============+========+================+
+| version | string | *Required*. |
+| | | Semantic |
+| | | version |
+| | | for this |
+| | | specification |
++-------------+--------+----------------+
+| name | string | *Required*. |
+| | | Full |
+| | | name of |
+| | | this |
+| | | component |
+| | | which is |
+| | | also |
+| | | used as |
+| | | this |
+| | | component's |
+| | | catalog |
+| | | id. |
++-------------+--------+----------------+
+| description | string | *Required* |
+| | | Human-readable |
+| | | text |
+| | | describing |
+| | | the |
+| | | component |
+| | | and the |
+| | | components |
+| | | functional |
+| | | purpose. |
++-------------+--------+----------------+
+| component_t\| string | *Required* |
+| ype | | Identify |
+| | | what |
+| | | containe\ |
+| | | rization |
+| | | technolo\ |
+| | | gy |
+| | | this |
+| | | componen\ |
+| | | t |
+| | | uses: |
+| | | *docker* |
+| | | or |
+| | | *cdap*. |
+| | | |
++-------------+--------+----------------+
+
+.. _interfaces:
+
+Interfaces
+----------
+
+Interfaces are the JSON objects found under the ``streams`` key and the
+``services`` key. These are used to describe the interfaces that the
+component uses and the interfaces that the component provides. The
+description of each interface includes the associated :any:`data
+format <data-formats>`.
+
+Streams
+~~~~~~~
+
+- The ``streams`` JSON is for specifying data produced for consumption
+ by other components, and the streams expected to subscribe to that is
+ produced by other components. These are “fire and forget” type
+ interfaces where the publisher of a stream does not expect or parse a
+ response from the subscriber.
+- The term ``stream`` here is abstract and neither refers to “CDAP
+ streams” or “DMaaP feeds”. While a stream is very likely a DMaaP
+ feed, it could be a direct stream of data being routed via HTTP too.
+ It abstractly refers to a sequence of data leaving a publisher.
+- Streams have anonymous publish/subscribe semantics, which decouples
+ the production of information from its consumption. Like the component
+ specification, the data format specification is represented/validated against this
+ `Data Format json schema <https://gerrit.onap.org/r/gitweb?p=dcaegen2/platform/cli.git;a=blob;f=component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json;h=be1568291300305c7adb9a8d244d39f9e6ddadbd;hb=HEAD>`__
+- In general, components are not aware of who they are communicating
+ with.
+- Instead, components that are interested in data, subscribe to the
+ relevant stream; components that generate data publish to the
+ relevant stream.
+- There can be multiple publishers and subscribers to a stream. Streams
+ are intended for unidirectional, streaming communication.
+
+Streams interfaces that implement an HTTP endpoint must support POST.
+
+Streams are split into:
+
++-------------+----+----------+
+| Property | Ty\| Descript\|
+| Name | pe | ion |
++=============+====+==========+
+| subscribes | JS\| *Require\|
+| | ON | d*. |
+| | li\| List of |
+| | st | all |
+| | | availabl\|
+| | | e |
+| | | stream |
+| | | interfac\|
+| | | es |
+| | | that |
+| | | this |
+| | | componen\|
+| | | t |
+| | | has that |
+| | | can be |
+| | | used for |
+| | | subscrib\|
+| | | ing |
++-------------+----+----------+
+| publishes | JS\| *Require\|
+| | ON | d*. |
+| | li\| List of |
+| | st | all |
+| | | stream |
+| | | interfac\|
+| | | es |
+| | | that |
+| | | this |
+| | | componen\|
+| | | t |
+| | | will |
+| | | publish |
+| | | onto |
++-------------+----+----------+
+
+Subscribes
+^^^^^^^^^^
+
+Example:
+
+.. code:: json
+
+ "streams": {
+ "subscribes": [{
+ "format": "dcae.vnf.kpi",
+ "version": "1.0.0",
+ "route": "/data", // for CDAP this value is not used
+ "type": "http"
+ }],
+ ...
+ }
+
+This describes that ``yourapp.component.kpi_anomaly`` exposes an HTTP
+endpoint called ``/data`` which accepts requests that have the data
+format of ``dcae.vnf.kpi`` version ``1.0.0``.
+
+``subscribes`` Schema:
+
++-------------+----+--------------------+
+| Property | Ty\| Descript\ |
+| Name | pe | ion |
++=============+====+====================+
+| format | st\| *Require\ |
+| | ri\| d*. |
+| | ng | Data |
+| | | format |
+| | | id of |
+| | | the data |
+| | | format |
+| | | that is |
+| | | used by |
+| | | this |
+| | | interfac\ |
+| | | e |
++-------------+----+--------------------+
+| version | st\| *Require\ |
+| | ri\| d*. |
+| | ng | Data |
+| | | format |
+| | | version |
+| | | of the |
+| | | data |
+| | | format |
+| | | that is |
+| | | used by |
+| | | this |
+| | | interfac\ |
+| | | e |
++-------------+----+--------------------+
+| route | st\| *Require\ |
+| | ri\| d |
+| | ng | for HTTP |
+| | | and data |
+| | | router*. |
+| | | The HTTP |
+| | | route |
+| | | that |
+| | | this |
+| | | interfac\ |
+| | | e |
+| | | listens |
+| | | on |
++-------------+----+--------------------+
+| config_key | st\| *Require\ |
+| | ri\| d \ |
+| | ng | for \ |
+| | | message_router\ |
+| | | and data \ |
+| | | router*. |
+| | | The HTTP |
+| | | route |
+| | | that |
+| | | this |
+| | | interfac\ |
+| | | e |
+| | | listens |
+| | | on |
++-------------+----+--------------------+
+| type | st\| *Require\ |
+| | ri\| d*. |
+| | ng | Type of |
+| | | stream: |
+| | | ``http`` |
+| | | , |
+| | | ``message_router`` |
+| | | , |
+| | | ``data_router`` |
++-------------+----+--------------------+
+
+.. _message-router:
+
+Message router
+''''''''''''''
+
+Message router subscribers are http clients rather than http services
+and performs a http a ``GET`` call. Thus, message router subscribers
+description is structured like message router publishers and requires
+``config_key``:
+
+.. code:: json
+
+ "streams": {
+ "subscribes": [{
+ "format": "dcae.some-format",
+ "version": "1.0.0",
+ "config_key": "some_format_handle",
+ "type": "message router"
+ }],
+ ...
+ }
+
+
+.. _data-router:
+
+Data router
+'''''''''''
+
+Data router subscribers are http or https services that handle ``PUT``
+requests from data router. Developers must provide the ``route`` or url
+path/endpoint that is expected to handle data router requests. This will
+be used to construct the delivery url needed to register the subscriber
+to the provisioned feed. Developers must also provide a ``config_key``
+because there is dynamic configuration information associated with the
+feed that the application will need e.g. username and password. See the
+page on :any:`DMaaP connection objects <dmaap-data-router>` for more details on
+the configuration information.
+
+Example (not tied to the larger example):
+
+.. code:: json
+
+ "streams": {
+ "subscribes": [{
+ "config_key": "some-sub-dr",
+ "format": "sandbox.platform.any",
+ "route": "/identity",
+ "type": "data_router",
+ "version": "0.1.0"
+ }],
+ ...
+ }
+
+Publishes
+^^^^^^^^^
+
+Example:
+
+.. code:: json
+
+ "streams": {
+ ...
+ "publishes": [{
+ "format": "yourapp.format.integerClassification",
+ "version": "1.0.0",
+ "config_key": "prediction",
+ "type": "http"
+ }]
+ },
+
+This describes that ``yourapp.component.kpi_anomaly`` publishes by making
+POST requests to streams that support the data format
+``yourapp.format.integerClassification`` version ``1.0.0``.
+
+``publishes`` Schema:
+
++-------------+----+--------------------+
+| Property | Ty\| Descript\ |
+| Name | pe | ion |
++=============+====+====================+
+| format | st\| *Require\ |
+| | ri\| d*. |
+| | ng | Data |
+| | | format |
+| | | id of |
+| | | the data |
+| | | format |
+| | | that is |
+| | | used by |
+| | | this |
+| | | interfac\ |
+| | | e |
++-------------+----+--------------------+
+| version | st\| *Require\ |
+| | ri\| d*. |
+| | ng | Data |
+| | | format |
+| | | version |
+| | | of the |
+| | | data |
+| | | format |
+| | | that is |
+| | | used by |
+| | | this |
+| | | interfac\ |
+| | | e |
++-------------+----+--------------------+
+| config_key | st\| *Require\ |
+| | ri\| d*. |
+| | ng | The JSON |
+| | | key in |
+| | | the |
+| | | generate\ |
+| | | d |
+| | | applicat |
+| | | ion |
+| | | configur\ |
+| | | ation |
+| | | that |
+| | | will be |
+| | | used to |
+| | | pass the |
+| | | downstre\ |
+| | | am |
+| | | componen\ |
+| | | t’s |
+| | | (the |
+| | | subscrib\ |
+| | | er’s) |
+| | | connecti\ |
+| | | on |
+| | | informat\ |
+| | | ion. |
++-------------+----+--------------------+
+| type | st\| *Require\ |
+| | ri\| d*. |
+| | ng | Type of |
+| | | stream: |
+| | | ``http`` |
+| | | , |
+| | | ``message_router`` |
+| | | , |
+| | | ``data_router`` |
++-------------+----+--------------------+
+
+.. message-router-1:
+
+Message router
+''''''''''''''
+
+Message router publishers are http clients of DMaap message_router.
+Developers must provide a ``config_key`` because there is dynamic
+configuration information associated with the feed that the application
+needs to receive e.g. topic url, username, password. See the page on
+:any:`DMaaP connection objects <dmaap-message-router>` for more details on
+the configuration information.
+
+Example (not tied to the larger example):
+
+.. code:: json
+
+ "streams": {
+ ...
+ "publishes": [{
+ "config_key": "some-pub-mr",
+ "format": "sandbox.platform.any",
+ "type": "message_router",
+ "version": "0.1.0"
+ }]
+ }
+
+.. data-router-1:
+
+Data router
+'''''''''''
+
+Data router publishers are http clients that make ``PUT`` requests to
+data router. Developers must also provide a ``config_key`` because there
+is dynamic configuration information associated with the feed that the
+application will need to receive e.g. publish url, username, password.
+See the page on :any:`DMaaP connection objects <dmaap-data-router>` for more details on
+the configuration information.
+
+Example (not tied to the larger example):
+
+.. code:: json
+
+ "streams": {
+ ...
+ "publishes": [{
+ "config_key": "some-pub-dr",
+ "format": "sandbox.platform.any",
+ "type": "data_router",
+ "version": "0.1.0"
+ }]
+ }
+
+Quick Reference
+^^^^^^^^^^^^^^^
+
+Refer to this :doc:`Quick Reference <streams-grid>` for a
+comparison of the Streams ‘Publishes’ and ‘Subscribes’ sections.
+
+Services
+~~~~~~~~
+
+- The publish / subscribe model is a very flexible communication
+ paradigm, but its many-to-many one-way transport is not appropriate
+ for RPC request / reply interactions, which are often required in a
+ distributed system.
+- Request / reply is done via a Service, which is defined by a pair of
+ messages: one for the request and one for the reply.
+
+Services are split into:
+
++-------------+----+----------+
+| Property | Ty\| Descript\|
+| Name | pe | ion |
++=============+====+==========+
+| calls | JS\| *Require\|
+| | ON | d*. |
+| | li\| List of |
+| | st | all |
+| | | service |
+| | | interfac\|
+| | | es |
+| | | that |
+| | | this |
+| | | componen\|
+| | | t |
+| | | will |
+| | | call |
++-------------+----+----------+
+| provides | JS\| *Require\|
+| | ON | d*. |
+| | li\| List of |
+| | st | all |
+| | | service |
+| | | interfac\|
+| | | es |
+| | | that |
+| | | this |
+| | | componen\|
+| | | t |
+| | | exposes |
+| | | and |
+| | | provides |
++-------------+----+----------+
+
+Calls
+^^^^^
+
+The JSON ``services/calls`` is for specifying that the component relies
+on an HTTP(S) service—the component sends that service an HTTP request,
+and that service responds with an HTTP reply. An example of this is how
+string matching (SM) depends on the AAI Broker. SM performs a
+synchronous REST call to the AAI broker, providing it the VMNAME of the
+VNF, and the AAI Broker responds with additional details about the VNF.
+This dependency is expressed via ``services/calls``. In contrast, the
+output of string matching (the alerts it computes) is sent directly to
+policy as a fire-and-forget interface, so that is an example of a
+``stream``.
+
+Example:
+
+.. code:: json
+
+ "services": {
+ "calls": [{
+ "config_key": "vnf-db",
+ "request": {
+ "format": "dcae.vnf.meta",
+ "version": "1.0.0"
+ },
+ "response": {
+ "format": "dcae.vnf.kpi",
+ "version": "1.0.0"
+ }
+ }],
+ ...
+ }
+
+This describes that ``yourapp.component.kpi_anomaly`` will make HTTP
+calls to a downstream component that accepts requests of data format
+``dcae.vnf.meta`` version ``1.0.0`` and is expecting the response to be
+``dcae.vnf.kpi`` version ``1.0.0``.
+
+``calls`` Schema:
+
++-------------+----+----------+
+| Property | Ty\| Descript\|
+| Name | pe | ion |
++=============+====+==========+
+| request | JS\| *Require\|
+| | ON | d*. |
+| | ob\| Descript\|
+| | je\| ion |
+| | ct | of the |
+| | | expected |
+| | | request |
+| | | for this |
+| | | downstre\|
+| | | am |
+| | | interfac\|
+| | | e |
++-------------+----+----------+
+| response | JS\| *Require\|
+| | ON | d*. |
+| | ob\| Descript\|
+| | je\| ion |
+| | ct | of the |
+| | | expected |
+| | | response |
+| | | for this |
+| | | downstre\|
+| | | am |
+| | | interfac\|
+| | | e |
++-------------+----+----------+
+| config_key | st\| *Require\|
+| | ri\| d*. |
+| | ng | The JSON |
+| | | key in |
+| | | the |
+| | | generate\|
+| | | d |
+| | | applicat |
+| | | ion |
+| | | configur\|
+| | | ation |
+| | | that |
+| | | will be |
+| | | used to |
+| | | pass the |
+| | | downstre\|
+| | | am |
+| | | componen |
+| | | t |
+| | | connecti\|
+| | | on |
+| | | informat\|
+| | | ion. |
++-------------+----+----------+
+
+The JSON object schema for both ``request`` and ``response``:
+
++-------------+----+----------+
+| Property | Ty\| Descript\|
+| Name | pe | ion |
++=============+====+==========+
+| format | st\| *Require\|
+| | ri\| d*. |
+| | ng | Data |
+| | | format |
+| | | id of |
+| | | the data |
+| | | format |
+| | | that is |
+| | | used by |
+| | | this |
+| | | interfac\|
+| | | e |
++-------------+----+----------+
+| version | st\| *Require\|
+| | ri\| d*. |
+| | ng | Data |
+| | | format |
+| | | version |
+| | | of the |
+| | | data |
+| | | format |
+| | | that is |
+| | | used by |
+| | | this |
+| | | interfac\|
+| | | e |
++-------------+----+----------+
+
+Provides
+^^^^^^^^
+
+Example:
+
+.. code:: json
+
+ "services": {
+ ...
+ "provides": [{
+ "route": "/score-vnf",
+ "request": {
+ "format": "dcae.vnf.meta",
+ "version": "1.0.0"
+ },
+ "response": {
+ "format": "yourapp.format.integerClassification",
+ "version": "1.0.0"
+ }
+ }]
+ },
+
+This describes that ``yourapp.component.kpi_anomaly`` provides a service
+interface and it is exposed on the ``/score-vnf`` HTTP endpoint. The
+endpoint accepts requests that have the data format ``dcae.vnf.meta``
+version ``1.0.0`` and gives back a response of
+``yourapp.format.integerClassification`` version ``1.0.0``.
+
+``provides`` Schema for a Docker component:
+
++-------------+----+----------+
+| Property | Ty\| Descript\|
+| Name | pe | ion |
++=============+====+==========+
+| request | JS\| *Require\|
+| | ON | d*. |
+| | ob\| Descript\|
+| | je\| ion |
+| | ct | of the |
+| | | expected |
+| | | request |
+| | | for this |
+| | | interfac\|
+| | | e |
++-------------+----+----------+
+| response | JS\| *Require\|
+| | ON | d*. |
+| | ob\| Descript\|
+| | je\| ion |
+| | ct | of the |
+| | | expected |
+| | | response |
+| | | for this |
+| | | interfac\|
+| | | e |
++-------------+----+----------+
+| route | st\| *Require\|
+| | ri\| d*. |
+| | ng | The HTTP |
+| | | route |
+| | | that |
+| | | this |
+| | | interfac\|
+| | | e |
+| | | listens |
+| | | on |
++-------------+----+----------+
+
+The JSON object schema for both ``request`` and ``response``:
+
++-------------+----+----------+
+| Property | Ty\| Descript\|
+| Name | pe | ion |
++=============+====+==========+
+| format | st\| *Require\|
+| | ri\| d*. |
+| | ng | Data |
+| | | format |
+| | | id of |
+| | | the data |
+| | | format |
+| | | that is |
+| | | used by |
+| | | this |
+| | | interfac\|
+| | | e |
++-------------+----+----------+
+| version | st\| *Require\|
+| | ri\| d*. |
+| | ng | Data |
+| | | format |
+| | | version |
+| | | of the |
+| | | data |
+| | | format |
+| | | that is |
+| | | used by |
+| | | this |
+| | | interfac\|
+| | | e |
++-------------+----+----------+
+
+Note, for CDAP, there is a slight variation due to the way CDAP exposes
+services:
+
+::
+
+ "provides":[ // note this is a list of JSON
+ {
+ "request":{ ...},
+ "response":{ ...},
+ "service_name":"name CDAP service",
+ "service_endpoint":"greet", // E.g the URL is /services/service_name/methods/service_endpoint
+ "verb":"GET" // GET, PUT, or POST
+ }
+ ]
+
+``provides`` Schema for a CDAP component:
+
++-------------+----+-----------+
+| Property | Ty\| Descript\ |
+| Name | pe | ion |
++=============+====+===========+
+| request | JS\| *Require\ |
+| | ON | d*. |
+| | ob\| Descript\ |
+| | je\| ion |
+| | ct | of the |
+| | | expected |
+| | | request |
+| | | data |
+| | | format |
+| | | for this |
+| | | interfac\ |
+| | | e |
++-------------+----+-----------+
+| response | JS\| *Require\ |
+| | ON | d*. |
+| | ob\| Descript\ |
+| | je\| ion |
+| | ct | of the |
+| | | expected |
+| | | response |
+| | | for this |
+| | | interfac\ |
+| | | e |
++-------------+----+-----------+
+| service_nam\| st\| *Require\ |
+| e | ri\| d*. |
+| | ng | The CDAP |
+| | | service |
+| | | name (eg |
+| | | “Greetin\ |
+| | | g”) |
++-------------+----+-----------+
+| service_end | st\| *Require\ |
+| point | ri\| d*. |
+| | ng | The CDAP |
+| | | service |
+| | | endpoint |
+| | | for this |
+| | | service_n\|
+| | | ame |
+| | | (eg |
+| | | “/greet” |
+| | | ) |
++-------------+----+-----------+
+| verb | st\| *Require\ |
+| | ri\| d*. |
+| | ng | ‘GET’, |
+| | | ‘PUT’ or |
+| | | ‘POST’ |
++-------------+----+-----------+
+
+.. _common-specification-parameters:
+
+Parameters
+----------
+
+``parameters`` is where to specify the component’s application
+configuration parameters that are not connection information.
+
++---------------+------------+----------------------------------+
+| Property Name | Type | Description |
++===============+============+==================================+
+| parameters | JSON array | Each entry is a parameter object |
++---------------+------------+----------------------------------+
+
+Parameter object has the following available properties:
+
++--------------+----+----------+------+
+| Property | Ty\| Descript\| Defa\|
+| Name | pe | ion | ult |
++==============+====+==========+======+
+| name | st\| *Require\| |
+| | ri\| d*. | |
+| | ng | The | |
+| | | property | |
+| | | name | |
+| | | that | |
+| | | will be | |
+| | | used as | |
+| | | the key | |
+| | | in the | |
+| | | generate\| |
+| | | d | |
+| | | config | |
++--------------+----+----------+------+
+| value | an\| *Require\| |
+| | y | d*. | |
+| | | The | |
+| | | default | |
+| | | value | |
+| | | for the | |
+| | | given | |
+| | | paramete\| |
+| | | r | |
++--------------+----+----------+------+
+| description | st\| *Require\| |
+| | ri\| d*. | |
+| | ng | Human-re\| |
+| | | adable | |
+| | | text | |
+| | | describi\| |
+| | | ng | |
+| | | the | |
+| | | paramete\| |
+| | | r | |
+| | | like | |
+| | | what its | |
+| | | for | |
++--------------+----+----------+------+
+| type | st\| The | |
+| | ri\| required | |
+| | ng | data | |
+| | | type for | |
+| | | the | |
+| | | paramete\| |
+| | | r | |
++--------------+----+----------+------+
+| required | bo\| An | true |
+| | ol\| optional | |
+| | ea\| key that | |
+| | n | declares | |
+| | | a | |
+| | | paramete\| |
+| | | r | |
+| | | as | |
+| | | required | |
+| | | (true) | |
+| | | or not | |
+| | | (false) | |
++--------------+----+----------+------+
+| constraints | ar\| The | |
+| | ra\| optional | |
+| | y | list of | |
+| | | sequence | |
+| | | d | |
+| | | constrai\| |
+| | | nt | |
+| | | clauses | |
+| | | for the | |
+| | | paramete\| |
+| | | r. | |
+| | | See | |
+| | | below | |
++--------------+----+----------+------+
+| entry_schem\ | st\| The | |
+| a | ri\| optional | |
+| | ng | key that | |
+| | | is used | |
+| | | to | |
+| | | declare | |
+| | | the name | |
+| | | of the | |
+| | | Datatype | |
+| | | definiti\| |
+| | | on | |
+| | | for | |
+| | | entries | |
+| | | of set | |
+| | | types | |
+| | | such as | |
+| | | the | |
+| | | TOSCA | |
+| | | ‘list’ | |
+| | | or | |
+| | | ‘map’. | |
+| | | Only 1 | |
+| | | level is | |
+| | | supporte\| |
+| | | d | |
+| | | at this | |
+| | | time | |
++--------------+----+----------+------+
+| designer_ed\ | bo\| An | |
+| itable | ol\| optional | |
+| | ea\| key that | |
+| | n | declares | |
+| | | a | |
+| | | paramete\| |
+| | | r | |
+| | | to be | |
+| | | editable | |
+| | | by | |
+| | | designer | |
+| | | (true) | |
+| | | or not | |
+| | | (false) | |
++--------------+----+----------+------+
+| sourced_at_d\| bo\| An | |
+| eployment | ol\| optional | |
+| | ea\| key that | |
+| | n | declares | |
+| | | a | |
+| | | paramete\| |
+| | | r’s | |
+| | | value to | |
+| | | be | |
+| | | assigned | |
+| | | at | |
+| | | deployme\| |
+| | | nt | |
+| | | time | |
+| | | (true) | |
++--------------+----+----------+------+
+| policy_edit\ | bo\| An | |
+| able | ol\| optional | |
+| | ea\| key that | |
+| | n | declares | |
+| | | a | |
+| | | paramete\| |
+| | | r | |
+| | | to be | |
+| | | editable | |
+| | | by | |
+| | | policy | |
+| | | (true) | |
+| | | or not | |
+| | | (false) | |
++--------------+----+----------+------+
+| policy_sche\ | ar\| The | |
+| ma | ra\| optional | |
+| | y | list of | |
+| | | schema | |
+| | | definiti\| |
+| | | ons | |
+| | | used for | |
+| | | policy. | |
+| | | See | |
+| | | below | |
++--------------+----+----------+------+
+
+Example:
+
+.. code:: json
+
+ "parameters": [
+ {
+ "name": "threshold",
+ "value": 0.75,
+ "description": "Probability threshold to exceed to be anomalous"
+ }
+ ]
+
+Many of the parameter properties have been copied from TOSCA model
+property definitions and are to be used for service design composition
+and policy creation. See `section 3.5.8 *Property
+definition* <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/TOSCA-Simple-Profile-YAML-v1.1.html>`__.
+
+The property ``constraints`` is a list of objects where each constraint
+object:
+
++--------------+----+----------+
+| Property | Ty\| Descript\|
+| Name | pe | ion |
++==============+====+==========+
+| equal | | Constrai\|
+| | | ns |
+| | | a |
+| | | property |
+| | | or |
+| | | paramete\|
+| | | r |
+| | | to a |
+| | | value |
+| | | equal to |
+| | | (‘=’) |
+| | | the |
+| | | value |
+| | | declared |
++--------------+----+----------+
+| greater_tha\ | nu\| Constrai\|
+| n | mb\| ns |
+| | er | a |
+| | | property |
+| | | or |
+| | | paramete |
+| | | r |
+| | | to a |
+| | | value |
+| | | greater |
+| | | than |
+| | | (‘>’) |
+| | | the |
+| | | value |
+| | | declared |
++--------------+----+----------+
+| greater_or_e\| nu\| Constrai\|
+| qual | mb\| ns |
+| | er | a |
+| | | property |
+| | | or |
+| | | paramete\|
+| | | r |
+| | | to a |
+| | | value |
+| | | greater |
+| | | than or |
+| | | equal to |
+| | | (‘>=’) |
+| | | the |
+| | | value |
+| | | declared |
++--------------+----+----------+
+| less_than | nu\| Constrai\|
+| | mb\| ns |
+| | er | a |
+| | | property |
+| | | or |
+| | | paramete\|
+| | | r |
+| | | to a |
+| | | value |
+| | | less |
+| | | than |
+| | | (‘<’) |
+| | | the |
+| | | value |
+| | | declared |
++--------------+----+----------+
+| less_or_equ\ | nu\| Constrai\|
+| al | mb\| ns |
+| | er | a |
+| | | property |
+| | | or |
+| | | paramete\|
+| | | r |
+| | | to a |
+| | | value |
+| | | less |
+| | | than or |
+| | | equal to |
+| | | (‘<=’) |
+| | | the |
+| | | value |
+| | | declared |
++--------------+----+----------+
+| valid_value\ | ar\| Constrai\|
+| s | ra\| ns |
+| | y | a |
+| | | property |
+| | | or |
+| | | paramete\|
+| | | r |
+| | | to a |
+| | | value |
+| | | that is |
+| | | in the |
+| | | list of |
+| | | declared |
+| | | values |
++--------------+----+----------+
+| length | nu\| Constrai\|
+| | mb\| ns |
+| | er | the |
+| | | property |
+| | | or |
+| | | paramete\|
+| | | r |
+| | | to a |
+| | | value of |
+| | | a given |
+| | | length |
++--------------+----+----------+
+| min_length | nu\| Constrai\|
+| | mb\| ns |
+| | er | the |
+| | | property |
+| | | or |
+| | | paramete\|
+| | | r |
+| | | to a |
+| | | value to |
+| | | a |
+| | | minimum |
+| | | length |
++--------------+----+----------+
+| max_length | nu\| Constrai\|
+| | mb\| ns |
+| | er | the |
+| | | property |
+| | | or |
+| | | paramete\|
+| | | r |
+| | | to a |
+| | | value to |
+| | | a |
+| | | maximum |
+| | | length |
++--------------+----+----------+
+
+``threshold`` is the configuration parameter and will get set to 0.75
+when the configuration gets generated.
+
+The property ``policy_schema`` is a list of objects where each
+policy_schema object:
+
++-------------+----+----------+------+
+| Property | Ty\| Descript\| Defa\|
+| Name | pe | ion | ult |
++=============+====+==========+======+
+| name | st\| *Require\| |
+| | ri\| d*. | |
+| | ng | paramete\| |
+| | | r | |
+| | | name | |
++-------------+----+----------+------+
+| value | st\| default | |
+| | ri\| value | |
+| | ng | for the | |
+| | | paramete\| |
+| | | r | |
++-------------+----+----------+------+
+| description | st\| paramete\| |
+| | ri\| r | |
+| | ng | descript\| |
+| | | ion | |
++-------------+----+----------+------+
+| type | en\| *Require\| |
+| | um | d*. | |
+| | | data | |
+| | | type of | |
+| | | the | |
+| | | paramete\| |
+| | | r, | |
+| | | ‘string’ | |
+| | | , | |
+| | | ‘number’ | |
+| | | , | |
+| | | ‘boolean | |
+| | | ’, | |
+| | | ‘datetim\| |
+| | | e’, | |
+| | | ‘list’, | |
+| | | or ‘map’ | |
++-------------+----+----------+------+
+| required | bo\| is | true |
+| | ol\| paramete\| |
+| | ea\| r | |
+| | n | required | |
+| | | or not? | |
++-------------+----+----------+------+
+| constraints | ar\| The | |
+| | ra\| optional | |
+| | y | list of | |
+| | | sequence\| |
+| | | d | |
+| | | constrai\| |
+| | | nt | |
+| | | clauses | |
+| | | for the | |
+| | | paramete\| |
+| | | r. | |
+| | | See | |
+| | | above | |
++-------------+----+----------+------+
+| entry_schem\| st\| The | |
+| a | ri\| optional | |
+| | ng | key that | |
+| | | is used | |
+| | | to | |
+| | | declare | |
+| | | the name | |
+| | | of the | |
+| | | Datatype | |
+| | | definiti\| |
+| | | on | |
+| | | for | |
+| | | certain | |
+| | | types. | |
+| | | entry_sc\| |
+| | | hema | |
+| | | must be | |
+| | | defined | |
+| | | when the | |
+| | | type is | |
+| | | either | |
+| | | list or | |
+| | | map. If | |
+| | | the type | |
+| | | is list | |
+| | | and the | |
+| | | entry | |
+| | | type is | |
+| | | a simple | |
+| | | type | |
+| | | (string, | |
+| | | number, | |
+| | | bookean, | |
+| | | datetime | |
+| | | ), | |
+| | | follow | |
+| | | with an | |
+| | | string | |
+| | | to | |
+| | | describe | |
+| | | the | |
+| | | entry | |
++-------------+----+----------+------+
+| | If | | |
+| | th\| | |
+| | e | | |
+| | ty\| | |
+| | pe | | |
+| | is | | |
+| | li\| | |
+| | st | | |
+| | an\| | |
+| | d | | |
+| | th\| | |
+| | e | | |
+| | en\| | |
+| | tr\| | |
+| | y | | |
+| | ty\| | |
+| | pe | | |
+| | is | | |
+| | a | | |
+| | ma\| | |
+| | p, | | |
+| | fo\| | |
+| | ll\| | |
+| | ow | | |
+| | wi\| | |
+| | th | | |
+| | an | | |
+| | ar\| | |
+| | ra\| | |
+| | y | | |
+| | to | | |
+| | de\| | |
+| | sc\| | |
+| | ri\| | |
+| | be | | |
+| | th\| | |
+| | e | | |
+| | ke\| | |
+| | ys | | |
+| | fo\| | |
+| | r | | |
+| | th\| | |
+| | e | | |
+| | en\| | |
+| | tr\| | |
+| | y | | |
+| | ma\| | |
+| | p | | |
++-------------+----+----------+------+
+| | If | | |
+| | th\| | |
+| | e | | |
+| | ty\| | |
+| | pe | | |
+| | is | | |
+| | li\| | |
+| | st | | |
+| | an\| | |
+| | d | | |
+| | th\| | |
+| | e | | |
+| | en\| | |
+| | tr\| | |
+| | y | | |
+| | ty\| | |
+| | pe | | |
+| | is | | |
+| | a | | |
+| | li\| | |
+| | st | | |
+| | , | | |
+| | th\| | |
+| | at | | |
+| | is | | |
+| | no\| | |
+| | t | | |
+| | cu\| | |
+| | rr\| | |
+| | en\| | |
+| | tl\| | |
+| | y | | |
+| | su\| | |
+| | pp\| | |
+| | or\| | |
+| | te\| | |
+| | d \| | |
++-------------+----+----------+------+
+| | If | | |
+| | th\| | |
+| | e | | |
+| | ty\| | |
+| | pe | | |
+| | is | | |
+| | ma\| | |
+| | p, | | |
+| | fo\| | |
+| | ll\| | |
+| | ow | | |
+| | wi\| | |
+| | th | | |
+| | an | | |
+| | ar\| | |
+| | ay | | |
+| | to | | |
+| | de\| | |
+| | sc\| | |
+| | ri\| | |
+| | be | | |
+| | th\| | |
+| | e | | |
+| | ke\| | |
+| | ys | | |
+| | fo\| | |
+| | r | | |
+| | th\| | |
+| | e | | |
+| | ma\| | |
+| | p | | |
++-------------+----+----------+------+
+
+
+.. _artifacts:
+
+Artifacts
+---------
+
+``artifacts`` contains a list of artifacts associated with this
+component. For Docker, this is the full path (including the registry) to
+the Docker image. For CDAP, this is the full path to the CDAP jar.
+
++---------------+------------+---------------------------------+
+| Property Name | Type | Description |
++===============+============+=================================+
+| artifacts | JSON array | Each entry is a artifact object |
++---------------+------------+---------------------------------+
+
+``artifact`` Schema:
+
++---------------+--------+--------------------------------------------+
+| Property Name | Type | Description |
++===============+========+============================================+
+| uri | string | *Required*. Uri to the artifact, full path |
++---------------+--------+--------------------------------------------+
+| type | string | *Required*. ``docker image`` or ``jar`` |
++---------------+--------+--------------------------------------------+
+
+.. _auxilary:
+
+Auxilary
+--------
+
+
+Health check
+~~~~~~~~~~~~
+
+Component developers are required to provide a way for the platform to
+periodically check the health of their running components. The
+details of the definition used by your component is to be provided
+through the :any:`Docker auxiliary specification <docker-auxiliary-details>`.
+
+
diff --git a/docs/sections/design-components/component-specification/configuration-grid.rst b/docs/sections/design-components/component-specification/configuration-grid.rst new file mode 100755 index 00000000..3efb9850 --- /dev/null +++ b/docs/sections/design-components/component-specification/configuration-grid.rst @@ -0,0 +1,118 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+Configuration Quick Reference
+=============================
+
+Default Values
+^^^^^^^^^^^^^^
+
+The component developer can provide default values for any ``parameter``
+in the component specification. These defaults will be passed to the
+component in its generated configuration.
+
+Overridden/Entered Values
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Depending on the other properties set for the parameter, the default
+value can be overridden at ‘design-time’, ‘deploy-time’ or once the
+microservice is running (‘run-time’).
+
++--------+--------+--------+--------+------------+
+| | Design\| CLAMP | Policy | Deploy-Time|
+| | -Time | Input | Input | Input |
+| | Input | | | |
+| | | | | |
++========+========+========+========+============+
+| Descri\| Applie\| Applie\| (not | Applies to |
+| ption | s | s | yet | manually |
+| | to | to | suppor\| deployed |
+| | self-s\| compon\| ted) | services |
+| | ervice | ents | | |
+| | compon\| deploy\| | |
+| | ents | ed | | |
+| | | by | | |
+| | | CLAMP | | |
++--------+--------+--------+--------+------------+
+| Input | Servic\| CLAMP | Operat\| DevOps |
+| provid\| e | | ions | |
+| ed | Designe| | | |
+| by | r | | | |
++--------+--------+--------+--------+------------+
+| How it | In the | In the | In the | In the DCAE|
+| is | SDC/MOD| CLAMP | POLICY | Dashboard |
+| provid\| UI | UI | GUI | (or Jenkins|
+| ed | | | | job) |
++--------+--------+--------+--------+------------+
+| Compon\| ‘desig\| None. | ‘polic\| ‘sourced\ |
+| ent | ner-ed\| Develo\| y_edit\| _at_deploy\|
+| Specif\| itable\| per | able’ | ment’ must |
+| icatio\| ’ | provid\| must | be set to |
+| n | set to | es | be set | ‘true’ |
+| Detail\| ‘true’ | CLAMP | to | |
+| s | | an | ‘true’ | |
+| | | email | and | |
+| | | with | ‘polic\| |
+| | | parame\| y_sche\| |
+| | | ters | ma’ | |
+| | | to be | must | |
+| | | suppor\| be | |
+| | | ted | provid\| |
+| | | | ed | |
+| | | | | |
+| | | | | |
++--------+--------+--------+--------+------------+
+| Additi\| | | For | |
+| onal | | | Docker | |
+| Info | | | only: | |
+| for | | | In the | |
+| Compon\| | | auxili\| |
+| ent | | | ary | |
+| Develo\| | | sectio\| |
+| per | | | n: | |
+| | | | {“poli\| |
+| | | | cy”: | |
+| | | | {“trig\| |
+| | | | ger_ty\| |
+| | | | pe”: | |
+| | | | “polic\| |
+| | | | y”,“sc\| |
+| | | | ript_p\| |
+| | | | ath”: | |
+| | | | “/opt/\| |
+| | | | app/re\| |
+| | | | config\| |
+| | | | ure.sh | |
+| | | | ”} | |
+| | | | } | |
+| | | | Script | |
+| | | | interf\| |
+| | | | ace | |
+| | | | would | |
+| | | | then | |
+| | | | be | |
+| | | | “/opt/\| |
+| | | | app/re\| |
+| | | | config\| |
+| | | | ure.sh | |
+| | | | ” | |
+| | | | $trigg\| |
+| | | | er_typ\| |
+| | | | e | |
+| | | | $updat\| |
+| | | | ed_pol\| |
+| | | | icy" | |
+| | | | where | |
+| | | | $updat\| |
+| | | | ed_pol\| |
+| | | | icy | |
+| | | | is | |
+| | | | json | |
+| | | | provid\| |
+| | | | ed | |
+| | | | by the | |
+| | | | Policy | |
+| | | | Handle\| |
+| | | | r. | |
++--------+--------+--------+--------+------------+
+
diff --git a/docs/sections/design-components/component-specification/data-formats.rst b/docs/sections/design-components/component-specification/data-formats.rst new file mode 100755 index 00000000..42194fa3 --- /dev/null +++ b/docs/sections/design-components/component-specification/data-formats.rst @@ -0,0 +1,235 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+.. _data-formats:
+
+
+Data Formats
+============
+
+Data formats are descriptions of data; they are the data contract
+between your component and other components. When the components are
+‘composed’ into services in the Design tool, they can only be matched with
+components that have compatible data formats. Data formats will be
+onboarded to Design tool and assigned a UUID at that time. This UUID is then
+used to ensure compatibility amoung components. (If component X outputs
+data format ‘DF-Y’, and another component Z specifies ‘DF-Y’ as its
+input data format, then X is said to be ``composable`` with component
+Z).
+
+Since data formats will be shared across components, the onboarding
+catalog should be checked first to see if the desired data format is
+available before creating one. The vision is to have a repository of
+shared data formats that developers and teams can re-use and also
+provide them the means to extend and create new custom data formats. A
+data format is referenced by its data format id and version number.
+
+JSON schema
+-----------
+
+ The data format specification is represented (and validated) against
+ this `Data Format json schema <https://git.onap.org/dcaegen2/platform/plain/mod/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json>`__
+ and described below:
+
+Meta Schema Definition
+~~~~~~~~~~~~~~~~~~~~~~
+
+The “Meta Schema” implementation defines how data format JSON schemas
+can be written to define user input. It is itself a JSON schema (thus it
+is a “meta schema”). It requires the name of the data format entry, the
+data format entry version and allows a description under “self” object.
+The meta schema version must be specified as the value of the
+“dataformatversion” key. Then the input schema itself is described as
+one of the four types listed below:
+
++------------------+---------------------------------------------------+
+| Type | Description |
++==================+===================================================+
+| jsonschema | inline standard JSON Schema definitions of JSON |
+| | inputs |
++------------------+---------------------------------------------------+
+| delimitedschema | delimited data input using a JSON description and |
+| | defined delimiter |
++------------------+---------------------------------------------------+
+| unstructured | unstructured text, and reference that allows a |
+| | pointer to another artifact for a schema. |
++------------------+---------------------------------------------------+
+| reference | allows for XML and Protocol Buffers schema, |
+| | but can be used to reference other JSON, |
+| | delimitedschema and unstructured schemas as well. |
++------------------+---------------------------------------------------+
+
+
+Example Schemas
+---------------
+
+By reference example - Common Event Format
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+First the full JSON schema description of the Common Event Format would
+be loaded with a name of “Common Event Format” and the current version
+of “25.0.0”.
+
+Then the data format description is loaded by this schema:
+
+::
+
+ {
+ "self": {
+ "name": "Common Event Format Definition",
+ "version": "25.0.0",
+ "description": "Common Event Format Definition"
+
+ },
+ "dataformatversion": "1.0.0",
+ "reference": {
+ "name": "Common Event Format",
+ "format": "JSON",
+ "version": "25.0.0"
+ }
+ }
+
+
+
+Simple JSON Example
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+::
+
+ {
+ "self": {
+ "name": "Simple JSON Example",
+ "version": "1.0.0",
+ "description": "An example of unnested JSON schema for Input and output"
+
+ },
+ "dataformatversion": "1.0.0",
+ "jsonschema": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "raw-text": {
+ "type": "string"
+ }
+ },
+ "required": ["raw-text"],
+ "additionalProperties": false
+ }
+ }
+
+Nested JSON Example
+~~~~~~~~~~~~~~~~~~~
+
+::
+
+ {
+ "self": {
+ "name": "Nested JSON Example",
+ "version": "1.0.0",
+ "description": "An example of nested JSON schema for Input and output"
+
+ },
+ "dataformatversion": "1.0.0",
+ "jsonschema": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "properties": {
+ "numFound": {
+ "type": "integer"
+ },
+ "start": {
+ "type": "integer"
+ },
+ "engagements": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "engagementID": {
+ "type": "string",
+ "transcript": {
+ "type": "array",
+ "items": {
+ "type": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
+ },
+ "senderName": {
+ "type": "string"
+ },
+ "iso": {
+ "type": "string"
+ },
+ "timestamp": {
+ "type": "integer"
+ },
+ "senderId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+
+Unstructured Example
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+ {
+ "self": {
+ "name": "Unstructured Text Example",
+ "version": "25.0.0",
+ "description": "An example of a unstructured text used for both input and output for "
+
+ },
+ "dataformatversion": "1.0.0",
+ "unstructured": {
+ "encoding": "UTF-8"
+ }
+ }
+
+
+An example of a delimited schema
+--------------------------------
+
+::
+
+ {
+ "self": {
+ "name": "Delimited Format Example",
+ "version": "1.0.0",
+ "description": "Delimited format example just for testing"
+
+ },
+ "dataformatversion": "1.0.0",
+ "delimitedschema": {
+ "delimiter": "|",
+ "fields": [{
+ "name": "field1",
+ "description": "test field1",
+ "fieldtype": "string"
+ }, {
+ "name": "field2",
+ "description": "test field2",
+ "fieldtype": "boolean"
+ }]
+ }
+ }
+
+Note: The referenced data format (in this case, a schema named “Common
+Event Format” with version of “25.0.0”) must already exist in the
+onboarding catalog.
+
+Working with Data Formats
+-------------------------
+
+Data Formats can be validated using `schema <https://git.onap.org/dcaegen2/platform/plain/mod/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json>`__
+Once validated, the dataformat can be onboarded using :doc:`DCAE-MOD <../DCAE-MOD/DCAE-MOD-User-Guide>`
\ No newline at end of file diff --git a/docs/sections/design-components/component-specification/dmaap-connection-objects.rst b/docs/sections/design-components/component-specification/dmaap-connection-objects.rst new file mode 100755 index 00000000..da368abf --- /dev/null +++ b/docs/sections/design-components/component-specification/dmaap-connection-objects.rst @@ -0,0 +1,218 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+.. _dmaap-connection-objects:
+
+DMaaP connection objects
+========================
+
+DMaaP Connection objects are generated by the DCAE Platform at runtime
+and passed to the component in its application_configuration
+
+.. _dmaap-message-router:
+
+Message Router
+--------------
+
+Publishers and subscribers have the same generated
+``Dmaap Connection Object`` structure. Here’s an example for any given
+config-key: (This is what will be in application_configuration)
+
+.. code:: json
+
+ {
+ "type": "message_router",
+ "aaf_username": "some-user",
+ "aaf_password": "some-password",
+ "dmaap_info": {
+ "client_role": "com.dcae.member",
+ "client_id": "1500462518108",
+ "location": "mtc00",
+ "topic_url": "https://we-are-message-router.us:3905/events/some-topic"
+ }
+ }
+
+At the top-level:
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| type | string | *Required as input*. Must |
+| | | be ``message_router`` for |
+| | | message router topics |
++--------------------------------+---------+---------------------------+
+| aaf_username | string | AAF username message |
+| | | router clients use to |
+| | | authenticate with secure |
+| | | topics |
++--------------------------------+---------+---------------------------+
+| aaf_password | string | AAF password message |
+| | | router clients use to |
+| | | authenticate with secure |
+| | | topics |
++--------------------------------+---------+---------------------------+
+| dmaap_info | JSON | *Required as input*. |
+| | object | Contains the topic |
+| | | connection details |
++--------------------------------+---------+---------------------------+
+
+The ``dmaap_info`` object contains:
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| client_role | string | AAF client role that’s |
+| | | requesting publish or |
+| | | subscribe access to the |
+| | | topic |
++--------------------------------+---------+---------------------------+
+| client_id | string | Client id for given AAF |
+| | | client |
++--------------------------------+---------+---------------------------+
+| location | string | DCAE location for the |
+| | | publisher or subscriber, |
+| | | used to set up routing |
++--------------------------------+---------+---------------------------+
+| topic_url | string | *Required as input*. URL |
+| | | for accessing the topic |
+| | | to publish or receive |
+| | | events |
++--------------------------------+---------+---------------------------+
+
+
+
+.. _dmaap-data-router:
+
+Data Router
+-----------
+
+Publisher
+~~~~~~~~~
+
+Here’s an example of what the generated ``Dmaap Connection Object`` for
+Data Router Publisher looks like: (This is what will be in
+application_configuration)
+
+.. code:: json
+
+ {
+ "type": "data_router",
+ "dmaap_info": {
+ "location": "mtc00",
+ "publish_url": "https://we-are-data-router.us/feed/xyz",
+ "log_url": "https://we-are-data-router.us/feed/xyz/logs",
+ "username": "some-user",
+ "password": "some-password",
+ "publisher_id": "123456"
+ }
+ }
+
+At the top-level:
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| type | string | *Required as input*. Must |
+| | | be ``data_router`` for |
+| | | data router feeds |
++--------------------------------+---------+---------------------------+
+| dmaap_info | JSON | *Required as input*. |
+| | object | Contains the feed |
+| | | connection details |
++--------------------------------+---------+---------------------------+
+
+The ``dmaap_info`` object contains:
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| location | string | DCAE location for the |
+| | | publisher, used to set up |
+| | | routing |
++--------------------------------+---------+---------------------------+
+| publish_url | string | *Required as input*. URL |
+| | | to which the publisher |
+| | | makes Data Router publish |
+| | | requests |
++--------------------------------+---------+---------------------------+
+| log_url | string | URL from which log data |
+| | | for the feed can be |
+| | | obtained |
++--------------------------------+---------+---------------------------+
+| username | string | Username the publisher |
+| | | uses to authenticate to |
+| | | Data Router |
++--------------------------------+---------+---------------------------+
+| password | string | Password the publisher |
+| | | uses to authenticate to |
+| | | Data Router |
++--------------------------------+---------+---------------------------+
+| publisher_id | string | Publisher id in Data |
+| | | Router |
++--------------------------------+---------+---------------------------+
+
+
+Subscriber
+~~~~~~~~~~
+
+Here’s an example of what the generated ``Dmaap Connection Object`` for
+a Data Router Subscriber looks like: (This is what will be passed in
+application_configuration)
+
+.. code:: json
+
+ {
+ "type": "data_router",
+ "dmaap_info": {
+ "location": "mtc00",
+ "delivery_url": "https://my-subscriber-app.dcae:8080/target-path",
+ "username": "some-user",
+ "password": "some-password",
+ "subscriber_id": "789012"
+ }
+ }
+
+At the top-level:
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| type | string | *Required as input*. Must |
+| | | be ``data_router`` for |
+| | | data router feeds |
++--------------------------------+---------+---------------------------+
+| dmaap_info | JSON | *Required as input*. |
+| | object | Contains the feed |
+| | | connection details |
++--------------------------------+---------+---------------------------+
+
+The ``dmaap_info`` object contains:
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| location | string | DCAE location for the |
+| | | subscriber, used to set |
+| | | up routing |
++--------------------------------+---------+---------------------------+
+| delivery_url | string | URL to which the Data |
+| | | Router should deliver |
+| | | files |
++--------------------------------+---------+---------------------------+
+| username | string | Username Data Router uses |
+| | | to authenticate to the |
+| | | subscriber when |
+| | | delivering files |
++--------------------------------+---------+---------------------------+
+| password | string | Password Data Router uses |
+| | | to authenticate to the |
+| | | subscriber when |
+| | | delivering files |
++--------------------------------+---------+---------------------------+
+| subscriber_id | string | Subscriber id in Data |
+| | | Router |
++--------------------------------+---------+---------------------------+
+
+
+
+
diff --git a/docs/sections/design-components/component-specification/docker-specification.rst b/docs/sections/design-components/component-specification/docker-specification.rst new file mode 100755 index 00000000..6dd4f927 --- /dev/null +++ b/docs/sections/design-components/component-specification/docker-specification.rst @@ -0,0 +1,347 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+.. _docker-requirements:
+
+Component Spec Requirements
+===========================
+
+The component specification contains the following groups of
+information.
+
+- :any:`Metadata <metadata>`
+- :any:`Interfaces <interfaces>` including the
+ associated :any:`Data Formats <data-formats>`
+- :any:`Parameters <common-specification-parameters>`
+- :any:`Auxiliary Details <docker-auxiliary-details>`
+- :any:`List of Artifacts <artifacts>`
+
+.. _docker-auxiliary-details:
+
+Auxiliary Details
+-----------------
+
+``auxiliary`` contains Docker specific details like health check, port
+mapping, volume mapping and policy reconfiguration script details.
+
+
++--------------------------------+---------+---------------------------+
+| Name | Type | Description |
++================================+=========+===========================+
+| healthcheck | JSON | *Required*. Health check |
+| | object | definition details |
++--------------------------------+---------+---------------------------+
+| ports | JSON | each array item maps a |
+| | array | container port to the |
+| | | host port. See example |
+| | | below. |
++--------------------------------+---------+---------------------------+
+| volume | JSON | each array item contains |
+| | array | a host and container |
+| | | object. See example |
+| | | below. |
++--------------------------------+---------+---------------------------+
+| policy | JSON | *Required*. Policy |
+| | array | reconfiguration script |
+| | | details |
++--------------------------------+---------+---------------------------+
+
+Health Check Definition
+~~~~~~~~~~~~~~~~~~~~~~~
+
+The platform currently supports http and docker script based health checks.
+
+When choosing a value for interval, consider that too frequent
+healthchecks will put unnecessary load on the platform. If there is a
+problematic resource, then more frequent healthchecks are warranted (eg
+15s or 60s), but as stability increases, so can these values, (eg
+300s).
+
+When choosing a value for timeout, consider that too small a number will
+result in increasing timeout failures, and too large a number will
+result in a delay in the notification of the resource problem. A
+suggestion is to start with 5s and work from there.
+
+http
+^^^^
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| type | string | *Required*. ``http`` |
++--------------------------------+---------+---------------------------+
+| interval | string | Interval duration in |
+| | | seconds i.e. ``60s`` |
++--------------------------------+---------+---------------------------+
+| timeout | string | Timeout in seconds i.e. |
+| | | ``5s`` |
++--------------------------------+---------+---------------------------+
+| endpoint | string | *Required*. GET endpoint |
+| | | provided by the component |
+| | | for checking health |
++--------------------------------+---------+---------------------------+
+
+Example:
+
+.. code:: json
+
+ "auxilary": {
+ "healthcheck": {
+ "type": "http",
+ "interval": "15s",
+ "timeout": "1s",
+ "endpoint": "/my-health"
+ }
+ }
+
+docker script example
+^^^^^^^^^^^^^^^^^^^^^
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| type | string | *Required*. ``docker`` |
++--------------------------------+---------+---------------------------+
+| interval | string | Interval duration in |
+| | | seconds i.e. ``15s`` |
++--------------------------------+---------+---------------------------+
+| timeout | string | Timeout in seconds i.e. |
+| | | ``1s`` |
++--------------------------------+---------+---------------------------+
+| script | string | *Required*. Full path of |
+| | | script that exists in the |
+| | | Docker container to be |
+| | | executed |
++--------------------------------+---------+---------------------------+
+
+During deployment, the K8S plugin maps the healthcheck defined into
+into a Kubernetes readiness probe.
+
+Kubernetes execs the script in the container (using the `docker exec API
+ <https://docs.docker.com/engine/api/v1.29/#tag/Exec>`__ ).
+It will examine the
+script result to identify whether your component is healthy. Your
+component is considered healthy when the script returns ``0`` otherwise
+your component is considered not healthy.
+
+Example:
+
+.. code:: json
+
+ "auxilary": {
+ "healthcheck": {
+ "type": "docker",
+ "script": "/app/resources/check_health.py",
+ "timeout": "30s",
+ "interval": "180s"
+ }
+ }
+
+Ports
+~~~~~
+
+This method of exposing/mapping a local port to a host port is NOT
+RECOMMENDED because of the possibility of port conflicts. If multiple
+instances of a docker container will be running, there definitely will
+be port conflicts. Use at your own risk. (The preferred way to expose a
+port is to do so in the Dockerfile as described
+:any:`here <dcae-cli-docker-ports>`).
+
+.. code:: json
+
+ "auxilary": {
+ "ports": ["8080:8000"]
+ }
+
+In the example above, container port 8080 maps to host port 8000.
+
+Volume Mapping
+~~~~~~~~~~~~~~
+
+.. code:: json
+
+ "auxilary": {
+ "volumes": [
+ {
+ "container": {
+ "bind": "/tmp/docker.sock",
+ "mode": "ro"
+ },
+ "host": {
+ "path": "/var/run/docker.sock"
+ }
+ }
+ ]
+ }
+
+At the top-level:
+
++---------------+-------+-------------------------------------+
+| Property Name | Type | Description |
++===============+=======+=====================================+
+| volumes | array | Contains container and host objects |
++---------------+-------+-------------------------------------+
+
+The ``container`` object contains:
+
+
++-----------------------+-----------------------+-------------------------------+
+| Property Name | Type | Description |
++=======================+=======================+===============================+
+| bind | string | path to the container |
+| | | volume |
++-----------------------+-----------------------+-------------------------------+
+| mode | string | ro - indicates |
+| | | read-only volume |
++-----------------------+-----------------------+-------------------------------+
+| | | w - indicates that |
+| | | the contain can write |
+| | | into the bind mount |
++-----------------------+-----------------------+-------------------------------+
+
+The ``host`` object contains:
+
++---------------+--------+-------------------------+
+| Property Name | Type | Description |
++===============+========+=========================+
+| path | string | path to the host volume |
++---------------+--------+-------------------------+
+
+Here’s an example of the minimal JSON that must be provided as an input:
+
+.. code:: json
+
+ "auxilary": {
+ "volumes": [
+ {
+ "container": {
+ "bind": "/tmp/docker.sock"
+ },
+ "host": {
+ "path": "/var/run/docker.sock"
+ }
+ }
+ ]
+ }
+
+In the example above, the container volume “/tmp/docker.sock” maps to
+host volume “/var/run/docker.sock”.
+
+
+Policy
+~~~~~~~
+
+Policy changes made in the Policy UI will be provided to the Docker
+component by triggering a script that is defined here.
+
++--------------------------------+---------+---------------------------+
+| Property Name | Type | Description |
++================================+=========+===========================+
+| reconfigure_type | string | *Required*. Current value |
+| | | supported is ``policy`` |
++--------------------------------+---------+---------------------------+
+| script_path | string | *Required*. Current value |
+| | | for ‘policy’ |
+| | | reconfigure_type must be |
+| | | “/opt/app/reconfigure.sh” |
++--------------------------------+---------+---------------------------+
+
+Example:
+
+.. code:: json
+
+ "auxilary": {
+ "policy": {
+ "reconfigure_type": "policy",
+ "script_path": "/opt/app/reconfigure.sh"
+ }
+ }
+
+The docker script interface is as follows: \`/opt/app/reconfigure.sh
+$reconfigure_type {“updated policies”: , “application config”: }
+
++---------------------+--------------+----------------------------------------+
+| Name | Type | Description |
++=====================+==============+========================================+
+| reconfigure_type | string | policy |
++---------------------+--------------+----------------------------------------+
+| updated_policies | json | TBD |
++---------------------+--------------+----------------------------------------+
+| updated_appl_config | json | complete generated app_config, not |
+| | | fully-resolved, but ``policy-enabled`` |
+| | | parameters have been updated. In order |
+| | | to get the complete updated |
+| | | app_config, the component would have |
+| | | to call ``config-binding-service``. |
++---------------------+--------------+----------------------------------------+
+
+Docker Component Spec - Complete Example
+----------------------------------------
+
+.. code:: json
+
+ {
+ "self": {
+ "version": "1.0.0",
+ "name": "yourapp.component.kpi_anomaly",
+ "description": "Classifies VNF KPI data as anomalous",
+ "component_type": "docker"
+ },
+ "streams": {
+ "subscribes": [{
+ "format": "dcae.vnf.kpi",
+ "version": "1.0.0",
+ "route": "/data",
+ "type": "http"
+ }],
+ "publishes": [{
+ "format": "yourapp.format.integerClassification",
+ "version": "1.0.0",
+ "config_key": "prediction",
+ "type": "http"
+ }]
+ },
+ "services": {
+ "calls": [{
+ "config_key": "vnf-db",
+ "request": {
+ "format": "dcae.vnf.meta",
+ "version": "1.0.0"
+ },
+ "response": {
+ "format": "dcae.vnf.kpi",
+ "version": "1.0.0"
+ }
+ }],
+ "provides": [{
+ "route": "/score-vnf",
+ "request": {
+ "format": "dcae.vnf.meta",
+ "version": "1.0.0"
+ },
+ "response": {
+ "format": "yourapp.format.integerClassification",
+ "version": "1.0.0"
+ }
+ }]
+ },
+ "parameters": [
+ {
+ "name": "threshold",
+ "value": 0.75,
+ "description": "Probability threshold to exceed to be anomalous"
+ }
+ ],
+ "auxilary": {
+ "healthcheck": {
+ "type": "http",
+ "interval": "15s",
+ "timeout": "1s",
+ "endpoint": "/my-health"
+ }
+ },
+ "artifacts": [{
+ "uri": "fake.nexus.att.com/dcae/kpi_anomaly:1.0.0",
+ "type": "docker image"
+ }]
+ }
diff --git a/docs/sections/design-components/component-specification/index-component-specification.rst b/docs/sections/design-components/component-specification/index-component-specification.rst new file mode 100644 index 00000000..76ef2129 --- /dev/null +++ b/docs/sections/design-components/component-specification/index-component-specification.rst @@ -0,0 +1,15 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Component Specification +======================= + +.. toctree:: + :maxdepth: 1 + + ./component-type-docker.rst + ./component-json-schema.rst + ./docker-specification.rst + ./dmaap-connection-objects.rst + ./streams-grid.rst + ./configuration-grid.rst
\ No newline at end of file diff --git a/docs/sections/design-components/component-specification/streams-grid.rst b/docs/sections/design-components/component-specification/streams-grid.rst new file mode 100755 index 00000000..6105e9e1 --- /dev/null +++ b/docs/sections/design-components/component-specification/streams-grid.rst @@ -0,0 +1,149 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+.. _streams-grid:
+
+Streams Formatting Quick Reference
+==================================
+
+Each of the following tables represents an example of a publisher and
+its subscriber, which are of course, different components. This focuses
+on the fields that are ‘different’ for each of these TYPEs, to
+illustrate the relationship between ``config_key``, dmaap connection
+object, and the generated configuration. Some notes on specific
+properties:
+
+- ``config_key`` is an arbitrary string, chosen by the component
+ developer. It is returned in the generated configuration where it
+ contains specific values for the target connection
+- ``format``, ``version``, and ``type`` properties in the subscriber
+ would match these properties in the publisher
+- ``aaf_username`` and ``aaf_password`` may be different between the
+ publisher and the subscriber
+
+Using http
+~~~~~~~~~~
+
+*Publishing Component*
+^^^^^^^^^^^^^^^^^^^^^^
+
++-----------------------------+----------------------------------------+
+| component \ | runtime platform generated config |
+| spec | |
++=============================+========================================+
+| "streams":{ | "streams_publishes":{ |
+| "publishes":[{ | "prediction":"10.100.1.100:32567/data" |
+| "config_key":"prediction", | |
+| "format":"some-format", | |
+| "type":"http", | |
+| "version":"0.1.0" } | |
+| ]} | |
++-----------------------------+----------------------------------------+
+
+*Subscribing Component*
+^^^^^^^^^^^^^^^^^^^^^^^
+
++-----------------------------+----------------------------------------+
+| component | runtime platform generated config |
+| spec | |
++=============================+========================================+
+| “streams”:{ | "N/A" |
+| "subscribes":[{ | |
+| "route":"/data", | |
+| "format":"some-format", | |
+| "type":"http" | |
+| "version":"0.1.0" } | |
+| ]} | |
++-----------------------------+----------------------------------------+
+
+Using Message Router
+~~~~~~~~~~~~~~~~~~~~
+
+.. publishing-component-1:
+
+*Publishing Component*
+^^^^^^^^^^^^^^^^^^^^^^
+
+Note: When deploying, this component should be deployed first so satisfy
+downstream dependencies. Refer to the –force option in component ‘run’
+command for more information.
+
++---------------+------------------------+-----------------------------------------------------------------------------+
+| component \ | Dmaap Connection \ | runtime platform generated \ |
+| spec | Object | config |
++===============+========================+=============================================================================+
+| “streams”:{ | { “dmaap_info”: | “streams_publishes”:{ |
+| “config_k\| {} \ *Note: For \ | “aaf_username”:“pub-user”, |
+| ey”:“mr_out\ | message router, this \ | “type”:“message_router”, |
+| put”, “t\ | object is identical \ | “topic_url”:"https://we-are-message-router.us:3905/events/some-topic"\ |
+| ype”:“messag\ | for the publisher and \| "streams_subscribes":{...} |
+| e_router”, | the subscriber* | |
+| }]} | | |
++---------------+------------------------+-----------------------------------------------------------------------------+
+
+*Subscribing Component*
+^^^^^^^^^^^^^^^^^^^^^^^
+
++---------------+------------------------+-----------------------------------------------------------------------------+
+| component \ | Dmaap Connection \ | runtime platform generated \ |
+| spec | Object | config |
++===============+========================+=============================================================================+
+| “streams”:{ | { “dmaap_info”: | “streams_publishes”:{…}, |
+| “config_k\| {} \ *Note: For \ | “streams_subscribes”:{ |
+| ey”:“mr_inp\ | message router, this \ | “aaf_username”:“sub-user”, |
+| ut”, “ty\ | object is identical \ | “type”:“message_router”, |
+| pe”:“message\ | for the publisher and \| “topic_url”:“https://we-are-message-router.us:3905/events/some-topic" |
+| _router”, | the subscriber* | |
+| }]} | | |
++---------------+------------------------+-----------------------------------------------------------------------------+
+
+Using Data Router
+~~~~~~~~~~~~~~~~~
+
+.. publishing-component-2:
+
+*Publishing Component*
+^^^^^^^^^^^^^^^^^^^^^^
+
++---------------+-----------------------------------------------+-----------------------------------------------+
+| component spec| Dmaap Connection Object | runtime platform generated config |
++===============+===============================================+===============================================+
+| “streams”:{ | { “dmaap_info”: { | streams_publishes“:{ ”typ\ |
+| “config_key: | “location”: | e“:”data_router“, "location":"mtc00" |
+| “dr_output" | “mtc00”, | , |
+| , "type": | “publish_url”: | "publish_url“: |
+| “data_r\ | "https://we-are-data-router.us/feed/xyz"\ | "http://we-are-data-router.us/feed/xyz" |
+| outer”, }] | , | , |
+| } | “log_url”:\ | "log_url“:\ |
+| | \ | ”https://we-are-data-router.us/feed/xyz/logs" |
+| | "https://we-are-data-router.us/feed/xyz/logs"\| , |
+| | , | ”username“:”pub-user“, |
+| | “username”: | ”publisher_id“:”123456\ |
+| | “pub-user”, | “}}, |
+| | “password”: | ”streams_subscribes“:{ |
+| | “pub-password”, | … } |
+| | “publisher_id”: | |
+| | “123456”}} | |
++---------------+-----------------------------------------------+-----------------------------------------------+
+
+.. subscribing-component-1:
+
+*Subscribing Component*
+^^^^^^^^^^^^^^^^^^^^^^^
+
++---------------+---------------------------------------------------+---------------------------------------------------------------------------+
+| component \ | Dmaap Connection \ | runtime platform generated \ |
+| spec | Object | config |
++===============+===================================================+===========================================================================+
+| “streams”:{ | { “dmaap_info”: | “streams_publishes”:{ … }, |
+| “config_k\| { “location”: | “streams_subscribes”:{ |
+| ey”:“dr_inp\ | “mtc00”, | “type”:“data_router”, |
+| ut”, “ty\ | “delivery_url”: | “location”:“mtc00”, |
+| pe”:“data_ro\ | "https://my-subscriber-app.dcae:8080/target-path"\| “delivery_url”:"https://my-subscriber-app.dcae:8080/target-path"\|
+| uter”, | \ | \ |
+| “route”: | , | , |
+| “/target-pat\ | “password”: | \ |
+| h”} | “sub-password”, | “username”:“sub-user”, |
+| | “subscriber_id”: | |
+| | “789012”}} | “subscriber_id”:“789012”}} |
++---------------+---------------------------------------------------+---------------------------------------------------------------------------+
diff --git a/docs/sections/design-components/glossary.rst b/docs/sections/design-components/glossary.rst new file mode 100644 index 00000000..b1430e22 --- /dev/null +++ b/docs/sections/design-components/glossary.rst @@ -0,0 +1,169 @@ + +.. http://creativecommons.org/licenses/by/4.0 + +.. _glossary: + +Glossary +======== + +A&AI - Active and Available Inventory +------------------------------------- +Inventory DB for all network components + + +CLAMP +----- +Non DCAE Platform Component - Controls the input and processing for +Closed Loop services. + + +Closed Loop +----------- +Services designed to monitor and report back to a controlling function +that automatically deals with the event reported without human +interaction. + + + +Cloudify +-------- +Open Source application and network orchestration framework, based on +TOSCA used in DCAE to deploy platform and service components from +Cloudify Blueprints. + + +Cloudify Blueprints +------------------- +YAML formatted file used by Cloudify to deploy platform and service +components. Contains all the information needed for installation. + + +Consul +------ +Opensource Platform Component that supports Service Discovery, +Configuration, and Healthcheck. Refer to +`Architecture </architecture/pieces>`__ for more information. + +Component +--------- +Refers to a DCAE service component which is a single micro-service that +is written to be run by the DCAE platform and to be composeable to form +a DCAE service. That composition occurs in the SDC. + + +Config Binding Service +---------------------- +DCAE Platform Component - Service Components use Config Binding Service +to access Consul and retrieve configuration variables. + + +Component Specification +----------------------- +JSON formatted file that fully describes a component and its interfaces + + +Data Format / Data Format Specification +--------------------------------------- +JSON formatted file that fully describes a components input or output + + +Deployment Handler +------------------ +DCAE Platform Component - Receives Input from DTI Handler, and talks to +Cloudify to deploy components. + + +Design-Time +----------- +Refers to when the System Designer uses a design tool to compose services +from components in the catalog. The Designer can provide input to +assign/override defaults for configuration for any parameter with the +property 'designer\_editable' set to 'true'. + + +Deploy-Time +----------- +Refers to when a service is being deployed. This can be done +automatically via the SDC Tool, or manually via the DCAE Dashboard or +CLAMP UI. When manually deployed, DevOps can provide input to +assign/override defaults for configuration for any parameter with the +property 'sourced\_at\_deployment' set to 'true'. + + +Docker +------ +Opensource Platform for development of containerized applications in the +cloud. Many DCAE service components and all DCAE collectors are written +utilizing Docker. + + +Dmaap +----- +AT&T data transportation service platform that supports message-based +topics and file-based feeds. Runs locally at the Edge and Centrally. + + +Inventory +--------- +DCAE Platform Component - Postgres DB containing Cloudify Blueprints for +platform and service components. + + +Policy +------ +Refers to the setting of configuration parameters for a component, by +Operations via the Policy UI. + + +Policy Handler +-------------- +DCAE Platform Component that received Policy updates from Policy UI + + +Policy UI +--------- +Non DCAE Component - Policy User Interace where Operations assigns +values to configuraton specified for this. + + +Run-Time +-------- +Refers to the when a service is running on the platform. Often used in +conjunction with DTI events which occur at Run-time. + + +SCH - Service Change Handler +---------------------------- +DCAE Platform Component - Receives updates from SDC and updates +Inventory + + +SDC - Service Design and Creation +--------------------------------- +ONAP design catalog for onboarding VNF/PNF packages + + +Self-Service +------------ +Refers to services that are supported by SDC, and that are automatically +installed as a result of a Service Designer's composition and submission +of a service. Only a handful of services are 'self-service' currently. +Most require manual effort to generate the Tosca Model files and +Cloudify Blueprints. + + +Service Component +----------------- +Microservice that provides network monitoring or analytic function on +the DCAE platform. + + +Service +------- +Generally composed of multiple service components, which is deployed to +the DCAE platform. + + +VNF - Virtualized Network Function +---------------------------------- +A network function that runs on one or more virtualized machines. diff --git a/docs/sections/design-components/images/1.png b/docs/sections/design-components/images/1.png Binary files differnew file mode 100644 index 00000000..e734a673 --- /dev/null +++ b/docs/sections/design-components/images/1.png diff --git a/docs/sections/design-components/images/10.png b/docs/sections/design-components/images/10.png Binary files differnew file mode 100644 index 00000000..9a7f75ad --- /dev/null +++ b/docs/sections/design-components/images/10.png diff --git a/docs/sections/design-components/images/11.png b/docs/sections/design-components/images/11.png Binary files differnew file mode 100644 index 00000000..fe5ed014 --- /dev/null +++ b/docs/sections/design-components/images/11.png diff --git a/docs/sections/design-components/images/12.png b/docs/sections/design-components/images/12.png Binary files differnew file mode 100644 index 00000000..f2d5a360 --- /dev/null +++ b/docs/sections/design-components/images/12.png diff --git a/docs/sections/design-components/images/13.png b/docs/sections/design-components/images/13.png Binary files differnew file mode 100644 index 00000000..c63d1361 --- /dev/null +++ b/docs/sections/design-components/images/13.png diff --git a/docs/sections/design-components/images/14.png b/docs/sections/design-components/images/14.png Binary files differnew file mode 100644 index 00000000..5b507b10 --- /dev/null +++ b/docs/sections/design-components/images/14.png diff --git a/docs/sections/design-components/images/15.png b/docs/sections/design-components/images/15.png Binary files differnew file mode 100644 index 00000000..1529ef04 --- /dev/null +++ b/docs/sections/design-components/images/15.png diff --git a/docs/sections/design-components/images/16.png b/docs/sections/design-components/images/16.png Binary files differnew file mode 100644 index 00000000..e3a7e36d --- /dev/null +++ b/docs/sections/design-components/images/16.png diff --git a/docs/sections/design-components/images/17.png b/docs/sections/design-components/images/17.png Binary files differnew file mode 100644 index 00000000..54347d18 --- /dev/null +++ b/docs/sections/design-components/images/17.png diff --git a/docs/sections/design-components/images/18.png b/docs/sections/design-components/images/18.png Binary files differnew file mode 100644 index 00000000..150e1c61 --- /dev/null +++ b/docs/sections/design-components/images/18.png diff --git a/docs/sections/design-components/images/19.png b/docs/sections/design-components/images/19.png Binary files differnew file mode 100644 index 00000000..b578b103 --- /dev/null +++ b/docs/sections/design-components/images/19.png diff --git a/docs/sections/design-components/images/2.png b/docs/sections/design-components/images/2.png Binary files differnew file mode 100644 index 00000000..20bd7a01 --- /dev/null +++ b/docs/sections/design-components/images/2.png diff --git a/docs/sections/design-components/images/20.png b/docs/sections/design-components/images/20.png Binary files differnew file mode 100644 index 00000000..80f56e92 --- /dev/null +++ b/docs/sections/design-components/images/20.png diff --git a/docs/sections/design-components/images/21.png b/docs/sections/design-components/images/21.png Binary files differnew file mode 100644 index 00000000..c92a2346 --- /dev/null +++ b/docs/sections/design-components/images/21.png diff --git a/docs/sections/design-components/images/22.png b/docs/sections/design-components/images/22.png Binary files differnew file mode 100644 index 00000000..bf4f1c02 --- /dev/null +++ b/docs/sections/design-components/images/22.png diff --git a/docs/sections/design-components/images/23.png b/docs/sections/design-components/images/23.png Binary files differnew file mode 100644 index 00000000..98fd7970 --- /dev/null +++ b/docs/sections/design-components/images/23.png diff --git a/docs/sections/design-components/images/24.png b/docs/sections/design-components/images/24.png Binary files differnew file mode 100644 index 00000000..2784fddf --- /dev/null +++ b/docs/sections/design-components/images/24.png diff --git a/docs/sections/design-components/images/25.png b/docs/sections/design-components/images/25.png Binary files differnew file mode 100644 index 00000000..55464c46 --- /dev/null +++ b/docs/sections/design-components/images/25.png diff --git a/docs/sections/design-components/images/26.png b/docs/sections/design-components/images/26.png Binary files differnew file mode 100644 index 00000000..9486bb80 --- /dev/null +++ b/docs/sections/design-components/images/26.png diff --git a/docs/sections/design-components/images/27.png b/docs/sections/design-components/images/27.png Binary files differnew file mode 100644 index 00000000..3c0bd2f3 --- /dev/null +++ b/docs/sections/design-components/images/27.png diff --git a/docs/sections/design-components/images/3.png b/docs/sections/design-components/images/3.png Binary files differnew file mode 100644 index 00000000..7d1d9df0 --- /dev/null +++ b/docs/sections/design-components/images/3.png diff --git a/docs/sections/design-components/images/4.png b/docs/sections/design-components/images/4.png Binary files differnew file mode 100644 index 00000000..69706f63 --- /dev/null +++ b/docs/sections/design-components/images/4.png diff --git a/docs/sections/design-components/images/5.png b/docs/sections/design-components/images/5.png Binary files differnew file mode 100644 index 00000000..ec158035 --- /dev/null +++ b/docs/sections/design-components/images/5.png diff --git a/docs/sections/design-components/images/6.png b/docs/sections/design-components/images/6.png Binary files differnew file mode 100644 index 00000000..b3f7e7bc --- /dev/null +++ b/docs/sections/design-components/images/6.png diff --git a/docs/sections/design-components/images/7.png b/docs/sections/design-components/images/7.png Binary files differnew file mode 100644 index 00000000..adb8a941 --- /dev/null +++ b/docs/sections/design-components/images/7.png diff --git a/docs/sections/design-components/images/8.png b/docs/sections/design-components/images/8.png Binary files differnew file mode 100644 index 00000000..e04c60ed --- /dev/null +++ b/docs/sections/design-components/images/8.png diff --git a/docs/sections/design-components/images/9.png b/docs/sections/design-components/images/9.png Binary files differnew file mode 100644 index 00000000..c18e9487 --- /dev/null +++ b/docs/sections/design-components/images/9.png diff --git a/docs/sections/design-components/images/DCAE-Mod-Architecture.png b/docs/sections/design-components/images/DCAE-Mod-Architecture.png Binary files differnew file mode 100644 index 00000000..ce5fca92 --- /dev/null +++ b/docs/sections/design-components/images/DCAE-Mod-Architecture.png diff --git a/docs/sections/design-components/images/Onboarding-with-DCAE-MOD.png b/docs/sections/design-components/images/Onboarding-with-DCAE-MOD.png Binary files differnew file mode 100644 index 00000000..4883b65e --- /dev/null +++ b/docs/sections/design-components/images/Onboarding-with-DCAE-MOD.png diff --git a/docs/sections/design-components/images/nifi-toolbar-components.png b/docs/sections/design-components/images/nifi-toolbar-components.png Binary files differnew file mode 100644 index 00000000..fa90afef --- /dev/null +++ b/docs/sections/design-components/images/nifi-toolbar-components.png diff --git a/docs/sections/design-components/index-onboarding.rst b/docs/sections/design-components/index-onboarding.rst new file mode 100644 index 00000000..1e859d1b --- /dev/null +++ b/docs/sections/design-components/index-onboarding.rst @@ -0,0 +1,18 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Design Platform +=============== + +.. toctree:: + :maxdepth: 1 + + ./overview.rst + ./requirements-guidelines.rst + ./blueprint_generator.rst + ./DCAE-MOD/DCAE-MOD-Architecture.rst + ./component-specification/index-component-specification.rst + ./component-specification/data-formats.rst + ./DCAE-MOD/DCAE-MOD-User-Guide.rst + ./glossary.rst +
\ No newline at end of file diff --git a/docs/sections/design-components/overview.rst b/docs/sections/design-components/overview.rst new file mode 100755 index 00000000..654a0c11 --- /dev/null +++ b/docs/sections/design-components/overview.rst @@ -0,0 +1,107 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+.. _intro:
+
+
+Overview
+========
+
+DCAE components are services that provide a specific functionality and
+are generally written to be composable with other DCAE components,
+although a component can run independently as well. The DCAE platform is
+responsible for running and managing DCAE service components reliably.
+
+The DCAE Design platform aims to provide a common catalog of available DCAE
+Service components, enabling designers to select required
+components to construct and deploy composite flows into DCAE Runtime platform.
+
+Service component/MS to be onboarded and deployed into DCAE platform would
+typically go through the following phases
+
+ - Onboarding
+ - Design
+ - Runtime
+
+DCAE Design Platform supports onboarding and service design through MOD.
+
+
+Onboarding is a process that ensures that the component is compliant
+with the DCAE platform rules. The high level summary of the onboarding process
+is:
+
+1. Defining the :doc:`data formats <data-formats>` if they don’t already
+ exist.
+2. Defining the :doc:`component specification <./component-specification/component-specification>`
+3. Validate the component spec schema against
+ `Component Spec json schema <https://git.onap.org/dcaegen2/platform/plain/mod/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json>`__
+4. Use :doc:`blueprint-generator tool <./blueprint_generator>` to generate Cloudify blueprint
+5. Test the blueprint generated in DCAE Runtime Environment (using either Dashboard UI or Cloudify cli from bootstrap)
+6. Using :doc:`DCAE-MOD <../DCAE-MOD/DCAE-MOD-User-Guide>` , publish the component and data formats into DCAE-MOD catalog.
+ (This step is required if Microservice needs to be deployed part of flow/usecase)
+
+
+A Component requires one or more data formats.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+A component is a software application that performs a function. It
+doesn’t run independently; it depends upon other components. A
+component’s function could require connecting to other components to
+fulfill that function. A component could also be providing its function
+as a service through an interface for other components to use.
+
+A component cannot connect to or be connected with any other component.
+The upstream and downstream components must *speak* the same vocabulary
+or *data format*. The output of an one component must match another
+component’s input. This is necessary for components to function
+correctly and without errors.
+
+The platform requires data formats to ensure that a component will be
+run with other *compatible* components.
+
+Data formats can and should be shared by multiple components.
+
+Each Component requires a component specification.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The component specification is a JSON artifact that fully specifies the
+component, it’s interfaces, and configuration. It’s standardized for
+CDAP (deprecated) and Docker applications and is validated using a
+:doc:`JSON schema <./component-specification/component-json-schema>`.
+
+The component specification fully specifies all the configuration
+parameters of the component. This is used by the designer and by policy
+(future) to configure the runtime behavior of the component.
+
+The component specification is used to *generate* application
+configuration in a standardized JSON that the platform will make
+available to the component. This application configuration JSON will
+include:
+
+- Parameters that have been assigned values from the component
+ specification, policy, and/or the designer
+- Connection details of downstream components
+
+The component specification is transformed by DCAE tooling (explained
+later) into TOSCA models (one for the component, and in the future, one
+for Policy). The TOSCA models then get transformed into Cloudify
+blueprints.
+
+The component specification is used by:
+
+
+- Blueprint Generator - Tool to generate standalone cloudify blueprint
+ using component spec. The blueprints can be uploaded into inventory
+ using Dashboard and triggered for deployment.
+- MOD Platform - To onboard the microservice and maintain in catalog
+ enabling designer to compose new DCAE service flows and distribute
+ to DCAE Runtime platform.
+- Policy (future) - TOSCA models are generated from the component
+ specification so that operations can create policy models used to
+ dynamically configure the component.
+- Runtime platform - The component’s application configuration
+ (JSON) is generated from the component specification and will be
+ provided to the component at runtime (through ConfigBindingService
+ or Consul).
+
+
\ No newline at end of file diff --git a/docs/sections/design-components/requirements-guidelines.rst b/docs/sections/design-components/requirements-guidelines.rst new file mode 100644 index 00000000..f633178c --- /dev/null +++ b/docs/sections/design-components/requirements-guidelines.rst @@ -0,0 +1,279 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Onboarding Pre-requisite +======================== + +Before a component is onboarded into DCAE, the component developer must ensure it +is compliant with ONAP & DCAE goals and requirement in order to correctly be deployed and be managed. This +page will discuss the changes which are grouped into the following +categories: + +- :any:`Configuration management via ConfigBindingService <configuration_management>` +- :any:`Docker images <docker_images>` +- :any:`Policy Reconfiguration flow support <policy_reconfiguration>` +- :any:`Operational Requirement <operation_requirement>` + + +.. _configuration_management: + +Configuration Management +------------------------ + +All configuration for a component is stored in CONSUL under the +components uniquely generated name which is provided by the environment +variable ``HOSTNAME`` as well as ``SERVICE_NAME``. It is then made +available to the component via a remote HTTP service call to CONFIG +BINDING SERVICE. + +The main entry in CONSUL for the component contains its +**generated application configuration**. This is based on the submitted +component specification, and consists of the *interfaces* (streams and +services/calls) and *parameters* sections. Other entries may exist as +well, under specific keys, such as :dmaap . Each key represents a +specific type of information and is also available to the component by +calling CONFIG BINDING SERVICE. More on this below. + +Components are required to pull their +**generated application configuration** at application startup using the environment +setting exposed during deployment. + + +Envs +~~~~ + +The platform provides a set of environment variables into each Docker +container: + ++----------------------------+--------------+----------------------------------------+ +| Name | Type | Description | ++============================+==============+========================================+ +| ``HOSTNAME`` | string | Unique name of the component instance | +| | | that is generated | ++----------------------------+--------------+----------------------------------------+ +| ``CONSUL_HOST`` | string | Hostname of the platform's Consul | +| | | instance | ++----------------------------+--------------+----------------------------------------+ +| ``CONFIG_BINDING_SERVICE`` | string | Hostname of the platform's config | +| | | binding service instance | +| | | | ++----------------------------+--------------+----------------------------------------+ +| ``DOCKER_HOST`` | string | Host of the target platform Docker | +| | | host to run the container on | ++----------------------------+--------------+----------------------------------------+ +| ``CBS_CONFIG_URL`` | string | Fully resolved URL to query config | +| | | from CONSUL via CBS | ++----------------------------+--------------+----------------------------------------+ + + +.. _config_binding_service: + +Config Binding Service +~~~~~~~~~~~~~~~~~~~~~~ + +The config binding service is a platform HTTP service that is +responsible for providing clients with its fully resolve configuration +JSON at startup, and also other configurations objects +when requested. + +At runtime, components should make an HTTP GET on: + +:: + + <config binding service hostname>:<port>/service_component/NAME + +For Docker components, NAME should be set to ``HOSTNAME``, which is +provided as an ENV variable to the container. + +The binding service integrates with the streams and services section of +the component specification. For example, if you specify that you call a +service: + +:: + + "services": { + "calls": [{ + "config_key": "vnf-db", + "request": { + "format": "dcae.vnf.meta", + "version": "1.0.0" + }, + "response": { + "format": "dcae.vnf.kpi", + "version": "1.0.0" + } + }], + ... + } + +Then the config binding service will find all available IP addresses of +services meeting the containers needs, and provide them to the container +under your ``config_key``: + +:: + + // your configuration + { + "vbf-db" : // see above + [IP:Port1, IP:Port2,…] // all of these meet your needs, choose one. + } + +Regarding ``<config binding service hostname>:<port>``, there is DNS +work going on to make this resolvable in a convenient way inside of your +container. + +For all Kubernetes deployments since El-Alto, an environment variable ``CBS_CONFIG_URL`` will be exposed +by platform (k8s plugins) providing the exact URL to be used for configuration retrieval. +Application can use this URL directly instead of constructing URL from HOSTNAME (which refers to ServiceComponentName) +and CONFIG_BINDING_SERVICE env's. By default, this URL will use HTTPS CBS interface + +If you are integrating with CBS SDK, then the DNS resolution and configuration fetch +are handled via library functions. + +Generated Application Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The DCAE platform uses the component specification to generate the +component’s application configuration provided at deployment time. The +component developer should expect to use this configuration JSON in the +component. + + +The following component spec snippet (from String Matching): + +:: + + "streams":{ + "subscribes": [{ + "format": "VES_specification", + "version": "4.27.2", + "type": "message_router", + "config_key" : "mr_input" + }], + "publishes": [{ + "format": "VES_specification", + "version": "4.27.2", + "config_key": "mr_output", + "type": "message_router" + }] + }, + "services":{ + "calls": [{ + "config_key" : "aai_broker_handle", + "verb": "GET", + "request": { + "format": "get_with_query_params", + "version": "1.0.0" + }, + "response": { + "format": "aai_broker_response", + "version": "3.0.0" + } + }], + "provides": [] + }, + +Will result in the following top level keys in the configuration + +:: + + "streams_publishes":{ + "mr_output":{ // notice the config key above + "aaf_password":"XXX", + "type":"message_router", + "dmaap_info":{ + "client_role": null, + "client_id": null, + "location": null, + "topic_url":"https://YOUR_HOST:3905/events/com.att.dcae.dmaap.FTL2.DCAE-CL-EVENT" // just an example + }, + "aaf_username":"XXX" + } + }, + "streams_subscribes":{ + "mr_input":{ // notice the config key above + "aaf_password":"XXX", + "type":"message_router", + "dmaap_info":{ + "client_role": null, + "client_id": null, + "location": null, + "topic_url":"https://YOUR_HOST:3905/events/com.att.dcae.dmaap.FTL2.TerrysStringMatchingTest" // just an example + }, + "aaf_username":"XXX" + } + }, + "services_calls":{ + "aai_broker_handle":[ // notice the config key above + "135.205.226.128:32768" // based on deployment time, just an example + ] + } + +These keys will always be populated whether they are empty or not. So +the minimum configuration you will get, (in the case of a component that +provides an HTTP service, doesn’t call any services, and has no streams, +is: + +:: + + "streams_publishes":{}, + "streams_subscribes":{}, + "services_calls":{} + +Thus your component should expect these well-known top level keys. + +DCAE SDK +~~~~~~~~ + +DCAE has SDK/libraries which can be used for service components for easy integration. + +- `Java Library <https://docs.onap.org/en/latest/submodules/dcaegen2.git/docs/sections/sdk/architecture.html>`__ +- `Python Modules <https://git.onap.org/dcaegen2/utils/tree/onap-dcae-cbs-docker-client>`__ + + + +.. _policy_reconfiguration: + +Policy Reconfiguration +---------------------- + +Components must provide a way to receive policy reconfiguration, that +is, configuration parameters that have been updated via the Policy UI. +The component developer must either periodically poll the ConfigBindingService API +to retrieve/refresh the new configuration or provides a script (defined in the :any:`Docker +auxiliary specification <docker-auxiliary-details>`) +that will be triggered when policy update is detected by the platform. + + +.. _docker_images: + +Docker Images +------------- + +Docker images must be pushed to the environment specific Nexus +repository. This requires tagging your build with the full name of you +image which includes the Nexus repository name. + +For ONAP microservices, the components images are expected to pushed into ONAP nexus +part of `ONAP CI jobs <https://wiki.onap.org/display/DW/Using+Standard+Jenkins+Job+%28JJB%29+Templates>`__ + + +.. _operation_requirement: + +Operational Requirement +----------------------- + +Logging +~~~~~~~ + +All ONAP MS logging should follow logging specification defined by `logging project <https://wiki.onap.org/pages/viewpage.action?pageId=71831691>`__ + +The application log configuration must enable operation to choose if to be written into file or stdout or both during deployment. + + +S3P +~~~ +ONAP S3P (all scaling/resiliency/security/maintainability) goals should meet at the minimum level defined for DCAE project for the targeted release + +If the component is stateful, it should persist its state on external store (eg. pg, redis) to allow support for scaling and resiliency. This should be important design criteria for the component. If the components either publish/subscribe into DMAAP topic, then secure connection to DMAAP must be supported (platform will provide aaf_username/aaf_password for each topic as configuration). + |