Haibin Huang | 13433a8 | 2019-06-04 16:14:59 +0800 | [diff] [blame^] | 1 | ## Guide for hpa_automation.py script in tosca |
| 2 | |
| 3 | These guide describes how to run the hpa_automation.py script. It can be used to run the vCPE end to end |
| 4 | use cases. |
| 5 | |
| 6 | ## Prerequisites |
| 7 | |
| 8 | - Login in your CLI container. |
| 9 | - Install python mysql.connector in CLI container (pip install mysql-connector-python) |
| 10 | - Create Nodeport for Policy pdp using the pdp_service_expose.yaml file (copy pdp_service_expose.yaml |
| 11 | in hpa_automation/tosca to rancher and run kubectl apply -f pdp_expose.yaml) |
| 12 | - Design vCPE in SDC, you can refer to https://wiki.onap.org/display/DW/vCPE+with+Tosca+VNF+Test+Guide. |
| 13 | - Put in the CSAR file to be used to create service models and specify its path in vcpe_config.json |
| 14 | - Put in the right parameters for automation in vcpe_config.json or vcpe_vgw_config.json |
| 15 | you must change below params: |
| 16 | - aai_url: https://<node-ip>:30233 |
| 17 | - sdc_onboarding_url: http://<cluster-ip>:8081 |
| 18 | - sdc_catalog_url: http://<node-ip>:30205 |
| 19 | - multicloud_url: http://<node-ip>:30280 |
| 20 | - policy_url: https://<node-ip>:30694 |
| 21 | - vfc-url: http://<node-ip>:30280 |
| 22 | - cloud_region_data |
| 23 | - vnfs path |
| 24 | - ns path |
| 25 | - You can run the following commands. |
| 26 | vcpe_config.json including all vnfs. |
| 27 | vcpe_vgw_config.json including vgw vnf, we can use it to test VF-C and do simple integration test. |
| 28 | - Use local package which is submitted by local file system. |
| 29 | # python hpa_automation.py -f vcpe_vgw_config.json -t "local" |
| 30 | - Use sdc package which is distributed from SDC. |
| 31 | # python hpa_automation.py -f vcpe_config.json -t "sdc" |
| 32 | |
| 33 | **Points to Note:** |
| 34 | - The hpa_automation.py runs end to end. It does the following; |
| 35 | - Create cloud complex |
| 36 | - Register cloud regions |
| 37 | - Create service type |
| 38 | - Create customer and adds customer subscription |
| 39 | - SDC Onboarding (Create VLM, VSP, VF Model, and service model) |
| 40 | - Upload policy models and adds policies |
| 41 | - Create Service Instance and VNF Instance |
| 42 | - There are well named functions that do the above items every time the script is run. If you do not |
| 43 | wish to run any part of that, you can go into the script and comment out the section at the bottom |
| 44 | that handles that portion. |