diff options
Diffstat (limited to 'book-enea-nfv-core-installation-guide/doc/post_deploy_scripts.xml')
-rw-r--r-- | book-enea-nfv-core-installation-guide/doc/post_deploy_scripts.xml | 217 |
1 files changed, 217 insertions, 0 deletions
diff --git a/book-enea-nfv-core-installation-guide/doc/post_deploy_scripts.xml b/book-enea-nfv-core-installation-guide/doc/post_deploy_scripts.xml new file mode 100644 index 0000000..c4668e4 --- /dev/null +++ b/book-enea-nfv-core-installation-guide/doc/post_deploy_scripts.xml | |||
@@ -0,0 +1,217 @@ | |||
1 | <?xml version="1.0" encoding="ISO-8859-1"?> | ||
2 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | ||
4 | <chapter id="post_dep_scripts"> | ||
5 | <title>Post Deploy Scripts</title> | ||
6 | |||
7 | <para>The Post Deploy Scripts is a collection of ENEA specific software that | ||
8 | can be used to easily modify existing environments. These projects can be | ||
9 | used in many situations, from installing new components to configuring | ||
10 | existing ones in a fast and efficient way. They are located on the Fuel | ||
11 | Master in <literal>/opt/enea/postdeployscripts/</literal>.</para> | ||
12 | |||
13 | <section id="provider_net"> | ||
14 | <title>Post Deploy Provider Networks</title> | ||
15 | |||
16 | <para>OpenStack Networking allows you to create and manage network objects | ||
17 | such as networks, subnets, and ports, which other OpenStack services can | ||
18 | use.</para> | ||
19 | |||
20 | <para>Provider networks offer layer-2 connectivity to instances, with | ||
21 | optional support for DHCP and metadata services. These networks connect or | ||
22 | map, to existing layer-2 networks within the data center, typically using | ||
23 | VLAN (802.1q) tagging to identify and separate them. Provider networks | ||
24 | generally offer simplicity, performance, and reliability at the cost of | ||
25 | flexibility.</para> | ||
26 | |||
27 | <note> | ||
28 | <para>Provider networks only handle layer-2 connectivity for instances, | ||
29 | lacking support for features such as routers and floating IP addresses. | ||
30 | Please refer to the <ulink | ||
31 | url="https://docs.openstack.org/ocata/install-guide-ubuntu/launch-instance-networks-provider.html">Openstack | ||
32 | documentation</ulink> for examples on using provider networks.</para> | ||
33 | </note> | ||
34 | |||
35 | <para>In the example provided here, an instance uses a provider (external) | ||
36 | network that connects to the physical network infrastructure via layer-2 | ||
37 | (bridging/switching). This network includes a DHCP server that provides IP | ||
38 | addresses to instances.</para> | ||
39 | |||
40 | <mediaobject> | ||
41 | <imageobject role="fo"> | ||
42 | <imagedata align="center" contentwidth="600" | ||
43 | fileref="images/network1-overview.svg" /> | ||
44 | </imageobject> | ||
45 | |||
46 | <imageobject role="html"> | ||
47 | <imagedata align="center" fileref="images/network1-overview.png" /> | ||
48 | </imageobject> | ||
49 | </mediaobject> | ||
50 | |||
51 | <para>DPDK acceleration is automatically enabled based on the setting of | ||
52 | the Private Network in Fuel (<link | ||
53 | linkend="allocate_nodes_assign_roles">See chapter 2.13, bullet 4 - | ||
54 | Configure Compute nodes interfaces</link>).</para> | ||
55 | |||
56 | <para>If DPDK is enabled on one of the nodes, the playbook will configure | ||
57 | the interface connected to the provider network as type | ||
58 | <literal>DPDKOVSPort</literal>. Otherwise the interface will be configured | ||
59 | as type <literal>OVSPort</literal>. You can check the port type by looking | ||
60 | at the configuration files in <literal>/etc/network/interfaces.d</literal> | ||
61 | on the corresponding node.</para> | ||
62 | |||
63 | <para>For best results, it is recommended to run this playbook right after | ||
64 | the deployment process has completed successfully. It can also be run at a | ||
65 | later time, but in this case it is best to leave the neutron and | ||
66 | OpenVSwitch configuration untouched.</para> | ||
67 | |||
68 | <para><emphasis role="bold">How to run the Provider Networks | ||
69 | Playbook</emphasis></para> | ||
70 | |||
71 | <orderedlist> | ||
72 | <listitem> | ||
73 | <para>Log into the Fuel master.</para> | ||
74 | </listitem> | ||
75 | |||
76 | <listitem> | ||
77 | <para>Install Ansible: <programlisting>yum install ansible</programlisting></para> | ||
78 | </listitem> | ||
79 | |||
80 | <listitem> | ||
81 | <para>Run the initialization script:<programlisting>cd /opt/enea/postdeployscripts/provider-net | ||
82 | ./init.sh</programlisting></para> | ||
83 | |||
84 | <para>This will create a hosts file that will be used by Ansible to | ||
85 | associate the nodes into groups and to access them. </para> | ||
86 | |||
87 | <para>It will also create a file named | ||
88 | <filename>samplenetworks.json</filename>, which will contain a single | ||
89 | network in which all nodes (computes and controllers) are plugged in. | ||
90 | The <filename>samplenetworks.json</filename> file will have the | ||
91 | following content:<programlisting> { | ||
92 | "networks": [ | ||
93 | { | ||
94 | "name": "prov-net", | ||
95 | "nodes": [ | ||
96 | { | ||
97 | "interfaces": [], | ||
98 | "name": "node-1" | ||
99 | }, | ||
100 | [...] # all other controller and compute nodes: node-X | ||
101 | ] | ||
102 | } | ||
103 | }</programlisting></para> | ||
104 | |||
105 | <note> | ||
106 | <para>The interface list is empty and has to be populated by the | ||
107 | user. If the interface lists are left empty the node will simply not | ||
108 | be processed, though the script/playbook will attempt to perform | ||
109 | certain checks.</para> | ||
110 | </note> | ||
111 | </listitem> | ||
112 | |||
113 | <listitem> | ||
114 | <para>Populate the <filename>networks.json</filename> file (located in | ||
115 | <literal>/opt/enea/postdeployscripts/provider-net/files/networks.json</literal>).</para> | ||
116 | |||
117 | <para>The <filename>networks.json</filename> file will be used in the | ||
118 | playbook to map the interfaces on the nodes to the corresponding | ||
119 | provider networks to which they are connected. The | ||
120 | <filename>samplenetworks.json</filename> file generated during step 3 | ||
121 | can be used as a base for this file.</para> | ||
122 | |||
123 | <para>Below is an example of the | ||
124 | <filename>samplenetworks.json</filename> file as seen in step 3. with | ||
125 | some interfaces included:<programlisting> { | ||
126 | "networks":[ | ||
127 | { | ||
128 | "name":"prov-net", | ||
129 | "nodes":[ | ||
130 | { | ||
131 | "name":"node-4", | ||
132 | "interfaces":[ | ||
133 | "em2p1s0f5" | ||
134 | ] | ||
135 | }, | ||
136 | { | ||
137 | "name":"node-5", | ||
138 | "interfaces":[ | ||
139 | "em2p1s0f5" | ||
140 | ] | ||
141 | } | ||
142 | ] | ||
143 | } | ||
144 | ] | ||
145 | } | ||
146 | |||
147 | cp samplenetworks.json /opt/enea/postdeployscripts/provider-net/files/networks.json</programlisting>The | ||
148 | snippet shown above infers the following:</para> | ||
149 | |||
150 | <itemizedlist> | ||
151 | <listitem> | ||
152 | <para>An Openstack provider network called | ||
153 | <filename>prov-net</filename> will be created.</para> | ||
154 | </listitem> | ||
155 | |||
156 | <listitem> | ||
157 | <para>Two nodes (node-4 and node-5) each have an interface | ||
158 | connected to the underlying physical network associated with the | ||
159 | provider network.</para> | ||
160 | </listitem> | ||
161 | </itemizedlist> | ||
162 | |||
163 | <note> | ||
164 | <para>All of these components are lists in terms of json format, and | ||
165 | can be extended accordingly, making it possible for there to be | ||
166 | potentially X networks with Y nodes with Z interfaces.</para> | ||
167 | </note> | ||
168 | </listitem> | ||
169 | |||
170 | <listitem> | ||
171 | <para>Final checklist:</para> | ||
172 | |||
173 | <itemizedlist> | ||
174 | <listitem> | ||
175 | <para>Verify that the node names in the file match the actual | ||
176 | hostnames of the nodes.</para> | ||
177 | </listitem> | ||
178 | |||
179 | <listitem> | ||
180 | <para>Check that the interfaces in the file exist on the | ||
181 | nodes.</para> | ||
182 | </listitem> | ||
183 | </itemizedlist> | ||
184 | </listitem> | ||
185 | |||
186 | <listitem> | ||
187 | <para>Run the playbook:<programlisting>ansible-playbook deploy.yaml</programlisting>Various | ||
188 | checks are in place to minimize user error.<literal><filename> | ||
189 | deploy.yaml</filename></literal> is located at | ||
190 | <literal>/opt/enea/postdeployscripts/provider-net/deploy.yaml</literal>.</para> | ||
191 | |||
192 | <note> | ||
193 | <para>After the playbook is executed the nodes will be | ||
194 | rebooted.</para> | ||
195 | </note> | ||
196 | |||
197 | <para>On the processed nodes there should be new OVS bridges, | ||
198 | connecting the physical interfaces to <literal>br-int</literal>. For | ||
199 | example, on a non-DPDK enabled setup, the new configuration will look | ||
200 | like the following:</para> | ||
201 | |||
202 | <para><programlisting> Bridge br-prov-net | ||
203 | Controller "tcp:127.0.0.1:6633" | ||
204 | is_connected: true | ||
205 | fail_mode: secure | ||
206 | Port phy-br-prov-net | ||
207 | Interface phy-br-prov-net | ||
208 | type: patch | ||
209 | options: {peer=int-br-prov-net} | ||
210 | Port br-prov-net | ||
211 | Interface br-prov-net | ||
212 | type: internal | ||
213 | ovs_version: "2.9.0"</programlisting></para> | ||
214 | </listitem> | ||
215 | </orderedlist> | ||
216 | </section> | ||
217 | </chapter> \ No newline at end of file | ||