859005f55a68255cfc60a662cf3aa5193fe2aae9
[doc.git] / docs / guides / onap-developer / settingup / fullonap.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2    http://creativecommons.org/licenses/by/4.0
3    Copyright 2017 ONAP
4
5
6 .. contents::
7    :depth: 2
8 ..
9
10
11 ========================
12 **Setting Up Full ONAP**
13 ========================
14
15 .. _demo-installing-running-onap:
16
17 **Context**
18 ===========
19 ONAP may be deployed in different contexts depending on your requirements. The recommended installation for Amsterdam Release is currently based on OpenStack.
20
21 Using the Amsterdam Release installer, ONAP components may be deployed in a single tenant or multiple tenants. One tenant for all the components except DCAE, and another tenant dedicated to the DCAE components.
22
23 The VNFs managed by ONAP may be deployed in different OpenStack tenants or based on top of VMware based infrastructure (cf MultiCloud project).
24
25 The current installation is based on the single tenant deployment (all the ONAP components will be hosted in a unique tenant) with DCAE componntes deployed in High Availability mode.
26
27 **Requirements**
28 ================
29
30 OpenStack
31 ---------
32 ONAP installation is validated on `OpenStack Ocata <https://releases.openstack.org/ocata/>`_ or latter release.
33
34 You can use various Cloud providers offering OpenStack based solutions. A list of available Cloud providers on the `OpenStack marketplace <https://www.openstack.org/marketplace/public-clouds/>`_.
35
36 You can use your private Cloud infrastructure.
37
38 The following OpenStack components must be deployed in the infrastructure:
39  - *Cinder*
40  - *Designate*
41  - *Glance*
42  - *Heat*
43  - *Horizon*
44  - *Keystone*
45  - *Neutron*
46  - *Nova*
47
48 To deploy OpenStack, you can use various solutions:
49  - `OpenStack installer <https://docs.openstack.org/install-guide/>`_
50  - `OPNFV Cross Community Continuous Integration - XCI installer <http://docs.opnfv.org/en/latest/infrastructure/xci.html>`_
51
52 *Designate* component is usually not deployed using standard OpenStack installers.
53 Please find a guide to deploy and configure *Designate*
54
55 .. toctree::
56    :maxdepth: 1
57
58    install-designate.rst
59
60
61 The OpenStack infrastructure must enable internet access.
62
63 ONAP components
64 ---------------
65 The following table presents the mapping between the created VM and the ONAP components, and provides informtaion about he VM (flavor and image):
66
67     ===================  =================   =======  ============
68     VM name              ONAP project(s)     Flavor   Image
69     ===================  =================   =======  ============
70     onap-aai-inst1       AAI                 xlarge   Ubuntu 14.04
71     onap-aai-inst2       AAI/UI              xlarge   Ubuntu 14.04
72     onap-appc            APPC, CCSDK         large    Ubuntu 14.04
73     onap-clamp           CLAMP               medium   Ubuntu 16.04
74     onap-dns-server      *Internal DNS*      small    Ubuntu 14.04
75     onap-message-router  DMAAP               large    Ubuntu 14.04
76     onap-multi-service   MSB, VF-C, VNFSDK   xxlarge  Ubuntu 16.04
77     onap-policy          Policy              xlarge   Ubuntu 14.04
78     onap-portal          Portal, CLI         large    Ubuntu 14.04
79     onap-robot           Integration         medium   Ubuntu 16.04
80     onap-sdc             SDC                 xlarge   Ubuntu 16.04
81     onap-sdnc            SDNC, CCSDK         large    Ubuntu 14.04
82     onap-so              SO                  large    Ubuntu 16.04
83     onap-vid             VID                 medium   Ubuntu 14.04
84     onap-dcae-bootstrap  DCAE, Holmes        small    Ubuntu 14.04
85     dcaeorcl00           DCAE/Orchestr.      medium   CentOS 7
86     dcaecnsl00           DCAE/Consul         medium   Ubuntu 16.04
87     dcaecnsl01           DCAE/Consul         medium   Ubuntu 16.04
88     dcaecnsl02           DCAE/Consul         medium   Ubuntu 16.04
89     dcaedokp00           DCAE/Policy Hand.   medium   Ubuntu 16.04
90     dcaedoks00           DCAE/VES, Holmes    medium   Ubuntu 16.04
91     dcaepgvm00           DCAE/Postrges       medium   Ubuntu 16.04
92     dcaecdap00           DCAE/CDAP           large    Ubuntu 16.04
93     dcaecdap01           DCAE/CDAP           large    Ubuntu 16.04
94     dcaecdap02           DCAE/CDAP           large    Ubuntu 16.04
95     dcaecdap03           DCAE/CDAP           large    Ubuntu 16.04
96     dcaecdap04           DCAE/CDAP           large    Ubuntu 16.04
97     dcaecdap05           DCAE/CDAP           large    Ubuntu 16.04
98     dcaecdap06           DCAE/CDAP           large    Ubuntu 16.04
99     ===================  =================   =======  ============
100
101 Footprint
102 ---------
103 The ONAP installation requires the following footprint:
104  - 29 VM
105  - 148 vCPU
106  - 336 GB RAM
107  - 3 TB Storage
108  - 29 floating IP
109
110 .. Note: the default flavor size may be optimized. The ONAP community is working to provide adpted flavors for basic ONAP installation.
111
112 .. Note: you should also reserve some resourcse for the VNFs to be deployed.
113
114 Artifacts
115 ---------
116 The following artifacts must be deployed on the OpenStack infrastructure.
117  - a public SSH key to access the various VM
118  - private SSH key and public key SSH key for the DCAE VM
119  - Ubuntu 14.04 image
120  - Ubuntu 16.04 image
121  - CentOS 7 image
122  - Set of flavors: small, medium, large, medium, large, xlarge, xxlarge
123
124 .. Note that floating IP may be private IP.
125
126 .. Note Basic flavors can reuse the default flavors as defined by `OpenStack <https://docs.openstack.org/horizon/latest/admin/manage-flavors.html>`_
127    The xxlarge flavor should be confiured using the following values: 12 vCPU, 64 GB RAM and 120 GB storage.
128
129 Security
130 --------
131 The default installation assumes that the Default security group is configured to enable full access between the ONAP components.
132 Depending on your environment, we may need to open some security groups (eg when using the portal from your desktop).
133
134 The list of various services and ports used can be found on the `ONAP wiki <https://wiki.onap.org/display/DW/ONAP+Services+List#ONAPServicesList-ONAPServices>`_
135
136 **Deployment**
137 ==============
138
139 Source files
140 ------------
141
142 - Template file: https://git.onap.org/demo/plain/heat/ONAP/onap_openstack.yaml
143 - Environment file: https://git.onap.org/demo/plain/heat/ONAP/onap_openstack.env
144
145 Description
146 -----------
147
148 The ONAP HEAT template spins up the entire ONAP platform. The template,
149 onap_openstack.yaml, comes with an environment file,
150 onap_openstack.env, in which all the default values are defined.
151
152 The HEAT template is composed of two sections: (i) parameters, and (ii)
153 resources.
154 The parameter section contains the declaration and
155 description of the parameters that will be used to spin up ONAP, such as
156 public network identifier, URLs of code and artifacts repositories, etc.
157 The default values of these parameters can be found in the environment
158 file.
159
160 The resource section contains the definition of:
161
162 - ONAP Private Management Network, which ONAP components use to communicate with each other and with VNFs
163 - ONAP Virtual Machines (VMs)
164 - Public/private key pair used to access ONAP VMs
165 - Virtual interfaces towards the ONAP Private Management Network
166 - Disk volumes.
167
168 Each VM specification includes Operating System image name, VM size
169 (i.e. flavor), VM name, etc. Each VM has two virtual network interfaces:
170 one towards the public network and one towards the ONAP Private
171 Management network, as described above. Furthermore, each VM runs a
172 post-instantiation script that downloads and installs software
173 dependencies (e.g. Java JDK, gcc, make, Python, ...) and ONAP software
174 packages and docker containers from remote repositories.
175
176 When the HEAT template is executed, the Openstack HEAT engine creates
177 the resources defined in the HEAT template, based on the parameters
178 values defined in the environment file.
179
180 Environment file
181 ----------------
182
183 Before running HEAT, it is necessary to customize the environment file.
184 Indeed, some parameters, namely public_net_id, pub_key,
185 openstack_tenant_id, openstack_username, and openstack_api_key,
186 need to be set depending on the user's environment:
187
188 **Global parameters**
189
190 ::
191
192  public_net_id:       PUT YOUR NETWORK ID/NAME HERE
193  pub_key:             PUT YOUR PUBLIC KEY HERE
194  openstack_tenant_id: PUT YOUR OPENSTACK PROJECT ID HERE
195  openstack_username:  PUT YOUR OPENSTACK USERNAME HERE
196  openstack_api_key:   PUT YOUR OPENSTACK PASSWORD HERE
197  horizon_url:         PUT THE HORIZON URL HERE
198  keystone_url:        PUT THE KEYSTONE URL HERE (do not include version number)
199
200 openstack_region parameter is set to RegionOne (OpenStack default). If
201 your OpenStack is using another Region, please modify this parameter.
202
203 public_net_id is the unique identifier (UUID) or name of the public
204 network of the cloud provider. To get the public_net_id, use the
205 following OpenStack CLI command (ext is the name of the external
206 network, change it with the name of the external network of your
207 installation)
208
209 ::
210
211  openstack network list  | grep ext |  awk '{print $2}'
212
213 pub_key is string value of the public key that will be installed in
214 each ONAP VM. To create a public/private key pair in Linux, please
215 execute the following instruction:
216
217 ::
218
219  user@ubuntu:~$ ssh-keygen -t rsa
220
221 The following operations to create the public/private key pair occur:
222
223 ::
224
225  Generating public/private rsa key pair.
226  Enter file in which to save the key (/home/user/.ssh/id_rsa):
227  Created directory '/home/user/.ssh'.
228  Enter passphrase (empty for no passphrase):
229  Enter same passphrase again:
230  Your identification has been saved in /home/user/.ssh/id_rsa.
231  Your public key has been saved in /home/user/.ssh/id_rsa.pub.
232
233 openstack_username, openstack_tenant_id (password), and
234 openstack_api_key are user's credentials to access the
235 OpenStack-based cloud.
236
237 **Images and flavors parameters**
238
239 ::
240
241  ubuntu_1404_image: PUT THE UBUNTU 14.04 IMAGE NAME HERE
242  ubuntu_1604_image: PUT THE UBUNTU 16.04 IMAGE NAME HERE
243  flavor_small:       PUT THE SMALL FLAVOR NAME HERE
244  flavor_medium:      PUT THE MEDIUM FLAVOR NAME HERE
245  flavor_large:       PUT THE LARGE FLAVOR NAME HERE
246  flavor_xlarge:      PUT THE XLARGE FLAVOR NAME HERE
247  flavor_xxlarge:     PUT THE XXLARGE FLAVOR NAME HERE
248
249 To get the images in your OpenStack environment, use the following
250 OpenStack CLI command:
251
252 ::
253
254         openstack image list | grep 'ubuntu'
255
256 To get the flavor names used in your OpenStack environment, use the
257 following OpenStack CLI command:
258
259 ::
260
261         openstack flavor list
262
263 **Network parameters**
264
265 ::
266
267  dns_list: PUT THE ADDRESS OFTHE EXTERNAL DNS HERE (e.g. a comma-separated list of IP addresses in your /etc/resolv.conf in UNIX-based Operating Systems). THIS LIST MUST INCLUDE THE DNS SERVER THAT OFFERS DNS AS AS SERVICE (see DCAE section below for more details)
268  external_dns: PUT THE FIRST ADDRESS OF THE EXTERNAL DNS LIST HERE oam_network_cidr: 10.0.0.0/16
269  dns_forwarder: PUT THE IP OF DNS FORWARDER FOR ONAP DEPLOYMENT'S OWN DNS SERVER
270  oam_network_cidr: 10.0.0.0/16
271
272 You can use the Google Public DNS 8.8.8.8 and 4.4.4.4 address or your internal DNS servers
273
274 ONAP installs a DNS server used to resolve IP addresses in the ONAP OAM private network.
275 ONAP Amsterdam Release also requires OpenStack Designate DNS support for the DCAE platform, so as to allow IP address discovery and communication among DCAE elements.
276 This is required because the ONAP HEAT template only installs the DCAE bootstrap container, which will in turn install the entire DCAE platform.
277 As such, at installation time, the IP addresses of the DCAE components are unknown.
278
279 The DNS server that ONAP installs needs to be connected to the Designate DNS to allow communication between the DCAE elements and the other ONAP components.
280 To this end, dns\_list, external\_dns, and dns\_forwarder should all have the IP address of the Designate DNS.
281 These three parameters are redundant, but still required for Amsterdam Release. Originally, dns\_list and external\_dns were both used to circumvent some limitations of older OpenStack versions.
282 In future releases, the DNS settings and parameters in HEAT will be consolidated.
283 The Designate DNS is configured to access the external DNS.
284 As such, the ONAP DNS will forward to the Designate DNS the queries from ONAP components to the external world.
285 The Designate DNS will then forward those queries to the external DNS.
286
287 **DCAE Parameters**
288
289 DCAE spins up ONAP's data collection and analytics system in two phases.
290
291 The first is the launching of a bootstrap VM that is specified in the ONAP Heat template, as described above. This VM requires a number of deployment-specific configuration parameters being provided so that it can subsequently bring up the DCAE system.
292
293 There are two groups of parameters.
294
295 The first group relates to the launching of DCAE VMs, including parameters such as the keystone URL and additional VM image IDs/names.
296 Hence these parameters need to be provided to DCAE.
297 Note that although DCAE VMs will be launched in the same tenant as the rest of ONAP, because DCAE may use MultiCloud node as the agent for interfacing with the underlying cloud, it needs a separate keystone URL (which points to MultiCloud node instead of the underlying cloud).
298
299 The second group of configuration parameters relate to DNS As A Service support (DNSaaS).
300 DCAE requires DNSaaS for registering its VMs into organization-wide DNS service.
301 For OpenStack, DNSaaS is provided by Designate, as mentioned above.
302 Designate support can be provided via an integrated service endpoint listed under the service catalog of the OpenStack installation; or proxyed by the ONAP MultiCloud service.
303 For the latter case, a number of parameters are needed to configure MultiCloud to use the correct Designate service.
304
305 These parameters are described below:
306
307 ::
308
309  dcae_keystone_url: PUT THE MULTIVIM PROVIDED KEYSTONE API URL HERE
310  dcae_centos_7_image: PUT THE CENTOS7 VM IMAGE NAME HERE FOR DCAE LAUNCHED CENTOS7 VM
311  dcae_domain: PUT THE NAME OF DOMAIN THAT DCAE VMS REGISTER UNDER
312  dcae_public_key: PUT THE PUBLIC KEY OF A KEYPAIR HERE TO BE USED BETWEEN DCAE LAUNCHED VMS
313  dcae_private_key: PUT THE SECRET KEY OF A KEYPAIR HERE TO BE USED BETWEEN DCAE LAUNCHED VMS
314
315  dnsaas_config_enabled: PUT WHETHER TO USE PROXYED DESIGNATE
316  dnsaas_region: PUT THE DESIGNATE PROVIDING OPENSTACK'S REGION HERE
317  dnsaas_keystone_url: PUT THE DESIGNATE PROVIDING OPENSTACK'S KEYSTONE URL HERE
318  dnsaas_tenant_name: PUT THE TENANT NAME IN THE DESIGNATE PROVIDING OPENSTACK HERE (FOR R1 USE THE SAME AS openstack_tenant_name)
319  dnsaas_username: PUT THE DESIGNATE PROVIDING OPENSTACK'S USERNAME HERE
320  dnsaas_password: PUT THE DESIGNATE PROVIDING OPENSTACK'S PASSWORD HERE
321
322 Instantiation
323 -------------
324
325 The ONAP platform can be instantiated via Horizon (OpenStack dashboard)
326 or Command Line.
327
328 **Instantiation via Horizon:**
329
330 - Login to Horizon URL with your personal credentials
331 - Click "Stacks" from the "Orchestration" menu
332 - Click "Launch Stack"
333 - Paste or manually upload the HEAT template file (onap_openstack.yaml) in the "Template Source" form
334 - Paste or manually upload the HEAT environment file (onap_openstack.env) in the "Environment Source" form
335 - Click "Next" - Specify a name in the "Stack Name" form
336 - Provide the password in the "Password" form
337 - Click "Launch"
338
339 **Instantiation via Command Line:**
340
341 - Install the HEAT client on your machine, e.g. in Ubuntu (ref. http://docs.openstack.org/user-guide/common/cli-install-openstack-command-line-clients.html):
342
343 ::
344
345  apt-get install python-dev python-pip
346  pip install python-heatclient        # Install heat client
347  pip install python-openstackclient   # Install the Openstack client to support multiple services
348
349 -  Create a file (named i.e. ~/openstack/openrc) that sets all the
350    environmental variables required to access Rackspace:
351
352 ::
353
354  export OS_AUTH_URL=INSERT THE AUTH URL HERE
355  export OS_USERNAME=INSERT YOUR USERNAME HERE
356  export OS_TENANT_ID=INSERT YOUR TENANT ID HERE
357  export OS_REGION_NAME=INSERT THE REGION HERE
358  export OS_PASSWORD=INSERT YOUR PASSWORD HERE
359
360 -  Run the script from command line:
361
362 ::
363
364  source ~/openstack/openrc
365
366 -  In order to install the ONAP platform, type:
367
368 ::
369
370  heat stack-create STACK_NAME -f PATH_TO_HEAT_TEMPLATE(YAML FILE) -e PATH_TO_ENV_FILE       # Old HEAT client, OR
371  openstack stack create -t PATH_TO_HEAT_TEMPLATE(YAML FILE) -e PATH_TO_ENV_FILE STACK_NAME  # New Openstack client
372
373
374 .. Note The Heat template deployment may take time (up to one hour) depending on your hardware environment.
375
376
377 Test the installation
378 ---------------------
379 Every ONAP component offers a HealthCheck REST API. The *Robot Virtual Machine* can be used to test that every components run smoothly.
380 Run the following command to perform the HealthCheck:
381
382 .. code-block:: bash
383
384   docker exec -it openecompete_container /var/opt/OpenECOMP_ETE/runTags.sh -i health h -d ./html -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py -V /share/config/vm_properties.py
385
386 This testsuite will execute 30 tests towards the various ONAP components.
387
388 Detect problems
389 ---------------
390 If all the tests are not OK, many causes are possible.
391 Here is a simple procedure to detect where the problem occurs:
392
393 * Check the OpenStack Virtual Machine logs
394 * Connect to the Virtual Machine and check that the various containers are running.
395
396 The list of containers are described in the following section. In case some containers are missing, check the docker logs using the following command:
397
398 .. code-block:: bash
399
400  sudo docker ps -a
401  sudo docker logs <containerid>
402
403 **Portal configuration**
404 ========================
405 The current ONAP installation is using the *onap.org* domain.
406 To use the portal on your desktop, you must configure the following information in your *host* file (located in /etc/host for Linux or /windows/system32/drivers/etc/hosts for Windows):
407
408 .. code-block:: bash
409
410  <onap-policy_ip>      policy.api.simpledemo.onap.org
411  <onap-portal_ip>      portal.api.simpledemo.onap.org
412  <onap-sdc_ip>         sdc.api.simpledemo.onap.org
413  <onap-vid_ip>         vid.api.simpledemo.onap.org
414  <onap-aai-inst1_ip>   aai.api.simpledemo.onap.org
415  <onap-aai-inst2_ip>   aai.ui.simpledemo.onap.org
416
417
418 You can use the Horizon dashboard to get the IP adresses associated with the Virtual Machines or use the following command line:
419
420 .. code-block:: bash
421
422  openstack server list
423
424 Launch the portal on the http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm
425
426 Various users are predefined as presented in the following table:
427
428   .. csv-table::
429    :header: Role, Login
430    :widths: 20, 20
431
432     Superuser,demo
433     Designer,cs0008
434     Tester,jm0007
435     Governor,gv0001
436     Ops,op0001
437
438 The password is *demo123456!*
439
440 Go to the `Portal component user guide <http://onap.readthedocs.io/en/latest/submodules/portal.git/docs/index.html>`_
441
442 Other UI documentation:
443  - `CLAMP  <http://onap.readthedocs.io/en/latest/submodules/clamp.git/docs/index.html>`_
444  - `SDC <http://onap.readthedocs.io/en/latest/submodules/sdc.git/docs/index.html>`_
445  - `UI Use-Case <http://onap.readthedocs.io/en/latest/submodules/usecase-ui.git/docs/index.html>`_
446
447
448 **Components**
449 ==============
450
451 The list of various services and ports used can be found on the `ONAP wiki <https://wiki.onap.org/display/DW/ONAP+Services+List#ONAPServicesList-ONAPServices>`_
452
453 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
454    http://creativecommons.org/licenses/by/4.0
455    Copyright 2017 ONAP
456
457
458 .. contents::