From e1bd6caaeb7210f8a3805cb0ab203b8d41a88b35 Mon Sep 17 00:00:00 2001
From: Eduardo Gonzalez <dabarren@gmail.com>
Date: Wed, 23 Aug 2017 11:53:17 +0200
Subject: [PATCH] Add tacker documentation

Tacker has become a complex service to deploy in pike
release, adding a bunch of other services dependencies.
This guide aims to ease users to deploy tacker.

Change-Id: Ibe15bee9438fed0cd09b3cabcb270b551fb13b87
---
 doc/index.rst        |   1 +
 doc/tacker-guide.rst | 168 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 169 insertions(+)
 create mode 100644 doc/tacker-guide.rst

diff --git a/doc/index.rst b/doc/index.rst
index 95b3666a00..ea02ce5f1e 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -76,6 +76,7 @@ Services
    osprofiler-guide
    skydive-guide
    vmware-guide
+   tacker-guide
 
 Developer Docs
 ==============
diff --git a/doc/tacker-guide.rst b/doc/tacker-guide.rst
new file mode 100644
index 0000000000..b0b06e6b4c
--- /dev/null
+++ b/doc/tacker-guide.rst
@@ -0,0 +1,168 @@
+Tacker in Kolla
+===============
+
+"Tacker is an OpenStack service for NFV Orchestration with
+a general purpose VNF Manager to deploy and operate
+Virtual Network Functions (VNFs) and Network Services
+on an NFV Platform.
+It is based on ETSI MANO Architectural Framework." [1].
+
+Overview
+--------
+
+As of the Pike release, tacker requires the following services
+to be enabled to operate correctly.
+
+* Core compute stack (nova, neutron, glance, etc)
+* Heat
+* Mistral + Redis
+* Barbican (Required only for multinode)
+
+Optionally tacker supports the following services and features.
+
+* Aodh
+* Ceilometer
+* Networking-sfc
+* Opendaylight
+
+Compatibility
+-------------
+
+Tacker is supported by the following distros and install_types.
+
+* Centos, Redhat and Oraclelinux.
+
+  * Source and binary images.
+
+* Debian and Ubuntu.
+
+  * Only source images.
+
+Preparation and Deployment
+--------------------------
+
+By default tacker and required services are disabled in
+the ``group_vars/all.yml`` file.
+In order to enable them, you need to edit the file
+``/etc/kolla/globals.yml`` and set the following variables:
+
+.. note::
+
+  Heat is enabled by default, ensure it is not disabled.
+
+::
+
+  enable_tacker: "yes"
+  enable_barbican: "yes"
+  enable_mistral: "yes"
+  enable_redis: "yes"
+
+.. warning::
+
+  Barbican is required in multinode deployments to share VIM fernet_keys.
+  If not enabled, only one tacker-server host will have the keys on it
+  and any request made to a different tacker-server will fail with a
+  similar error as ``No such file or directory /etc/tacker/vim/fernet_keys``
+
+Deploy tacker and related services.
+
+::
+
+  $ kolla-ansible deploy
+
+Verify
+------
+
+Generate the credentials file.
+
+::
+
+  $ kolla-ansible post-deploy
+
+Source credentials file.
+
+::
+
+  $ source /etc/kolla/admin-openrc.sh
+
+Create base neutron networks and glance images.
+
+::
+
+  $ sh tools/init-runonce
+
+.. note::
+
+  ``init-runonce`` file is located in ``$PYTHON_PATH/kolla-ansible``
+  folder in kolla-ansible installation from pip.
+
+In kolla-ansible git repository a `tacker demo <https://github.com/openstack/kolla-ansible/tree/master/contrib/demos/tacker>`_
+is present in ``kolla-ansible/contrib/demos/tacker/`` that will
+create a very basic VNF from a cirros image in ``demo-net`` network.
+
+Install python-tackerclient.
+
+.. note::
+
+  Barbican, heat and mistral python clients are in tacker's
+  requirements and will be installed as dependency.
+
+::
+
+  $ pip install python-tackerclient
+
+Execute ``deploy-tacker-demo`` script to initialize the VNF creation.
+
+::
+
+  $ sh deploy-tacker-demo
+
+Tacker demo script will create sample VNF Descriptor (VNFD) file,
+then register a default VIM, create a tacker VNFD and finally
+deploy a VNF from the previously created VNFD.
+
+
+After a few minutes, the tacker VNF is ACTIVE with a cirros instance
+running in nova and with its corresponding heat stack CREATION_COMPLETE.
+
+Verify tacker VNF status is ACTIVE.
+
+::
+
+  $ tacker vnf-list
+  +--------------------------------------+------------------+-----------------------+--------+--------------------------------------+--------------------------------------+
+  | id                                   | name             | mgmt_url              | status | vim_id                               | vnfd_id                              |
+  +--------------------------------------+------------------+-----------------------+--------+--------------------------------------+--------------------------------------+
+  | c52fcf99-101d-427b-8a2d-c9ef54af8b1d | kolla-sample-vnf | {"VDU1": "10.0.0.10"} | ACTIVE | eb3aa497-192c-4557-a9d7-1dff6874a8e6 | 27e8ea98-f1ff-4a40-a45c-e829e53b3c41 |
+  +--------------------------------------+------------------+-----------------------+--------+--------------------------------------+--------------------------------------+
+
+Verify nova instance status is ACTIVE.
+
+::
+
+  $ openstack server list
+  +--------------------------------------+-------------------------------------------------------+--------+--------------------+--------+-----------------------------------------------------------------------------------------------------------------------+
+  | ID                                   | Name                                                  | Status | Networks           | Image  | Flavor                                                                                                                |
+  +--------------------------------------+-------------------------------------------------------+--------+--------------------+--------+-----------------------------------------------------------------------------------------------------------------------+
+  | d2d59eeb-8526-4826-8f1b-c50b571395e2 | ta-cf99-101d-427b-8a2d-c9ef54af8b1d-VDU1-fchiv6saay7p | ACTIVE | demo-net=10.0.0.10 | cirros | tacker.vnfm.infra_drivers.openstack.openstack_OpenStack-c52fcf99-101d-427b-8a2d-c9ef54af8b1d-VDU1_flavor-yl4bzskwxdkn |
+  +--------------------------------------+-------------------------------------------------------+--------+--------------------+--------+-----------------------------------------------------------------------------------------------------------------------+
+
+Verify Heat stack status is CREATE_COMPLETE.
+
+::
+
+  $ openstack stack list
+  +--------------------------------------+----------------------------------------------------------------------------------------------+----------------------------------+-----------------+----------------------+--------------+
+  | ID                                   | Stack Name                                                                                   | Project                          | Stack Status    | Creation Time        | Updated Time |
+  +--------------------------------------+----------------------------------------------------------------------------------------------+----------------------------------+-----------------+----------------------+--------------+
+  | 289a6686-70f6-4db7-aa10-ed169fe547a6 | tacker.vnfm.infra_drivers.openstack.openstack_OpenStack-c52fcf99-101d-427b-8a2d-c9ef54af8b1d | 1243948e59054aab83dbf2803e109b3f | CREATE_COMPLETE | 2017-08-23T09:49:50Z | None         |
+  +--------------------------------------+----------------------------------------------------------------------------------------------+----------------------------------+-----------------+----------------------+--------------+
+
+After the correct functionality of tacker is verified, tacker demo
+can be cleaned up executing ``cleanup-tacker`` script.
+
+::
+
+  $ sh cleanup-tacker
+
+[1] https://docs.openstack.org/tacker/latest/