update link to upper-constraints.txt
[integration.git] / docs / docs_vFWDT.rst
index 5554cd4..0c13886 100644 (file)
@@ -3,12 +3,11 @@
 
 .. _docs_vfw_traffic:
 
-.. contents::
-   :depth: 3
-..
+:orphan:
 
 vFW In-Place Software Upgrade with Traffic Distribution Use Case
 ----------------------------------------------------------------
+
 Description
 ~~~~~~~~~~~
 
@@ -292,7 +291,7 @@ what should show following folders
 ::
 
     root@sb01-rancher:~/demo/tutorials/vFWDT# ls
-    playbooks  preloads  workflow
+    get_secret.sh  playbooks  policies  preloads  workflow
 
 
 .. note:: Remember vFWDT tutorial directory `~/demo/tutorials/vFWDT` for the further use
@@ -392,85 +391,24 @@ This sections show the steps necessary to configure Policies, CDT and Ansible se
 
 Configuration of Policies for Optimization Framework
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-We need to enter the Policy editor in order to upload policy types and then the policy rules for the demo. The policies are required for the Optimization Framework and they guide OOF how to determine
+We need to upload neccessary optimization policy rules required for the demo. The policies are required for the Optimization Framework and they guide OOF how to determine
 vFW and vPGN instances used in the Traffic Distribution workflow.
 
-1. Enter the Policy portal
-
-Specify *demo*:*demo* as a login and password
-
-::
-
-    https://K8S_NODE_IP:30219/onap/login.htm
-
-From the left side menu enter *Dictionary* section and from the combo boxes select *MicroService Policy* and *MicroService Models* respectively. Below you can see the result.
-
-.. figure:: files/vfwdt-policy-type-list.png
-   :scale: 70 %
-   :align: center
-
-   Figure 15 List of MicroService policy types in the Policy portal
-
-2. Upload the policy types
-
-Before policy rules for Traffic Distribution can be uploaded we need to create policy types to store these rules. For that we need to create following three types:
-
-- VNF Policy - it used to filter vf-module instances i.e. base on their attributes from the AAI like *provStatus*, *cloudRegionId* etc.
-- Query Policy - it is used to declare extra input parameters for OOF placement request  - in our case we need to specify cloud region name
-- Affinity Policy - it is used to specify the placement rule used for selection vf-module candidate pairs of vFW vf-module instance (traffic destination) and vPGN vf-module instance (anchor point). In this case the match is done by belonging to the same cloud region
-
-Enter vFWDT tutorial directory on Rancher server (already created in `Preparation of Workflow Script Environment`_) and create policy types from the following files
-
-::
-
-    root@sb01-rancher:~/demo/tutorials/vFWDT# ls policies/types/
-    affinityPolicy-v20181031.yml  queryPolicy-v20181031.yml  vnfPolicy-v20181031.yml
-
-For each file press *Create* button, choose the policy type file, select the *Micro Service Option* (always one available) and enter the *Version* which must be the same like the one specified for policy instances. In this case pass value *OpenSource.version.1*
-
-.. figure:: files/vfwdt-add-micro-service-policy.png
-   :scale: 70 %
-   :align: center
-
-   Figure 16 Creation of new MicroService policy type for OOF
-
-In a result you should see in the dictionary all three new types of policies declared
-
-.. figure:: files/vfwdt-completed-policy-type-list.png
-   :scale: 70 %
-   :align: center
-
-   Figure 17 Completed list of MicroService policy types in the Policy portal
+1. Push the policies into the PDP
 
-3. Push the policies into the PDP
-
-In order to push policies into the PDP it is required to execute already prepared *uploadPolicies.sh* script that builds policy creation/update requests and automatically sends them to the Policy PDP pod
+In order to push policies into the PDP it is required to execute already prepared *uploadPolicies.sh* script that prepares policy upload requests and automatically sends them to the Policy PDP pod
 
 ::
 
     root@sb01-rancher:~/demo/tutorials/vFWDT# ls policies/rules/
-    QueryPolicy_vFW_TD.json  affinity_vFW_TD.json  uploadPolicies.sh  vnfPolicy_vFW_TD.json  vnfPolicy_vPGN_TD.json
+    QueryPolicy_vFW_TD.json  affinity_vFW_TD.json  uploadPolicies.sh  dt-policies.sh  vnfPolicy_vFW_TD.json  vnfPolicy_vPGN_TD.json
 
-When necessary, you can modify policy json files. Script will read these files and will build new PDP requests based on them. To create new policies execute script in the following way
+When necessary, you can modify policy json files. Script will read these files and will build new PDP requests based on them. To create or update policies execute the script in the following way
 
 ::
 
     ./policies/rules/uploadPolicies.sh
 
-To update existing policies execute script with an extra argument
-
-::
-
-    ./policies/rules/uploadPolicies.sh U
-
-The result can be verified in the Policy portal, in the *Editor* section, after entering *OSDF_DUBLIN* directory
-
-.. figure:: files/vfwdt-policy-editor-osdf-dublin.png
-   :scale: 70 %
-   :align: center
-
-   Figure 18 List of policies for OOF and vFW traffic distribution
-
 Testing Gathered Facts on Workflow Script
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -549,7 +487,7 @@ Configuration of VNF in the APPC CDT tool
 
 .. note:: Automated procedure can be found at the end of the section
 
