Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 1 | ONAP HEAT Template |
| 2 | ------------------ |
| 3 | |
| 4 | Source 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 | |
| 10 | Description |
| 11 | ~~~~~~~~~~~ |
| 12 | |
| 13 | The ONAP HEAT template spins up the entire ONAP platform. The template, |
Rene Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 14 | onap_openstack.yaml, comes with an environment file, |
| 15 | onap_openstack.env, in which all the default values are defined. |
Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 16 | |
| 17 | .. note:: |
Rene Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 18 | onap_openstack.yaml AND onap_openstack.env ARE THE HEAT TEMPLATE |
Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 19 | AND ENVIRONMENT FILE CURRENTLY SUPPORTED. |
Rene Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 20 | onap_openstack_float.yaml/env AND onap_openstack_nofloat.yaml/env |
Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 21 | AREN'T UPDATED AND THEIR USAGE IS NOT SUGGESTED. |
| 22 | |
| 23 | The HEAT template is composed of two sections: (i) parameters, and (ii) |
| 24 | resources. |
| 25 | The parameter section contains the declaration and |
| 26 | description of the parameters that will be used to spin up ONAP, such as |
| 27 | public network identifier, URLs of code and artifacts repositories, etc. |
| 28 | The default values of these parameters can be found in the environment |
| 29 | file. |
| 30 | |
| 31 | The 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 | |
| 39 | Each VM specification includes Operating System image name, VM size |
| 40 | (i.e. flavor), VM name, etc. Each VM has two virtual network interfaces: |
| 41 | one towards the public network and one towards the ONAP Private |
| 42 | Management network, as described above. Furthermore, each VM runs a |
| 43 | post-instantiation script that downloads and installs software |
| 44 | dependencies (e.g. Java JDK, gcc, make, Python, ...) and ONAP software |
| 45 | packages and docker containers from remote repositories. |
| 46 | |
| 47 | When the HEAT template is executed, the Openstack HEAT engine creates |
| 48 | the resources defined in the HEAT template, based on the parameters |
| 49 | values defined in the environment file. |
| 50 | |
| 51 | Environment file |
| 52 | ~~~~~~~~~~~~~~~~ |
| 53 | |
| 54 | Before running HEAT, it is necessary to customize the environment file. |
Rene Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 55 | Indeed, some parameters, namely public_net_id, pub_key, |
| 56 | openstack_tenant_id, openstack_username, and openstack_api_key, |
Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 57 | need 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 Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 71 | openstack_region parameter is set to RegionOne (OpenStack default). If |
Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 72 | your OpenStack is using another Region, please modify this parameter. |
| 73 | |
Rene Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 74 | public_net_id is the unique identifier (UUID) or name of the public |
| 75 | network of the cloud provider. To get the public_net_id, use the |
Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 76 | following OpenStack CLI command (ext is the name of the external |
| 77 | network, change it with the name of the external network of your |
| 78 | installation) |
| 79 | |
| 80 | :: |
| 81 | |
| 82 | openstack network list | grep ext | awk '{print $2}' |
| 83 | |
Rene Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 84 | pub_key is string value of the public key that will be installed in |
Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 85 | each ONAP VM. To create a public/private key pair in Linux, please |
| 86 | execute the following instruction: |
| 87 | |
| 88 | :: |
| 89 | |
| 90 | user@ubuntu:~$ ssh-keygen -t rsa |
| 91 | |
| 92 | The 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 Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 104 | openstack_username, openstack_tenant_id (password), and |
| 105 | openstack_api_key are user's credentials to access the |
Eric Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 106 | OpenStack-based cloud. |
| 107 | |
| 108 | **Images and flavors parameters** |
| 109 | |
| 110 | :: |
| 111 | |
Rene Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 112 | 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 Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 119 | |
| 120 | To get the images in your OpenStack environment, use the following |
| 121 | OpenStack CLI command: |
| 122 | |
| 123 | :: |
| 124 | |
| 125 | openstack image list | grep 'ubuntu' |
| 126 | |
| 127 | To get the flavor names used in your OpenStack environment, use the |
| 128 | following OpenStack CLI command: |
| 129 | |
| 130 | :: |
| 131 | |
| 132 | openstack flavor list |
| 133 | |
| 134 | **DNS parameters** |
| 135 | |
| 136 | :: |
| 137 | |
Rene Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 138 | 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 Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 140 | |
| 141 | You 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 | |
| 145 | DCAE spins up ONAP's data collection and analytics system in two phases. |
| 146 | The first is the launching of a bootstrap VM that is specified in the |
| 147 | ONAP Heat template. This VM requires a number of deployment specific |
| 148 | conifiguration parameters being provided so that it can subsequently |
| 149 | bring up the DCAE system. There are two groups of parameters. |
| 150 | |
| 151 | The first group relates to the launching of DCAE VMs, including parameters such as |
| 152 | the keystone URL and additional VM image IDs/names. DCAE VMs are |
| 153 | connected to the same internal network as the rest of ONAP VMs, but |
| 154 | dynamically spun up by the DCAE core platform. Hence these parameters |
| 155 | need to be provided to DCAE. Note that although DCAE VMs will be |
| 156 | launched in the same tenant as the rest of ONAP, because DCAE may use |
| 157 | MultiCloud node as the agent for interfacing with the underying cloud, |
| 158 | it needs a separate keystone URL (which points to MultiCloud node |
| 159 | instead of the underlying cloud). |
| 160 | |
| 161 | The second group of configuration parameters relate to DNS As A Service support (DNSaaS). |
| 162 | DCAE requires DNSaaS for registering its VMs into organization-wide DNS service. For |
| 163 | OpenStack, DNSaaS is provided by Designate. Designate support can be |
| 164 | provided via an integrated service endpoint listed under the service |
| 165 | catalog of the OpenStack installation; or proxyed by the ONAP MultiCloud |
| 166 | service. For the latter case, a number of parameters are needed to |
| 167 | configure MultiCloud to use the correct Designate service. These |
| 168 | parameters 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 | |
| 186 | Instantiation |
| 187 | ~~~~~~~~~~~~~ |
| 188 | |
| 189 | The ONAP platform can be instantiated via Horizon (OpenStack dashboard) |
| 190 | or 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 Robert | 24508c0 | 2017-11-07 14:51:01 +0000 | [diff] [blame^] | 197 | - 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 Debeau | 7dc2db8 | 2017-11-06 22:35:28 +0000 | [diff] [blame] | 199 | - 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 | |