A Full Guideline Needed For Creating VNF

Asked by harry zhang

I am new to Tacker. I am using the examples to create VNF. May I ask where I can get more detail information, such as what the default location is for Tacker to locate the image that I specified within yaml file using "properties: image: cirros-0.3.4-x86_64-uec", where is the log file, when creation returns errors, such as Internal error, how to debug, etc?

Can somebody provide a complete example with all the components and exact steps to launch a VNF by Tacker?

Thanks,

Harry

Question information

Language:
English Edit question
Status:
Answered
For:
tacker Edit question
Assignee:
Sridhar Ramaswamy Edit question
Last query:
Last reply:
Revision history for this message
Sridhar Ramaswamy (srics-r) said :
#1

Hi Harry,

Thanks for your input. We don't have one comprehensive document like that. However we recently added [1] to describe better the syntax and semantics of VNFD TOSCA YAML template including images. If you find anything lacking in this doc, please open a bug [2] and we will fix it.

Log file location is some thing that differs depending on the distros & the installer. For devstack, tacker logs are typically in /opt/stack/logs/tacker.log.

- Sridhar

[1] http://docs.openstack.org/developer/tacker/devref/vnfd_template_description.html
[2] https://bugs.launchpad.net/tacker/

Revision history for this message
harry zhang (harryhzhang) said :
#2

Hi Sridhar,

Thank you very much for the quick response.

I just installed devstack and Tacker followed the guideline,

Tacker Installation using stable/liberty

1) Pull devstack repo for stable liberty branch

git clone -b stable/liberty https://github.com/openstack-dev/devstack

2) A sample local.conf is placed at
https://raw.githubusercontent.com/openstack/tacker/stable/liberty/devstack/samples/local.conf.example.
Copy the local.conf to devstack root directory and customize it based on
your environment settings. Update the HOST_IP to the IP address of VM or
host where you are running tacker.

3) Make sure the local.conf "enable_plugin tacker" is pointing to
stable/liberty,

enable_plugin tacker https://github.com/openstack/tacker stable/liberty

4) Run stack.sh

I then created vnf successfully as following, but no VM Instance was
created for me. May I ask what could be the problem?

Regards,

Harry

stack@vim-222:~/devstack$ tacker vnfd-create --vnfd-file
tosca-vnfd-image.yaml --name cirros-vnfd-vdu

Created a new vnfd:

+---------------+------------------------------------------------------------------------+

| Field | Value
             |

+---------------+------------------------------------------------------------------------+

| description | Demo example with auto image creation
             |

| id | 7918e2d6-d0e1-4f0a-b7ad-31e509ddc2cb
              |

| infra_driver | heat
              |

| mgmt_driver | noop
              |

| name | cirros-vnfd-vdu
             |

| service_types | {"service_type": "vnfd", "id":
"6e339adb-fccf-431a-b5b5-cd51352cdbf4"} |

| tenant_id | 4b91fa25521d4255a7201e81918420d2
              |

+---------------+------------------------------------------------------------------------+

stack@vim-222:~/devstack$ tacker vnf-create --name my_tosca_vnf --vnfd-id
7918e2d6-d0e1-4f0a-b7ad-31e509ddc2cb

Created a new vnf:

+-------------+---------------------------------------+

| Field | Value |

+-------------+---------------------------------------+

| description | Demo example with auto image creation |

| id | 8b350f65-f037-49f0-8a54-6e7c7c8710ab |

| instance_id | 78f8cbce-03ac-4270-837f-5afd708eff8d |

| mgmt_url | |

| name | my_tosca_vnf |

| status | PENDING_CREATE |

| tenant_id | 4b91fa25521d4255a7201e81918420d2 |

| vnfd_id | 7918e2d6-d0e1-4f0a-b7ad-31e509ddc2cb |

+-------------+---------------------------------------+

stack@vim-222:~/devstack$ tacker vnf-list

+--------------------------------------+--------------+---------------------------------------+----------+--------+

| id | name | description
                  | mgmt_url | status |

+--------------------------------------+--------------+---------------------------------------+----------+--------+

| 8b350f65-f037-49f0-8a54-6e7c7c8710ab | my_tosca_vnf | Demo example with
auto image creation | | ACTIVE |

+--------------------------------------+--------------+---------------------------------------+----------+--------+

stack@vim-222:~/devstack$
stack@vim-222:~/devstack$ nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
stack@vim-222:~/devstack$

