Saturday, June 06, 2015

Switching to Dashboard Spice Console in RDO Kilo on Fedora 22

*************************
UPDATE 06/27/2015
*************************
# dnf install -y https://rdoproject.org/repos/rdo-release.rpm
# dnf  install -y openstack-packstack  
# dnf install fedora-repos-rawhide
# dnf  --enablerepo=rawhide update openstack-packstack

Fedora - Rawhide - Developmental packages for the next Fedora re 1.7 MB/s |  45 MB     00:27   
Last metadata expiration check performed 0:00:39 ago on Sat Jun 27 13:23:03 2015.
Dependencies resolved.
==============================================================
 Package                       Arch      Version                                Repository  Size
==============================================================
Upgrading:
 openstack-packstack           noarch    2015.1-0.7.dev1577.gc9f8c3c.fc23       rawhide    233 k
 openstack-packstack-puppet    noarch    2015.1-0.7.dev1577.gc9f8c3c.fc23       rawhide     23 k

Transaction Summary
==============================================================
Upgrade  2 Packages
 .  .  .  .  .

# dnf install python3-pyOpenSSL.noarch python-service-identity.noarch python-ndg_httpsclient.noarch

At this point run :-

# packstack  --gen-answer-file answer-file-aio.txt

and set

CONFIG_KEYSTONE_SERVICE_NAME=httpd

