Fixes in LCM
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / docs / integration.rst
1 Integrate ONAP with Nokia VNFM
2 ==============================
3
4 The following section describes how the Nokia VNFM can be integrated into ONAP. The integration is the easiest if the
5 VNFM is installed before ONAP.
6
7 Prepare the VNFM
8 ----------------
9 * Start VNFM: The VNFM must be able to communicate with the ONAP VF-C interface, the cloud and the VNF, so the VNFM must
10  have the correct network setup. The VNFM will use LCNs to notify VF-C of the executed changes, so the LCN zone of the
11  VNFM must be configured so that the VNFM is able to reach the VF-C LCN interface.
12
13 * Register driver in CBAM
14
15  - Log into CBAM via SSH and determine the keycloak admin password
16
17   - ectl get /cbam/cluster/components/keycloak/admin_credentials/password
18
19  - Log into keycloak https://<cbamIp>/auth/admin with admin username and password from previous step and change password (note the changed password)
20  - Add a new client
21
22   - set client id to onapClient
23   - change credential type to confidential
24   - enable Standard Flow Enabled, Direct Access Grants Enabled, Service Accounts Enabled
25   - add * for redirect URL
26   - save
27   - note the client id <clientId>
28   - add new credential
29   - note the client secret <clientSecret>
30
31  - Add a new user
32
33   - note the username <onapUsername>
34   - reset password
35   - assign the "user" role to the created user
36
37  - Log into CBAM GUI using the created user
38
39   - change and note the password <onapPassword>
40
41  - Add SSL certificates for all VIM connection or disable certificate verification
42
43   - For insecure (all certificates are automatically trusted)
44
45    - sudo su -
46    - ectl set /cbam/cluster/components/tlm/insecure_vim_connection true
47    - ectl set /actions/reconfigure start
48    - journalctl -fu cbam-reconfigure.service
49    - (wait for "Started cbam-reconfigure.service.")
50
51   - For secure: (read CBAM documentation)
52
53 Prepare /ets/hosts file on your laptop (optional easier to copy paste URLs)
54 ----------------------------------------------------------------------------
55
56 +-------------------+---------------------------------+
57 | IP address        | DNS entry                       |
58 +===================+=================================+
59 | <fill IP address> | portal.api.simpledemo.onap.org  |
60 +-------------------+---------------------------------+
61 | <fill IP address> | policy.api.simpledemo.onap.org  |
62 +-------------------+---------------------------------+
63 | <fill IP address> | sdc.api.simpledemo.onap.org     |
64 +-------------------+---------------------------------+
65 | <fill IP address> | vid.api.simpledemo.onap.org     |
66 +-------------------+---------------------------------+
67 | <fill IP address> | aai.api.simpledemo.onap.org     |
68 +-------------------+---------------------------------+
69 | <fill IP address> | msb.api.simpledemo.onap.org     |
70 +-------------------+---------------------------------+
71 | <fill IP address> | robot.api.simpledemo.onap.org   |
72 +-------------------+---------------------------------+
73
74 Add the VNFM driver to ONAP
75 ---------------------------
76
77 - Locate the IP address of the MSB (MSB_IP). Look at the VM instances of ONAP and search one with vm1-multi-service name. This is where the MSB is located
78 - Create VIM in A&AI (may already exist) (repeat for all clouds planed to be used)
79
80  - http://msb.api.simpledemo.onap.org/iui/aai-esr-gui/extsys/vim/vimView.html
81
82 - Determine the tenant id to be used (log into the cloud) (repeat for all tenants planed to be used within the cloud)
83
84  - http://<horizonUrl>/project/access_and_security/ Intentity / Projects
85
86 - Create tenant (may already exist) (repeat for all tenants planed to be used within the cloud)
87
88  + tool: Postman
89  + change tenantId, cloudRegion and cloudOwner
90  + method: PUT
91  + url: https://aai.api.simpledemo.onap.org:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/<cloudOwner>/<cloudRegion>/tenants/tenant/<tenantId>
92  + Headers
93
94   - basic auth AAI:AAI
95   - X-FromAppId : any
96   - Content-type: application/json
97   - Accept: application/json
98
99  - Content: :download:`aai.create.tenant.request.json <sample/aai.create.tenant.request.json>`
100
101   - change tenant id, region id owner id and tenant name
102
103 - Register the VNFM as external system (repeat for all clouds planed to be used)
104
105  - Visit MSB http://msb.api.simpledemo.onap.org:9518/api/aai-esr-server/v1/vims
106
107   - note the cloud owner field <cloudOwner>
108   - note the region id field <cloudRegionId>
109
110  - Visit MSB http://msb.api.simpledemo.onap.org/iui/aai-esr-gui/extsys/vnfm/vnfmView.html and click on register button
111
112 +-----------------+-----------------------------------+
113 | key             | Value                             |
114 +-----------------+-----------------------------------+
115 | Name            | CbamVnfm                          |
116 +-----------------+-----------------------------------+
117 | type            | NokiaSVNFM                        |
118 +-----------------+-----------------------------------+
119 | Vendor          | Nokia                             |
120 +-----------------+-----------------------------------+
121 | version         | v1                                |
122 +-----------------+-----------------------------------+
123 | URL             | https://<cbamIp>:443/vnfm/lcm/v3/ |
124 +-----------------+-----------------------------------+
125 | VIM             | <cloudOwner>_<cloudRegionId>      |
126 +-----------------+-----------------------------------+
127 | certificate URL |                                   |
128 +-----------------+-----------------------------------+
129 | Username        | <clientId>                        |
130 +-----------------+-----------------------------------+
131 | Password        | <clientSecret>                    |
132 +-----------------+-----------------------------------+
133
134  - Determine the UUID of the VNFM (if the VNFM was registered multiple times select one at random)
135
136   - visit http://msb.api.simpledemo.onap.org:9518/api/aai-esr-server/v1/vnfms and search for the previously registered VNFM
137   - note the id field <vnfmId>
138
139 Configure the SVNFM driver (generic)
140 ------------------------------------
141
142  - Download the CBAM SVNFM driver
143    - docker pull https://nexus.onap.org/content/sites/raw/onap/vfc/nfvo/svnfm/nokiav2:1.1.0-STAGING-latest
144  - Start the driver (fill in values)
145
146 .. code-block:: console
147
148    export CBAM_IP=<cbamIp>
149    export MULTI_NODE_IP=<multiNodeIp>
150    export VNFM_ID=<vnfmId>
151    export IMAGE_ID=<imageId>
152    export CBAM_PASSWORD=<onapPassword>
153    export CBAM_USERNAME=<onapUsername>
154    docker run --name vfc_nokia -p 8089:8089 -e "MSB_IP=$MULTI_NODE_IP" -e "CONFIGURE=kuku" -e "EXTERNAL_IP=$MULTI_NODE_IP" -e "CBAM_CATALOG_URL=https://$CBAM_IP:443/api/catalog/adapter/" -e "CBAM_LCN_URL=https://$CBAM_IP:443/vnfm/lcn/v3/" -e "CBAM_KEYCLOAK_URL=https://$CBAM_IP:443/auth/" -e "CBAM_USERNAME=$CBAM_USERNAME" -e "CBAM_PASSWORD=$CBAM_PASSWORD" -e "VNFM_ID=$VNFM_ID" -d --stop-timeout 300 $IMAGE_ID
155
156 Configure the SVNFM driver (ONAP demo environment)
157 --------------------------------------------------
158  - Configure the already running instance
159  - docker exec -it `docker ps | grep nokiav2 | awk '{print $1}'` /bin/bash
160  - Edit /service/application.properties
161  - Fill values for cbamCatalogUrl, cbamLcnUrl, cbamKeyCloakBaseUrl, cbamUsername, cbamPassword, vnfmId