stack@vim-222:~/devstack$ ip route

10.12.161.0/24 dev em3 proto kernel scope link src 10.12.161.6

10.12.161.0/24 dev br-ext proto kernel scope link src 10.12.161.1

10.18.161.0/24 dev em2 proto kernel scope link src 10.18.161.164

15.0.0.0/24 via 10.12.161.150 dev em3
192.168.120.0/24 dev br-mgmt0 proto kernel scope link src 192.168.120.1
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

On Mon, Jul 25, 2016 at 2:08 PM, Sridhar Ramaswamy <
<email address hidden>> wrote:

> Your question #302221 on tacker changed:
> https://answers.launchpad.net/tacker/+question/302221
>
> Status: Open => Answered
>
> Sridhar Ramaswamy proposed the following answer:
> Hi Harry,
>
> Thanks for your input. We don't have one comprehensive document like
> that. However we recently added [1] to describe better the syntax and
> semantics of VNFD TOSCA YAML template including images. If you find
> anything lacking in this doc, please open a bug [2] and we will fix it.
>
> Log file location is some thing that differs depending on the distros &
> the installer. For devstack, tacker logs are typically in
> /opt/stack/logs/tacker.log.
>
> - Sridhar
>
> [1]
> http://docs.openstack.org/developer/tacker/devref/vnfd_template_description.html
> [2] https://bugs.launchpad.net/tacker/
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/tacker/+question/302221/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/tacker/+question/302221
>
> You received this question notification because you asked the question.
>

Revision history for this message
harry zhang (harryhzhang) said :
#3

Hi Sridhar,

Even though the command line did not show any error, but I saw
inside, /opt/stack/logs/tacker.log, the following error was logged during
tacker vnf-create. May I ask what can cause the problem? tosca-vnfd-image.yaml
was copied from one of Tacker sample.

Thanks,

Harry

from (pid=17717) mgmt_call
/opt/stack/tacker/tacker/vm/mgmt_drivers/noop.py:46^[[00m
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/greenpool.py", line
82, in _spawn_n_impl
    func(*args, **kwargs)
  File "/opt/stack/tacker/tacker/vm/plugin.py", line 267, in
create_device_wait
    self.add_device_to_monitor(device_dict)
  File "/opt/stack/tacker/tacker/vm/plugin.py", line 179, in
add_device_to_monitor
    device_dict, action_cb)
  File "/opt/stack/tacker/tacker/vm/monitor.py", line 98, in to_hosting_vnf
    device_dict['mgmt_url']),
  File "/opt/stack/tacker/tacker/openstack/common/jsonutils.py", line 172,
in loads
    return json.loads(strutils.safe_decode(s, encoding))
  File "/opt/stack/tacker/tacker/openstack/common/strutils.py", line 112,
in safe_decode
    raise TypeError("%s can't be decoded" % type(text))
TypeError: <type 'NoneType'> can't be decoded

On Mon, Jul 25, 2016 at 5:41 PM, Harry Zhang <email address hidden>
wrote:

