From 5c5af7155ae989664919de1f10ac17121fa12a36 Mon Sep 17 00:00:00 2001 From: Ryan Chu Date: Mon, 2 Jul 2018 15:13:12 +0200 Subject: Enable mDNS service discovery in Docker-based test servers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To resolve the challenge of connecting Docker containers from the host without extra user-efforts, Avahi is used to publish the Docker-based test servers (Docker containers) on a local network. It is a free Zeroconf implementation, and it provides multicast DNS (mDNS) service discovery. By default, mDNS only resolves hostname ending with the ".local" domain. In this change, the domain name of test servers is changed to "test-net.qt.local". As stated in the standard, the DNS query for a local domain will be sent to the mDNS multicast address. It avoids the need for root access to modify system files. Task-number: QTQAINFRA-1686 Change-Id: I255fba0720ee6d0e84c9cb5ca9289d4466578922 Reviewed-by: Edward Welbourne Reviewed-by: Ryan Chu Reviewed-by: Jędrzej Nowacki --- tests/testserver/common/startup.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/testserver/common/startup.sh') diff --git a/tests/testserver/common/startup.sh b/tests/testserver/common/startup.sh index 10847d3524..84d4003f86 100755 --- a/tests/testserver/common/startup.sh +++ b/tests/testserver/common/startup.sh @@ -48,5 +48,10 @@ for RUN_CMD do $RUN_CMD done +# start multicast DNS service discovery (mDNS) +sed -i "s,#domain-name=local,domain-name=test-net.qt.local," /etc/avahi/avahi-daemon.conf +service dbus restart +service avahi-daemon restart + # keep-alive in docker detach mode sleep infinity -- cgit v1.2.3