Skip to content

Commit 52257a8

Browse files
committed
moving release 0.7 changes to github
1 parent 46a5239 commit 52257a8

File tree

133 files changed

+8079
-5268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+8079
-5268
lines changed

.mvn/maven.config-template

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-Dunit-test-wlst-dir=/scratch/jcslcm/jcs122121/oracle_common/common/bin
1+
-Dunit-test-wlst-dir=/u01/oracle/oracle_common/common/bin

README.md

+133-3
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,135 @@ Users can create further directory structures underneath the above locations to
122122

123123
One final note is that the framework is written in such a way to allow the model to be extended for use by other tools. Adding other top-level sections to the model is supported and the existing tooling and framework will simply ignore them, if present. For example, it would be possible to add a `soaComposites` section to the model where SOA composite applications are described and a location within the archive file where those binaries can be stored so that a tool that understands SOA composites and how to deploy them could be run against the same model and archive files.
124124

125-
## The Validate Model Tool
125+
### Model Semantics
126+
127+
When modeling configuration attributes that can have multiple values, the WebLogic Deploy Tooling tries to make this as painless as possible. For example, the `Target` attribute on resources can have zero or more clusters and/or servers specified. When specifying the value of such list attributes, the user has freedom to specify them as a list or as a comma-delimited string (comma is the only recognized delimiter for lists). For attributes where the values can legally contain commas, the items must be specified as a list. Examples of each are shown below.
128+
129+
```$yaml
130+
resources:
131+
JDBCSystemResource:
132+
MyStringDataSource:
133+
Target: 'AdminServer,mycluster'
134+
JdbcResource:
135+
JDBCDataSourceParams:
136+
JNDIName: 'jdbc/generic1, jdbc/special1'
137+
...
138+
MyListDataSource:
139+
Target: [ AdminServer, mycluster ]
140+
JdbcResource:
141+
JDBCDataSourceParams:
142+
JNDIName: [ jdbc/generic2, jdbc/special2 ]
143+
...
144+
WLDFSystemResource:
145+
MyWldfModule:
146+
Target: mycluster
147+
WLDFResource:
148+
Harvester:
149+
HarvestedType:
150+
weblogic.management.runtime.ServerRuntimeMBean:
151+
Enabled: true
152+
HarvestedInstance: [
153+
'com.bea:Name=AdminServer,Type=ServerRuntime',
154+
'com.bea:Name=m1,Type=ServerRuntime'
155+
]
156+
...
157+
```
158+
159+
In the example above, the `Target` attribute is specified 3 different ways, as a comma-separated string, as a list, and as a single string in the case of whether there is only a single target. The `JNDIName` attribute is specified as a comma-separated string and as a list (and the single string also works). On the other hand, the `HarvestedInstances` attribute had to be specified as a list since each element contains commas.
160+
161+
One of the primary goals of the WebLogic Deploy Tooling is to support a sparse model where the user can specify just the configuration needed for a particular situation. What this implies varies somewhat between the tools but in general, this implies that the tools are using an additive model. That is, the tools add to what is already there in the existing domain or domain templates (when creating a new domain) rather than making the domain conform exactly to the specified model. Where it makes sense, a similar, additive approach is taken when setting the value of multi-valued attributes. For example, if the model specified the cluster `mycluster` as the target for an artifact, the tooling will add `mycluster` to any existing list of targets for the artifact. While the development team has tried to mark attributes that do not make sense to merge accordingly in our knowledge base, this behavior can be disabled on an attribute-by-attribute basis by adding an additional annotation in the knowledge base data files. The development team is already thinking about how to handle situations that require a non-additive, converge-to-the-model approach and how that might be supported but this still remains a wish list item. Users with these requirements should raise an issue for this support.
126162

