]> git.evergreen-ils.org Git - OpenSRF.git/blob - examples/opensrf_core.xml.example
818fd1cf714fdacaa0b34440df80fa8e83a062a2
[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>localhost</domain>
30       </router>
31     </routers>
32
33
34     <!-- Jabber login settings
35         Our domain should match that of the private router -->
36     <domain>localhost</domain>
37     <username>client</username>
38     <passwd>mypass</passwd>
39     <port>5222</port>
40
41     <!-- log file settings ======================================  -->
42     <!-- log to a local file -->
43     <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
44
45     <!-- Log to syslog. You can use this same layout for 
46         defining the logging of all services in this file -->
47     <!--
48     <logfile>syslog</logfile>
49     <syslog>local2</syslog>
50     <actlog>local1</actlog>
51     -->
52
53     <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
54     <loglevel>3</loglevel>
55
56     <!-- config file for the services -->
57     <settings_config>SYSCONFDIR/opensrf.xml</settings_config>
58
59   </opensrf>
60
61   <!-- Update this if you use ChopChop -->
62   <chopchop>
63     <!-- Our jabber server -->
64     <domain>localhost</domain>
65     <port>5222</port>
66     <!-- used when multiple servers need to communicate -->
67     <s2sport>5269</s2sport>
68     <secret>secret</secret>
69     <listen_address>10.0.0.3</listen_address>
70     <loglevel>3</loglevel>
71     <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
72   </chopchop>
73
74   <!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
75   <gateway>
76
77     <!--
78     we consider ourselves to be the "originating" client for requests,
79     which means we define the log XID string for log traces
80     -->
81     <client>true</client>
82
83     <!--  the routers's name on the network -->
84     <router_name>router</router_name>
85
86     <!--
87     These are the services that the gateway will serve. 
88     Any other requests will receive an HTTP_NOT_FOUND (404) 
89     DO NOT put any services here that you don't want the internet to have access to
90     This section will be soon deprecated for multi-domain mode... 
91     -->
92     <services>
93       <service>opensrf.math</service>
94     </services>
95
96     <!-- jabber login info -->
97
98     <!-- The gateway connects to the public domain -->
99     <domain>public.localhost</domain>
100     <username>mylogin</username>
101     <passwd>mypassword</passwd>
102     <port>5222</port>
103     <logfile>LOCALSTATEDIR/log/gateway.log</logfile>
104     <loglevel>3</loglevel>
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>localhost</server>
116                 <!-- also allow private clients to send to the router so it can receive error messages -->
117                 <client>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>osrf</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             <loglevel>2</loglevel>
136         </router>
137         <router> <!-- private router -->
138             <trusted_domains>
139                 <server>localhost</server>
140                 <!-- only clients on the private domain can send requests to this router -->
141                 <client>localhost</client>
142             </trusted_domains>
143             <transport>
144                 <server>localhost</server>
145                 <port>5222</port>
146                 <username>router</username>
147                 <password>osrf</password>
148                 <resource>router</resource>
149                 <connect_timeout>10</connect_timeout>
150                 <max_reconnect_attempts>5</max_reconnect_attempts>
151             </transport>
152             <logfile>LOCALSTATEDIR/log/router.log</logfile>
153             <!--
154             <logfile>syslog</logfile>
155             <syslog>local2</syslog>
156             -->
157             <loglevel>4</loglevel>
158         </router>
159     </routers>
160
161   <!-- ======================================================================================== -->
162
163 </config>