In Openstack

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

    [[email protected] ~(keystone_admin)]$ python -V
    Python 2.7.6
    [[email protected] ~(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  
    [[email protected] 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.  

Showing 2 comments
  • fuzzy
    Reply

    Thank you for your nice post. It is really useful. Shop for organic products Fuzzy International.

  • Sagar Sharma
    Reply

    Hello Sir I tried installing Tacker on my Liberty setup,
    but I am facing issue when executing any tacker cli command like:
    #tacker vnf-list
    The server has either erred or is incapable of performing the requested operation.

    also in Horizon:
    the error is
    Error: Unable to fetch vim list
    or
    Error: Unable to fetch vim instances

    tacker.log
    2017-01-05 12:57:58.914 12071 DEBUG tacker.wsgi [-] (12071) accepted (‘10.0.15.24’, 54394) server /usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py:883
    2017-01-05 12:57:58.915 12071 DEBUG tacker.alarm_receiver [-] Process request: (,) process_request /usr/local/lib/python2.7/dist-packages/tacker/alarm_receiver.py:44
    2017-01-05 12:57:58.916 12071 WARNING keystonemiddleware.auth_token [-] Using the in-process token cache is deprecated as of the 4.2.0 release and may be removed in the 5.0.0 release or the ‘O’ development cycle. The in-process cache causes inconsistent results and high memory usage. When the feature is removed the auth_token middleware will not cache tokens by default which may result in performance issues. It is recommended to use memcache for the auth_token token cache by setting the memcached_servers option.
    2017-01-05 12:57:58.931 12071 WARNING keystoneauth.identity.generic.base [-] Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL.
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors [-] An error occurred during processing the request: (,)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors Traceback (most recent call last):
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/oslo_middleware/catch_errors.py”, line 38, in __call__
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors response = req.get_response(self.application)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/webob/request.py”, line 1316, in send
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors application, catch_exc_info=False)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/webob/request.py”, line 1280, in call_application
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors app_iter = application(self.environ, start_response)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/webob/dec.py”, line 131, in __call__
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors resp = self.call_func(req, *args, **self.kwargs)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/webob/dec.py”, line 196, in call_func
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors return self.func(req, *args, **kwargs)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/tacker/wsgi.py”, line 315, in __call__
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors response = req.get_response(self.application)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/webob/request.py”, line 1316, in send
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors application, catch_exc_info=False)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/webob/request.py”, line 1280, in call_application
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors app_iter = application(self.environ, start_response)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/webob/dec.py”, line 131, in __call__
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors resp = self.call_func(req, *args, **self.kwargs)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/webob/dec.py”, line 196, in call_func
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors return self.func(req, *args, **kwargs)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py”, line 332, in __call__
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors response = self.process_request(req)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py”, line 623, in process_request
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors resp = super(AuthProtocol, self).process_request(request)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py”, line 405, in process_request
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors allow_expired=allow_expired)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py”, line 435, in _do_fetch_token
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors data = self.fetch_token(token, **kwargs)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py”, line 761, in fetch_token
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors allow_expired=allow_expired)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/_identity.py”, line 217, in verify_token
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors auth_ref = self._request_strategy.verify_token(
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/_identity.py”, line 168, in _request_strategy
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors strategy_class = self._get_strategy_class()
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/_identity.py”, line 190, in _get_strategy_class
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors if self._adapter.get_endpoint(version=klass.AUTH_VERSION):
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py”, line 175, in get_endpoint
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors return self.session.get_endpoint(auth or self.auth, **kwargs)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py”, line 808, in get_endpoint
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors return auth.get_endpoint(self, **kwargs)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py”, line 212, in get_endpoint
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors service_catalog = self.get_access(session).service_catalog
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py”, line 136, in get_access
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors self.auth_ref = self.get_auth_ref(session)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py”, line 196, in get_auth_ref
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors self._plugin = self._do_create_plugin(session)
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors File “/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py”, line 191, in _do_create_plugin
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors raise exceptions.DiscoveryFailure(‘Could not determine a suitable URL ‘
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors DiscoveryFailure: Could not determine a suitable URL for the plugin
    2017-01-05 12:57:58.932 12071 ERROR oslo_middleware.catch_errors
    2017-01-05 12:57:58.934 12071 INFO tacker.wsgi [-] 10.0.15.24 – – [05/Jan/2017 12:57:58] “GET /v1.0/vnfs.json HTTP/1.1” 500 404 0.019548

    Please help

Leave a Comment

Start typing and press Enter to search