vFW CNF CDS usecase automation scripts update
[demo.git] / heat / vFW_CNF_CDS / automation / README.md
1 # CNF automation
2
3 0. Make sure you have python 3.8.x installed and default interpreter, what is required by onap-pythonsdk
4 1. Install required packages with pipenv `pipenv install`
5 2. Run virtual environment `pipenv shell`. In case of problems use `--fancy` option
6    
7    **In case of problems with pipenv:** `venv` can be used as well. In that case, please install all required python packages in correct version according the list in `Pipfile`
8 3. Add kubeconfig file for k8s cluster that will host your CNF
9    - `artifacts/cluster_kubeconfig`
10 4. Prepare onboarding packages `cd ../templates/ && make && cd ../automation/`
11 5. Modify `config.py`:
12    - NATIVE - enables native helm orchestration path in SO
13    - SKIP_POST_INSTANTIATION - whether post instantiation configuration should be run
14    - MACRO_INSTANTIATION - instantiation method used: macro or a'la carte
15    - K8S_NAMESPACE - k8s namespace to use for deployment of CNF
16    - K8S_VERSION - version of the k8s cluster
17    - K8S_REGION - name of the k8s region from the CLOUD_REGIONS 
18    - CLOUD_REGIONS - configuration of k8s or Openstack regions
19    - GLOBAL_CUSTOMER_ID
20    - VENDOR
21    - SERVICENAME
22    - VNF_PARAM_LIST - list of parameters to pass for VNF creation process
23    - VF_MODULE_PARAM_LIST - list of parameters to pass for VF Module creation
24 6. __Important:__ Before running python scripts, some settings for `onapsdk` with information about ONAP endpoints (and socks) have to be exported. 
25    All settings for ONAP instance are located in `automation/onap_settings.py` file. To export that settings please run command inside `pipenv` or `venv` shell
26    ```shell
27    (automation) ubuntu@onap:~/automation$ export ONAP_PYTHON_SDK_SETTINGS="onap_settings"
28    ```
29 7. Run script `python create_cloud_regions.py` in order to create **k8s or openstack cloud region**
30 8. Onboard CNF `python onboard.py`
31 9. Instantiate CNF `python instantiate.py`
32 10. Once test is done, CNF service instance can be deleted with `python delete.py` command
33