I also commented out second line in  /etc/httpd/conf.d/mod_dnssd.conf
Then run `packstack --answer-file=./answer-file-aio.txt` , however you will still
need pre-patch provision_demo.pp at the moment
( see third patch at http://textuploader.com/yn0v ) , the rest should work fine.

Upon completion you may try follow :-
https://www.rdoproject.org/Neutron_with_existing_external_network
I didn't test it on Fedora 22, just creating external and private networks of VXLAN type and configure
 
[root@ServerFedora22 network-scripts(keystone_admin)]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="static"
IPADDR="192.168.1.32"
NETMASK="255.255.255.0"
DNS1="8.8.8.8"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
TYPE="OVSIntPort"
OVS_BRIDGE=br-ex
DEVICETYPE="ovs"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no

[root@ServerFedora22 network-scripts(keystone_admin)]# cat ifcfg-enp2s0
DEVICE="enp2s0"
ONBOOT="yes"
HWADDR="90:E6:BA:2D:11:EB"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

When configuration above is done :-

# chkconfig network on
# systemctl stop NetworkManager
# systemctl disable NetworkManager
# reboot

*************************
UPDATE 06/26/2015
*************************
To install RDO Kilo on Fedora 22 :-
after `dnf -y install openstack-packstack `
# cd /usr/lib/python2.7/site-packages/packstack/puppet/templates
Then apply following 3 patches   
# cd ; packstack  --gen-answer-file answer-file-aio.txt
Set "CONFIG_NAGIOS_INSTALL=n" in  answer-file-aio.txt
# packstack --answer-file=./answer-file-aio.txt
************************
UPDATE 05/19/2015
************************
MATE Desktop supports sound ( via patch mentioned bellow) on RDO Kilo  Cloud instances F22, F21, F20. RDO Kilo AIO install performed on bare metal.
Also Windows Server 2012 (evaluation version) cloud VM provides pretty stable "video/sound" ( http://www.cloudbase.it/windows-cloud-images/ ) .
************************
UPDATE 05/14/2015
************************ 
I've  got sound working on CentOS 7 VM ( connection  to console via virt-manager)  with slightly updated patch of Y.Kawada , self.type set "ich6" RDO Kilo installed on bare metal AIO testing host, Fedora 22. Same results have been  obtained for RDO Kilo on CentOS 7.1. However , connection to spice console having cut&&paste and sound enabled features may be obtained via spicy ( remote connection)
Generated libvirt.xml
<domain type="kvm">
  <uuid>455877f2-7070-48a7-bb24-e0702be2fbc5</uuid>
  <name>instance-00000003</name>
  <memory>2097152</memory>
  <vcpu cpuset="0-7">1</vcpu>
  <metadata>
    <nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
      <nova:package version="2015.1.0-3.el7"/>
      <nova:name>CentOS7RSX05</nova:name>
      <nova:creationTime>2015-06-14 18:42:11</nova:creationTime>
      <nova:flavor name="m1.small">
        <nova:memory>2048</nova:memory>
        <nova:disk>20</nova:disk>
        <nova:swap>0</nova:swap>
        <nova:ephemeral>0</nova:ephemeral>
        <nova:vcpus>1</nova:vcpus>
      </nova:flavor>
      <nova:owner>
        <nova:user uuid="da79d2c66db747eab942bdbe20bb3f44">demo</nova:user>
        <nova:project uuid="8c9defac20a74633af4bb4773e45f11e">demo</nova:project>
      </nova:owner>
      <nova:root type="image" uuid="4a2d708c-7624-439f-9e7e-6e133062e23a"/>
    </nova:instance>
  </metadata>
  <sysinfo type="smbios">
    <system>
      <entry name="manufacturer">Fedora Project</entry>
      <entry name="product">OpenStack Nova</entry>
      <entry name="version">2015.1.0-3.el7</entry>
      <entry name="serial">b3fae7c3-10bd-455b-88b7-95e586342203</entry>
      <entry name="uuid">455877f2-7070-48a7-bb24-e0702be2fbc5</entry>
    </system>
  </sysinfo>
  <os>
    <type>hvm</type>
    <boot dev="hd"/>
    <smbios mode="sysinfo"/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cputune>
    <shares>1024</shares>
  </cputune>
  <clock offset="utc">
    <timer name="pit" tickpolicy="delay"/>
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="hpet" present="no"/>
  </clock>
  <cpu mode="host-model" match="exact">
    <topology sockets="1" cores="1" threads="1"/>
  </cpu>
  <devices>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/455877f2-7070-48a7-bb24-e0702be2fbc5/disk"/>
      <target bus="virtio" dev="vda"/>
    </disk>
    <interface type="bridge">
      <mac address="fa:16:3e:87:4b:29"/>
      <model type="virtio"/>
      <source bridge="qbr8ce9ae7b-f0"/>
      <target dev="tap8ce9ae7b-f0"/>
    </interface>
    <serial type="file">
      <source path="/var/lib/nova/instances/455877f2-7070-48a7-bb24-e0702be2fbc5/console.log"/>
    </serial>
    <serial type="pty"/>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
    </channel>
    <graphics type="spice" autoport="yes" keymap="en-us" listen="0.0.0.0   "/>
    <video>
      <model type="qxl"/>
    </video>
    <sound model="ich6"/>
    <memballoon model="virtio">
      <stats period="10"/>
    </memballoon>
  </devices>
</domain>

  

*****************
END UPDATE
*****************

The post follows up http://lxer.com/module/newswire/view/214893/index.html
The most recent `yum update` on F22 significantly improved network performance on cloud VMs (L2) . Watching movies running on cloud F22 VM (with "Mate Desktop" been installed and functioning pretty smoothly) without sound refreshes spice memories,view https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=913607


# dnf -y install spice-html5 ( installed on Controller && Compute)
# dnf -y install  openstack-nova-spicehtml5proxy (Compute Node)
# rpm -qa | grep openstack-nova-spicehtml5proxy
openstack-nova-spicehtml5proxy-2015.1.0-3.fc23.noarch

*********************************************************************** 
Update /etc/nova/nova.conf on Controller && Compute Node as follows :-
***********************************************************************

[DEFAULT]

. . . . .
web=/usr/share/spice-html5 (only Controller)
. . . . . .
spicehtml5proxy_host=0.0.0.0  (only Compute)
spicehtml5proxy_port=6082     (only Compute)
. . . . . . .
# Disable VNC
vnc_enabled=false
. . . . . . .
[spice]
# Compute Node Management IP 192.169.142.137

html5proxy_base_url=http://192.169.142.137:6082/spice_auto.html
server_proxyclient_address=127.0.0.1 ( only  Compute )
server_listen=0.0.0.0 ( only  Compute )
enabled=true
agent_enabled=true
keymap=en-us

:wq


# service httpd restart ( on Controller )

Next actions to be performed on Compute Node

# service openstack-nova-compute restart
# service openstack-nova-spicehtml5proxy start
# systemctl enable openstack-nova-spicehtml5proxy
*********************************************************************
Update /etc/sysconfig/iptables on Compute :-
*********************************************************************

-A INPUT -p tcp -m state --state NEW -m tcp --dport 6082 -j ACCEPT

[root@ip-192-169-142-137 sysconfig]# service iptables restart

[root@ip-192-169-142-137 sysconfig]# netstat -lntp | grep 6082
tcp        0      0 0.0.0.0:6082            0.0.0.0:*               LISTEN      1287/python

[root@ip-192-169-142-137 sysconfig]# ps -ef | grep 1287
nova      1287 16243  0 15:39 ?        00:00:00 /usr/bin/python /usr/bin/nova-spicehtml5proxy

[root@ip-192-169-142-137 sysconfig]# ps -ef | grep 16243
nova      1287 16243  0 15:39 ?        00:00:00 /usr/bin/python /usr/bin/nova-spicehtml5proxy
nova      1288 16243  0 15:39 ?        00:00:00 /usr/bin/python /usr/bin/nova-spicehtml5proxy
nova      1289 16243  2 15:39 ?        00:00:06 /usr/bin/python /usr/bin/nova-spicehtml5proxy
nova      1290 16243  0 15:39 ?        00:00:00 /usr/bin/python /usr/bin/nova-spicehtml5proxy
nova     16243     1  0 15:23 ?        00:00:01 /usr/bin/python /usr/bin/nova-spicehtml5proxy


  

On Controller

[root@ip-192-169-142-127 ~(keystone_admin)]# nova list --all-tenants

+--------------------------------------+-----------+----------------------------------+---------+------------+-------------+----------------------------------+
| ID                                   | Name      | Tenant ID                        | Status  | Task State | Power State | Networks                         |
+--------------------------------------+-----------+----------------------------------+---------+------------+-------------+----------------------------------+
| 6c8ef008-e8e0-4f1c-af17-b5f846f8b2d9 | CirrOSDev | 7e5a0f3ec3fe45dc83ae0947ef52adc3 | SHUTOFF | -          | Shutdown    | demo_net=50.0.0.11, 172.24.4.228 |
| cfd735ea-d9a8-4c4e-9a77-03035f01d443 | VF22DEVS  | 7e5a0f3ec3fe45dc83ae0947ef52adc3 | ACTIVE  | -          | Running     | demo_net=50.0.0.14, 172.24.4.231 |
+--------------------------------------+-----------+----------------------------------+---------+------------+-------------+----------------------------------+

[root@ip-192-169-142-127 ~(keystone_admin)]# nova get-spice-console cfd735ea-d9a8-4c4e-9a77-03035f01d443  spice-html5

+-------------+----------------------------------------------------------------------------------------+
| Type        | Url                                                                                    |
+-------------+----------------------------------------------------------------------------------------+
| spice-html5 | http://192.169.142.137:6082/spice_auto.html?token=24fb65c7-e7e9-4727-bad3-ba7c2c29f7f4 |
+-------------+----------------------------------------------------------------------------------------+

  

   

     Session running by virt-manager on Virtualization Host ( F22 )   
   Connection to Compute Node 192.169.142.137 has been activated

  

 Active VM features :-


Actually , not much spice benefits enabled , just QXL video mode

[root@fedora22wks 2b75c461-fbe0-4527-a031-08d2e729db91]# pwd
/var/lib/nova/instances/2b75c461-fbe0-4527-a031-08d2e729db91

[root@fedora22wks 2b75c461-fbe0-4527-a031-08d2e729db91]# cat libvirt.xml

<domain type="kvm">
  <uuid>2b75c461-fbe0-4527-a031-08d2e729db91</uuid>
  <name>instance-00000003</name>
  <memory>2097152</memory>
  <vcpu cpuset="0-3">1</vcpu>
  <metadata>
    <nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
      <nova:package version="2015.1.0-3.fc23"/>
      <nova:name>VF22Devs</nova:name>
      <nova:creationTime>2015-06-06 16:50:07</nova:creationTime>
      <nova:flavor name="m1.small">
        <nova:memory>2048</nova:memory>
        <nova:disk>20</nova:disk>
        <nova:swap>0</nova:swap>
        <nova:ephemeral>0</nova:ephemeral>
        <nova:vcpus>1</nova:vcpus>
      </nova:flavor>
      <nova:owner>
        <nova:user uuid="6a89f1e00f554e37b3c288f20daa34ec">demo</nova:user>
        <nova:project uuid="22cd2b8ca101493ba621c1656141cea6">demo</nova:project>
      </nova:owner>
      <nova:root type="image" uuid="19c62e6f-527e-4e4a-b84a-c92f8caa7334"/>
    </nova:instance>
  </metadata>
  <sysinfo type="smbios">
    <system>
      <entry name="manufacturer">Fedora Project</entry>
      <entry name="product">OpenStack Nova</entry>
      <entry name="version">2015.1.0-3.fc23</entry>
      <entry name="serial">75cbcf76-d9ef-479e-8f2e-99b89adfc667</entry>
      <entry name="uuid">2b75c461-fbe0-4527-a031-08d2e729db91</entry>
    </system>
  </sysinfo>
  <os>
    <type>hvm</type>
    <boot dev="hd"/>
    <smbios mode="sysinfo"/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cputune>
    <shares>1024</shares>
  </cputune>
  <clock offset="utc">
    <timer name="pit" tickpolicy="delay"/>
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="hpet" present="no"/>
  </clock>
  <cpu mode="host-model" match="exact">
    <topology sockets="1" cores="1" threads="1"/>
  </cpu>
  <devices>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/2b75c461-fbe0-4527-a031-08d2e729db91/disk"/>
      <target bus="virtio" dev="vda"/>
    </disk>
    <interface type="bridge">
      <mac address="fa:16:3e:20:b9:4f"/>
      <model type="virtio"/>
      <source bridge="qbr8af1434b-25"/>
      <target dev="tap8af1434b-25"/>
    </interface>
    <serial type="file">
      <source path="/var/lib/nova/instances/2b75c461-fbe0-4527-a031-08d2e729db91/console.log"/>
    </serial>
    <serial type="pty"/>
    <channel type="pty">
      <target type="virtio" name="com.redhat.spice.0"/>
    </channel>
    <graphics type="spice" autoport="yes" keymap="en-us" listen="0.0.0.0"/>
    <video>
      <model type="qxl"/>
    </video>
    <memballoon model="virtio">
      <stats period="10"/>
    </memballoon>
  </devices>
</domain>



   References
   1.  http://blog.felipe-alfaro.com/2014/05/13/html5-spice-console-in-openstack/
   2.  https://www.rdoproject.org/Neutron_with_existing_external_network