Skip to content

Commit 1646131

Browse files
revise use cases
1 parent 02e8875 commit 1646131

13 files changed

+739
-688
lines changed
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
+++
2-
title = "Samples"
2+
title = "Model Use Cases"
33
date = 2019-02-22T15:27:54-05:00
44
weight = 3
5-
chapter = true
65
pre = "<b>3. </b>"
76
+++
8-
# Model Use Cases
7+
98

109
These typical use case scenarios show you how some common configurations can be represented in the model.
10+
11+
{{% children style="h4" description="true" %}}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: "Customizing the Administration Server"
3+
date: 2019-02-23T17:19:24-05:00
4+
draft: false
5+
weight: 1
6+
description: "Configure the Administration Server using a domain model."
7+
---
8+
9+
### Administration Server configuration
10+
11+
The Create Domain Tool lets you configure the Administration Server using a domain model. These examples show how some common configurations can be represented in the model.
12+
13+
#### Using the default Administration Server configuration
14+
15+
When the Create Domain Tool is run, the templates associated with your domain type will automatically create an Administration Server named `AdminServer`, with default values for all the attributes. If you don't need to change any of these attributes, such as `ListenAddress` or `ListenPort`, or any of the sub-folders, such as `SSL` or `ServerStart`, nothing needs to be added to the model.
16+
17+
#### Customizing the Administration Server configuration
18+
19+
To customize the configuration of the default Administration Server, you will need to add a server with the default name `AdminServer`. Because you are not changing the name of the Administration Server, there is no need to specify the `AdminServerName` attribute under the topology section. This example shows some attributes and sub-folders:
20+
21+
```yaml
22+
topology:
23+
Server:
24+
AdminServer:
25+
ListenPort: 9071
26+
RestartDelaySeconds: 10
27+
ListenAddress: 'my-host-1'
28+
Log:
29+
FileCount: 9
30+
LogFileSeverity: Info
31+
FileMinSize: 5000
32+
SSL:
33+
HostnameVerificationIgnored: true
34+
JSSEEnabled: true
35+
ListenPort: 9072
36+
Enabled: true
37+
```
38+
39+
The most common problem with this type of configuration is to misspell the name of the folder under `Server`, when it should be `AdminServer`. This will result in the creation of an Administration Server with the default name, and an additional Managed Server with the misspelled name.
40+
41+
#### Configuring the Administration Server with a different name
42+
43+
If you want the Administration Server to have a name other than the default `AdminServer`, you will need to specify that name in the `AdminServerName` attribute, and use that name in the `Server` section. This example uses the name `my-admin-server`:
44+
45+
```yaml
46+
topology:
47+
AdminServerName: 'my-admin-server'
48+
Server:
49+
'my-admin-server':
50+
ListenPort: 9071
51+
RestartDelaySeconds: 10
52+
ListenAddress: 'my-host-1'
53+
Log:
54+
FileCount: 9
55+
LogFileSeverity: Info
56+
FileMinSize: 5000
57+
SSL:
58+
HostnameVerificationIgnored: true
59+
JSSEEnabled: true
60+
ListenPort: 9072
61+
Enabled: true
62+
```
63+
64+
The most common problem with this type of configuration is to mismatch the `AdminServerName` attribute with the name in the `Server` folder. This will change the name of the default Administration Server to the value of `AdminServerName`, and the folder under `Server` to be created as an additional Managed Server.
65+
66+
The name of the Administration Server cannot be changed after domain creation, so any changes to the `AdminServerName` attribute will be ignored by the Update Domain Tool.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Modeling a Configured Cluster"
3+
date: 2019-02-23T17:19:24-05:00
4+
draft: false
5+
weight: 2
6+
description: "A domain model with a typical configuration for a configured cluster."
7+
---
8+
9+
This WDT domain model sample has a typical configuration for a configured cluster with a single managed server, including connection information, logging setup, and other details.
10+
11+
```yaml
12+
topology:
13+
Cluster:
14+
'cluster-1':
15+
ClientCertProxyEnabled: true
16+
AutoMigrationTableName: MIGRATION_1
17+
DataSourceForAutomaticMigration: 'jdbc-1'
18+
ClusterMessagingMode: unicast
19+
FrontendHost: frontend.com
20+
FrontendHTTPPort: 9001
21+
FrontendHTTPSPort: 9002
22+
MigrationBasis: database
23+
NumberOfServersInClusterAddress: 5
24+
WeblogicPluginEnabled: true
25+
26+
Server:
27+
'server-1':
28+
Cluster: 'cluster-1' # this server belongs to cluster-1
29+
ListenAddress: 127.0.0.1
30+
ListenPort: 8001
31+
Machine: 'machine-1'
32+
Log:
33+
DomainLogBroadcastSeverity: Error
34+
FileCount: 7
35+
FileMinSize: 5000
36+
FileName: 'logs/AdminServer.log'
37+
LogFileSeverity: Info
38+
MemoryBufferSeverity: Notice
39+
NumberOfFilesLimited: true
40+
RotateLogOnStartup: true
41+
RotationType: bySize
42+
SSL:
43+
Enabled: true
44+
ListenPort: 8002
45+
ServerStart:
46+
Arguments: '-Dosgi=true -Dtangosol.coherence.management=all'
47+
ClassPath: '/foo/bar,wlsdeploy/classpathLibraries/mylib.jar'
48+
```
49+
There are additional sub-folders and attributes available for more configuration options. These can be determined using the [Model Help Tool]({{< relref "/userguide/tools/model_help.md" >}}). For example, this command will list the attributes and sub-folders for the `Server` folder:
50+
```yaml
51+
${WDT_HOME}/bin/modelHelp.sh -oracle_home /tmp/oracle topology:/Server
52+
```
53+
54+
For this sample, the machine named `machine-1` and the data source named `jdbc-1` should be defined elsewhere within this model, or should already exist in a domain that is being updated.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: "Modeling a JDBC Data Source"
3+
date: 2019-02-23T17:19:24-05:00
4+
draft: false
5+
weight: 3
6+
description: "A domain model with a typical configuration for a JDBC data source."
7+
---
8+
9+
This WDT domain model sample section has a typical configuration for a JDBC data source, including targeting information, connection pool parameters, and other details.
10+
11+
```yaml
12+
resources:
13+
JDBCSystemResource:
14+
'datasource-1':
15+
Target: 'AdminServer,cluster-1'
16+
JdbcResource:
17+
DatasourceType: GENERIC
18+
JDBCConnectionPoolParams:
19+
ConnectionReserveTimeoutSeconds: 10
20+
InitialCapacity: 0
21+
MaxCapacity: 5
22+
MinCapacity: 0
23+
TestConnectionsOnReserve: true
24+
TestTableName: SQL ISVALID
25+
JDBCDriverParams:
26+
DriverName: oracle.jdbc.OracleDriver
27+
PasswordEncrypted: '@@PROP:jdbc.password@@'
28+
URL: 'jdbc:oracle:thin:@//localhost:1521/myDB'
29+
Properties:
30+
user:
31+
Value: scott
32+
```
33+
There are additional sub-folders and attributes available for more configuration options. These can be determined using the [Model Help Tool]({{< relref "/userguide/tools/model_help.md" >}}). For example, this command will list the attributes and sub-folders for the `JDBCSystemResource/JdbcResource` folder:
34+
```yaml
35+
${WDT_HOME}/bin/modelHelp.sh -oracle_home /tmp/oracle resources:/JDBCSystemResource/JdbcResource
36+
```
37+
38+
For this sample, the target cluster `cluster-1` should be defined elsewhere within this model, or should already exist in a domain that is being updated.
39+
40+
It is recommended that credential fields, such as `PasswordEncrypted`, should not be stored as clear text in the model. Those values can be referenced in a separate variables file or in Kubernetes secrets, or the model can be encrypted using the [Encrypt Model Tool]({{< relref "/userguide/tools/encrypt.md" >}}).
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: "Configuring Oracle Diagnostic Logging"
3+
date: 2019-02-23T17:19:24-05:00
4+
draft: false
5+
weight: 8
6+
description: "A model for configuring Oracle Diagnostic Logging (ODL)."
7+
---
8+
9+
10+
Oracle Diagnostic Logging (ODL) can be configured and updated with Create Domain, Update Domain, and Deploy Applications Tools, starting with WDT release 1.5.2.
11+
ODL configuration is only supported for offline mode in WDT. ODL configuration is not added when a model is created using the Discover Domain Tool.
12+
This example shows how some common configuration elements can be represented in the model.
13+
14+
```yaml
15+
resources:
16+
ODLConfiguration:
17+
config1:
18+
Servers: "m1, m2"
19+
AddJvmNumber: true
20+
HandlerDefaults:
21+
abc: r123
22+
xyz: k890
23+
Handler:
24+
'my-handler':
25+
Class: 'com.my.MyHandler'
26+
Level: 'TRACE:32'
27+
ErrorManager: 'com.my.MyErrorManager'
28+
Filter: 'com.my.MyFilter'
29+
Formatter: 'com.my.MyFormatter'
30+
Encoding: 'UTF-8'
31+
Properties:
32+
'path': '/home/me/mypath"
33+
'quicktrace-handler':
34+
Filter: 'oracle:dfw:incident:IncidentDetectionLogFilter'
35+
Properties:
36+
path: '${domain.home}/servers/${weblogic.Name}/logs/${weblogic.Name}-myhistory.log'
37+
useSourceClassandMethod: 'true'
38+
Logger:
39+
'my-logger':
40+
Level: 'NOTIFICATION:1'
41+
UseParentHandlers: true
42+
Filter: 'oracle:dfw:incident:IncidentDetectionLogFilter'
43+
Handlers: 'richard-handler,owsm-message-handler'
44+
'oracle.sysman':
45+
Handlers: [
46+
'my-handler',
47+
'owsm-message-handler'
48+
]
49+
config2:
50+
Servers: 'AdminServer'
51+
HandlerDefaults:
52+
path: '/home/me/otherpath'
53+
maxFileSize: 5242880
54+
```
55+
56+
Each named ODL configuration (such as `config1`) is updated for each of the managed servers in the `Servers` list. Handlers and loggers that exist in the current configuration are updated, and any new ones are created and updated.
57+
58+
Unlike other WDT model elements, ODL configuration is not updated using WLST MBeans. The configuration is written directly to the file system, in the file `<domain_home>/config/fmwconfig/servers/<server>/logging.xml`.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: "Configuring Oracle HTTP Server"
3+
date: 2019-02-23T17:19:24-05:00
4+
draft: false
5+
weight: 9
6+
description: "A model for configuring Oracle HTTP Server (OHS)."
7+
---
8+
9+
Starting with WDT 1.8.0, you can configure and update Oracle HTTP Server (OHS) using the Create Domain, Update Domain, and Deploy Applications Tools, in offline mode only. To discover the OHS configuration, use the Discover Domain Tool, in offline mode only.
10+
11+
#### Prerequisites
12+
13+
In order to configure and use OHS, it must be installed in the Oracle Home directory used to create the domain. You can download OHS [here](https://www.oracle.com/middleware/technologies/webtier-downloads.html).
14+
15+
The OHS template must be present in the WDT domain type definition file used to create or update the domain. For more information on creating a custom definition, see [Domain Type Definitions]({{< relref "/reference/tool_configuration#domain-type-definitions" >}}).
16+
17+
You create a copy of an existing domain type definition file, add the template to that file, and then reference that file on the WDT command line. For example, if you want to create a domain with Oracle HTTP Server based on a Restricted JRF domain, then you would first create a copy of the file `WLSDEPLOY_HOME/lib/typedefs/RestrictedJRF.json` in the same directory, such as `WLSDEPLOY_HOME/lib/typedefs/HttpServer.json`. In this example, you would change the existing `extensionTemplates` section to include the additional OHS template. The original value is:
18+
```
19+
"extensionTemplates": [ "Oracle Restricted JRF", "Oracle Enterprise Manager-Restricted JRF" ],
20+
```
21+
The revised value would be:
22+
```
23+
"extensionTemplates": [ "Oracle Restricted JRF", "Oracle Enterprise Manager-Restricted JRF", "Oracle HTTP Server (Restricted JRF)" ],
24+
```
25+
The file name of this new domain type (without the `.json` extension) is used with the `-domain_type` argument on the WDT command line. For example, the command line to create a domain using the `HttpServer.json` file from the previous steps would look like:
26+
```
27+
WLSDEPLOY_HOME/bin/createDomain -oracle_home /etc/oracle ... -domain_type HttpServer
28+
```
29+
30+
#### Configuring the Model
31+
32+
Configuring OHS typically involves adding two top-level folders to the `resources` section of the model, `SystemComponent` and `OHS`. Here is an example:
33+
```yaml
34+
resources:
35+
SystemComponent:
36+
'my-ohs':
37+
ComponentType: 'OHS'
38+
Machine: 'my-machine'
39+
OHS:
40+
'my-ohs':
41+
AdminHost: '127.0.0.1'
42+
AdminPort: '9324'
43+
ListenAddress: '127.0.0.1'
44+
ListenPort: '7323'
45+
SSLListenPort: '4323'
46+
ServerName: 'http://localhost:7323'
47+
```
48+
Each name under the `OHS` folder must match a name under the `SystemComponent` folder in the model, or the name of a `SystemComponent` element that has been previously created. In this example, the name `my-ohs` is in both places.
49+
50+
The `ComponentType` field of the `SystemComponent` element must be set to `OHS` in order to allow configuration of the corresponding `OHS` folders.
51+
52+
You can use the [Model Help Tool]({{< relref "/userguide/tools/model_help.md" >}}) to determine the complete list of folders and attributes that can be used in these sections of the model. For example, this command will list the attributes in the `OHS` folder:
53+
```yaml
54+
${WDT_HOME}/bin/modelHelp.sh -oracle_home /tmp/oracle resources:/OHS
55+
```
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: "Modeling WebLogic User Password Credential Mapping"
3+
date: 2019-02-23T17:19:24-05:00
4+
draft: false
5+
weight: 7
6+
description: "A model for creating user password credential mappings."
7+
---
8+
9+
10+
11+
The Create Domain Tool can be used to create user password credential mappings for use with the `DefaultCredentialMapper` security provider.
12+
Information in the model will be used to create a credential mapping file that will be imported the first time the Administration Server is started. This example shows how mappings are represented in the model:
13+
```yaml
14+
domainInfo:
15+
WLSUserPasswordCredentialMappings:
16+
CrossDomain:
17+
map1:
18+
RemoteDomain: otherDomain
19+
RemoteUser: otherUser
20+
RemotePassword: '@@PROP:other.pwd@@'
21+
RemoteResource:
22+
map2:
23+
Protocol: http
24+
RemoteHost: remote.host
25+
RemotePort: 7020
26+
Path: /app/buy
27+
Method: POST
28+
User: user1
29+
RemoteUser: remoteUser
30+
RemotePassword: '@@PROP:remote.pwd@@'
31+
map3:
32+
Protocol: https
33+
RemoteHost: remote2.host
34+
RemotePort: 7030
35+
Path: /app/sell
36+
Method: GET
37+
User: 'user1,user2'
38+
RemoteUser: remoteUser2
39+
RemotePassword: '@@PROP:remote2.pwd@@'
40+
```
41+
In this example, the mapping `map1` creates a cross-domain credential mapping that provides access from this domain to the remote domain `otherDomain` as the user `otherUser` with the configured password.
42+
43+
The mapping `map2` creates a remote resource credential mapping that will give the local user `user1` access to a single remote resource on `remote.host` as the user `remoteUser` with the configured password. The mapping `map3` is similar, but provides access to a different remote resource for two local users, `user1` and `user2`.
44+
45+
The names of the mapping sections in the model, such as `map1` and `map2`, are used to group the attributes for each mapping in the model and are not part of the resulting credential mappings. These names should be unique for each mapping of a particular type.

0 commit comments

Comments
 (0)