]> git.evergreen-ils.org Git - OpenSRF.git/blob - examples/opensrf_core.xml.example
Sync up the sample bootstrap conf from rel_1_0 - more explicit public vs. private
[OpenSRF.git] / examples / opensrf_core.xml.example
1 <?xml version="1.0"?>
2 <!-- 
3 vim:et:ts=2:sw=2:
4 -->
5 <config>
6
7   <!-- bootstrap config for OpenSRF apps -->
8   <opensrf>
9
10     <routers>
11
12       <!-- define the list of routers our services will register with -->
13
14       <router>
15
16         <!-- This is the public router.  On this router, we only register applications
17              which should be accessible to everyone on the opensrf network -->
18         <name>router</name>
19         <domain>public.localhost</domain>
20         <services>
21             <service>opensrf.math</service> 
22         </services>
23       </router>
24
25       <router>
26         <!-- This is the private router.  All applications must register with 
27             this router, so no explicit <services> section is required -->
28         <name>router</name>
29         <domain>private.localhost</domain>
30       </router>
31     </routers>
32
33
34     <!-- Jabber login settings
35         Our domain should match that of the private router -->
36     <domain>private.localhost</domain>
37     <username>opensrf</username>
38     <passwd>password</passwd>
39     <port>5222</port>
40     <!-- name of the router used on our private domain.  
41         this should match one of the <name> of the private router above -->
42     <router_name>router</router_name>
43
44     <!-- log file settings ======================================  -->
45     <!-- log to a local file -->
46     <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
47
48     <!-- Log to syslog. You can use this same layout for 
49         defining the logging of all services in this file -->
50     <!--
51     <logfile>syslog</logfile>
52     <syslog>local2</syslog>
53     <actlog>local1</actlog>
54     -->
55
56     <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
57     <loglevel>3</loglevel>
58
59     <!-- config file for the services -->
60     <settings_config>SYSCONFDIR/opensrf.xml</settings_config>
61
62   </opensrf>
63
64   <!-- Update this if you use ChopChop -->
65   <chopchop>
66     <!-- Our jabber server -->
67     <domain>private.localhost</domain>
68     <port>5222</port>
69     <!-- used when multiple servers need to communicate -->
70     <s2sport>5269</s2sport>
71     <secret>secret</secret>
72     <listen_address>10.0.0.3</listen_address>
73     <loglevel>3</loglevel>
74     <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
75   </chopchop>
76
77   <!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
78   <gateway>
79
80     <!--
81     we consider ourselves to be the "originating" client for requests,
82     which means we define the log XID string for log traces
83     -->
84     <client>true</client>
85
86     <!--  the routers's name on the network -->
87     <router_name>router</router_name>
88
89     <!--
90     These are the services that the gateway will serve. 
91     Any other requests will receive an HTTP_NOT_FOUND (404) 
92     DO NOT put any services here that you don't want the internet to have access to
93     This section will be soon deprecated for multi-domain mode... 
94     -->
95     <services>
96       <service>opensrf.math</service>
97     </services>
98
99     <!-- jabber login info -->
100
101     <!-- The gateway connects to the public domain -->
102     <domain>public.localhost</domain>
103     <username>opensrf</username>
104     <passwd>password</passwd>
105     <port>5222</port>
106     <logfile>LOCALSTATEDIR/log/gateway.log</logfile>
107     <loglevel>3</loglevel>
108
109   </gateway>
110
111   <!-- ======================================================================================== -->
112
113     <routers>
114         <router> <!-- public router -->
115             <trusted_domains>
116                 <!-- allow private services to register with this router 
117                      and public clients to send requests to this router. -->
118                 <server>private.localhost</server>
119                 <!-- also allow private clients to send to the router so it can receive error messages -->
120                 <client>private.localhost</client>
121                 <client>public.localhost</client>
122             </trusted_domains>
123             <transport>
124                 <server>public.localhost</server>
125                 <port>5222</port>
126                 <unixpath>LOCALSTATEDIR/sock/unix_sock</unixpath>
127                 <username>router</username>
128                 <password>password</password>
129                 <resource>router</resource>
130                 <connect_timeout>10</connect_timeout>
131                 <max_reconnect_attempts>5</max_reconnect_attempts>
132             </transport>
133             <logfile>LOCALSTATEDIR/log/router.log</logfile>
134             <!--
135             <logfile>syslog</logfile>
136             <syslog>local2</syslog>
137             -->
138             <loglevel>2</loglevel>
139         </router>
140         <router> <!-- private router -->
141             <trusted_domains>
142                 <server>private.localhost</server>
143                 <!-- only clients on the private domain can send requests to this router -->
144                 <client>private.localhost</client>
145             </trusted_domains>
146             <transport>
147                 <server>private.localhost</server>
148                 <port>5222</port>
149                 <username>router</username>
150                 <password>password</password>
151                 <resource>router</resource>
152                 <connect_timeout>10</connect_timeout>
153                 <max_reconnect_attempts>5</max_reconnect_attempts>
154             </transport>
155             <logfile>LOCALSTATEDIR/log/router.log</logfile>
156             <!--
157             <logfile>syslog</logfile>
158             <syslog>local2</syslog>
159             -->
160             <loglevel>4</loglevel>
161         </router>
162     </routers>
163
164   <!-- ======================================================================================== -->
165
166 </config>