blob: 0b551d22f06d4f00090d9774f68c7f09919708e3 [file] [log] [blame]
E. Scott Danielsece5bbe2020-07-21 13:39:18 -04001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. SPDX-License-Identifier: CC-BY-4.0
3.. CAUTION: this document is generated from source in doc/src/rtd.
4.. To make changes edit the source and recompile the document.
5.. Do NOT make changes directly to .rst or .md files.
6
7============================================================================================
8Configuration and Deployment
9============================================================================================
E. Scott Danielsa3a121c2020-05-06 09:07:08 -040010
11
12OVERVIEW
13========
14
E. Scott Danielsece5bbe2020-07-21 13:39:18 -040015The RIC Message Router (RMR) is a library for peer-to-peer
16communication. Applications use the library to send and
17receive messages where the message routing and endpoint
18selection is based on the message type rather than DNS host
19name-IP port combinations.
20
21This document contains information regarding the
22configuration of RMR when it is embedded by a *user
23application* . RMR itself is a library, not a deployable
24entity.
E. Scott Danielsa3a121c2020-05-06 09:07:08 -040025
26
27Configuration
28-------------
29
E. Scott Danielsece5bbe2020-07-21 13:39:18 -040030Many aspects of RMR behavior are controlled via environment
31variables. These values are read when a user application
32invokes the RMR initialization function. This allows these
33variables to be set before the application is started as a
34function of the true environment, or set by the application
35as a means for the application to influence RMR's behaviour.
36The following is a list of environment variables which RMR
37recognizes. Also see the main RMR manual page in the
38development package for more details.
39
40 .. list-table::
41 :widths: auto
42 :header-rows: 0
43 :class: borderless
44
45 * - **RMR_ASYNC_CONN**
46 -
47 Allows the async connection mode to be turned off (by setting
48 the value to 0). When set to 1, or missing from the
49 environment, RMR will invoke the connection interface in the
50 transport mechanism using the non-blocking (async) mode. This
51 will likely result in many "soft failures" (retry) until the
52 connection is established, but allows the application to
53 continue unimpeded should the connection be slow to set up.
54
55 * - **RMR_BIND_IF**
56 -
57 This provides the interface that RMR will bind listen ports
58 to, allowing for a single interface to be used rather than
59 listening across all interfaces. This should be the IP
60 address assigned to the interface that RMR should listen on,
61 and if not defined RMR will listen on all interfaces.
62
63 * - **RMR_CTL_PORT**
64 -
65 This variable defines the port that RMR should open for
66 communications with Route Manager, and other RMR control
67 applications. If not defined, the port 4561 is assumed.
68
69 Previously, the ``RMR_RTG_SVC`` (route table generator
70 service port) was used to define this port. However, a future
71 version of Route Manager will require RMR to connect and
72 request tables, thus that variable is now used to supply the
73 Route Manager's well-known address and port.
74
75 To maintain backwards compatibility with the older Route
76 Manager versions, the presence of this variable in the
77 environment will shift RMR's behaviour with respect to the
78 default value used when ``RMR_RTG_SVC`` is **not** defined.
79
80 When ``RMR_CTL_PORT`` is **defined:** RMR assumes that Route
81 Manager requires RMR to connect and request table updates is
82 made, and the default well-known address for Route manager is
83 used (routemgr:4561).
84
85 When ``RMR_CTL_PORT`` is **undefined:** RMR assumes that
86 Route Manager will connect and push table updates, thus the
87 default listen port (4561) is used.
88
89 To avoid any possible misinterpretation and/or incorrect
90 assumptions on the part of RMR, it is recommended that both
91 the ``RMR_CTL_PORT`` and ``RMR_RTG_SVC`` be defined. In the
92 case where both variables are defined, RMR will behave
93 exactly as is communicated with the variable's values.
94
E. Scott Daniels9c923bc2020-08-03 09:22:20 -040095 * - **RMR_RTREQ_FREQ**
96 -
97 When RMR needs a new route table it will send a request once
98 every ``n`` seconds. The default value for ``n`` is 5, but
99 can be changed if this variable is set prior to invoking the
100 process. Accepted values are between 1 and 300 inclusive.
101
E. Scott Danielsece5bbe2020-07-21 13:39:18 -0400102 * - **RMR_RTG_SVC**
103 -
104 The value of this variable depends on the Route Manager in
105 use.
106
107 When the Route Manager is expecting to connect to an xAPP and
108 push route tables, this variable must indicate the
109 ``port`` which RMR should use to listen for these
110 connections.
111
112 When the Route Manager is expecting RMR to connect and
113 request a table update during initialisation, the variable
114 should be the ``host`` of the Route Manager process.
115
116 The ``RMR_CTL_PORT`` variable (added with the support of
117 sending table update requests to Route manager), controls the
118 behaviour if this variable is not set. See the description of
119 that variable for details.
120
121 * - **RMR_HR_LOG**
122 -
123 By default RMR writes messages to standard error (incorrectly
124 referred to as log messages) in human readable format. If
125 this environment variable is set to 0, the format of standard
126 error messages might be written in some format not easily
127 read by humans. If missing, a value of 1 is assumed.
128
129 * - **RMR_LOG_VLEVEL**
130 -
131 This is a numeric value which corresponds to the verbosity
132 level used to limit messages written to standard error. The
133 lower the number the less chatty RMR functions are during
134 execution. The following is the current relationship between
135 the value set on this variable and the messages written:
136
137
138 .. list-table::
139 :widths: auto
140 :header-rows: 0
141 :class: borderless
142
143 * - **0**
144 -
145 Off; no messages of any sort are written.
146
147 * - **1**
148 -
149 Only critical messages are written (default if this variable
150 does not exist)
151
152 * - **2**
153 -
154 Errors and all messages written with a lower value.
155
156 * - **3**
157 -
158 Warnings and all messages written with a lower value.
159
160 * - **4**
161 -
162 Informational and all messages written with a lower value.
163
164 * - **5**
165 -
166 Debugging mode -- all messages written, however this requires
167 RMR to have been compiled with debugging support enabled.
168
169
170
171 * - **RMR_RTG_ISRAW**
172 -
173 **Deprecated.** Should be set to 1 if the route table
174 generator is sending "plain" messages (not using RMR to send
175 messages), 0 if the RTG is using RMR to send. The default is
176 1 as we don't expect the RTG to use RMR.
177
178 This variable is only recognised when using the NNG transport
179 library as it is not possible to support NNG "raw"
180 communications with other transport libraries. It is also
181 necessary to match the value of this variable with the
182 capabilities of the Route Manager; at some point in the
183 future RMR will assume that all Route Manager messages will
184 arrive via an RMR connection and will ignore this variable.
185
186 * - **RMR_SEED_RT**
187 -
188 This is used to supply a static route table which can be used
189 for debugging, testing, or if no route table generator
190 process is being used to supply the route table. If not
191 defined, no static table is used and RMR will not report
192 *ready* until a table is received. The static route table may
193 contain both the route table (between newrt start and end
194 records), and the MEID map (between meid_map start and end
195 records).
196
197 * - **RMR_SRC_ID**
198 -
199 This is either the name or IP address which is placed into
200 outbound messages as the message source. This will used when
201 an RMR based application uses the rmr_rts_msg() function to
202 return a response to the sender. If not supplied RMR will use
203 the hostname which in some container environments might not
204 be routable.
205
206 The value of this variable is also used for Route Manager
207 messages which are sent via an RMR connection.
208
E. Scott Danielsd07cc972021-04-01 10:05:33 -0400209 * - **RMR_STASH_RT**
210 -
211 Names the file where RMR should write the latest update it
212 receives from the source of route tables (generally Route
213 Manager). This is meant to assist with debugging and/or
214 troubleshooting when it is suspected that route information
215 isn't being sent and/or received correctly. If this variable
216 is not given, RMR will save the last update using the
217 ``RMR_SEED_RT`` variable value and adding a ``.stash`` suffix
218 to the filename so as not to overwrite the static table.
219
E. Scott Danielsece5bbe2020-07-21 13:39:18 -0400220 * - **RMR_VCTL_FILE**
221 -
222 This supplies the name of a verbosity control file. The core
223 RMR functions do not produce messages unless there is a
224 critical failure. However, the route table collection thread,
225 not a part of the main message processing component, can
226 write additional messages to standard error. If this variable
227 is set, RMR will extract the verbosity level for these
228 messages (0 is silent) from the first line of the file.
229 Changes to the file are detected and thus the level can be
230 changed dynamically, however RMR will only suss out this
231 variable during initialisation, so it is impossible to enable
232 verbosity after startup.
233
234 * - **RMR_WARNINGS**
235 -
236 If set to 1, RMR will write some warnings which are
237 non-performance impacting. If the variable is not defined, or
238 set to 0, RMR will not write these additional warnings.
239
240