]> git.evergreen-ils.org Git - OpenSRF.git/blob - examples/opensrf_core.xml.example
draft 3.1.x release notes for 3.1-beta
[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 a warning when an outbound message reaches this size in bytes -->
45     <msg_size_warn>1800000</msg_size_warn>
46
47     <!-- log file settings ======================================  -->
48     <!-- log to a local file -->
49     <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
50
51     <!-- Log to syslog. You can use this same layout for 
52         defining the logging of all services in this file -->
53     <!--
54     <logfile>syslog</logfile>
55     <syslog>local2</syslog>
56     <actlog>local1</actlog>
57     -->
58     <!-- Optional log tag.  You can use this to help distinguish
59          syslog entries when running multiple OpenSRF stacks on the
60          same server. -->
61     <!--
62     <logtag>instance1</logtag>
63     -->
64
65     <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
66     <loglevel>3</loglevel>
67
68     <!-- Maximum log message length; if using syslog, you might need to adjust
69          your syslog service's configuration to match longer message lengths -->
70     <loglength>1536</loglength>
71
72     <!-- config file for the services -->
73     <settings_config>SYSCONFDIR/opensrf.xml</settings_config>
74
75   </opensrf>
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     <!-- jabber login info -->
90     <!-- The gateway connects to the public domain -->
91     <domain>public.localhost</domain>
92     <username>opensrf</username>
93     <passwd>password</passwd>
94     <port>5222</port>
95     <logfile>LOCALSTATEDIR/log/gateway.log</logfile>
96     <loglevel>3</loglevel>
97
98     <!-- cross origin HTTP settings http://en.wikipedia.org/wiki/Cross-origin_resource_sharing -->
99     <cross_origin>
100         <!-- specify individual hosts -->
101         <!-- <origin>example.com</origin> -->
102         <!-- ...or use the * wildcard to match all -->
103         <!-- <origin>*</origin> -->
104     </cross_origin>
105
106   </gateway>
107
108   <!-- ======================================================================================== -->
109
110     <routers>
111         <router> <!-- public router -->
112             <trusted_domains>
113                 <!-- allow private services to register with this router 
114                      and public clients to send requests to this router. -->
115                 <server>private.localhost</server>
116                 <!-- also allow private clients to send to the router so it can receive error messages -->
117                 <client>private.localhost</client>
118                 <client>public.localhost</client>
119             </trusted_domains>
120             <transport>
121                 <server>public.localhost</server>
122                 <port>5222</port>
123                 <unixpath>LOCALSTATEDIR/sock/unix_sock</unixpath>
124                 <username>router</username>
125                 <password>password</password>
126                 <resource>router</resource>
127                 <connect_timeout>10</connect_timeout>
128                 <max_reconnect_attempts>5</max_reconnect_attempts>
129             </transport>
130             <logfile>LOCALSTATEDIR/log/router.log</logfile>
131             <!--
132             <logfile>syslog</logfile>
133             <syslog>local2</syslog>
134             -->
135             <!--
136             <logtag>instance1</logtag>
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             <!--
161             <logtag>instance1</logtag>
162             -->
163             <loglevel>4</loglevel>
164         </router>
165     </routers>
166
167   <!-- ======================================================================================== -->
168
169   <shared>
170     <!-- Any methods which match any of these match_string node values will
171          have their params redacted from lower-level input logging.
172          Adjust these examples as needed. -->
173     <log_protect>
174     <!--
175       <match_string>open-ils.auth</match_string>
176       <match_string>open-ils.some_service.some_method</match_string>
177     -->
178     </log_protect>
179   </shared>
180
181 </config>