blob: 78796df95704fe014252804b505af333f278c487 [file] [log] [blame]
Eric Debeau7dc2db82017-11-06 22:35:28 +00001ONAP HEAT Template
2------------------
3
4Source files
5~~~~~~~~~~~~
6
7- Template file: https://git.onap.org/demo/plain/heat/ONAP/onap_openstack.yaml
8- Environment file: https://git.onap.org/demo/plain/heat/ONAP/onap_openstack.env
9
10Description
11~~~~~~~~~~~
12
13The ONAP HEAT template spins up the entire ONAP platform. The template,
Rene Robert24508c02017-11-07 14:51:01 +000014onap_openstack.yaml, comes with an environment file,
15onap_openstack.env, in which all the default values are defined.
Eric Debeau7dc2db82017-11-06 22:35:28 +000016
17.. note::
Rene Robert24508c02017-11-07 14:51:01 +000018 onap_openstack.yaml AND onap_openstack.env ARE THE HEAT TEMPLATE
Eric Debeau7dc2db82017-11-06 22:35:28 +000019 AND ENVIRONMENT FILE CURRENTLY SUPPORTED.
Rene Robert24508c02017-11-07 14:51:01 +000020 onap_openstack_float.yaml/env AND onap_openstack_nofloat.yaml/env
Eric Debeau7dc2db82017-11-06 22:35:28 +000021 AREN'T UPDATED AND THEIR USAGE IS NOT SUGGESTED.
22
23The HEAT template is composed of two sections: (i) parameters, and (ii)
24resources.
25The parameter section contains the declaration and
26description of the parameters that will be used to spin up ONAP, such as
27public network identifier, URLs of code and artifacts repositories, etc.
28The default values of these parameters can be found in the environment
29file.
30
31The resource section contains the definition of:
32
33- ONAP Private Management Network, which ONAP components use to communicate with each other and with VNFs
34- ONAP Virtual Machines (VMs)
35- Public/private key pair used to access ONAP VMs
36- Virtual interfaces towards the ONAP Private Management Network
37- Disk volumes.
38
39Each VM specification includes Operating System image name, VM size
40(i.e. flavor), VM name, etc. Each VM has two virtual network interfaces:
41one towards the public network and one towards the ONAP Private
42Management network, as described above. Furthermore, each VM runs a
43post-instantiation script that downloads and installs software
44dependencies (e.g. Java JDK, gcc, make, Python, ...) and ONAP software
45packages and docker containers from remote repositories.
46
47When the HEAT template is executed, the Openstack HEAT engine creates
48the resources defined in the HEAT template, based on the parameters
49values defined in the environment file.
50
51Environment file
52~~~~~~~~~~~~~~~~
53
54Before running HEAT, it is necessary to customize the environment file.
Rene Robert24508c02017-11-07 14:51:01 +000055Indeed, some parameters, namely public_net_id, pub_key,
56openstack_tenant_id, openstack_username, and openstack_api_key,
Eric Debeau7dc2db82017-11-06 22:35:28 +000057need to be set depending on the user's environment:
58
59**Global parameters**
60
61::
62
63 public_net_id: PUT YOUR NETWORK ID/NAME HERE
64 pub_key: PUT YOUR PUBLIC KEY HERE
65 openstack_tenant_id: PUT YOUR OPENSTACK PROJECT ID HERE
66 openstack_username: PUT YOUR OPENSTACK USERNAME HERE
67 openstack_api_key: PUT YOUR OPENSTACK PASSWORD HERE
68 horizon_url: PUT THE HORIZON URL HERE
69 keystone_url: PUT THE KEYSTONE URL HERE (do not include version number)
70
Rene Robert24508c02017-11-07 14:51:01 +000071openstack_region parameter is set to RegionOne (OpenStack default). If
Eric Debeau7dc2db82017-11-06 22:35:28 +000072your OpenStack is using another Region, please modify this parameter.
73
Rene Robert24508c02017-11-07 14:51:01 +000074public_net_id is the unique identifier (UUID) or name of the public
75network of the cloud provider. To get the public_net_id, use the
Eric Debeau7dc2db82017-11-06 22:35:28 +000076following OpenStack CLI command (ext is the name of the external
77network, change it with the name of the external network of your
78installation)
79
80::
81
82 openstack network list | grep ext | awk '{print $2}'
83
Rene Robert24508c02017-11-07 14:51:01 +000084pub_key is string value of the public key that will be installed in
Eric Debeau7dc2db82017-11-06 22:35:28 +000085each ONAP VM. To create a public/private key pair in Linux, please
86execute the following instruction:
87
88::
89
90 user@ubuntu:~$ ssh-keygen -t rsa
91
92The following operations to create the public/private key pair occur:
93
94::
95
96 Generating public/private rsa key pair.
97 Enter file in which to save the key (/home/user/.ssh/id_rsa):
98 Created directory '/home/user/.ssh'.
99 Enter passphrase (empty for no passphrase):
100 Enter same passphrase again:
101 Your identification has been saved in /home/user/.ssh/id_rsa.
102 Your public key has been saved in /home/user/.ssh/id_rsa.pub.
103
Rene Robert24508c02017-11-07 14:51:01 +0000104openstack_username, openstack_tenant_id (password), and
105openstack_api_key are user's credentials to access the
Eric Debeau7dc2db82017-11-06 22:35:28 +0000106OpenStack-based cloud.
107
108**Images and flavors parameters**
109
110::
111
Rene Robert24508c02017-11-07 14:51:01 +0000112 ubuntu_1404_image: PUT THE UBUNTU 14.04 IMAGE NAME HERE
113 ubuntu_1604_image: PUT THE UBUNTU 16.04 IMAGE NAME HERE
114 flavor_small: PUT THE SMALL FLAVOR NAME HERE
115 flavor_medium: PUT THE MEDIUM FLAVOR NAME HERE
116 flavor_large: PUT THE LARGE FLAVOR NAME HERE
117 flavor_xlarge: PUT THE XLARGE FLAVOR NAME HERE
118 flavor_xxlarge: PUT THE XXLARGE FLAVOR NAME HERE
Eric Debeau7dc2db82017-11-06 22:35:28 +0000119
120To get the images in your OpenStack environment, use the following
121OpenStack CLI command:
122
123::
124
125 openstack image list | grep 'ubuntu'
126
127To get the flavor names used in your OpenStack environment, use the
128following OpenStack CLI command:
129
130::
131
132 openstack flavor list
133
134**DNS parameters**
135
136::
137
Rene Robert24508c02017-11-07 14:51:01 +0000138 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)
139 external_dns: PUT THE FIRST ADDRESS OF THE EXTERNAL DNS LIST HERE oam_network_cidr: 10.0.0.0/16
Eric Debeau7dc2db82017-11-06 22:35:28 +0000140
141You can use the Google Public DNS 8.8.8.8 and 4.4.4.4 address or your internal DNS servers
142
143**DCAE Parameters**
144
145DCAE spins up ONAP's data collection and analytics system in two phases.
146The first is the launching of a bootstrap VM that is specified in the
147ONAP Heat template. This VM requires a number of deployment specific
148conifiguration parameters being provided so that it can subsequently
149bring up the DCAE system. There are two groups of parameters.
150
151The first group relates to the launching of DCAE VMs, including parameters such as
152the keystone URL and additional VM image IDs/names. DCAE VMs are
153connected to the same internal network as the rest of ONAP VMs, but
154dynamically spun up by the DCAE core platform. Hence these parameters
155need to be provided to DCAE. Note that although DCAE VMs will be
156launched in the same tenant as the rest of ONAP, because DCAE may use
157MultiCloud node as the agent for interfacing with the underying cloud,
158it needs a separate keystone URL (which points to MultiCloud node
159instead of the underlying cloud).
160
161The second group of configuration parameters relate to DNS As A Service support (DNSaaS).
162DCAE requires DNSaaS for registering its VMs into organization-wide DNS service. For
163OpenStack, DNSaaS is provided by Designate. Designate support can be
164provided via an integrated service endpoint listed under the service
165catalog of the OpenStack installation; or proxyed by the ONAP MultiCloud
166service. For the latter case, a number of parameters are needed to
167configure MultiCloud to use the correct Designate service. These
168parameters are described below:
169
170::
171
172 dcae_keystone_url: PUT THE KEYSTONE URL OF THE OPENSTACK INSTANCE WHERE DCAE IS DEPLOYED (Note: put the MultiCloud proxy URL if the DNSaaS is proxyed by MultiCloud)
173 dcae_centos_7_image: PUT THE CENTOS7 IMAGE ID/NAME AVAILABLE AT THE OPENSTACK INSTANCE WHERE DCAE IS DEPLOYED
174 dcae_security_group: PUT THE SECURITY GROUP ID/NAME TO BE USED AT THE OPENSTACK INSTANCE WHERE DCAE IS DEPLOYED
175 dcae_key_name: PUT THE ACCESS KEY-PAIR NAME REGISTER AT THE OPENSTACK INSTANCE WHERE DCAE IS DEPLOYED
176 dcae_public_key: PUT THE PUBLIC KEY OF A KEY-PAIR USED FOR DCAE BOOTSTRAP NODE TO COMMUNICATE WITH DCAE VMS
177 dcae_private_key: PUT THE PRIVATE KEY OF A KEY-PAIR USED FOR DCAE BOOTSTRAP NODE TO COMMUNICATE WITH DCAE VMS
178
179 dnsaas_config_enabled: true or false FOR WHETHER DNSAAS IS PROXYED
180 dnsaas_region: PUT THE REGION OF THE OPENSTACK INSTANCE WHERE DNSAAS IS PROVIDED
181 dnsaas_tenant_id: PUT THE TENANT ID/NAME OF THE OPENSTACK INSTANCE WHERE DNSAAS IS PROVIDED
182 dnsaas_keystone_url: PUT THE KEYSTONE URL OF THE OPENSTACK INSTANCE WHERE DNSAAS IS PROVIDED
183 dnsaas_username: PUT THE USERNAME OF THE OPENSTACK INSTANCE WHERE DNSAAS IS PROVIDED
184 dnsaas_password: PUT THE PASSWORD OF THE OPENSTACK INSTANCE WHERE DNSAAS IS PROVIDED
185
186Instantiation
187~~~~~~~~~~~~~
188
189The ONAP platform can be instantiated via Horizon (OpenStack dashboard)
190or Command Line.
191
192**Instantiation via Horizon:**
193
194- Login to Horizon URL with your personal credentials
195- Click "Stacks" from the "Orchestration" menu
196- Click "Launch Stack"
Rene Robert24508c02017-11-07 14:51:01 +0000197- Paste or manually upload the HEAT template file (onap_openstack.yaml) in the "Template Source" form
198- Paste or manually upload the HEAT environment file (onap_openstack.env) in the "Environment Source" form
Eric Debeau7dc2db82017-11-06 22:35:28 +0000199- Click "Next" - Specify a name in the "Stack Name" form
200- Provide the password in the "Password" form
201- Click "Launch"
202
203**Instantiation via Command Line:**
204
205- 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):
206
207::
208
209 apt-get install python-dev python-pip
210 pip install python-heatclient # Install heat client
211 pip install python-openstackclient # Install the Openstack client to support multiple services
212
213- Create a file (named i.e. ~/openstack/openrc) that sets all the
214 environmental variables required to access Rackspace:
215
216::
217
218 export OS_AUTH_URL=INSERT THE AUTH URL HERE
219 export OS_USERNAME=INSERT YOUR USERNAME HERE
220 export OS_TENANT_ID=INSERT YOUR TENANT ID HERE
221 export OS_REGION_NAME=INSERT THE REGION HERE
222 export OS_PASSWORD=INSERT YOUR PASSWORD HERE
223
224- Run the script from command line:
225
226::
227
228 source ~/openstack/openrc
229
230- In order to install the ONAP platform, type:
231
232::
233
234 heat stack-create STACK_NAME -f PATH_TO_HEAT_TEMPLATE(YAML FILE) -e PATH_TO_ENV_FILE # Old HEAT client, OR
235 openstack stack create -t PATH_TO_HEAT_TEMPLATE(YAML FILE) -e PATH_TO_ENV_FILE STACK_NAME # New Openstack client
236