127-
**NOTE: Work on the Validate Model tool to bring it in line with the text below is still in progress.**
163+
One place where the semantics are different is for WebLogic security providers. Because provider ordering is important and to make sure the ordering is correctly set in the newly created domain, the Create Domain tool will look for security providers of each base type (e.g., Authentication Providers, Credential Mappers, etc.) to see if any are included in the model. If so, the tool will make sure that only the providers listed for a type are present in the resulting domain so that the providers are created in the necessary order. For example, if the model specified an `LDAPAuthenticator` and an `LDAPX509IdentityAsserter` similar to what is shown below, the `DefaultAuthenticator` and `DefaultIdentityAsserters` will be deleted. If no providers for a base type are listened in the model, then the default provider(s) will be left untouched.
164+
165+
```$yaml
166+
topology:
167+
SecurityConfiguration:
168+
Realm:
169+
myrealm:
170+
AuthenticationProvider:
171+
My LDAP authenticator:
172+
LDAPAuthenticator:
173+
ControlFlag: SUFFICIENT
174+
PropagateCauseForLoginException: true
175+
EnableGroupMembershipLookupHierarchyCaching: true
176+
Host: myldap.example.com
177+
Port: 389
178+
UserObjectClass: person
179+
GroupHierarchyCacheTTL: 600
180+
SSLEnabled: true
181+
UserNameAttribute: cn
182+
Principal: 'cn=foo,ou=users,dc=example,dc=com'
183+
UserBaseDn: 'OU=Users,DC=example,DC=com'
184+
UserSearchScope: subtree
185+
UserFromNameFilter: '(&(cn=%u)(objectclass=person))'
186+
AllUsersFilter: '(memberOf=CN=foo,OU=mygroups,DC=example,DC=com)'
187+
GroupBaseDN: 'OU=mygroups,DC=example,DC=com'
188+
AllGroupsFilter: '(&(foo)(objectclass=group))'
189+
StaticGroupObjectClass: group
190+
StaticMemberDNAttribute: cn
191+
StaticGroupDNsfromMemberDNFilter: '(&(member=%M)(objectclass=group))'
192+
DynamicGroupObjectClass: group
193+
DynamicGroupNameAttribute: cn
194+
UseRetrievedUserNameAsPrincipal: true
195+
KeepAliveEnabled: true
196+
GuidAttribute: uuid
197+
My LDAP IdentityAsserter:
198+
LDAPX509IdentityAsserter:
199+
ActiveType: AuthenticatedUser
200+
Host: myldap.example.com
201+
Port: 389
202+
SSLEnabled: true
203+
```
204+
205+
To keep the `DefaultAuthenticator` and `DefaultIdentityAsserter`, simply add the default name and types in the correct position in the model's `AuthenticationProvider` list. Settings on the default providers can be changed, if desired, as shown below.
206+
207+
```$yaml
208+
topology:
209+
SecurityConfiguration:
210+
Realm:
211+
myrealm:
212+
AuthenticationProvider:
213+
My LDAP authenticator:
214+
LDAPAuthenticator:
215+
ControlFlag: SUFFICIENT
216+
PropagateCauseForLoginException: true
217+
EnableGroupMembershipLookupHierarchyCaching: true
218+
Host: myldap.example.com
219+
Port: 389
220+
UserObjectClass: person
221+
GroupHierarchyCacheTTL: 600
222+
SSLEnabled: true
223+
UserNameAttribute: cn
224+
Principal: 'cn=foo,ou=users,dc=example,dc=com'
225+
UserBaseDn: 'OU=Users,DC=example,DC=com'
226+
UserSearchScope: subtree
227+
UserFromNameFilter: '(&(cn=%u)(objectclass=person))'
228+
AllUsersFilter: '(memberOf=CN=foo,OU=mygroups,DC=example,DC=com)'
229+
GroupBaseDN: 'OU=mygroups,DC=example,DC=com'
230+
AllGroupsFilter: '(&(foo)(objectclass=group))'
231+
StaticGroupObjectClass: group
232+
StaticMemberDNAttribute: cn
233+
StaticGroupDNsfromMemberDNFilter: '(&(member=%M)(objectclass=group))'
234+
DynamicGroupObjectClass: group
235+
DynamicGroupNameAttribute: cn
236+
UseRetrievedUserNameAsPrincipal: true
237+
KeepAliveEnabled: true
238+
GuidAttribute: uuid
239+
My LDAP IdentityAsserter:
240+
LDAPX509IdentityAsserter:
241+
ActiveType: AuthenticatedUser
242+
Host: myldap.example.com
243+
Port: 389
244+
SSLEnabled: true
245+
DefaultAuthenticator:
246+
DefaultAuthenticator:
247+
ControlFlag: SUFFICIENT
248+
DefaultIdentityAsserter:
249+
DefaultIdentityAsserter:
250+
251+
```
252+
253+
## The Validate Model Tool
128254

129255
When working with a metadata model that drives tooling, it is critical to make it easy both to validate that the model and its related artifacts are well-formed and to provide help on the valid attributes and subfolders for a particular model location. The validate model tool provides both validation and help for model authors as a standalone tool. In addition, the tool is integrated with the `createDomain` and `deployApps` tools to catch validation errors early before any actions are performed on the domain.
130256

