[Opensrf-commits] r1550 - trunk/examples

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Dec 19 17:52:22 EST 2008


Author: erickson
Date: 2008-12-19 17:52:17 -0500 (Fri, 19 Dec 2008)
New Revision: 1550

Modified:
   trunk/examples/opensrf_core.xml.example
Log:
updated to use multidomain by default

Modified: trunk/examples/opensrf_core.xml.example
===================================================================
--- trunk/examples/opensrf_core.xml.example	2008-12-19 22:21:29 UTC (rev 1549)
+++ trunk/examples/opensrf_core.xml.example	2008-12-19 22:52:17 UTC (rev 1550)
@@ -7,35 +7,48 @@
   <!-- bootstrap config for OpenSRF apps -->
   <opensrf>
 
-    <!-- The OpenSRF Routers's name on the network -->
-    <!-- You should never need to change this -->
-    <router_name>router</router_name>
-
     <routers>
 
-      <!-- List of router domains we should register with. 
-        We must at least have our default jabber domain in here -->
-      <router>localhost</router>
+      <!-- define the list of routers our services will register with -->
 
+      <router>
+
+        <!-- This is the public router.  On this router, we only register applications
+             which should be accessible to everyone on the opensrf network -->
+        <name>router</name>
+        <domain>public.localhost</domain>
+        <services>
+            <service>opensrf.math</service> 
+        </services>
+      </router>
+
+      <router>
+        <!-- This is the private router.  All applications must register with 
+            this router, so no explicit <services> section is required -->
+        <name>router</name>
+        <domain>localhost</domain>
+      </router>
     </routers>
 
-    <!-- Our jabber domain, currently only one domain is supported -->
+
+    <!-- Jabber login settings
+        Our domain should match that of the private router -->
     <domain>localhost</domain>
-
     <username>client</username>
     <passwd>mypass</passwd>
     <port>5222</port>
 
+    <!-- log file settings ======================================  -->
     <!-- log to a local file -->
     <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
 
     <!-- Log to syslog. You can use this same layout for 
         defining the logging of all services in this file -->
-<!--
+    <!--
     <logfile>syslog</logfile>
     <syslog>local2</syslog>
     <actlog>local1</actlog>
--->
+    -->
 
     <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
     <loglevel>3</loglevel>
@@ -47,11 +60,9 @@
 
   <!-- Update this if you use ChopChop -->
   <chopchop>
-
     <!-- Our jabber server -->
     <domain>localhost</domain>
     <port>5222</port>
-
     <!-- used when multiple servers need to communicate -->
     <s2sport>5269</s2sport>
     <secret>secret</secret>
@@ -72,19 +83,20 @@
     <!--  the routers's name on the network -->
     <router_name>router</router_name>
 
-    <!-- jabber domains to connect to (domain1, domain2, ...) -->
-    <domain>localhost</domain>
-
     <!--
     These are the services that the gateway will serve. 
     Any other requests will receive an HTTP_NOT_FOUND (404) 
     DO NOT put any services here that you don't want the internet to have access to
+    This section will be soon deprecated for multi-domain mode... 
     -->
     <services>
       <service>opensrf.math</service>
     </services>
 
     <!-- jabber login info -->
+
+    <!-- The gateway connects to the public domain -->
+    <domain>public.localhost</domain>
     <username>mylogin</username>
     <passwd>mypassword</passwd>
     <port>5222</port>
@@ -95,45 +107,57 @@
 
   <!-- ======================================================================================== -->
 
-  <routers>
-    <router>
+    <routers>
+        <router> <!-- public router -->
+            <trusted_domains>
+                <!-- allow private services to register with this router 
+                     and public clients to send requests to this router. -->
+                <server>localhost</server>
+                <!-- also allow private clients to send to the router so it can receive error messages -->
+                <client>localhost</client>
+                <client>public.localhost</client>
+            </trusted_domains>
+            <transport>
+                <server>public.localhost</server>
+                <port>5222</port>
+                <unixpath>/openils/var/sock/unix_sock</unixpath>
+                <username>router</username>
+                <password>osrf</password>
+                <resource>router</resource>
+                <connect_timeout>10</connect_timeout>
+                <max_reconnect_attempts>5</max_reconnect_attempts>
+            </transport>
+            <logfile>/openils/var/log/router.log</logfile>
+            <!--
+            <logfile>syslog</logfile>
+            <syslog>local2</syslog>
+            -->
+            <loglevel>2</loglevel>
+        </router>
+        <router> <!-- private router -->
+            <trusted_domains>
+                <server>localhost</server>
+                <!-- only clients on the private domain can send requests to this router -->
+                <client>localhost</client>
+            </trusted_domains>
+            <transport>
+                <server>localhost</server>
+                <port>5222</port>
+                <username>router</username>
+                <password>osrf</password>
+                <resource>router</resource>
+                <connect_timeout>10</connect_timeout>
+                <max_reconnect_attempts>5</max_reconnect_attempts>
+            </transport>
+            <logfile>/openils/var/log/router.log</logfile>
+            <!--
+            <logfile>syslog</logfile>
+            <syslog>local2</syslog>
+            -->
+            <loglevel>4</loglevel>
+        </router>
+    </routers>
 
-      <trusted_domains>
-
-        <!-- servers on trusted domains are allowed to register apps with the router -->
-        <server>localhost</server>
-  
-        <!-- clients on trusted domains are allowed to send requests to this router -->
-        <client>localhost</client>
-  
-      </trusted_domains>
-  
-      <transport>
-  
-        <!-- jabber server are we connecting to -->
-        <server>localhost</server>
-        <port>5222</port>
-  
-        <!--
-        if this is changed, all "router_name" settings 
-        will need to be updated to match this setting
-        -->
-        <username>router</username>
-        <password>mypassword</password>
-  
-        <!-- router's jabber resource -->
-        <!-- do not change this -->
-        <resource>router</resource>
-        <connect_timeout>10</connect_timeout>
-        <max_reconnect_attempts>5</max_reconnect_attempts>
-  
-        </transport>
-      <logfile>LOCALSTATEDIR/log/router.log</logfile>
-      <loglevel>2</loglevel>
-  
-    </router>
-  </routers>
-
   <!-- ======================================================================================== -->
 
 </config>



More information about the opensrf-commits mailing list