Initial Documentation Commit
[docs.git] / manuals / howto-openstack / section_configure_fedora_images.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE section [
3  <!-- Some useful entities borrowed from HTML -->
4 <!ENTITY ndash  "&#x2013;">
5 <!ENTITY mdash  "&#x2014;">
6 <!ENTITY hellip "&#x2026;">
7 ]>
8 <section xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
9     xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="configure_fedora_images">
10     <title>Configure the Fedora Images for your Environment</title>
11     <para>To configure you have 2 options, Fedora 19 and Fedora 20. Fedora 19 is recommanded due to
12         Fderoa 20 having an issue with MariaDB and hostnames. For assistance with getting the stack
13         going, ping the OVSDB Listserv and check the archives for answers.</para>
14     <para>Download the pre-built image that contains OpenDaylight, DevStack installing Ice House
15         OpenStack, Open vSwitch all on Fedora:</para>
16     <para><emphasis role="bold">Fedora 19:</emphasis></para>
17     <para>
18         <screen><command>curl -O https://wiki.opendaylight.org/images/HostedFiles/ODL_Devstack_Fedora19.zip
19 $ unzip ODL_Devstack_Fedora19.zip
20 # Two files contained
21 ODL-Devstack-Fedora19-disk1.vmdk
22 ODL-Devstack-Fedora19.ovf</command></screen>
23     </para>
24     <para><emphasis role="bold">Fedora 20:</emphasis></para>
25     <para>
26         <screen><command>$ curl -O https://wiki.opendaylight.org/images/HostedFiles/OpenDaylight_DevStack_Fedora20.ova</command></screen>
27     </para>
28     <para>Clone this Virtual Machine image into two images. One is for the Control (This VM runs
29         both the OpenStack Controller and OpenDaylight Controller) and the other for the Compute
30         instance. If you use VM Fusion the vanilla image works as is with no need to change any
31         adaptor settings. Use the ‘ip addr’ configuration output as a reference in the next section.
32         I recommend using SSH to connect to the host rather then using the TTY interface.</para>
33     <para/>
34     <para>Here are two screenshots with VirtualBox network adaptor examples. The first are the two
35         networks you can create. vxboxnet0 is there by default. Create the 2nd network with the +w/a
36         nic picture in the following example. Note: you have to manually fill in the DHCP server
37         settings on the new network. Refer to the existing if unsure of the values to use. When
38         complete the host OS should be able to reach the guest OS.<inlinemediaobject>
39             <imageobject>
40                 <imagedata fileref="VirtualBox-HostOnly-Networks.png"/>
41             </imageobject>
42         </inlinemediaobject></para>
43     <para>The second example is what the VirtualBox NIC setup can look like without have to deal
44         with the NAT Network option in VirtualBox. VM Fusion has integrated hooks in to resolve the
45         need for host only etc. NAT and Host only work fine with NAT so the host can reach your
46         networks default gateway and get to the Inets as needed. With host only that is not the case
47         but it is plenty to run the stack and integration.<inlinemediaobject>
48             <imageobject>
49                 <imagedata fileref="VirtualBox-HostOnly-Nics.png"/>
50             </imageobject>
51         </inlinemediaobject></para>
52     <para>Boot both guest VMs write down the four IP addresses from both NICs. You will primarily
53         only use one of them other then a gateway or out of band SSH connectivity etc.</para>
54     <para><emphasis role="bold">Fedora 19:</emphasis></para>
55     <para>
56         <screen><command>
57 Login: fedora
58 Passwd: opendaylight</command></screen>
59     </para>
60     <para><emphasis role="bold">Fedora 20:</emphasis></para>
61     <para>
62         <screen><command>
63 Login: odl
64 Passwd: odl</command></screen>
65     </para>
66     <para>In this example the configuration of the IP addresses are as follows:</para>
67     <para>
68         <screen><command>
69 Openstack Controller IP == 172.16.86.129
70 Openstack Compute IP == 172.16.86.128
71 OpenDaylight Controller IP == 172.16.86.129</command></screen>
72     </para>
73     <para>Record the IP addresses of both of the hosts:</para>
74     <para>Controller IP addresses:</para>
75     <para>
76         <screen><prompt>[odl@fedora-odl-1 devstack]$</prompt><command>ip addr</command>
77 <computeroutput>
78 1: lo: loopback,up,lower_up, mtu 65536 qdisc noqueue state UNKNOWN group default
79 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
80 inet 127.0.0.1/8 scope host lo
81 valid_lft forever preferred_lft forever
82 inet6 ::1/128 scope host
83 valid_lft forever preferred_lft forever
84 2: eth0: &amp;lt;broadcast,multicast,up,lower_up&amp;gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
85 link/ether 00:0c:29:35:0b:65 brd ff:ff:ff:ff:ff:ff
86 inet 172.16.47.134/24 brd 172.16.47.255 scope global dynamic eth0
87 valid_lft 1023sec preferred_lft 1023sec
88 inet6 fe80::20c:29ff:fe35:b65/64 scope link
89 valid_lft forever preferred_lft forever
90 3: eth1: &amp;lt;broadcast,multicast,up,lower_up&amp;gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
91 link/ether 00:0c:29:35:0b:6f brd ff:ff:ff:ff:ff:ff
92 inet 172.16.86.129/24 brd 172.16.86.255 scope global dynamic eth1
93 valid_lft 1751sec preferred_lft 1751sec
94 inet6 fe80::20c:29ff:fe35:b6f/64 scope link
95 valid_lft forever preferred_lft forever</computeroutput></screen>
96     </para>
97     <para>Compute IP addresses:</para>
98     <para>
99         <screen><prompt>[odl@fedora-odl-2 ~]$</prompt><command>ip addr</command>
100 <computeroutput>
101 1: lo: &amp;lt;loopback,up,lower_up&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN group default
102 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
103 inet 127.0.0.1/8 scope host lo
104 valid_lft forever preferred_lft forever
105 inet6 ::1/128 scope host
106 valid_lft forever preferred_lft forever
107 2: eth0: &amp;lt;broadcast,multicast,up,lower_up&amp;gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
108 link/ether 00:0c:29:85:2d:f2 brd ff:ff:ff:ff:ff:ff
109 inet 172.16.47.133/24 brd 172.16.47.255 scope global dynamic eth0
110 valid_lft 1774sec preferred_lft 1774sec
111 inet6 fe80::20c:29ff:fe85:2df2/64 scope link
112 valid_lft forever preferred_lft forever
113 3: eth1: &amp;lt;broadcast,multicast,up,lower_up mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
114 link/ether 00:0c:29:85:2d:fc brd ff:ff:ff:ff:ff:ff
115 inet 172.16.86.128/24 brd 172.16.86.255 scope global dynamic eth1
116 valid_lft 1716sec preferred_lft 1716sec
117 inet6 fe80::20c:29ff:fe85:2dfc/64 scope link
118 valid_lft forever preferred_lft forever</computeroutput></screen>
119     </para>
120     <para>Go to the home directory of the user id odl:</para>
121     <para>
122         <screen><command>$ cd ~/</command></screen>
123     </para>
124     <para>Start the OVS Service (DevStack should start this svc). This startup script can be loaded
125         at startup of OVS to load at the OS init.</para>
126     <para>
127         <screen><command> sudo /sbin/service openvswitch start </command></screen>
128     </para>
129     <para>Configure the /etc/hosts file to reflect your controller and compute hostname mappings.
130         While not necessarily required it can cause issues for Nova output.</para>
131     <para>Verify the OpenStack Controller /etc/hosts file. The only edit is adding the compute IP to
132         hostname mapping. E.g. x.x.x.x fedora-odl-2</para>
133     <para>
134         <screen><prompt>[odl@fedora-odl-1 ~]$</prompt><command>sudo vi /etc/hosts</command>
135 <computeroutput>
136 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 fedora-odl-1
137 172.16.86.128 fedora-odl-2
138 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 </computeroutput></screen>
139     </para>
140     <para>Edit the compute nodes /etc/hosts from fedora-odl-1 to fedora-odl-2:</para>
141     <para>
142         <screen><prompt>[odl@fedora-odl-2 ~]$</prompt><command>sudo vi /etc/hosts</command>
143 <computeroutput>
144 $ cat /etc/hosts
145 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 fedora-odl-2
146 172.16.86.129 fedora-odl-1
147 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6</computeroutput></screen>
148     </para>
149     <para>Then, change the compute hostname from (compute only):</para>
150     <para>
151         <screen><command>$ sudo vi /etc/hostname</command>
152 <command># Change to:</command>
153 <command>$ cat /etc/hostname</command>
154 <command>fedora-odl-2</command>
155 <command>$sudo vi /etc/sysconfig/network</command>
156 <command>#Change HOSTNAME=fedora-odl-1 to HOSTNAME=fedora-odl-2</command>
157 <command>$sudo hostname -b fedora-odl-2</command></screen>
158     </para>
159     <para>Then, reboot the cloned Compute node for the change to take affect:</para>
160     <para>
161         <screen><command>sudo shutdown -r now</command></screen>
162     </para>
163     <para>After the host restarts verify the hostnames like so:</para>
164     <para>
165         <screen><command> $ hostname</command>
166 <command>fedora-odl-2</command></screen>
167     </para>
168     <para>Note: Iin the Fedora 20 VM, commenting out “#127.0.0.1 localhost fedora-odl-1″ will result
169         in a crash of MySql. Avoid doing any changes to the host name locally resolving to
170         127.0.0.1.</para>
171     <para>
172         <screen><computeroutput>
173 An unexpected error prevented the server from fulfilling your request. (OperationalError) (1045, "Access denied for user 'root'@'fedora-odl-1' (using password: YES)") None None (HTTP 500)
174 2014-02-10 04:03:28 + KEYSTONE_SERVICE=
175 2014-02-10 04:03:28 + keystone endpoint-create --region RegionOne --service_id --publicurl http://172.16.86.129:5000/v2.0 --adminurl http://172.16.86.129:35357/v2.0 --internalurl http://172.16.86.129:5000/v2.0
176 2014-02-10 04:03:28 usage: keystone endpoint-create [--region ] --service
177 2014-02-10 04:03:28 --publicurl 2014-02-10 04:03:28 [--adminurl ]
178 2014-02-10 04:03:28 [--internalurl ]
179 2014-02-10 04:03:28 keystone endpoint-create: error: argument --service/--service-id/--service_id: expected one argument
180 2014-02-10 04:03:28 ++ failed</computeroutput></screen>
181     </para>
182   </section>