-Following steps aim to configure DistributeTraffic LCM action for our vPKG and vFW-SINK VNFs in APPC CDT tool. 
+Following steps aim to configure DistributeTraffic LCM action for our vPKG and vFW-SINK VNFs in APPC CDT tool.
 
 1. Enter the Controller Design Tool portal
 
@@ -565,7 +503,7 @@ Following steps aim to configure DistributeTraffic LCM action for our vPKG and v
    :scale: 70 %
    :align: center
 
-   Figure 19 Creation of new VNF type in CDT
+   Figure 15 Creation of new VNF type in CDT
 
 4. Enter previously retrieved VNF Type for vPKG VNF and press the *NEXT* button
 
@@ -573,7 +511,7 @@ Following steps aim to configure DistributeTraffic LCM action for our vPKG and v
    :scale: 70 %
    :align: center
 
-   Figure 20 Creation of new VNF type in CDT
+   Figure 16 Creation of new VNF type in CDT
 
 5. For already created VNF Type (if the view does not open itself) click the *View/Edit* button. In the LCM action edit view in the first tab please choose:
 
@@ -592,7 +530,7 @@ Following steps aim to configure DistributeTraffic LCM action for our vPKG and v
    :scale: 70 %
    :align: center
 
-   Figure 21 DistributeTraffic LCM action editing
+   Figure 17 DistributeTraffic LCM action editing
 
 6. Go to the *Template* tab and in the editor paste the request template of LCM actions for vPKG VNF type
 
@@ -649,7 +587,7 @@ The meaning of selected template parameters is following:
    :scale: 70 %
    :align: center
 
-   Figure 22 LCM DistributeTraffic request template
+   Figure 18 LCM DistributeTraffic request template
 
 7. Afterwards press the *SYNCHRONIZE WITH TEMPLATE PARAMETERS* button. You will be moved to the *Parameter Definition* tab. The new parameters will be listed there.
 
@@ -657,7 +595,7 @@ The meaning of selected template parameters is following:
    :scale: 70 %
    :align: center
 
-   Figure 23 Summary of parameters specified for DistributeTraffic LCM action.
+   Figure 19 Summary of parameters specified for DistributeTraffic LCM action.
 
 .. note:: For each parameter you can define its: mandatory presence; default value; source (Manual/A&AI). For our case modification of this settings is not necessary
 
@@ -801,19 +739,27 @@ Configuration of APPC DB for Ansible
 
 For each VNF that uses the Ansible protocol you need to configure *PASSWORD* and *URL* field in the *DEVICE_AUTHENTICATION* table. This step must be performed after configuration in CDT which populates data in *DEVICE_AUTHENTICATION* table.
 
-1. Enter the APPC DB container
+1. Read APPC DB password
+
+Enter vFWDT tutorial directory `Preparation of Workflow Script Environment`_ on Rancher server.
+
+::
+
+    ./get_secret.sh `kubectl get secrets | grep appc-db-root-pass`
+
+2. Enter the APPC DB container
 
 ::
 
     kubectl exec -it -n onap `kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | grep appc-db-0` -- sh
 
-2. Enter the APPC DB CLI (password is *gamma*)
+3. Enter the APPC DB CLI
 
 ::
 
-    mysql -u sdnctl -p
+    mysql -u root -p
 
-3. Execute the following SQL commands
+4. Execute the following SQL commands
 
 ::
 
@@ -852,7 +798,7 @@ the execution of APPC LCM actions with configuration resolved before by Optimiza
 Workflow Execution
 ~~~~~~~~~~~~~~~~~~
 
-In order to run workflows execute following commands from the vFWDT tutorial directory `Preparation of Workflow Script Environment`_ on Rancher server. 
+In order to run workflows execute following commands from the vFWDT tutorial directory `Preparation of Workflow Script Environment`_ on Rancher server.
 
 For Traffic Distribution workflow run
 
@@ -892,8 +838,8 @@ The order of executed LCM actions for In-Place Software Upgrade with Traffic Dis
 5. DistributeTraffic on vPKG VM - ansible playbook reconfigures vPKG in order to send traffic to destination specified before by OOF.
 6. DistributeTrafficCheck on vFW-1 VM - ansible playbook checks if traffic is not present on vFW from which traffic should be migrated out. If traffic is still present after 30 seconds playbook fails
 7. DistributeTrafficCheck on vFW-2 VM - ansible playbook checks if traffic is present on vFW from which traffic should be migrated out. If traffic is still not present after 30 seconds playbook fails
-8. UpgradeSoftware on vFW-1 VM - ansible playbook modifies the software on the vFW instance and sets the version of the software to the specified one in the request 
-9. UpgradePostCheck on vFW-1 VM - ansible playbook checks if the software of vFW is the same like the one specified in the workflows input. 
+8. UpgradeSoftware on vFW-1 VM - ansible playbook modifies the software on the vFW instance and sets the version of the software to the specified one in the request
+9. UpgradePostCheck on vFW-1 VM - ansible playbook checks if the software of vFW is the same like the one specified in the workflows input.
 10. DistributeTraffic on vPKG VM - ansible playbook reconfigures vPKG in order to send traffic to destination specified before by OOF (reverse configuration).
 11. DistributeTrafficCheck on vFW-2 VM - ansible playbook checks if traffic is not present on vFW from which traffic should be migrated out. If traffic is still present after 30 seconds playbook fails
 12. DistributeTrafficCheck on vFW-1 VM - ansible playbook checks if traffic is present on vFW from which traffic should be migrated out. If traffic is still not present after 30 seconds playbook fails