You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/1.9/content/_index.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,9 @@
1
-
#Oracle WebLogic Server Deploy Tooling
1
+
## WebLogic Deploy Tooling
2
2
3
-
Many organizations are using WebLogic Server, with or without other Oracle Fusion Middleware components, to run their enterprise applications. As more and more organizations move toward Continuous Delivery of their applications, the importance of automated testing grows. Automating WebLogic Server domain creation and application deployment with hand-coded WLST scripts is challenging. After those scripts exist for a project, they must be maintained as the project evolves. The motivation for the Oracle WebLogic Server Deploy Tooling project is to remove the need for most users to write WLST scripts for routine domain creation and application deployment tasks. Instead, the project team can write a declarative, metadata model describing the domain and applications (with their dependent resources), and use one or more of the single-purpose tools provided that perform domain lifecycle operations based on the content of the model. The goal is to make it easy to stand up environments and perform domain lifecycle operations in a repeatable fashion based on a metadata model that can be treated as source and evolve as the project evolves.
3
+
Many organizations are using WebLogic Server, with or without other Oracle Fusion Middleware components, to run their enterprise applications. As more and more organizations move toward Continuous Delivery of their applications, the importance of automated testing grows. Automating WebLogic Server domain creation and application deployment with hand-coded WLST scripts is challenging. After those scripts exist for a project, they must be maintained as the project evolves. WebLogic Deploy Tooling (WDT) removes the need for most users to write WLST scripts for routine domain creation and application deployment tasks. Instead, you can write a declarative, metadata model describing the domain and applications (with their dependent resources), and use one or more of the single-purpose tools that perform domain lifecycle operations based on the content of the model. This makes it easy to stand up environments and perform domain lifecycle operations in a repeatable fashion based on a metadata model that can be treated as source and evolve as the project evolves.
4
4
5
-
## Features of the Oracle WebLogic Server Deploy Tooling
6
5
7
-
Currently, the project provides several single-purpose tools, all exposed as shell scripts (both Windows and UNIX scripts are provided):
6
+
WDT provides several single-purpose tools, all exposed as shell scripts (for both Windows and UNIX):
8
7
9
8
- The [Create Domain Tool]({{< relref "/create.md" >}}) (`createDomain`) understands how to create a domain and populate the domain with all resources and applications specified in the model.
10
9
- The [Update Domain Tool]({{< relref "/update.md" >}}) (`updateDomain`) understands how to update an existing domain and populate the domain with all resources and applications specified in the model, either in offline or online mode.
@@ -21,12 +20,12 @@ Currently, the project provides several single-purpose tools, all exposed as she
21
20
As new use cases are discovered, new tools will likely be added to cover those operations but all will use the metadata model to describe what needs to be done.
22
21
23
22
24
-
##Downloading and Installing the Software
23
+
### Download and Install the Software
25
24
26
25
The Oracle WebLogic Server Deploy Tooling project repository is located at [`https://github.com/oracle/weblogic-deploy-tooling`](https://github.com/oracle/weblogic-deploy-tooling). Binary distributions of the `weblogic-deploy.zip` installer can be downloaded from the [GitHub Releases page](https://github.com/oracle/weblogic-deploy-tooling/releases). To install the software, simply unzip the `weblogic-deploy.zip` installer on a machine that has the desired versions of WebLogic Server installed. After being unzipped, the software is ready to use, just set the `JAVA_HOME` environment variable to point to a Java 7 or higher JDK and the shell scripts are ready to run.
27
26
28
27
29
-
## Supported WLS Versions
28
+
###Supported WLS Versions
30
29
31
30
For the supported WebLogic Server and JDK versions required to run WebLogic Server Deploy Tooling, see [Supported WLS Versions]({{< relref "/wls_versions.md" >}}).
32
31
@@ -40,7 +39,7 @@ For the supported WebLogic Server and JDK versions required to run WebLogic Serv
40
39
41
40
## Developer Guide
42
41
43
-
For information for developers, see the [Developer Guide]({{< relref "/developer/developer_guide.md" >}}).
42
+
For information for developers, see the [Developer Guide]({{< relref "/developer/_index.md" >}}).
This project is structured using the Standard Directory Layout for Maven projects, with two child modules, `core` and `installer`. In addition, there is a `samples` directory with example configurations, and the `site` directory containing project documentation.
12
-
13
-
The `core` module contains the main source code for the project. This includes Jython modules and Java classes, as well as typedef files, alias definitions, and the message bundle. There are unit tests related to this module.
14
-
15
-
Alias definitions are discussed in more detail [here](#alias-definitions).
16
-
17
-
The `installer` module builds the final installer ZIP file. It includes the assembly definitions, start scripts for each tool for Linux and Windows platforms, and configurations for variable injection and logging.
18
-
19
-
A single installer ZIP file is built under the `WLSDEPLOY_HOME/installer/target` directory.
20
-
21
-
There are detailed instructions for building the project [here](#building-weblogic-deploy-tool).
22
-
23
-
## Feature Implementation
24
-
25
-
This section describes how specific features of WebLogic Deploy Tooling are implemented in the source code.
26
-
27
-
### Creator and Deployer Class Hierarchies
28
-
29
-
The creation of individual folders and attributes within the `topology` section of the domain model is accomplished using subclasses of the Jython class `Creator`, in the module `wlsdeploy.tool.create.creator.py`. The `Creator` class provides base methods to recurse through nested folders in the domain model, create or update those folders, and set or update their attributes. Each subclass can override these methods to account for variations in behavior for different functional areas.
30
-
31
-
For example, the `SecurityProviderCreator` subclass overrides the method `_create_named_subtype_mbeans` with special processing to remove all existing security providers, and re-create them from the data in the model.
32
-
33
-
The update of folders and attributes in the `resources` section of the domain model follows a similar pattern, but the base class for these modules is `Deployer` in the module `wlsdeploy.tool.deploy.deployer.py`.
34
-
35
-
The class `TopologyUpdater` is a special subclass of `Deployer` that is used to update elements in the `topology` section after their initial creation.
36
-
37
-
## Alias Definitions
1
+
---
2
+
title: "Alias definitions"
3
+
date: 2019-02-23T17:19:24-05:00
4
+
draft: false
5
+
weight: 3
6
+
---
38
7
39
8
WebLogic Deploy Tool uses a set of JSON configuration files to map folders and attributes in the model to the corresponding WLST MBeans and their attributes. These mappings are referred as 'aliases' throughout the project code and documentation. Each element in the alias definition file has detailed properties that assist in this mapping.
40
9
41
10
The model's folder and attribute names usually match the names of the corresponding elements in WLST. For cases where the names of WLST elements may change across WebLogic Server releases, the names should match the names in the 12.2.1.3 release. The unit test `AttributesTestCase` verifies that this convention is used, and identifies a few exceptions.
42
11
43
12
Attributes that are introduced after the 12.2.1.3 release should, in most cases, match the name of the first WebLogic Server release in which they appear. The unit test `AttributesTestCase` will ignore these for now, because they will not be present in the 12.2.1.3 alias structure.
44
-
13
+
45
14
The alias definition files reside in the directory:
Each definition file corresponds to a second-level folder within the model, such as `JDBCSystemResource`. Any elements below a second-level folder are defined in the file of that parent. For example, the model element `resources/JDBCSystemResource/JdbcResource/JDBCConnectionPoolParams` is described in `JDBCSystemResource.json`.
18
+
Each definition file corresponds to a second-level folder within the model, such as `JDBCSystemResource`. Any elements below a second-level folder are defined in the file of that parent. For example, the model element `resources/JDBCSystemResource/JdbcResource/JDBCConnectionPoolParams` is described in `JDBCSystemResource.json`.
50
19
51
20
Top-level elements such as `topology` and `resources` are for organizational purposes, and are not represented in the alias definition files.
52
21
53
22
No elements in the `domainInfo` section of the model are represented in the alias definitions, because they don't correspond directly to WLST elements.
54
23
55
-
This example, from the file `JDBCSystemResource.json`, will be used as a reference in the descriptions below:
24
+
This example, from the file `JDBCSystemResource.json`, will be used as a reference in the descriptions below:
56
25
57
26
```yaml
58
27
{
@@ -68,19 +37,19 @@ This example, from the file `JDBCSystemResource.json`, will be used as a referen
@@ -95,7 +64,7 @@ This example, from the file `JDBCSystemResource.json`, will be used as a referen
95
64
96
65
Notations similar to `${Jdbc:JDBC}Resource` appear throughout this example, and other alias definition files. It is shorthand for the common situation where a value is different between offline and online WLST. The value before the colon is used in offline processing, and the value after is used for online. In this example, the value for `wlst_type` is `JdbcResource` in offline, and `JDBCResource` in online. This notation can be used for values in most places in the model. It cannot be used for key values, such as `wlst_type`.
97
66
98
-
### Keys for Top Level and `folders`Elements
67
+
### Keys for top level and `folders`elements
99
68
100
69
These JSON keys are applicable for the top-level element (such as `JDBCSystemResource`), and each of its nested `folders` elements (such as `JdbcResource` and `JdbcResource/JDBCConnectionPoolParams`.
101
70
@@ -111,15 +80,15 @@ This value specifies how the tool will map the domain model element to one or mo
111
80
112
81
-`single-unpredictable` - this element represents a single MBean, but the MBean name must be derived at runtime.
113
82
114
-
-`multiple` - this element contains multiple named elements (such as `dataSource1`, `dataSource2`), and each represents a single MBean.
83
+
-`multiple` - this element contains multiple named elements (such as `dataSource1`, `dataSource2`), and each represents a single MBean.
115
84
116
85
#### `folders`
117
86
118
87
Nested WLST MBean types for the current MBean are listed here. Each has a domain model type name, followed by its own JSON keyed elements.
119
-
88
+
120
89
#### `wlst_attributes_path`
121
90
122
-
This key element specifies the name of the path expression used for navigating to the MBean attributes folder. The actual path expression is defined later in the `"wlst_paths": { }` element.
91
+
This key element specifies the name of the path expression used for navigating to the MBean attributes folder. The actual path expression is defined later in the `"wlst_paths": { }` element.
123
92
124
93
#### `wlst_paths`
125
94
@@ -136,9 +105,9 @@ Each child of an `attributes` element represents a single MBean attribute, and i
136
105
#### `version`
137
106
138
107
This key element defines the applicable versions for a particular MBean attribute description. Maven versioning conventions are used to describe ranges and limits. For example:
139
-
108
+
140
109
`"version": "[10,)"`
141
-
110
+
142
111
Specifies that an MBean attribute description is relevant for WebLogic Server version 10 and later
143
112
144
113
#### `wlst_mode`
@@ -159,7 +128,7 @@ This key element specifies the data type used to read the WLST MBean attribute.
159
128
160
129
#### `get_method`
161
130
162
-
This key element specifies which method should be used for retrieving the value the MBean attribute. Valid values are:
131
+
This key element specifies which method should be used for retrieving the value the MBean attribute. Valid values are:
163
132
164
133
-`GET` use the WLST get method to retrieve the value of the attribute
165
134
-`LSA` use ls(type='a') to retrieve the value of the attribute
@@ -170,11 +139,11 @@ This key element specifies which method should be used for retrieving the value
170
139
By default, an attribute is read write in both WLST and MODEL. This element is used to set an attribute to read-only. The two read-only attributes are `RO` and `ROD`. The latter indicates that the attribute is read-only and will not be written into the domain. However, it will be discovered by the discover tool into the model.
171
140
#### `preferred_model_type`
172
141
173
-
This key element specifies the preferred data type that should be used to put data in the model during discovery. As an example, list values can be represented in the model as comma-separated text, such as `"value1, value2"`, or as a YAML list, such as `["value1", "value2"]`. If the list values can contain commas, it is preferred to use a YAML list.
142
+
This key element specifies the preferred data type that should be used to put data in the model during discovery. As an example, list values can be represented in the model as comma-separated text, such as `"value1, value2"`, or as a YAML list, such as `["value1", "value2"]`. If the list values can contain commas, it is preferred to use a YAML list.
174
143
175
144
#### `wlst_path`
176
145
177
-
This key element specifies the name of the path expression used for navigating to the MBean attribute's folder. This name maps to an entry in the parent folder's `"wlst_paths": { }` list.
146
+
This key element specifies the name of the path expression used for navigating to the MBean attribute's folder. This name maps to an entry in the parent folder's `"wlst_paths": { }` list.
178
147
179
148
#### `value`
180
149
@@ -184,12 +153,12 @@ This key element is used to specify the default value of the MBean attribute. Fo
184
153
185
154
#### `set_method`
186
155
187
-
For cases where attributes cannot be set with simple types, it may be necessary to use a custom method to set the value. For example, most `Target` attributes require their values to be set as lists of MBeans, in online mode. This may be defined as:
156
+
For cases where attributes cannot be set with simple types, it may be necessary to use a custom method to set the value. For example, most `Target` attributes require their values to be set as lists of MBeans, in online mode. This may be defined as:
@@ -199,44 +168,3 @@ The method `set_target_mbeans` directs the tool to call the Jython method `attri
199
168
#### `set_mbean_type`
200
169
201
170
When a `set_method` key is specified, it may be required to specify the MBean type for the set method to use (see the example under `set_method`).
202
-
203
-
## Building WebLogic Deploy Tool
204
-
205
-
### Prerequisite
206
-
207
-
You will need the following software installed in your local build environment
208
-
209
-
1. Oracle WebLogic Server installation version 12.2.1 and later
210
-
2. JDK version 8
211
-
3. Maven 3 and later
212
-
213
-
### Specifying the WLST location
214
-
215
-
Execution of the unit tests requires a WebLogic Server installation, because the tests must be run within WLST.
216
-
217
-
The WLST directory can be specified in one of two ways:
218
-
219
-
- Specify the `-Dunit-test-wlst-dir=<wlst-directory>` on the mvn command line.
220
-
221
-
- Create a file `.mvn/maven.config` file in the project directory, containing a single line with the `-Dunit-test-wlst-dir=<wlst-directory>` value. The `.mvn` directory contains a `maven.config-template` file that can be copied and used as a starting point.
222
-
223
-
In these cases, `<wlst-directory>` refers to the fully-qualified path to the WLST script (`wlst.sh` or `wlst.cmd`).
224
-
225
-
If you are using an IDE for development and building, creating a `maven-config` file will allow some Maven tasks to be performed within the IDE.
226
-
227
-
### Build Commands
228
-
229
-
If you are making changes to the project, you can build the project using this command line:
This will build the entire project and run the unit tests. Omit the `-Dunit-test-wlst-dir=` argument if you have created a `maven.config` file, as described above.
234
-
235
-
Another option for specifying the WLST directory is to set the environment variable WLST_DIR. It is not necessary to use both, and
236
-
the -D setting will take precedence.
237
-
238
-
If you are not making changes and are only interested in building the latest version, then you can skip the unit tests, using this command line:
239
-
240
-
`mvn -DskipTests clean install`
241
-
242
-
The resulting installer ZIP file built is under the `WLSDEPLOY_HOME/installer/target` directory.
0 commit comments