Updating Nokia driver
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / docs / integration.rst
1 Integrate ONAP with Nokia VNFM
2 ==============================
3
4 Prepare CBAM
5 ------------
6
7 * Start CBAM in ONAP network
8
9  - via image: (read the CBAM installation guide)
10
11 * Register driver in CBAM
12
13  - Log into CBAM via SSH and get keycloak admin password
14
15   - ectl get /cbam/cluster/components/keycloak/admin_credentials/password
16
17  - Log into keycloak https://<cbamIp>/auth/admin with admin username and password from previous step and change password (save the changed password)
18  - Add a new client
19
20   - set client id to onapClient
21   - change credential type to confidental
22   - enable Standard Flow Enabled, Direct Access Grants Enabled, Service Accounts Enabled
23   - add * for redirect URL
24   - save
25   - note the client id <clientId>
26   - add new credential
27   - note the client secret <clientSecret>
28
29  - Add a new user
30
31   - note the username <onapUsername>
32   - reset password
33   - assign the "user" role to the created user
34
35  - Log into CBAM GUI usin the created user
36
37   - change and note the password <onapPassword>
38
39  - Add SSL certificates for all VIM connection or disable certificate verification
40
41   - For insecure
42
43    - sudo su -
44    - ectl set /cbam/cluster/components/tlm/insecure_vim_connection true
45    - ectl set /actions/reconfigure start
46    - journalctl -fu cbam-reconfigure.service
47    - (wait for "Started cbam-reconfigure.service.")
48
49   - For secure: (read CBAM documentation)
50
51 Prepare /ets/hosts file on your machine (optional easier to copy paste URLs)
52 ----------------------------------------------------------------------------
53
54 +--------------+---------------------------------+
55 | IP address   | DNS entry                       |
56 +==============+=================================+
57 | 1.2.3.4      | portal.api.simpledemo.onap.org  |
58 +--------------+---------------------------------+
59 | 1.2.3.4      | policy.api.simpledemo.onap.org  |
60 +--------------+---------------------------------+
61 | 1.2.3.4      | sdc.api.simpledemo.onap.org     |
62 +--------------+---------------------------------+
63 | 1.2.3.4      | vid.api.simpledemo.onap.org     |
64 +--------------+---------------------------------+
65 | 1.2.3.4      | aai.api.simpledemo.onap.org     |
66 +--------------+---------------------------------+
67 | 1.2.3.4      | msb.api.simpledemo.onap.org     |
68 +--------------+---------------------------------+
69 | 1.2.3.4      | robot.api.simpledemo.onap.org   |
70 +--------------+---------------------------------+
71
72
73 Add the VNFM driver to ONAP
74 ---------------------------
75
76 - 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
77 - Create VIM in A&AI (may already exist) (repeat for all clouds planed to be used)
78
79  - http://msb.api.simpledemo.onap.org/iui/aai-esr-gui/extsys/vim/vimView.html
80
81 - Determine the tenant id to be used (log into the cloud) (repeat for all tenants planed to be used within the cloud)
82
83  - http://<horizonUrl>/project/access_and_security/ Intentity / Projects
84
85 - Create tenant (may already exist) (repeat for all tenants planed to be used within the cloud)
86
87  + tool: Postman
88  + change tenant id, region id owner id
89  + method: PUT
90  + url: https://aai.api.simpledemo.onap.org:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/<cloudOwner>/<cloudRegion>/tenants/tenant/<tenantId>
91  + Headers
92
93   - basic auth AAI:AAI
94   - X-FromAppId : any
95   - Content-type: application/json
96   - Accept: application/json
97
98  - Content: :download:`aai.create.tenant.request.json <sample/aai.create.tenant.request.json>`
99
100   - change tenant id, region id owner id and tenant name
101
102 - Register the VNFM as external system (repeat for all cloud planed to be used)
103
104  - Visit MSB http://msb.api.simpledemo.onap.org:9518/api/aai-esr-server/v1/vims
105
106   - note the cloud owner field <cloudOwner>
107   - note the region id field <cloudRegionId>
108
109  - Visit MSB http://msb.api.simpledemo.onap.org/iui/aai-esr-gui/extsys/vnfm/vnfmView.html and click on register button
110
111 +-----------------+-----------------------------------+
112 | key             | Value                             |
113 +-----------------+-----------------------------------+
114 | Name            | CbamVnfm                          |
115 +-----------------+-----------------------------------+
116 | type            | NokiaSVNFM                        |
117 +-----------------+-----------------------------------+
118 | Vendor          | Nokia                             |
119 +-----------------+-----------------------------------+
120 | version         | v1                                |
121 +-----------------+-----------------------------------+
122 | URL             | https://<cbamIp>:443/vnfm/lcm/v3  |
123 +-----------------+-----------------------------------+
124 | VIM             | <cloudOwner>_<cloudRegionId>      |
125 +-----------------+-----------------------------------+
126 | certificate URL |                                   |
127 +-----------------+-----------------------------------+
128 | Username        | <clientId>                        |
129 +-----------------+-----------------------------------+
130 | Password        | <clientSecret>                    |
131 +-----------------+-----------------------------------+
132
133  - Determine the UUID of the VNFM (if the VNFM was registered multiple times select one at random)
134
135   - visit http://msb.api.simpledemo.onap.org:9518/api/aai-esr-server/v1/vnfms and search for the previously registered VNFM
136   - note the id field <vnfmId>
137
138  - Download the cbam driver into ONAP multi service node
139  - Load the image into docker and note the image identifier <imageId>
140
141 .. code-block:: console
142
143    docker load -i /tmp/nokia.img
144
145 Start the driver (fill in values)
146
147 .. code-block:: console
148
149    export CBAM_IP=<cbamIp>
150    export MULTI_NODE_IP=<multiNodeIp>
151    export VNFM_ID=<vnfmId>
152    export IMAGE_ID=<imageId>
153    export CBAM_PASSWORD=<onapPassword>
154    export CBAM_USERNAME=<onapUsername>
155    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
156