Skip to content

Commit bc25faf

Browse files
Tom Barnesrjeberhard
authored andcommitted
further emphasize need to restart domain after changes
1 parent 4f9b082 commit bc25faf

File tree

1 file changed

+39
-25
lines changed

1 file changed

+39
-25
lines changed

site/config-overrides.md

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
* [Typical overrides](#typical-overrides)
88
* [Unsupported overrides](#unsupported-overrides)
99
* [Override template names and syntax](#override-template-names-and-syntax)
10+
* [Override template names](##override-template-names)
11+
* [Override template macros](##override-template-macros)
12+
* [Override template samples](##override-template-samples)
1013
* [Step-by-step guide](#step-by-step-guide)
1114
* [Debugging](#debugging)
1215
* [Internal design flow](#internal-design-flow)
@@ -18,44 +21,28 @@
1821

1922
Use configuration overrides (also called _situational configuration_) to customize a WebLogic domain home configuration without modifying the domain's actual `config.xml` or system resource files. For example, you may want to override a JDBC datasource XML module user name, password, and URL so that it references a local database.
2023

24+
You can use overrides to customize domains as they are moved from QA to production, are deployed to different sites, or are even deployed multiple times at the same site.
25+
2126
## How do you specify overrides?
2227
* Create a Kubernetes configuration map that contains:
2328
* Override templates (also known as situational configuration templates).
2429
* A file named `version.txt` that contains the string `2.0`.
2530
* Set your domain resource `configOverrides` to the name of this configuration map.
2631
* Create Kubernetes secrets that contain template macro values.
27-
* Set your domain `configOverrideSecrets` to reference the aforementioned secrets. See the example below.
28-
* Start or restart your domain.
32+
* Set your domain `configOverrideSecrets` to reference the aforementioned secrets.
33+
* Stop all running WebLogic server pods in your domain. (See [Server Lifecycle](server-lifecycle.md).)
34+
* Start or restart your domain. (See [Server Lifecycle](server-lifecycle.md).)
2935

30-
Example:
31-
```
32-
apiVersion: "weblogic.oracle/v2"
33-
kind: Domain
34-
metadata:
35-
name: domain1
36-
namespace: default
37-
labels:
38-
weblogic.resourceVersion: domain-v2
39-
weblogic.domainUID: domain1
40-
spec:
41-
[ ... ]
42-
webLogicCredentialsSecret:
43-
name: domain1-wl-credentials-secret
44-
configOverrides: domain1-overrides-config-map
45-
configOverrideSecrets: [domain1-overrides-db1-secret, domain1-config-jms1-secret]
46-
[ ... ]
47-
```
36+
For a detailed walk-through of these steps, [Step-by-step guide](#step-by-step-guide).
4837

4938
## How do overrides work during runtime?
50-
* When a domain is first deployed, or is restarted, the operator will:
39+
* When a domain is first deployed, or is restarted after shutting down all WebLogic server pods, the operator will:
5140
* Resolve any macros in your override templates.
5241
* Place expanded override templates in the `optconfig` directory located in each WebLogic domain home directory.
5342
* When the WebLogic Servers start, they will:
5443
* Automatically load the override files from the `optconfig` directory.
5544
* Use the override values in the override files instead of the values specified in their `config.xml` or system resource XML files.
5645

57-
You can use overrides to customize domains as they are moved from QA to production, are deployed to different sites, or are even deployed multiple times at the same site.
58-
5946
---
6047
# Prerequisites
6148

@@ -264,8 +251,35 @@ The following `jdbc-testDS.xml` override template demonstrates setting the URL,
264251
* Configure the names of each secret in domain CR.
265252
* If the secret contains the WebLogic admin `username` and `password` keys, set the domain CR `webLogicCredentialsSecret` field.
266253
* For all other secrets, add them to domain CR `configOverrideSecrets` field.
254+
* Stop all running WebLogic server pods in your domain. (See [Server Lifecycle](server-lifecycle.md).)
255+
* Start or restart your domain. (See [Server Lifecycle](server-lifecycle.md).)
267256
* See [Debugging](#debugging) for ways to check if the situational configuration is taking effect or if there are errors.
268257
258+
**IMPORTANT: Custom override changes, such as updating an override configuration map, a secret, or a domain resource, will not take effect until all running WebLogic server pods in your domain are shutdown (so no servers are left running), and the domain is subsequently restarted.**
259+
260+
**IMPORTANT: Incorrectly formatted override files are 'somewhat' silently ignored. WebLogic Servers log errors or warnings when they detect an incorrectly formatted configuration override template file, but will still boot, and will skip overriding. So it is important to make sure template files are correct in a QA environment by checking your WebLogic pod logs for situational configuration errors and warnings, before attempting to use them in production.**
261+
262+
263+
Example domain resource yaml:
264+
```
265+
apiVersion: "weblogic.oracle/v2"
266+
kind: Domain
267+
metadata:
268+
name: domain1
269+
namespace: default
270+
labels:
271+
weblogic.resourceVersion: domain-v2
272+
weblogic.domainUID: domain1
273+
spec:
274+
[ ... ]
275+
webLogicCredentialsSecret:
276+
name: domain1-wl-credentials-secret
277+
configOverrides: domain1-overrides-config-map
278+
configOverrideSecrets: [my-secret, my-other-secret]
279+
[ ... ]
280+
```
281+
282+
269283
---
270284
# Debugging
271285
@@ -307,9 +321,9 @@ The following `jdbc-testDS.xml` override template demonstrates setting the URL,
307321
-Dweblogic.debug.DebugSituationalConfigDumpXml=true
308322
```
309323
310-
**IMPORTANT: Custom override changes, such as updating an override configuration map, a secret, or a domain resource, will not take effect until your domain is restarted.**
324+
**IMPORTANT: Custom override changes, such as updating an override configuration map, a secret, or a domain resource, will not take effect until all running WebLogic server pods in your domain are shutdown (so no servers are left running), and the domain is subsequently restarted.**
311325
312-
**IMPORTANT: Incorrectly formatted override files are 'somewhat' silently ignored. WebLogic Servers log errors or warnings, but will still boot, and will skip overriding, when they detect an incorrectly formatted configuration override template file. So it is important to make sure template files are correct in a QA environment by checking your WebLogic pod logs for situational configuration errors and warnings, before attempting to use them in production.**
326+
**IMPORTANT: Incorrectly formatted override files are 'somewhat' silently ignored. WebLogic Servers log errors or warnings when they detect an incorrectly formatted configuration override template file, but will still boot, and will skip overriding. So it is important to make sure template files are correct in a QA environment by checking your WebLogic pod logs for situational configuration errors and warnings, before attempting to use them in production.**
313327
314328
---
315329
# Internal design flow

0 commit comments

Comments
 (0)