summaryrefslogtreecommitdiffstats
path: root/book-enea-nfv-core-installation-guide/doc/tacker.xml
blob: 55cf18c63964707eb40b5e15461ab4fc0965d144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="tacker">
  <title>Tacker</title>

  <para><emphasis role="bold">Tacker</emphasis> is an OpenStack project,
  building a generic VNF Manager and a NFV Orchestrator in order to deploy and
  operate Network Services and Virtual Network Functions on an NFV
  infrastructure platform. It is based on ETSI MANO Architectural Framework
  and provides a functional stack to Orchestrate Network Services end-to-end
  using VNFs.</para>

  <section id="install_tacker">
    <title>Installing Tacker</title>

    <para>Execute the following in the Fuel master console:</para>

    <orderedlist>
      <listitem>
        <para>Go to the tacker plugin directory:<programlisting>cd /var/www/nailgun/plugins/tacker-1.0/repositories/tacker</programlisting></para>
      </listitem>

      <listitem>
        <para>Execute the following to install Ansible: <programlisting>yum install ansible</programlisting></para>
      </listitem>

      <listitem>
        <para>Run the initialization script:<programlisting>./files/init.sh</programlisting>This
        will create a hosts file for ansible
        <literal>/etc/ansible/hosts</literal> of the form:<programlisting>**********
[controllers]
node-5 mac_addr+68:05:ca:46:8b:64 ipmi_ip=0.0.0.0 ipmi_user=****** ipmi_pass=******
node-2 mac_addr+68:05:ca:46:8c:d4 ipmi_ip=0.0.0.0 ipmi_user=****** ipmi_pass=******
node-1 mac_addr+68:05:ca:46:8c:45 ipmi_ip=0.0.0.0 ipmi_user=****** ipmi_pass=******
[main_cont]
node-5
[computes]
node-3 mac_addr+68:05:ca:46:8c:c9 ipmi_ip=0.0.0.0 ipmi_user=****** ipmi_pass=******
node-4 mac_addr+68:05:ca:46:8c:c2 ipmi_ip=0.0.0.0 ipmi_user=****** ipmi_pass=******
[nodes:children]
controllers
computes
**********</programlisting></para>
      </listitem>

      <listitem>
        <para>Use your favorite text editor to manually edit
        <literal>ipmi_ip</literal> with the ip address of the ipmi interface,
        <literal>ipmi_user</literal> with the user for accessing the ipmi
        interface, and <literal>ipmi_pass</literal> with the password used by
        the user to access the ipmi interface for all the nodes.</para>
      </listitem>

      <listitem>
        <para>Run the ansible playbook responsible with the installation and
        configuration of tacker plugin.<programlisting>ansible-playbook tacker_deploy.yaml</programlisting></para>
      </listitem>
    </orderedlist>
  </section>

  <section id="using_tacker">
    <title>Using Tacker</title>

    <para>After Tacker has been installed and configured, perform the
    following in order to start a VNF:</para>

    <orderedlist>
      <listitem>
        <para>Log in using SSH to the controller node where Tacker has been
        installed (Example here <literal>node-5</literal>) and authenticate
        with openstack:</para>

        <para>The controller where tacker has been installed is the one under
        [<filename>main_cont</filename>] category in file
        <literal>/etc/ansible/hosts</literal></para>

        <programlisting>[root@fuel ~]# ssh node-5
root@node-5:~# . openrc</programlisting>
      </listitem>

      <listitem>
        <para>Activate the virtual environment for Tacker:</para>

        <programlisting>root@node-5:~# source /usr/share/tacker_venv/bin/activate</programlisting>

        <para>All subsequent commands will be executed in the venv.</para>
      </listitem>

      <listitem>
        <para>Create <filename>testvnf.yaml</filename> file with the following
        contents:</para>

        <programlisting>tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0

description: Demo example

metadata:
  template_name: sample-tosca-vnfd

topology_template:

  node_templates:
    VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      capabilities:
        nfv_compute:
          properties:
            num_cpus: 1
            mem_size: 512 MB
            disk_size: 1 GB
      properties:
        image: TestVM
        flavor: m1.micro
        availability_zone: nova
        mgmt_driver: noop
        metadata: {metering.vnf: VDU1}
        monitoring_policy:
          name: noop    # was ping
          # parameters:
          #   monitoring_delay: 45
          #   count: 3
          #   interval: 1
          #   timeout: 2
          # actions:
          #   failure: respawn
    CP1:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        order: 0
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL1
        - virtualBinding:
            node: VDU1

    VL1:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: admin_internal_net
        vendor: Tacker

    FIP1:
      type: tosca.nodes.network.FloatingIP
      properties:
         floating_network: admin_floating_net
      requirements:
        - link:
            node: CP1

  outputs:
    mgmt_ip-VDU1:
      description: 'management ip address'
      value: { get_attr: [FIP1, floating_ip_address] }

  policies:
    - vdu1_respawn_on_error:
        type: tosca.policies.tacker.AlarmingEvent
        targets: [VDU1]
        triggers:
            vdu1_down:
                event_type:
                    type: tosca.events.resource.event
                    implementation: ceilometer
                condition:
                    resource: compute.instance.*
                    field: traits.state
                    value: error
                    op: eq
                metadata: VDU1
                actions: [respawn]</programlisting>

        <para>Define a VNF Descriptor (VNFD):</para>

        <programlisting>(tacker_venv) root@node-5:~# tacker vnfd-create --vnfd-file testvnf.yaml TestVNF</programlisting>
      </listitem>

      <listitem>
        <para>Start a VNF:</para>

        <programlisting>(tacker_venv) root@node-5:~# tacker vnf-create --vnfd-name TestVNF someVnf</programlisting>
      </listitem>

      <listitem>
        <para>Verify:</para>

        <programlisting>(tacker_venv) root@node-5:~# tacker vnf-list
+------------+---------+-----------------------+--------+----------+-----------+
| id         | name    | mgmt_url              | status | vim_id   | vnfd_id   |
+------------+---------+-----------------------+--------+----------+-----------+
| &lt;VNF-UUID&gt; | someVnf | {"VDU1": "&lt;MGMT-IP&gt;"} | ACTIVE | &lt;VIM-ID&gt; | &lt;VNFD-ID&gt; |
+------------+---------+-----------------------+--------+----------+-----------+</programlisting>

        <programlisting>root@node-5:~# nova list
+-----------+---------------+--------+------------+-------------+
| ID        | Name          | Status | Task State | Power State |
+-----------+---------------+--------+------------+-------------+
| &lt;VM-UUID&gt; | ta-&lt;NAME&gt;     | ACTIVE | -          | Running     |
+-----------+---------------+--------+------------+-------------+
-------------------------------------------------+
 Networks                                        |
-------------------------------------------------+
 admin_internal_net=&lt;INTERNAL-IP&gt;, &lt;FLOATING-IP&gt; |
-------------------------------------------------+</programlisting>
      </listitem>
    </orderedlist>
  </section>
</chapter>