diff options
Diffstat (limited to 'docs/architecture/architecture.rst')
-rw-r--r-- | docs/architecture/architecture.rst | 136 |
1 files changed, 64 insertions, 72 deletions
diff --git a/docs/architecture/architecture.rst b/docs/architecture/architecture.rst index dc04ab43..5bd061eb 100644 --- a/docs/architecture/architecture.rst +++ b/docs/architecture/architecture.rst @@ -93,7 +93,7 @@ in TOSCA. 3. A *Policy Type Implementation* or *Raw Policy*, is the logic that implements the policy. It is implemented by a skilled policy developer in consultation with domain experts. The implementation has software that reads the Policy - Type and parses the incoming confiuration properties. The software has domain logic that is triggered when one of the + Type and parses the incoming configuration properties. The software has domain logic that is triggered when one of the triggers described in the Policy Type occurs. The software logic executes and acts on the targets specified in the Policy Type. @@ -116,7 +116,7 @@ The Policy Type Implementation is developed that can configure the maximum downt can receive a trigger from the analytics system when the maximum downtime is breached, and that can either request more resources, report an issue to a trouble ticketing system, and can log a breach. -VPN Policies are created by specifying values for the properties, triggers, and targets specifed in VPN Policy Type. +VPN Policies are created by specifying values for the properties, triggers, and targets specified in VPN Policy Type. In the case of the bank network, the *maximumDowntime* threshold is specified as 5 minutes downtime per year and the *mitigationStrategy* is defined as *allocateMoreResources*, and the target is specified as being the bank's VPN service @@ -152,11 +152,11 @@ are executing correctly, and that the state and status of policies is monitored. running in the ONAP system and is responsible for making policy decisions and for managing the administrative state of the PDPs as directed by \ *PolicyAdministration.* -*PolicyDevelopment* creates policy artifacts and supporting information in the policy database. \ *PolicyAdministration* -reads those artifacts and the supporting information from the policy database whilst deploying policy artifacts. Once -the policy artifacts are deployed, *PolicyAdministration* handles the run-time management of the PDPs on which the -policies are running. *PolicyDevelopment* interacts with ONAP design time components, and has no programmatic interface -with *PolicyAdministration*, *PolicyExecution* or any other run-time ONAP components. +*PolicyDevelopment* provides APIs that allow creation of policy artifacts and supporting information in the policy +database. *PolicyAdministration* reads those artifacts and the supporting information from the policy database whilst +deploying policy artifacts. Once the policy artifacts are deployed, *PolicyAdministration* handles the run-time +management of the PDPs on which the policies are running. *PolicyDevelopment* interacts with the database, and has +no programmatic interface with *PolicyAdministration*, *PolicyExecution* or any other run-time ONAP components. The diagram below shows a more detailed view of the architecture, as inspired by `RFC-2753 <https://tools.ietf.org/html/rfc2753>`__ and `RFC-3198 <https://tools.ietf.org/html/rfc3198>`__. @@ -164,15 +164,15 @@ The diagram below shows a more detailed view of the architecture, as inspired by .. image:: images/PFDesignAndAdmin.svg *PolicyDevelopment* provides a `CRUD <https://en.wikipedia.org/wiki/Create,_read,_update_and_delete>`__ API for policy -types and policies. The policy types and policy artifacts and their metadata (Information about policies, policy types, +types and policies. The policy types and policy artifacts and their metadata (information about policies, policy types, and their interrelations) are stored in the *PolicyDB*. The *PolicyDevGUI*, PolicyDistribution, and other applications -such as *CLAMP* can use the *PolicyDevelopment* API to create, update, and delete policy types and policies. +such as *CLAMP* can use the *PolicyDevelopment* API to create, update, delete, and read policy types and policies. *PolicyAdministration* has two important functions: - Management of the life cycle of PDPs in an ONAP installation. PDPs register with *PolicyAdministration* when they come - up. *PolicyAdministration* handles the allocation of PDPs to a PDP Groups and PDP Subgroups, so that they can be - managed as microservices in Kubernetes. + up. *PolicyAdministration* handles the allocation of PDPs to PDP Groups and PDP Subgroups, so that they can be + managed as microservices in infrastructure management systems such as Kubernetes. - Management of the deployment of policies to PDPs in an ONAP installation. *PolicyAdministration* gives each PDP group a set of domain policies to execute. @@ -182,7 +182,7 @@ three APIs: - a CRUD API for policy groups and subgroups -- an API that allows the allocation of policies PDP groups and subgroups to be controlled +- an API that allows the allocation of policies to PDP groups and subgroups to be controlled - an API allows policy execution to be managed, showing the status of policy execution on PDP Groups, subgroups, and individual PDPs as well as the life cycle state of PDPs @@ -201,8 +201,8 @@ is a group of PDPs of the same type that are running the same policies. *A PDPSu structuring of PDPs is required because, in order to simplify deployment and scaling of PDPs in Kubernetes, we gather all the PDPs of the same type that are running the same policies together for deployment. -For example, assume we have policies for the SON (Self Organizing Network) and ACPE (Advanced Customer Premises Service) -domains. For SON,we have XACML, Drools, and APEX policies, and for ACPE we have XACML and Drools policies. The table +For example, assume we have policies for the SON (Self Organizing Network) and ACPS (Advanced Customer Premises Service) +domains. For SON,we have XACML, Drools, and APEX policies, and for ACPS we have XACML and Drools policies. The table below shows the resulting \ *PDPGroup*, *PDPSubGroup*, and PDP allocations: ============= ================ ========================= ======================================== ================ @@ -213,8 +213,8 @@ SON SON-XACML SON-XACML-Dep Always 2, be geo redund scale down on 40% load, be geo-redundant \ SON-APEX SON-APEX-Dep At Least 3, scale up on 70% load, scale >= 3 PDP-A down on 40% load, be geo-redundant -ACPE ACPE-XACML ACPE-XACML-Dep Always 2 2 PDP-X -\ ACPE-Drools ACPE-Drools-Dep At Least 2, scale up on 80% load, scale >=2 PDP-D +ACPS ACPS-XACML ACPS-XACML-Dep Always 2 2 PDP-X +\ ACPS-Drools ACPS-Drools-Dep At Least 2, scale up on 80% load, scale >=2 PDP-D down on 50% load ============= ================ ========================= ======================================== ================ @@ -229,59 +229,50 @@ implemented as a common model and is used by *PolicyDevelopment*, *PolicyDeploym .. image:: images/ClassStructure.svg -The UML class diagram above shows the portion of the Policy Framework Object Model that applies to *PolicyDeployment* -and *PolicyExecution.* - -.. image:: images/DesignTimeComponents.svg - -The UML class diagram above shows the portion of the Policy Framework Object Model that applies to *PolicyDevelopment* -and *PolicyDeployment.* +The UML class diagram above shows thePolicy Framework Object Model. 2.2 Policy Design Architecture ------------------------------ -This section describes the architecture of the model driven system used to develop policy types and to create concrete +This section describes the architecture of the model driven system used to develop policy types and to create policies using policy types. The output of Policy Design is deployment-ready artifacts and Policy metadata in the Policy Framework database. -Policies that are expressed via natural language or a model require some development work ahead of time for them to be -translated into concrete runtime policies. Some Policy Domains will be set up and available in the platform during +Policy types that are expressed via natural language or a model require an implementation that allows them to be +translated into runtime policies. Some Policy Type implementations are set up and available in the platform during startup such as Control Loop Operational Policy Models, OOF placement Models, DCAE microservice models. Policy type -implementation development is done by an experienced developer. +implementations can also be loaded and deployed at run time. 2.2.1 Policy Type Design ^^^^^^^^^^^^^^^^^^^^^^^^ Policy Type Design is the task of creating policy types that capture the generic and vendor independent aspects of a -policy for a particular domain use case. The policy type implementation specifies the model information, rules, and -tasks that a policy type requires to generate concrete policies. - -All policy types must implement the ONAP Policy Framework *PolicyType* interface. This interface allows -*PolicyDevelopment* to manage policy types and to generate policies from these policy types in a uniform way regardless -of the domain that the policy type is addressing or the PDP technology that will execute the policy. The interface is -used by *PolicyDevelopment* to determine the PDP technology of the policy type, the structure, type, and definition of -the model information that must be supplied to the policy type to generate a concrete policy. - -A *PolicyTypeImpl* is developed for a certain type of PDP (for example XACML oriented for decision policies or Drools -rules oriented for ECA policies). The design environment and tool chain for a policy type is specific for the type of -policy being designed. - -The *PolicyTypeImpl* implementation (or raw policy) is the specification of the specific rules or tasks, the flow of -the policy, its internal states and data structures and other relevant information. A *PolicyTypeImpl* is specific to a -PDP technology, that is XACML, Drools, or APEX. *A PolicyTypeImpl* can be specific to a particular policy type, it can -be more general, providing the implementation of a class of policy types, or the same policy type may have many -implementations. - -*PolicyDevelopment* provides the RESTful :ref:`Policy Design API <design-label>` which allows other components to query -policy types and policy type implementations, to determine the model information, rules, or tasks that they require, to -specialize policy flow, and to generate policies from policy types. This API is used by the ONAP Policy Framework and -other components such as \ *PolicyDistribution* to create policies from policy types. +policy for a particular domain use case. + +All policy types are specified in TOSCA service templates. Once policy types are defined and created in the system, +*PolicyDevelopment* manages them and uses them to allow policies to be created from these policy types in a uniform +way regardless of the domain that the policy type is addressing or the PDP technology that will execute the policy. + +A *PolicyTypeImpl* is developed for a policy type for a certain type of PDP (for example XACML oriented for decision +policies, Drools rules or Apex state machines oriented for ECA policies). While a policy type is implementation +independent, a policy type implementation for a policy type is specific for the technology of the PDP on which +policies that use that policy type implementation will execute. A Policy Type may have many implementations. A +*PolicyTypeImpl* is the specification of the specific rules or tasks, the flow of the policy, its internal states +and data structures and other relevant information. A *PolicyTypeImpl* can be specific to a particular policy type +or it can be more general, providing the implementation of a class of policy types. Further, the design environment +and tool chain for implementing implementations of policy types is specific to the technology of the PDP on which +the implementation will run. + +*PolicyDevelopment* provides the RESTful :ref:`Policy Design API <design-label>`, which allows other components to query +policy types, Those components can then create policies that specify values for the properties, triggers, and targets +specified in a policy type. This API is used by components such as *CLAMP* and *PolicyDistribution* to create policies +from policy types. Consider a policy type created for managing faults on vCPE equipment in a vendor independent way. The policy type -captures the generic logic required to manage the faults and specifies the vendor specific information that must be -supplied to the type for specific vendor vCPE VFs. The actual vCPE policy that is used for managing particular vCPE -equipment is created by setting the parameters specified in the policy type together with the specific modeled -information, rules and tasks in the policy type implementation for that vendor model of vCPE. +implementation captures the generic logic required to manage the faults and specifies the vendor specific information +that must be supplied to the type for specific vendor vCPE VFs. The actual vCPE policy that is used for managing +particular vCPE equipment is created by setting the properties specified in the policy type for that vendor model +of vCPE. 2.2.1.1 Generating Policy Types """"""""""""""""""""""""""""""" @@ -290,17 +281,12 @@ It is possible to generate policy types using MDD (Model Driven Development) tec using a DSL (Domain Specific Language) or a policy specification environment for a particular application domain. For example, policy types for specifying SLAs could be expressed in a SLA DSL and policy types for managing SON features could be generated from a visual SON management tool. The ONAP Policy framework provides an API that allows tool chains -to create policy types. SDC uses this approach for generating Policy Types in the Policy Framework, see the -:ref:`Policy Design and Development <design-label>` page. - -The SDC GUI supports several types of policies that can be captured at design time. DCAE micro service configuration -policies can be onboarded via the DCAE-DS (DCAE Design Studio). - +to create policy types, see the :ref:`Policy Design and Development <design-label>` page. .. image:: images/PolicyTypeDesign.svg -The GUI implementation in another ONAP component such as SDC DCAE-DS uses the *API_User* API to create and edit ONAP -policy types. +A GUI implementation in another ONAP component (a *PolicyTypeDesignClient*) may use the *API_User* API to create and +edit ONAP policy types. 2.2.1.2 Programming Policy Type Implementations """"""""""""""""""""""""""""""""""""""""""""""" @@ -327,16 +313,22 @@ file and posted over the policy design API described on the :ref:`Policy Design A number of mechanisms for policy creation are supported in ONAP. The process in *PolicyDevelopment* for creating a policy is the same for all mechanisms. The most general mechanism for creating a policy is using the RESTful *Policy Design API*, which provides a full interface to the policy creation support of *PolicyDevelopment*. This API may -be exercised directly using utilities such as *curl*. *PolicyDevelopment* provides a command line tool that is a loose -wrapper around the API. It also provides a general purpose Policy GUI in the ONAP Portal for policy creation, which -again is a general purpose wrapper around the policy creation API. The Policy GUI can interpret any TOSCA Model that has -been loaded into it and flexibly presents a GUI for a user to create policies from. The development of these mechanisms -will be phased over a number of ONAP releases. +be exercised directly using utilities such as *curl*. + +In future releases, the Policy Framework may provide a command line tool that will be a loose wrapper around the API. It +may also provide a general purpose Policy GUI in the ONAP Portal for policy creation, which again would be a general +purpose wrapper around the policy creation API. The Policy GUI would interpret any TOSCA Model that has been loaded into +it and flexibly presents a GUI for a user to create policies from. The development of these mechanisms will be phased +over a number of ONAP releases. A number of ONAP components use policy in manners which are specific to their particular needs. The manner in which the policy creation process is triggered and the way in which information required to create a policy is specified and accessed is specialized for these ONAP components. +For example, *CLAMP* provides a GUI for creation of Control Loop policies, which reads the Policy Type associated +with a control loop, presents the properties as fields in its GUI, and creates a policy using the property values entered +by the user. + The following subsections outline the mechanisms for policy creation and modification supported by the ONAP Policy Framework. @@ -354,7 +346,7 @@ An *API_User* first gets a reference to and the metadata for the Policy type for *API_User* then asks for a reference and the metadata for the policy. *PolicyDevelopment* looks up the policy in the database. If the policy already exists, *PolicyDevelopment* reads the artifact and returns the reference of the existing policy to the *API_User* with the metadata for the existing policy. If the policy does not exist, *PolicyDevelopment* -creates and new reference and metadata and returns that to the *API_User*. +informs the *API_User*. The *API_User* may now proceed with a policy specification session, where the parameters are set for the policy using the policy type specification. Once the *API_User* is happy that the policy is completely and correctly specified, it @@ -400,10 +392,10 @@ using TOSCA Policy Types. .. image:: images/ScriptedPolicyDesign.svg -One straightforward way of generating policies from Policy types is to use directives specified in a script file. The -command line utility is an *API_User*. The script reads directives from a file. For each directive, it reads the policy -type using the Policy Type API, and uses the parameters of the directive to prepare a TOSCA Policy. It then uses the -Policy API to create the policy. +One straightforward way of generating policies from Policy types is to use commands specified in a script file. A +command line utility such as *curl* is an *API_User*. Commands read policy types using the Policy Type API, parse the +policy type and uses the properties of the policy type to prepare a TOSCA Policy. It then issues further commands to use +the Policy API to create policies. 2.2.3 Policy Design Process ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |