Sunday, February 02, 2014

Setup Light Weight X Windows environment on Fedora 20 Cloud instance and running F20 cloud instance in Spice session via virt-manager or spicy

 Following bellow builds Light Weight X Windows environment on Fedora 20 Cloud instance and demonstrate running same instance in Spice session via virt-manager ( Controller connects to Compute node via virt-manager ).  Spice console and QXL specified in virt-manager , then instance rebooted via Nova.

This post follows up [1]  http://bderzhavets.blogspot.ru/2014/01/setting-up-two-physical-node-openstack.html 
getting things on cloud instances ready to work without openstack-dashboard setup (RDO Havana administrative WEB console)

Needless to say that Spice console behaviour with running X-Server much better then it happens in VNC session , where actually one X-sever is running in a client of another one at Controller Node (F20)

Spice-gtk source rpm installed on both boxes of Cluster and rebuilt:-

$ rpm -iv spice-gtk-0.22-1.fc21.src.rpm
$ cd ~/rpmbuild/SPEC

$ sudo yum install intltool gtk2-devel usbredir-devel libusb1-devel libgudev1-devel pixman-devel openssl-devel  libjpeg-turbo-devel celt051-devel pulseaudio-libs-devel pygtk2-devel python-devel zlib-devel cyrus-sasl-devel libcacard-devel gobject-introspection-devel  dbus-glib-devel libacl-devel polkit-devel gtk-doc vala-tools gtk3-devel spice-protocol

$ rpmbuild -bb ./spice-gtk.spec
$ cd ../RPMS/x86_64

RPMs been built installed , because spicy is not on the system

[boris@dfw02 x86_64]$  sudo yum install spice-glib-0.22-2.fc20.x86_64.rpm \
spice-glib-devel-0.22-2.fc20.x86_64.rpm \
spice-gtk-0.22-2.fc20.x86_64.rpm \
spice-gtk3-0.22-2.fc20.x86_64.rpm \
spice-gtk3-devel-0.22-2.fc20.x86_64.rpm \
spice-gtk3-vala-0.22-2.fc20.x86_64.rpm \
spice-gtk-debuginfo-0.22-2.fc20.x86_64.rpm \
spice-gtk-devel-0.22-2.fc20.x86_64.rpm  \
spice-gtk-python-0.22-2.fc20.x86_64.rpm \
spice-gtk-tools-0.22-2.fc20.x86_64.rpm


Next we install X windows on F20 to run fluxbox ( by the way after hours of googling I was unable to find requied set of packages and just picked them up
during KDE Env installation via yum , which I actually don't need at all on cloud instance of Fedora )

# yum install xorg-x11-server-Xorg xorg-x11-xdm fluxbox \
xorg-x11-drv-ati xorg-x11-drv-evdev xorg-x11-drv-fbdev \
xorg-x11-drv-intel xorg-x11-drv-mga xorg-x11-drv-nouveau \
xorg-x11-drv-openchrome xorg-x11-drv-qxl xorg-x11-drv-synaptics \
xorg-x11-drv-vesa xorg-x11-drv-vmmouse xorg-x11-drv-vmware \
xorg-x11-drv-wacom xorg-x11-font-utils xorg-x11-drv-modesetting \
xorg-x11-glamor xorg-x11-utils xterm \
dejavu-fonts-common \
dejavu-sans-fonts \
dejavu-sans-mono-fonts \
dejavu-serif-fonts \
feh xcompmgr lxappearance \
xscreensaver dmenu firefox -y



View for details http://blog.bodhizazen.net/linux/a-5-minute-guide-to-fluxbox/

$mkdir .fluxbox/backgrounds

Add to ~/.fluxbox/menu file

 [submenu] (Wallpapers)
      [wallpapers] (~/.fluxbox/backgrounds) {feh --bg-scale}
[end] 

to be able set wallpaper

We are ready to go :-

# echo "exec fluxbox" > ~/.xinitrc
# startx

  
       

   Sample of ~/.fluxbox/menu for Fedora 20.

   [begin] (Fluxbox-1.3.5)
   [encoding] {UTF-8}
      [exec] (xterm) {xterm}
      [exec] (gnome-terminal) {gnome-terminal}
      [exec] (firefox) {firefox}
[submenu] (Fluxbox menu)
      [config] (Configure)
[submenu] (System Styles) {Choose a style...}
      [stylesdir] (/usr/share/fluxbox/styles)
[end]
[submenu] (Wallpapers)
  [wallpapers] (~/.fluxbox/backgrounds) {feh --bg-scale}
[end]
[submenu] (User Styles) {Choose a style...}
      [stylesdir] (~/.fluxbox/styles)
[end]
      [workspaces] (Workspace List)
[submenu] (Tools)
      [exec] (Regen Menu) {fluxbox-generate_menu}
[end]
      [commanddialog] (Fluxbox Command)
      [reconfig] (Reload config)
      [restart] (Restart)
      [exec] (About) {(fluxbox@EXEEXT@ -v; fluxbox@EXEEXT@ -info | sed 1d) | xmessage -file - -center}
      [separator]
      [exit] (Exit)
[end]
[endencoding]
[end]


   





 Fedora 20 cloud instance running in Spice Session via virt-manager with QXL
 64 MB of VRAM  :-










 
   Connecting via spicy from Controller Node to F20 instance :-

   # ssh -L 5900:localhost:5900 -N -f -l 192.168.1.137 ( Compute IP-address)
   # ssh -L 5901:localhost:5901 -N -f -l 192.168.1.137 ( Compute IP-address)
   # ssh -L 5902:localhost:5902 -N -f -l 192.168.1.137 ( Compute IP-address)

   # spicy -h localhost -p  590(X)
 


 



   Ubuntu Salamander Server cloud instance running in spice session ( connect via spicy from Controller Node 192.168.1.127)

   After instance setup (on Controller)  :-
   
   # ssh -L 5900:localhost:5900 -N -f -l 192.168.1.137 ( Compute IP-address) 

Log into iinstance as "ubuntu" password "mysecret" , view    http://bderzhavets.blogspot.ru/2014/01/setting-up-two-physical-node-openstack.html

   # ifconfig eth0 mtu 1400 up
   # apt-get update ; apt-get upgrade
   # apt-get install xorg fluxbox
   # echo "exec fluxbox">> ~/.xinitrc
   # startx
 
    Change to Spice Server & QXL in virt-manager.

     # nova reboot UbuntuSalamander
  


 

   Two spicy's sessions from Controller (192.168.1.127)

   # ssh -L 5900:127.0.0.1:5900 -N -f -l root 192.168.1.137
   # ssh -L 5901:127.0.0.1:5901 -N -f -l root 192.168.1.137