Quantcast
Channel: Openstack – CoreStack
Viewing all articles
Browse latest Browse all 50

How to deploy Openstack Tacker

$
0
0

123

Introduction

Tacker is an OpenStack project building a Generic VNF Manager (VNFM) and a NFV
Orchestrator (NFVO) to deploy, operate Network Services and Virtual Network Functions (VNFs) on an NFV infrastructure platform like OpenStack. It is based on ETSI MANO Architectural Framework and provides a functional stack to Orchestrate Network Services
endtoend using VNFs. This document describes how to install and run Tacker manually on the controller node.

Pre-requisites

  1. Hardware Requirements: Tacker can be installed in the openstack platform running in any linux distribution with minimum 8GB RAM. The host machine used here for tacker installation is
    DELL running on Ubuntu (version 14.04) with i-3 quadcore processor and 16GB RAM.
  2.  

  3. Ensure that OpenStack components Keystone, Glance, Nova, Neutron, Heat and Horizon are
    installed. Installation of tacker is supported from the Openstack Kilo Release. Openstack Liberty
    Release is used here.
  4.  

  5. Create client environment script “adminopenrc.
    sh” for the admin project.

    export OS_PROJECT_DOMAIN_ID=default
    export OS_USER_DOMAIN_ID=default
    export OS_PROJECT_NAME=admin
    export OS_TENANT_NAME=admin
    export OS_USERNAME=admin
    export OS_PASSWORD=ADMIN_PASS
    export OS_AUTH_URL=http://controller:35357/v3
    export OS_IDENTITY_API_VERSION=3
     
    Replace ADMIN_PASS with the password you chose for the admin user in the Identity service.
  6.  

  7. Install the packages given below
    sudo apt-get install python-pip git
  8.  

  9. Ensure entry for extensions drivers in /etc/neutron/plugins/ml2/ml2_conf.ini
    Restart neutron services after the below entry has been added.[ml2] extension_drivers = port_security
  10.   

  11. Modify heat’s policy.json file under /etc/heat/policy.json file to allow users in non-admin projects with ‘admin’ roles to create flavors.
    "resource_types:OS::Nova::Flavor": "role:admin"
  12.   

Install Tacker server

Before you install and configure Tacker server, you must create a database, service credentials,
and API endpoints.

  

  1. To create the database, complete these steps:
    • Use the database access client to connect to the database server as the root user:
      mysql -u root -p
    •  

    • Create the tacker database:
      create database tacker;
    •  

    • Grant proper access to the tacker database:

      GRANT ALL PRIVILEGES ON tacker.* TO 'tacker'@'localhost' \
      IDENTIFIED BY 'TACKER_DBPASS';
      GRANT ALL PRIVILEGES ON tacker.* TO 'tacker'@'%' \
      IDENTIFIED BY 'TACKER_DBPASS';
       
      Replace ‘TACKER_DBPASS’ with a suitable password.
    •  

    • Exit the database access client.
    •  

  2.  

  3. Source the admin credentials to gain access to adminonly CLI commands:
    source admin-openrc.sh
  4.  

  5. To create the service credentials, complete these steps:
    • Create the tacker user:
      openstack user create --domain default --password <PASSWORD> tacker
      Replace <PASSWORD> with a suitable password
    •  

    • Add the admin role to the tacker user:
      openstack role add --project services --user tacker admin

      Note: Project_name can be service or services. Verify the project_name under
      [keystone_authtoken] section in the /etc/nova/nova.conf file.
    •  

    • Create the tacker service:
      openstack service create --name tacker --description "nfv-orchestration" servicevm
    •  

    • Create the tacker service API endpoints:
      openstack endpoint create --region RegionOne <Service Type or Service ID> public
      http:// <TACKER_NODE_IP> :8888
      openstack endpoint create --region RegionOne <Service Type or Service ID> admin
      http:// <TACKER_NODE_IP> :8888
      openstack endpoint create --region RegionOne <Service Type or Service ID> internal
      http:// <TACKER_NODE_IP> :8888
    •  

  6.  

  7. Clone tacker repository
    git clone -b stable/liberty https://github.com/openstack/tacker
  8.  

  9. 5. Install all requirements. The requirements.txt file contains a set of python-packages required to run Tacker-Server

    cd tacker  
    sudo pip install -r requirements.txt 


    Note: If OpenStack components mentioned in pre-requisites section have been installed,
    the below command would be sufficient.

    cd tacker  
    sudo pip install tosca-parser
  10.  

  11. Install tacker
    sudo python setup.py install
  12.  

  13. Create ‘tacker’ directory in ‘/var/log’

    Note:The above referenced path ‘/var/log’ is for Ubuntu and may be different for other
    Operating Systems.

    sudo mkdir /var/log/tacker
  14.  

  15. Edit tacker.conf to ensure the below entries: 

    Note:
    1. In Ubuntu 14.04, the tacker.conf is located at /usr/local/etc/tacker/ and below ini
      sample is for Ubuntu and directory paths referred in ini may be different for other
      Operating Systems.
    2.  

    3. Project_name can be service or services. Verify the project_name in
      [keystone_authtoken] section in the /etc/nova/nova.conf file.
    4.  


      [DEFAULT]
      auth_strategy = keystone
      policy_file = /usr/local/etc/tacker/policy.json
      debug = True
      use_syslog = False
      state_path = /var/lib/tacker
      ...
      [keystone_ authtoken] project_name = services
      password = <TACKER_SERVICE_USER_PASSWORD>
      auth_url = http://<KEYSTONE_IP>:35357
      identity_uri = http://<KEYSTONE_IP>:5000
      auth_uri = http://<KEYSTONE_IP>:5000  
      ...
      [agent]
      root_helper = sudo /usr/local/bin/tacker-rootwrap
      /usr/local/etc/tacker/rootwrap.conf
      ...
      [DATABASE]
      connection =
      mysql://tacker:<TACKERDB_PASSWORD>@<MYSQL_IP>:3306/tacker?charset=utf8
      ...
      [servicevm_nova]
      password = <NOVA_SERVICE_USER_PASSWORD>
      auth_url = http://<NOVA_IP>:35357
      ...
      [servicev m_heat] heat_uri = http://<HEAT_IP>:8004/v1

  16.  

  17. Populate Tacker database:

    Note:The below command is for Ubuntu Operating System

    /usr/local/bin/tacker-db-manage --config-file /usr/local/etc/tacker/tacker.conf upgrade head
  18.  

Install Tacker client

  1. Clone tacker-client repository.
    cd ~/
    git clone -b stable/liberty https://github.com/openstack/python-tackerclient
  2.  

  3. Install tacker-client.
    cd python-tackerclient
    sudo python setup.py install
  4.  

Install Tacker horizon

  1. Clone tacker-horizon repository.
    cd ~/
    git clone -b stable/liberty https://github.com/openstack/tacker-horizon
  2.  

  3. Install horizon module.

    cd tacker-horizon
    sudo python setup.py install 
  4.  

  5. Enable tacker horizon in dashboard.

    Note:The below destination path referred is for Ubuntu 14.04 and may change for other
    Operating Systems.

    sudo cp openstack_dashboard_extensions/* /usr/share/openstack-dashboard/openstack_dashboard/enabled/
  6.  

  7. Restart Apache server
    sudo service apache2 restart
  8.  

Starting Tacker server


Note:Ensure that ml2_conf.ini as per Step 4 from the pre-requisites section has been configured.

sudo python /usr/local/bin/tacker-server --config-file /usr/local/etc/tacker/tacker.conf --log-file /var/log/tacker/tacker.log &

Run the following tacker commands to verify whether tacker is working fine
tacker ext-list
tacker vnf-list
tacker device-list

Issues Faced/Solved

  1. The following issue occured while trying to install the required python packages to run
    tacker-server (i.e.while running the command sudo pip install -r requirements.txt)

    Exception:

    Traceback (most recent call last):

    File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)

    File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 262, in run
    for req in parse_requirements(filename, finder=finder, options=options, session=session):

    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1632, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))

    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 173, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)

    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 71, in __init__
    req = pkg_resources.Requirement.parse(req)

    File "/usr/share/python-wheels/setuptools-18.4-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2986, in parse

    req, = parse_requirements(s)

    File "/usr/share/python-wheels/setuptools-18.4-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2930, in parse_requirements
    "version spec")

    File "/usr/share/python-wheels/setuptools-18.4-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2906, in scan_list
    raise RequirementParseError(msg, line, "at", line[p:])

    RequirementParseError: Expected ',' or end-of-list in Routes!=2.0,!=2.1,>=1.12.3;python_version=='2.7' at ;python_version=='2.7'

    Storing debug log for failure in /root/.pip/pip.log
     

    To solve the above issue, it is important to know which version of python and pip is installed. To
    check the version run the following commands

    [root@ubuntu ~(keystone_admin)]$ python -V
    Python 2.7.6
    [root@ubuntu ~(keystone_admin)]$ pip -V
    pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)
      

    From the output it is known that python 2.7.6 version and pip 1.5.4 version is installed. Since
    python 2.7 version is used this issue can be solved by editing the following lines in the
    requirements.txt file.  

    Routes!=2.0,!=2.1,>=1.12.3;python_version==’2.7′
    Routes!=2.0,>=1.12.3;python_version!=’2.7′
      

    The first line is edited as Routes!=2.0,!=2.1,>=1.12.3 and the second line is commented. Then
    again by running the command sudo pip install r
    requirements.txt all the required packages
    are installed.  

    This issue can also be solved by upgrading pip to the latest version (pip 8.1.2). If pip is
    upgraded to 8.1.2 no need to edit the requirements.txt file.

  2.   

  3. While running the command tacker extlist
    the following issue occured  
    [root@ubuntu tacker(keystone_admin)]$ tacker ext-list
    publicURL endpoint for servicevm service not found
     

    To solve this issue, the service which is initially created for tacker with service name as tacker
    and service type as nfvorchestration
    is deleted and new service for tacker is created with
    service name as tacker and service type as servicevm. Then API endpoints are created for the
    tacker service with service type:servicevm and the tacker server is restarted. This issue
    comes up only in stable/liberty version of tacker not in master version of tacker.

  4.  

The post How to deploy Openstack Tacker appeared first on CoreStack.


Viewing all articles
Browse latest Browse all 50

Trending Articles