-
Notifications
You must be signed in to change notification settings - Fork 0
zeroconf notes
First off, we need to install avahi on the client machines. This should be done automatically during the Ubuntu installation. But if you run into errors make sure that the following packages are installed (or install them with apt-get):
- avahi-daemon
- avahi-utils
- libavahi-compat-libdnssd-dev
Once we have Avahi installed we need to ensure that clients are automatically registering themselves via multicast DNS and publishing their services.
This can be manually via bash:
avahi-publish-service "Roomtrol Client `hostname`" _roomtrol._tcp 10000
However, we want avahi-daemon to automatically publish this service. We do this by putting a file in /etc/avahi/services/roomtrol.service
of:
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Roomtrol client on %h</name>
<service>
<type>_roomtrol._tcp</type>
<port>10000</port>
</service>
</service-group>
This should all be setup by chef during the intial system install.
Once we have our clients publishing their service we can browse for services:
$ avahi-browse '_roomtrol._tcp'
+ eth0 IPv6 Roomtrol client on roomtrol-dev2 _roomtrol._tcp local
+ eth0 IPv6 Roomtrol client on roomtrol-dev3 _roomtrol._tcp local
+ eth0 IPv4 Roomtrol client on roomtrol-dev2 _roomtrol._tcp local
+ eth0 IPv4 Roomtrol client on roomtrol-dev3 _roomtrol._tcp local
Installation Notes Using ruby gem dnssd
If getting errors ensure that dns_sd.h header file is included:
sudo apt-get install libavahi-compat-libdnssd-dev
to get dns_sd.h header file included
So install the following packages: $ sudo apt-get install avahi-daemon libavahi-compat-libdnssd-dev