Skip to content

Commit 0ece713

Browse files
author
Tom Barnes
committed
config overrides doc update
1 parent 8ca7075 commit 0ece713

File tree

1 file changed

+15
-4
lines changed
  • docs-source/content/userguide/managing-domains/configoverrides

1 file changed

+15
-4
lines changed

docs-source/content/userguide/managing-domains/configoverrides/_index.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@ Typical attributes for overrides include:
8787
* Server and domain log locations
8888
* Node Manager related configuration
8989
* Changing any existing MBean name
90+
* Adding or removing a module (for example, a JDBC module)
9091

9192
**Specifically, do not use custom overrides for:**
9293

9394
* Adding or removing:
9495
* Servers
9596
* Clusters
9697
* Network Access Points (custom channels)
98+
* Modules
9799
* Changing any of the following:
98100
* Dynamic cluster size
99101
* Default, SSL, and Admin channel `Enabled`, listen address, and port
@@ -122,7 +124,7 @@ The operator requires a different file name format for override templates than W
122124
| JDBC module | `jdbc-MODULENAME.xml` |
123125
| Diagnostics module | `diagnostics-MODULENAME.xml` |
124126

125-
A `MODULENAME` must correspond to the MBean name of a system resource defined in your original `config.xml` file.
127+
A `MODULENAME` must correspond to the MBean name of a system resource defined in your original `config.xml` file. It's not possible to add a new module via overrides. If you need your overrides to setup a new module, then have your original configuration specify 'skeleton' modules that can be overridden.
126128

127129
#### Override template schemas
128130

@@ -184,24 +186,28 @@ The secret macro `SECRETNAME` field must reference the name of a Kubernetes secr
184186

185187
#### Override template syntax special requirements
186188

187-
**Check each item below to ensure custom situational configuration takes effect:**
189+
**Check each item below for best practices and to ensure custom situational configuration takes effect:**
188190

189191
* Reference the name of the current bean and each parent bean in any hierarchy you override.
190192
* Note that the `combine-mode` verbs (`add` and `replace`) should be omitted for beans that are already defined in your original domain home configuration.
191-
* See [Override template samples](#override-template-samples) for examples.
193+
* See [Override template samples](#override-template-samples) for examples.
192194
* Use situational config `replace` and `add` verbs as follows:
193195
* If you are adding a new bean that doesn't already exist in your original domain home `config.xml`, then specify `add` on the MBean itself and on each attribute within the bean.
194196
* See the `server-debug` stanza in [Override template samples](#override-template-samples) for an example.
195197
* If you are adding a new attribute to an existing bean in the domain home `config.xml`, then the attribute needs an `add` verb.
196198
* See the `max-message-size` stanza in [Override template samples](#override-template-samples) for an example.
197199
* If you are changing the value of an existing attribute within a domain home `config.xml`, then the attribute needs a `replace` verb.
198-
* See the `public-address` stanza in [Override template samples](#override-template-samples) for an example.
200+
* See the `public-address` stanza in [Override template samples](#override-template-samples) for an example.
199201
* When overriding `config.xml`:
200202
* The XML namespace (`xmlns:` in the XML) must be exactly as specified in [Override template schemas](#override-template-schemas).
201203
* For example, use `d:` to reference `config.xml` beans and attributes, `f:` for `add` and `replace` `domain-fragment` verbs, and `s:` to reference the situational configuration schema.
202204
* Avoid specifying the domain name stanza, as this may cause some overrides to be ignored (for example, server-template scoped overrides).
203205
* When overriding modules:
204206
* It is a best practice to use XML namespace abbreviations `jms:`, `jdbc:`, and `wldf:` respectively for JMS, JDBC, and WLDF (diagnostics) module override files.
207+
* A module must already exist in your original configuration if you want to override it; it's not possible to add a new module via overrides. If you need your overrides to setup a new module, then have your original configuration specify 'skeleton' modules that can be overridden.
208+
* See [Overriding a data source module](#overriding-a-data-source-module) for best practice advice. Note that similar advice applies generally too other module types.
209+
* Consider having your original configuration reference invalid usernames, passwords, and URLs:
210+
* If your original (non-overridden) configuration references non-working usernames, passwords, and URLS, then this helps guard against accidentally deploying a working configuration that's invalid for the intended environment. For example, if your base configuration references a working QA database, and there is some mistake in setting up overrides, then it's possible the running servers will connect to the QA database when you deploy to your production environment.
205211

206212
#### Override template samples
207213

@@ -240,6 +246,11 @@ The following `config.xml` override file demonstrates:
240246

241247
The following `jdbc-testDS.xml` override template demonstrates setting the URL, user name, and password-encrypted fields of a JDBC module named `testDS` via `secret macros`. The generated situational configuration that replaces the macros with secret values will be located in the `DOMAIN_HOME/optconfig/jdbc` directory. The `password-encrypted` field will be populated with an encrypted value because it uses a secret macro with an `:encrypt` suffix. The secret is named `dbsecret` and contains three keys: `url`, `username`, and `password`.
242248

249+
Best practices for data source modules and their overrides:
250+
251+
* A data source module must already exist in your original configuration if you want to override it; it's not possible to add a new module via overrides. If you need your overrides to setup a new module, then have your original configuration specify 'skeleton' modules that can be overridden. See the next two bullets for the typical contents of a skeleton data source module.
252+
* Set your original (non-overridden) URL, username, and password to invalid values. This helps prevent accidentally starting a server without overrides, and then having the datasource successfully connect to a database that's wrong for the current environment. For example, if these attributes are set to reference a QA database in your original configuration, then a mistake configuring overrides in your production Kubernetes deployment could cause your production applications to use your QA database.
253+
* Set your original (non-overridden) `JDBCConnectionPoolParams` `MinCapacity` and `InitialCapacity` to `0`, and set your original `DriverName` to a reference an existing JDBC Driver. This ensures you can still successfully boot a server even when you have configured invalid URL/username/password values, your database isn't running, and/or you haven't been specified your overrides yet.
243254

244255
```
245256
<?xml version='1.0' encoding='UTF-8'?>

0 commit comments

Comments
 (0)