+ONAP HEAT Template for Rackspace
+---
+
+The ONAP HEAT template spins up the entire ONAP platform. The template, openecomp_rackspace.yaml, comes with an environment file, openecomp_rackspace.env, in which all the default values are defined.
+
+The HEAT template is composed of two sections: (i) parameters, and (ii) resources. The parameter section contains the declaration and description of the parameters that will be used to spin up ONAP, such as public network identifier, URLs of code and artifacts repositories, etc.
+The default values of these parameters can be found in the environment file. The resource section contains the definition of:
+ - ONAP Private Management Network, which ONAP components use to communicate with each other and with VNFs
+ - ONAP Virtual Machines (VMs)
+ - Public/private key pair used to access ONAP VMs
+ - Virtual interfaces towards the ONAP Private Management Network
+ - Disk volumes.
+
+Each VM specification includes Operating System image name, VM size (i.e. flavor), VM name, etc. Each VM has two virtual network interfaces: one towards the public network and one towards the ONAP Private Management network, as described above.
+Furthermore, each VM runs a post-instantiation script that downloads and installs software dependencies (e.g. Java JDK, gcc, make, Python, ...) and ONAP software packages and docker containers from remote repositories.
+
+When the HEAT template is executed, the Openstack HEAT engine creates the resources defined in the HEAT template, based on the parameters values defined in the environment file.
+
+Before running HEAT, it is necessary to customize the environment file. Indeed, some parameters, namely public_net_id, pub_key, openstack_tenant_id, openstack_username, and openstack_api_key, need to be set depending on the user's environment:
+
+ public_net_id: INSERT YOUR NETWORK ID/NAME HERE
+ pub_key: INSERT YOUR PUBLIC KEY HERE
+ openstack_tenant_id: INSERT YOUR TENANT ID HERE
+ openstack_username: INSERT YOUR USERNAME HERE
+ openstack_api_key: INSERT YOUR API KEY HERE
+
+public_net_id is the unique identifier (UUID) or name of the public network of the cloud provider. Note that for Rackspace template, this value is already set to
+
+ 00000000-0000-0000-0000-000000000000
+
+
+pub_key is string value of the public key that will be installed in each ONAP VM. To create a public/private key pair in Linux, please execute the following instruction:
+
+ user@ubuntu:~$ ssh-keygen -t rsa
+
+The following operations to create the public/private key pair occur:
+
+ Generating public/private rsa key pair.
+ Enter file in which to save the key (/home/user/.ssh/id_rsa):
+ Created directory '/home/user/.ssh'.
+ Enter passphrase (empty for no passphrase):
+ Enter same passphrase again:
+ Your identification has been saved in /home/user/.ssh/id_rsa.
+ Your public key has been saved in /home/user/.ssh/id_rsa.pub.
+
+openstack_username, openstack_tenant_id (password), and openstack_api_key are user's credentials to access the Openstack-based cloud. Note that in the Rackspace web interface, openstack_api_key can be found by clicking on the username on the top-right corner of the GUI and then "Account Settings".
+
+DCAE spins up the data collection and analytics environment outside the HEAT template. This environment is composed of: 3-VM CDAP/Hadoop cluster, 1 VM for the DCAE data collector, and 1 VM for Postgres DB. DCAE needs to know where (i.e. Rackspace region) it has to spin up these VMs. Three parameters have to be setup to reflect the Rackspace region, namely dcae_zone, dcae_state and openstack_region. dcae_zone and dcae_state are used to compose the name of the VMs, so any meaningful name can be used. openstack_region, instead, represents the actual location, so Rackspace-specific values must be used: IAD, DFW, HKG, SYD. The example below shows a snippet of the HEAT environment file that instantiate ONAP in IAD region in Rackspace:
+
+ dcae_zone: iad4
+ dcae_state: vi
+ openstack_region: IAD
+
+The ONAP platform can be instantiated via Rackspace GUI or command line.
+
+Instantiation via Rackspace GUI:
+ - Login to Rackspace with your personal credentials
+ - Click "Stack Templates" from the "Orchestration" menu
+ - Click "Create Custom Template"
+ - Paste or manually upload the HEAT template (openecomp.yaml)
+ - Specify a name for your template in the "Template Name" form
+ - Click "Create Template and Launch Stack" at the bottom of the page
+ - In the "Create Stack" page, specify a name for your stack in the "Stack Name" form and select the Rackspace Region
+ - In the "Advanced Option" menu, insert the values of the parameters specified in the environment file (openecomp.env)
+ - Click "Create Stack"
+
+
+Instantiation via Command Line:
+ - 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):
+
+ apt-get install python-dev python-pip
+ pip install python-heatclient # Install heat client
+ pip install python-openstackclient # Install the Openstack client to support multiple services
+
+ - Create a file (named i.e. ~/rackspace/openrc) that sets all the environmental variables required to access Rackspace:
+
+ export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
+ export OS_USERNAME=INSERT YOUR USERNAME HERE
+ export OS_TENANT_ID=INSERT YOUR TENANT ID HERE
+ export OS_REGION_NAME=INSERT THE RACKSPACE REGION ID [IAD | DFW | SYD | HKG]
+ export OS_PASSWORD=INSERT YOUR PASSWORD HERE
+
+ - Run the script from command line:
+
+ source ~/rackspace/openrc
+
+ - In order to install the ONAP platform, type:
+
+ heat stack-create STACK_NAME -f PATH_TO_HEAT_TEMPLATE(YAML FILE) -e PATH_TO_ENV_FILE # Old HEAT client, OR
+ openstack stack create -t PATH_TO_HEAT_TEMPLATE(YAML FILE) -e PATH_TO_ENV_FILE STACK_NAME # New Openstack client
+
+
+ONAP HEAT Template for vanilla OpenStack
+---
+
+The HEAT template for vanilla OpenStack is similar to the HEAT template for Rackspace. The main difference is the way in which some VMs resource-intensive VMs are defined. Unlike OpenStack, in fact, Rackspace requires to explicitly define a local disk for memory- or CPU-intensive VMs.
+
+The HEAT template for vanilla OpenStack tries to replicate typical application deployments in OpenStack. VMs have a private IP address in the ONAP Private Management Network space. Unlike the Rackspace deployment, they use floating IP addresses. Currently, floating IPs are automatically assigned by OpenStack. A router is also created that connects the ONAP Private Management Network to the external network.
+
+In addition to the parameters described in the previous section, the HEAT template for vanilla OpenStack uses the following parameters to define the image name and flavor of a VM:
+
+ ubuntu_1404_image: PUT THE UBUNTU 14.04 IMAGE NAME HERE
+ ubuntu_1604_image: PUT THE UBUNTU 16.04 IMAGE NAME HERE
+ flavor_small: PUT THE SMALL FLAVOR NAME HERE
+ flavor_medium: PUT THE MEDIUM FLAVOR NAME HERE
+ flavor_large: PUT THE LARGE FLAVOR NAME HERE
+ flavor_xlarge: PUT THE XLARGE FLAVOR NAME HERE
+
+Parameters for network configuration are also used:
+
+ external_dns
+ oam_network_cidr
+ aai_ip_addr
+ appc_ip_addr
+ ...
+ vid_ip_addr
+
+These parameters are used to configure the ONAP internal DNS VM. The external_dns parameter is a comma-separated list of IP addresses (they can be obtained from /etc/resolv.conf in many UNIX-based Operating Systems). The IP address of the ONAP VMs must comply with the oam_network_cidr parameter, and viceversa. Except for external_dns, the other network parameters are already set. They should work for many deployments.
+
+
+VNFs HEAT Templates
+---
+
+The HEAT templates for the demo applications are stored in heat/vFW and heat/vLB directories.
+
+vFW contains the HEAT template, base_vfw.yaml, and the environment file, base_vfw.env, that are used to instantiate a virtual firewall. The VNF is composed of three VMs:
+ - Packet generator
+ - Firewall
+ - Sink