Skip to content

Commit ad1abe3

Browse files
authoredApr 3, 2019
JIRA WDT 299 admin server name problems (#335)
* JIRA WDT-299 - Avoid misleading logging when admin server name is in model; discover admin server name * JIRA WDT-299 - Added a document describing admin server configuration * JIRA WDT-299 - Revised wording * JIRA WDT-299 - Use back ticks instead of asterisks * JIRA WDT-299 - Revised wording * JIRA WDT-299 - Revised wording * JIRA WDT-299 - Revised wording
1 parent 4be955e commit ad1abe3

File tree

6 files changed

+84
-9
lines changed

6 files changed

+84
-9
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Many organizations are using WebLogic Server, with or without other Oracle Fusio
1515
- [Simple Example](#simple-example)
1616
- [Model Names](#model-names)
1717
- [Model Semantics](#model-semantics)
18+
- [Administration Server Configuration](site/admin_server.md)
1819
- [Modeling Security Providers](site/security_providers.md)
1920
- [JRF Trust Service Identity Asserter](site/security_providers.md#trust-service-identity-asserter)
2021
- [Custom Security Providers](site/security_providers.md#custom-security-providers)

‎core/src/main/python/wlsdeploy/aliases/model_constants.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
APP_DIR = 'AppDir'
2020
APPLICATION = 'Application'
2121
RCU_DB_INFO = 'RCUDbInfo'
22-
RCU_PREFIX= 'rcu_prefix'
23-
RCU_SCHEMA_PASSWORD= 'rcu_schema_password'
22+
RCU_PREFIX = 'rcu_prefix'
23+
RCU_SCHEMA_PASSWORD = 'rcu_schema_password'
2424
RCU_ADMIN_PASSWORD = 'rcu_admin_password'
2525
RCU_DB_CONN = 'rcu_db_conn_string'
2626
RCU_VARIABLES = 'rcu_variables'
@@ -223,7 +223,7 @@
223223
SERVER_START_MODE = 'ServerStartMode'
224224
SERVER_TEMPLATE = 'ServerTemplate'
225225
SHUTDOWN_CLASS = 'ShutdownClass'
226-
SINGLETON_SERVICE= 'SingletonService'
226+
SINGLETON_SERVICE = 'SingletonService'
227227
SMTP_NOTIFICATION = 'SMTPNotification'
228228
SNMP_NOTIFICATION = 'SNMPNotification'
229229
SOURCE_DESTINATION = 'SourceDestination'
@@ -349,3 +349,10 @@
349349
RESOURCES,
350350
APP_DEPLOYMENTS
351351
]
352+
353+
# these domain attributes have special processing in create,
354+
# and should be skipped in regular attribute processing.
355+
CREATE_ONLY_DOMAIN_ATTRIBUTES = [
356+
DOMAIN_NAME,
357+
ADMIN_SERVER_NAME
358+
]

‎core/src/main/python/wlsdeploy/tool/create/domain_creator.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from wlsdeploy.aliases.model_constants import ATP_DEFAULT_TABLESPACE
1616
from wlsdeploy.aliases.model_constants import ATP_TEMPORARY_TABLESPACE
1717
from wlsdeploy.aliases.model_constants import CLUSTER
18+
from wlsdeploy.aliases.model_constants import CREATE_ONLY_DOMAIN_ATTRIBUTES
1819
from wlsdeploy.aliases.model_constants import DEFAULT_ADMIN_SERVER_NAME
1920
from wlsdeploy.aliases.model_constants import DEFAULT_WLS_DOMAIN_NAME
2021
from wlsdeploy.aliases.model_constants import DOMAIN_NAME
@@ -1038,8 +1039,12 @@ def __set_domain_attributes(self):
10381039
_method_name = '__set_domain_attributes'
10391040
self.logger.finer('WLSDPLY-12231', self._domain_name, class_name=self.__class_name, method_name=_method_name)
10401041
attrib_dict = dictionary_utils.get_dictionary_attributes(self.model.get_model_topology())
1041-
if DOMAIN_NAME in attrib_dict:
1042-
del attrib_dict[DOMAIN_NAME]
1042+
1043+
# skip any attributes that have special handling
1044+
for attribute in CREATE_ONLY_DOMAIN_ATTRIBUTES:
1045+
if attribute in attrib_dict:
1046+
del attrib_dict[attribute]
1047+
10431048
location = LocationContext()
10441049
attribute_path = self.alias_helper.get_wlst_attributes_path(location)
10451050
self.wlst_helper.cd(attribute_path)

‎core/src/main/python/wlsdeploy/tool/deploy/topology_updater.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from wlsdeploy.aliases.location_context import LocationContext
66
from wlsdeploy.aliases.model_constants import ADMIN_CONSOLE
77
from wlsdeploy.aliases.model_constants import CLUSTER
8-
from wlsdeploy.aliases.model_constants import DOMAIN_NAME
8+
from wlsdeploy.aliases.model_constants import CREATE_ONLY_DOMAIN_ATTRIBUTES
99
from wlsdeploy.aliases.model_constants import MACHINE
1010
from wlsdeploy.aliases.model_constants import MIGRATABLE_TARGET
1111
from wlsdeploy.aliases.model_constants import SECURITY
@@ -143,8 +143,12 @@ def _set_domain_attributes(self):
143143
self.logger.fine('WLSDPLY-09700', self.model_context.get_domain_name(), class_name=self._class_name,
144144
method_name=_method_name)
145145
attrib_dict = dictionary_utils.get_dictionary_attributes(self._topology)
146-
if DOMAIN_NAME in attrib_dict:
147-
del attrib_dict[DOMAIN_NAME]
146+
147+
# skip any attributes that have special handling in create
148+
for attribute in CREATE_ONLY_DOMAIN_ATTRIBUTES:
149+
if attribute in attrib_dict:
150+
del attrib_dict[attribute]
151+
148152
location = LocationContext()
149153
attribute_path = self.alias_helper.get_wlst_attributes_path(location)
150154
self.wlst_helper.cd(attribute_path)

‎core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/Domain.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"folders": {},
66
"attributes": {
77
"Active": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "Active", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean", "access": "RO" } ],
8-
"AdminServerName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AdminServerName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "RO"} ],
8+
"AdminServerName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AdminServerName", "wlst_path": "WP001", "value": {"default": "AdminServer" }, "wlst_type": "string" } ],
99
"AdministrationMBeanAuditingEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AdministrationMBeanAuditingEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
1010
"AdministrationPort": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AdministrationPort", "wlst_path": "WP001", "value": {"default": 9002 }, "wlst_type": "integer" } ],
1111
"AdministrationPortEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AdministrationPortEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],

‎site/admin_server.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Administration Server Configuration
2+
3+
The Create Domain Tool allows you to configure the Administration Server using a domain model. These examples show how some common configurations can be represented in the model.
4+
5+
### Using the Default Administration Server Configuration
6+
7+
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.
8+
9+
### Customizing the Administration Server Configuration
10+
11+
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:
12+
13+
```yaml
14+
topology:
15+
Server:
16+
AdminServer:
17+
ListenPort: 9071
18+
RestartDelaySeconds: 10
19+
ListenAddress: 'my-host-1'
20+
Log:
21+
FileCount: 9
22+
LogFileSeverity: Info
23+
FileMinSize: 5000
24+
SSL:
25+
HostnameVerificationIgnored: true
26+
JSSEEnabled: true
27+
ListenPort: 9072
28+
Enabled: true
29+
```
30+
31+
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.
32+
33+
### Configuring the Administration Server with a Different Name
34+
35+
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`:
36+
37+
```yaml
38+
topology:
39+
AdminServerName: 'my-admin-server'
40+
Server:
41+
'my-admin-server':
42+
ListenPort: 9071
43+
RestartDelaySeconds: 10
44+
ListenAddress: 'my-host-1'
45+
Log:
46+
FileCount: 9
47+
LogFileSeverity: Info
48+
FileMinSize: 5000
49+
SSL:
50+
HostnameVerificationIgnored: true
51+
JSSEEnabled: true
52+
ListenPort: 9072
53+
Enabled: true
54+
```
55+
56+
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.
57+
58+
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.

0 commit comments

Comments
 (0)
Please sign in to comment.