@@ -349,7 +475,7 @@ topology:
349475
Security:
350476
Group:
351477
FriscoGroup:
352-
Description: The WLS Deploy development group
478+
Description: The WebLogic Deploy development group
353479
User:
354480
Robert:
355481
Password: '{AES}VFIzVmdwcWNLeHBPaWhyRy82VER6WFV6aHRPbGcwMjQ6bS90OGVSTnJxWTIvZjkrRjpjSzBQUHlOWWpWTT0='
@@ -586,3 +712,7 @@ When creating the archive, the tool will try to gather all binaries, scripts, an
586712

587713
1. Any binaries referenced from the ORACLE_HOME will not be gathered, as they are assumed to exist in any target domain to which model-driven operations will be applied. Doing this is key to allowing the model to be WebLogic Server version independent.
588714
2. In its current form, the Discover Domain Tool will only gather binaries and scripts that are accessible from the local machine. Warnings will be generated for any binaries or scripts that cannot be found but the configuration for those binaries will still be collected, where possible. It is the user's responsibility to add those missing files to the archive in the appropriate locations and edit the the model, as needed, to point to those files inside the archive using the relative path inside the archive (e.g., wlsdeploy/applications/myapp.ear).
715+
716+
## Downloading and Installing the Software
717+
718+
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 version(s) of WebLogic Server installed. Once 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.

core/pom.xml

+54-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
<properties>
1919
<unit-test-wlst-dir>SET_VALUE_WITH_DASH_D_OR_SETTINGS_PROFILE</unit-test-wlst-dir>
20+
<!--
21+
Hack to get around Maven bug so that we can inject the build timestamp into the version class
22+
-->
23+
<weblogic.deploy.build.timestamp>${maven.build.timestamp}</weblogic.deploy.build.timestamp>
24+
<maven.build.timestamp.format>MMM dd, yyyy HH:mm z</maven.build.timestamp.format>
2025
</properties>
2126

2227
<dependencies>
@@ -38,6 +43,34 @@
3843
</dependencies>
3944

4045
<build>
46+
<resources>
47+
<!--
48+
This is filling in the version and build info in the Java class.
49+
The build-helper plugin will pull get the Java class into the
50+
project for compilation and Javadoc generation.
51+
-->
52+
<resource>
53+
<directory>src/main/resources/templates</directory>
54+
<includes>
55+
<include>*.java</include>
56+
</includes>
57+
<filtering>true</filtering>
58+
<targetPath>${project.build.directory}/generated-sources/weblogic-deploy</targetPath>
59+
</resource>
60+
<!--
61+
We need to explicitly list things in src/main/resources that go into the JAR
62+
since we are specifying this resources section, which causes the default
63+
behavior to be disabled.
64+
-->
65+
<resource>
66+
<directory>src/main/resources</directory>
67+
<includes>
68+
<include>oracle/**/*.json</include>
69+
<include>oracle/**/*.properties</include>
70+
</includes>
71+
<filtering>false</filtering>
72+
</resource>
73+
</resources>
4174
<plugins>
4275
<plugin>
4376
<groupId>org.apache.maven.plugins</groupId>
@@ -87,6 +120,27 @@
87120
</execution>
88121
</executions>
89122
</plugin>
123+
<plugin>
124+
<groupId>ru.concerteza.buildnumber</groupId>
125+
<artifactId>maven-jgit-buildnumber-plugin</artifactId>
126+
</plugin>
127+
<plugin>
128+
<groupId>org.codehaus.mojo</groupId>
129+
<artifactId>build-helper-maven-plugin</artifactId>
130+
<executions>
131+
<execution>
132+
<id>add-weblogic-deploy-version-dir</id>
133+
<goals>
134+
<goal>add-source</goal>
135+
</goals>
136+
<configuration>
137+
<sources>
138+
<source>${project.build.directory}/generated-sources/weblogic-deploy</source>
139+
</sources>
140+
</configuration>
141+
</execution>
142+
</executions>
143+
</plugin>
90144
<plugin>
91145
<groupId>org.codehaus.mojo</groupId>
92146
<artifactId>flatten-maven-plugin</artifactId>
@@ -95,10 +149,6 @@
95149
<groupId>org.jacoco</groupId>
96150
<artifactId>jacoco-maven-plugin</artifactId>
97151
</plugin>
98-
<plugin>
99-
<groupId>ru.concerteza.buildnumber</groupId>
100-
<artifactId>maven-jgit-buildnumber-plugin</artifactId>
101-
</plugin>
102152
</plugins>
103153
</build>
104154
</project>

0 commit comments

Comments
 (0)