Skype on a server

From Wildsong
Revision as of 23:07, 21 November 2014 by Brian Wilson (talk | contribs) (Created page with "At CDS we mostly communicate via Skype, so it would be nice to be able to have Icinga notifications come in that way. * SMS txts are disruptive and cost money * Email is anno...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

At CDS we mostly communicate via Skype, so it would be nice to be able to have Icinga notifications come in that way.

  • SMS txts are disruptive and cost money
  • Email is annoying and I tend to ignore them
  • Skype has the right level of immediacy.

so I think it's worth a shot.

Get Skype going

  1. Build a virtual machine with 32-bit Xubuntu 12.04 Desktop
  2. Add the repository for Skype: sudo apt-add-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
  3. Install Skype: sudo apt-get update && sudo apt-get install skype
  4. Test Skype: it works, and I like the UI more than the new Mac version

Comments:

  1. Use XUbuntu because the GUI is lighter weight, and when deployed we won't use the GUI anyway!
  2. Use the 32-bit version of 12.04 because that's what Skype requires
  3. Ubuntu is the easiest place to install all this. (The skids are greased.)

If you try to install onto 64-bit version of Ubuntu, godspeed and best wishes to you. It's possible but I chose the appliance route specifically to avoid issues with package dependencies and 64-bit. The docs for sevabot are for 64-bit.

The only package option I select for the Ubuntu Server install is "OpenSSH Server".

Add packages to make headless mode work

I hit a bug in the first run of 'apt-get update' and had to do this first.

sudo rm -rf /var/lib/apt/lists
sudo apt-get update
sudo apt-get install xvfb fluxbox x11vnc dbus libasound2 libqt4-dbus libqt4-network libqtcore4 libqtgui4 libxss1 libqt4-xml libaudio2 libmng1 fontconfig liblcms1 python-gobject

Add the Python support

sudo apt-get install git python-setuptools python-virtualenv
mkdir src && cd src
git clone https://github.com/awahlig/skype4py.git
git clone https://github.com/opensourcehacker/sevabot.git
cd skype4py
python setup.py build
sudo python setup.py install

Test it

Start Skype and log in. You can see if the python library works with this snippet.

python
import Skype4Py
skype=Skype4Py.Skype()
skype.Attach()
print skype.CurrentUser.FullName

Then copy the whole thing up to CDS

Test it from there

Finally, hook up Icinga2