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