Revise docs
[multicloud/framework.git] / docs / MultiCloud-Deployment-Guide.rst
1 ..
2  This work is licensed under a Creative Commons Attribution 4.0
3  International License.
4
5 ================================
6 ONAP MultiCloud Deployment Guide
7 ================================
8
9 prepare docker environment
10 ~~~~~~~~~~~~~~~~~~~~~~~~~~
11
12 Please refer to onap deployment in kubernetes website(https://wiki.onap.org/display/DW/ONAP+on+Kubernetes)
13 to setup kubernets cluster.
14
15
16 After installing kubectl and helm, execute "kubectl cluster-info" command to verify your kubernets cluster.
17
18 Clone oom project:  git clone http://gerrit.onap.org/r/oom
19 Source the setenv.bash script in /oom/kubernetes/oneclick/, it will set your helm list of components to start/delete
20 Run the one time config pod - which mounts the volume /dockerdata/ contained in the pod config-init.
21
22 .. code-block:: console
23
24   $ cd  oom/kubernetes/config
25   $ cp onap-parameters-sample.yaml onap-parameters.yaml
26   $ ./createConfig.sh -n onap
27
28 wait for "onap" namespace created, pod "config-init" created
29
30 .. code-block:: console
31
32   $ kubectl get namespaces
33   +------------+------------+------+
34   | NAME       |     STATUS |  AGE |
35   +------------+------------+------+
36   |default           Active    10d |
37   |kube-public       Active    10d |
38   |kube-system       Active    10d |
39   |onap              Active    9d  |
40   +------------+------------+------+
41
42 startup containers
43 ~~~~~~~~~~~~~~~~~~
44
45 first run kube2msb container.
46
47 .. code-block:: console
48
49  $ cd oom/kubernetes/oneclick
50  $ ./createAll.bash -n onap -a kube2msb
51
52 run msb container
53
54 .. code-block:: console
55
56   $ ./createAll.bash -n onap -a msb
57
58 run aai container
59
60 .. code-block:: console
61
62   $ ./createAll.bash -n onap -a aai
63
64
65 Finally run multicloud container
66
67 .. code-block:: console
68
69   $ ./createAll.bash -n onap -a multicloud
70
71 get all pods
72
73 .. code-block:: console
74
75   $ kubectl get pods --all-namespaces
76   +---------------+---------------------------------------+--------+-----------+----------+-----+
77   |NAMESPACE      |  NAME                                 | READY  |   STATUS  |RESTARTS  | AGE |
78   +---------------+---------------------------------------+--------+-----------+----------+-----+
79   |kube-system       heapster-4285517626-2k4l1               1/1       Running   1          9d  |
80   |kube-system       kube-dns-2514474280-mxh18               3/3       Running   3          9d  |
81   |kube-system       kubernetes-dashboard-716739405-jl6mk    1/1       Running   1          9d  |
82   |kube-system       monitoring-grafana-3552275057-hrpn5     1/1       Running   1          9d  |
83   |kube-system       monitoring-influxdb-4110454889-t8tpv    1/1       Running   1          9d  |
84   |kube-system       tiller-deploy-737598192-8q523           1/1       Running   1          9d  |
85   |onap-aai          aai-resources-837807428-2t158           1/1       Running   0          2d  |
86   |onap-aai          aai-service-3869033750-1nvg5            1/1       Running   0          2d  |
87   |onap-aai          aai-traversal-50329389-gnsnk            1/1       Running   0          2d  |
88   |onap-aai          data-router-2254557428-zwxx1            1/1       Running   0          2d  |
89   |onap-aai          elasticsearch-622738319-sx6q1           1/1       Running   0          2d  |
90   |onap-aai          gremlin-671060974-npsg5                 1/1       Running   0          2d  |
91   |onap-aai          hbase-3690059193-2pjc5                  1/1       Running   0          2d  |
92   |onap-aai          model-loader-service-849987455-w6vwn    1/1       Running   0          2d  |
93   |onap-aai          search-data-service-4105978183-p1nnj    1/1       Running   0          2d  |
94   |onap-aai          sparky-be-2696729089-mcjbw              1/1       Running   0          2d  |
95   |onap-kube2msb     kube2msb-registrator-1600827891-1s3s4   1/1       Running   3          7d  |
96   |onap-msb          msb-consul-3388279333-hbr16             1/1       Running   0          2d  |
97   |onap-msb          msb-discovery-1109629174-t14q8          1/1       Running   0          2d  |
98   |onap-msb          msb-eag-3969419634-2fdnr                1/1       Running   0          2d  |
99   |onap-msb          msb-iag-1114772402-sjlww                1/1       Running   0          2d  |
100   |onap-multicloud   framework-1225620501-9567n              1/1       Running   0          21h |
101   |onap-multicloud   multicloud-vio-269945856-rl6w6          1/1       Running   0          21h |
102   +---------------+---------------------------------------+--------+-----------+----------+-----+
103
104 get cluster-ip and port
105
106 .. code-block:: console
107
108   $ kubectl get svc --all-namespaces
109   +---------------+----------------------+---------------+-------------+-------------------------------------------------------------------+--------+
110   | NAMESPACE     |      NAME            |  CLUSTER-IP   | EXTERNAL-IP |               PORT(S)                                             |  AGE   |
111   +---------------+----------------------+---------------+-------------+-------------------------------------------------------------------+--------+
112   |default           kubernetes             10.43.0.1       <none>        443/TCP                                                             10d   |
113   |kube-system       heapster               10.43.96.134    <none>        80/TCP                                                              10d   |
114   |kube-system       kube-dns               10.43.0.10      <none>        53/UDP,53/TCP                                                       10d   |
115   |kube-system       kubernetes-dashboard   10.43.9.43      <none>        9090/TCP                                                            10d   |
116   |kube-system       monitoring-grafana     10.43.210.16    <none>        80/TCP                                                              10d   |
117   |kube-system       monitoring-influxdb    10.43.32.60     <none>        8086/TCP                                                            10d   |
118   |kube-system       tiller-deploy          10.43.84.208    <none>        44134/TCP                                                           10d   |
119   |onap-aai          aai-resources          None            <none>        8447/TCP,5005/TCP                                                   2d    |
120   |onap-aai          aai-service            10.43.88.92     <nodes>       8443:30233/TCP,8080:30232/TCP                                       2d    |
121   |onap-aai          aai-traversal          None            <none>        8446/TCP,5005/TCP                                                   2d    |
122   |onap-aai          elasticsearch          None            <none>        9200/TCP                                                            2d    |
123   |onap-aai          gremlin                None            <none>        8182/TCP                                                            2d    |
124   |onap-aai          hbase                  None            <none>        2181/TCP,8080/TCP,8085/TCP,9090/TCP,16000/TCP,16010/TCP,16201/TCP   2d    |
125   |onap-aai          model-loader-service   10.43.172.213   <nodes>       8443:30229/TCP,8080:30210/TCP                                       2d    |
126   |onap-aai          search-data-service    None            <none>        9509/TCP                                                            2d    |
127   |onap-aai          sparky-be              None            <none>        9517/TCP                                                            2d    |
128   |onap-msb          msb-consul             10.43.41.203    <nodes>       8500:30500/TCP                                                      2d    |
129   |onap-msb          msb-discovery          10.43.6.205     <nodes>       10081:30081/TCP                                                     2d    |
130   |onap-msb          msb-eag                10.43.81.104    <nodes>       80:30082/TCP                                                        2d    |
131   |onap-msb          msb-iag                10.43.188.78    <nodes>       80:30080/TCP                                                        2d    |
132   |onap-multicloud   framework              10.43.97.54     <nodes>       9001:30291/TCP                                                      21h   |
133   |onap-multicloud   multicloud-vio         10.43.230.197   <nodes>       9004:30294/TCP                                                      21h   |
134   +---------------+----------------------+---------------+-------------+-------------------------------------------------------------------+--------+
135
136
137 Now msb,aai and multicloud container are online, navigate to http://msb_docker_host_ip:30081/iui/microservices/index.html,
138 you can see  multicloud endpoint have been registered.
139
140 No      Service Name    Version NameSpace       Url     Protocol        Visualrange     Control
141 1       multicloud      v0              /api/multicloud/v0      REST    InSystem
142 2       multicloud-vio  v0              /api/multicloud-vio/v0  REST    InSystem
143
144 Then register vio information into AAI service with region name "vmware" and region id "vio"
145
146 .. code-block:: console
147
148   $ curl -X PUT -H "Authorization: Basic QUFJOkFBSQ==" -H "Content-Type: application/json" -H "X-TransactionId:get_aai_subcr" \
149       https://aai_resource_docker_host_ip:30233/aai/v01/cloud-infrastructure/cloud-regions/cloud-region/vmware/vio \
150       -d "{
151            "cloud-type": "vmware",
152            "cloud-region-version": "4.0",
153            "esr-system-info-list": {
154            "esr-system-info": [
155              {
156               "esr-system-info-id": "123-456",
157               "system-name": "vim-vio",
158               "system-type": "vim",
159               "type": "vim",
160               "user-name": "admin",
161               "password": "vmware",
162               "service-url": "<keystone auth url>",
163               "cloud-domain": "default",
164               "default-tenant": "admin",
165               "ssl-insecure": false
166              }
167            ]
168           }
169         }"