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