Permalink
Browse files

Add collaboration.cfg

  • Loading branch information...
1 parent adeaaad commit 8a47d37976aaa18f180dfce842f705e5fe73578e Yiorgis Gozadinos committed Sep 23, 2011
Showing with 247 additions and 0 deletions.
  1. +94 −0 collaboration.cfg
  2. +109 −0 templates/ejabberd.cfg.in
  3. +44 −0 templates/supervisord.conf.in
View
@@ -0,0 +1,94 @@
+[buildout]
+find-links = http://dist.jarn.com/public
+extends = buildout.cfg
+parts +=
+ nginx
+ frontend
+ ejabberd.cfg
+ ejabberd
+ supervisor-conf
+ supervisor
+
+auto-checkout +=
+ jarn.xmpp.twisted
+ jarn.xmpp.core
+ jarn.xmpp.collaboration
+
+[versions]
+gocept.cmmi = 0.9.4
+gocept.nginx = 0.9.4
+Twisted = 10.2.0
+gocept.download = 0.9.5
+pas.plugins.userdeletedevent = 0.1
+wokkel = 0.6.4-jarn.xmpp-1
+rod.recipe.ejabberd = 1.1.4
+
+[sources]
+wokkel = git https://github.com/ggozad/wokkel.git
+jarn.xmpp.twisted = git https://github.com/ggozad/jarn.xmpp.twisted.git
+jarn.xmpp.core = git https://github.com/ggozad/jarn.xmpp.core.git
+jarn.xmpp.collaboration = git https://github.com/ggozad/jarn.xmpp.collaboration.git
+
+[instance]
+http-address = 8081
+eggs +=
+ jarn.xmpp.collaboration
+
+zcml-additional =
+ <configure xmlns="http://namespaces.zope.org/zope">
+ <include package="jarn.xmpp.twisted" file="reactor.zcml" />
+ <include package="jarn.xmpp.collaboration" file="component.zcml" />
+ </configure>
+
+[ejabberd]
+recipe = rod.recipe.ejabberd
+erlang-path = /opt/local/bin
+url = http://www.process-one.net/downloads/ejabberd/2.1.8/ejabberd-2.1.8.tar.gz
+
+[ejabberd.cfg]
+recipe = collective.recipe.template
+input = templates/ejabberd.cfg.in
+output = ${buildout:directory}/etc/ejabberd.cfg
+xmppdomain = localhost
+admin_userid = admin
+collaboration_allowed_subnet = 0,0,0,0
+collaboration_port = 5347
+component_password = secret
+
+[nginx]
+recipe = gocept.cmmi
+url = http://sysoev.ru/nginx/nginx-0.5.30.tar.gz
+md5sum = 804cf3d6583fe820de42c5e7c50d7a1a
+
+[frontend]
+recipe = gocept.nginx
+configuration =
+ worker_processes 1;
+ daemon off;
+ events {
+ worker_connections 1024;
+ }
+ http {
+ server {
+ listen 8080;
+ server_name localhost;
+
+ location ~ ^/http-bind/ {
+ proxy_pass http://localhost:5280;
+ }
+
+ location / {
+ proxy_pass http://localhost:8081/VirtualHostBase/http/localhost:8080/Plone/VirtualHostRoot/;
+ }
+
+ }
+ }
+
+[supervisor]
+recipe = zc.recipe.egg
+eggs = supervisor
+
+[supervisor-conf]
+recipe = collective.recipe.template
+input = ${buildout:directory}/templates/supervisord.conf.in
+output = ${buildout:directory}/etc/supervisord.conf
View
@@ -0,0 +1,109 @@
+{loglevel, 4}.
+
+{hosts, ["${xmppdomain}"]}.
+
+{listen,
+ [
+
+ {5222, ejabberd_c2s, [
+ {access, c2s},
+ {shaper, c2s_shaper},
+ {max_stanza_size, 65536}
+ ]},
+
+ {5269, ejabberd_s2s_in, [
+ {shaper, s2s_shaper},
+ {max_stanza_size, 131072}
+ ]},
+
+ {{${collaboration_port}, {${collaboration_allowed_subnet}} }, ejabberd_service, [
+ {access, all},
+ {shaper_rule, fast},
+ {ip, {127, 0, 0, 1}},
+ {hosts, ["collaboration.${xmppdomain}"],
+ [{password, "${component_password}"}]
+ }
+ ]},
+
+ {5280, ejabberd_http, [
+ http_bind,
+ web_admin
+ ]}
+
+ ]}.
+
+{auth_method, internal}.
+
+{shaper, normal, {maxrate, 1000}}.
+{shaper, fast, {maxrate, 50000}}.
+
+{host_config, "${xmppdomain}", [{acl, admin, {user, "${admin_userid}", "${xmppdomain}"}}]}.
+
+{acl, local, {user_regexp, ""}}.
+
+{access, max_user_sessions, [{10, all}]}.
+
+{access, local, [{allow, local}]}.
+
+{access, c2s, [{deny, blocked},
+ {allow, all}]}.
+
+{access, c2s_shaper, [{none, admin},
+ {normal, all}]}.
+
+{access, s2s_shaper, [{fast, all}]}.
+
+{access, announce, [{allow, admin}]}.
+
+{access, configure, [{allow, admin}]}.
+
+{access, muc_admin, [{allow, admin}]}.
+
+{access, muc, [{allow, all}]}.
+{access, muc_create, [{allow, local}]}.
+
+{access, register, [{allow, all}]}.
+
+{access, pubsub_createnode, [{allow, local}]}.
+
+
+{language, "en"}.
+
+{modules,
+ [
+ {mod_adhoc, []},
+ {mod_announce, [{access, announce}]},
+ {mod_caps, []},
+ {mod_configure,[]},
+ {mod_disco, []},
+ {mod_http_bind,[]},
+ {mod_irc, []},
+ {mod_last, []},
+ {mod_muc, [
+ {access, muc},
+ {access_create, muc_create},
+ {access_persistent, muc_create},
+ {access_admin, muc_admin}
+ ]},
+ {mod_offline, []},
+ {mod_privacy, []},
+ {mod_private, []},
+ {mod_pubsub, [
+ {access_createnode, pubsub_createnode},
+ {ignore_pep_from_offline, true},
+ {last_item_cache, false},
+ {nodetree, "dag"},
+ {plugins, ["dag", "flat", "hometree", "pep"]}
+ ]},
+ {mod_register, [
+ {welcome_message, {"Welcome!",
+ "Welcome to ${xmppdomain} Jabber server."}},
+ {access, register}
+ ]},
+ {mod_roster, []},
+ {mod_shared_roster,[]},
+ {mod_time, []},
+ {mod_vcard, []},
+ {mod_version, []}
+ ]}.
+
@@ -0,0 +1,44 @@
+[unix_http_server]
+file=${buildout:directory}/var/supervisor.sock
+chmod=0600
+
+[supervisorctl]
+serverurl=unix://${buildout:directory}/var/supervisor.sock
+
+[rpcinterface:supervisor]
+supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
+
+[supervisord]
+logfile=${buildout:directory}/var/log/supervisord.log
+logfile_maxbytes=5MB
+logfile_backups=10
+loglevel=info
+pidfile=${buildout:directory}/var/supervisord.pid ;
+childlogdir=${buildout:directory}/var/log
+nodaemon=false ; (start in foreground if true;default false)
+minfds=1024 ; (min. avail startup file descriptors;default 1024)
+minprocs=200 ; (min. avail process descriptors;default 200)
+directory=%(here)s
+
+[program:ejabberd]
+command = ${buildout:bin-directory}/ejabberd
+startretries = 5
+redirect_stderr = true
+autostart = true
+autorestart = true
+priority = 100
+
+[program:nginx]
+command = ${buildout:directory}/parts/nginx/sbin/nginx -c ${buildout:directory}/parts/frontend/frontend.conf
+autostart= true
+autorestart = true
+redirect_stderr = true
+priority = 200
+
+[program:instance]
+command = ${buildout:bin-directory}/instance console
+startretries = 5
+redirect_stderr = true
+autostart= true
+autorestart = true
+priority = 300

0 comments on commit 8a47d37

Please sign in to comment.