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