summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2016-07-27 11:27:42 -0400
committerMatthew Treinish <mtreinish@kortar.org>2016-07-27 19:04:15 -0400
commitb0ab19c7c626bd22e63067003ea51f137841cd17 (patch)
treee5f7adf922a489ded17c7575d093d4d27d439cdc
parente6e978cae70f9d7202c1445f73462ff8503bfe11 (diff)
Add websocket listner to mosquitto
This commit adds configuring a websocket listener to the mosquitto config. By default it will listen on port 80. The next step will be enabling an ssl/tls encrypted websocket port too. Change-Id: Ibec91fd0abc637ea7087872cab1ec8487c73acae
Notes
Notes (review): Code-Review+2: yolanda.robla <yroblamo@redhat.com> Code-Review+2: Paul Belanger <pabelanger@redhat.com> Workflow+1: Paul Belanger <pabelanger@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Sat, 30 Jul 2016 03:02:22 +0000 Reviewed-on: https://review.openstack.org/347924 Project: openstack-infra/puppet-mosquitto Branch: refs/heads/master
-rw-r--r--manifests/server.pp1
-rw-r--r--templates/mosquitto.conf.erb7
2 files changed, 7 insertions, 1 deletions
diff --git a/manifests/server.pp b/manifests/server.pp
index 7292c59..2916d3b 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -20,6 +20,7 @@ class mosquitto::server (
20 $persistence_location = '/var/lib/mosquitto/', 20 $persistence_location = '/var/lib/mosquitto/',
21 $infra_service_username = 'infra', 21 $infra_service_username = 'infra',
22 $infra_service_password, 22 $infra_service_password,
23 $websocket_port = 80,
23) { 24) {
24 25
25 file {'/etc/mosquitto/infra_service.pw': 26 file {'/etc/mosquitto/infra_service.pw':
diff --git a/templates/mosquitto.conf.erb b/templates/mosquitto.conf.erb
index 256138d..62335e9 100644
--- a/templates/mosquitto.conf.erb
+++ b/templates/mosquitto.conf.erb
@@ -274,7 +274,12 @@ pid_file <%= @pid_file %>
274# Note that for a websockets listener it is not possible to bind to a host 274# Note that for a websockets listener it is not possible to bind to a host
275# name. 275# name.
276# listener port-number [ip address/host name] 276# listener port-number [ip address/host name]
277#listener 277#
278
279listener 1883
280
281listener <%= @websocket_port %>
282protocol websockets
278 283
279# The maximum number of client connections to allow. This is 284# The maximum number of client connections to allow. This is
280# a per listener setting. 285# a per listener setting.