> Hi Sridhar,
>
> Thank you very much for the quick response.
>
> I just installed devstack and Tacker followed the guideline,
>
> Tacker Installation using stable/liberty
>
> 1) Pull devstack repo for stable liberty branch
>
> git clone -b stable/liberty https://github.com/openstack-dev/devstack
>
> 2) A sample local.conf is placed at
> https://raw.githubusercontent.com/openstack/tacker/stable/liberty/devstack/samples/local.conf.example.
> Copy the local.conf to devstack root directory and customize it based on
> your environment settings. Update the HOST_IP to the IP address of VM or
> host where you are running tacker.
>
> 3) Make sure the local.conf "enable_plugin tacker" is pointing to
> stable/liberty,
>
> enable_plugin tacker https://github.com/openstack/tacker stable/liberty
>
> 4) Run stack.sh
>
> I then created vnf successfully as following, but no VM Instance was
> created for me. May I ask what could be the problem?
>
> Regards,
>
> Harry
>
> stack@vim-222:~/devstack$ tacker vnfd-create --vnfd-file
> tosca-vnfd-image.yaml --name cirros-vnfd-vdu
>
> Created a new vnfd:
>
>
> +---------------+------------------------------------------------------------------------+
>
> | Field | Value
> |
>
>
> +---------------+------------------------------------------------------------------------+
>
> | description | Demo example with auto image creation
> |
>
> | id | 7918e2d6-d0e1-4f0a-b7ad-31e509ddc2cb
> |
>
> | infra_driver | heat
> |
>
> | mgmt_driver | noop
> |
>
> | name | cirros-vnfd-vdu
> |
>
> | service_types | {"service_type": "vnfd", "id":
> "6e339adb-fccf-431a-b5b5-cd51352cdbf4"} |
>
> | tenant_id | 4b91fa25521d4255a7201e81918420d2
> |
>
>
> +---------------+------------------------------------------------------------------------+
>
> stack@vim-222:~/devstack$ tacker vnf-create --name my_tosca_vnf --vnfd-id
> 7918e2d6-d0e1-4f0a-b7ad-31e509ddc2cb
>
> Created a new vnf:
>
> +-------------+---------------------------------------+
>
> | Field | Value |
>
> +-------------+---------------------------------------+
>
> | description | Demo example with auto image creation |
>
> | id | 8b350f65-f037-49f0-8a54-6e7c7c8710ab |
>
> | instance_id | 78f8cbce-03ac-4270-837f-5afd708eff8d |
>
> | mgmt_url | |
>
> | name | my_tosca_vnf |
>
> | status | PENDING_CREATE |
>
> | tenant_id | 4b91fa25521d4255a7201e81918420d2 |
>
> | vnfd_id | 7918e2d6-d0e1-4f0a-b7ad-31e509ddc2cb |
>
> +-------------+---------------------------------------+
>
> stack@vim-222:~/devstack$ tacker vnf-list
>
>
> +--------------------------------------+--------------+---------------------------------------+----------+--------+
>
> | id | name | description
> | mgmt_url | status |
>
>
> +--------------------------------------+--------------+---------------------------------------+----------+--------+
>
> | 8b350f65-f037-49f0-8a54-6e7c7c8710ab | my_tosca_vnf | Demo example with
> auto image creation | | ACTIVE |
>
>
> +--------------------------------------+--------------+---------------------------------------+----------+--------+
>
> stack@vim-222:~/devstack$
> stack@vim-222:~/devstack$ nova list
> +----+------+--------+------------+-------------+----------+
> | ID | Name | Status | Task State | Power State | Networks |
> +----+------+--------+------------+-------------+----------+
> +----+------+--------+------------+-------------+----------+
> stack@vim-222:~/devstack$
>
> stack@vim-222:~/devstack$ ip route
>
> 10.12.161.0/24 dev em3 proto kernel scope link src 10.12.161.6
>
> 10.12.161.0/24 dev br-ext proto kernel scope link src 10.12.161.1
>
> 10.18.161.0/24 dev em2 proto kernel scope link src 10.18.161.164
>
> 15.0.0.0/24 via 10.12.161.150 dev em3
> 192.168.120.0/24 dev br-mgmt0 proto kernel scope link src 192.168.120.1
> 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
>
>
>
> On Mon, Jul 25, 2016 at 2:08 PM, Sridhar Ramaswamy <
> <email address hidden>> wrote:
>
>> Your question #302221 on tacker changed:
>> https://answers.launchpad.net/tacker/+question/302221
>>
>> Status: Open => Answered
>>
>> Sridhar Ramaswamy proposed the following answer:
>> Hi Harry,
>>
>> Thanks for your input. We don't have one comprehensive document like
>> that. However we recently added [1] to describe better the syntax and
>> semantics of VNFD TOSCA YAML template including images. If you find
>> anything lacking in this doc, please open a bug [2] and we will fix it.
>>
>> Log file location is some thing that differs depending on the distros &
>> the installer. For devstack, tacker logs are typically in
>> /opt/stack/logs/tacker.log.
>>
>> - Sridhar
>>
>> [1]
>> http://docs.openstack.org/developer/tacker/devref/vnfd_template_description.html
>> [2] https://bugs.launchpad.net/tacker/
>>
>> --
>> If this answers your question, please go to the following page to let us
>> know that it is solved:
>> https://answers.launchpad.net/tacker/+question/302221/+confirm?answer_id=0
>>
>> If you still need help, you can reply to this email or go to the
>> following page to enter your feedback:
>> https://answers.launchpad.net/tacker/+question/302221
>>
>> You received this question notification because you asked the question.
>>
>
>

Revision history for this message
Trinh Nguyen (dangtrinhnt) said :
#4

Please try with the new release of Tacker to see if the error still exists.

Can you help with this problem?

Provide an answer of your own, or ask harry zhang for more information if necessary.

To post a message you must log in.