Skip to content

Commit 9008e63

Browse files
rakillenddsharpe
authored andcommitted
JIRA WDT-322 Document the archive file (#514)
* JIRA WDT-322 Document the archive file
1 parent 12b64ca commit 9008e63

File tree

2 files changed

+94
-14
lines changed

2 files changed

+94
-14
lines changed

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Many organizations are using WebLogic Server, with or without other Oracle Fusio
2626
- [ODL Configuration](site/odl_configuration.md)
2727
- [Variable Injection](site/variable_injection.md)
2828
- [Model Filters](site/tool_filters.md)
29+
- [The Archive File](site/archive.md)
2930
- [Downloading and Installing](#downloading-and-installing-the-software)
3031
- [Developer Guide](site/developer/developer_guide.md)
3132
- [Known Issues](KnownIssues.md)
@@ -134,20 +135,7 @@ Second, notice that the `jsf#2.0` shared library `SourcePath` attribute value st
134135
- `@@PWD@@` - The current working directory from which the tool was invoked.
135136
- `@@TMP@@` - The location of the temporary directory, as controlled by the `java.io.tmpdir` system property.
136137

137-
All binaries needed to supplement the model must be specified in an archive file, which is just a ZIP file with a specified directory structure. For convenience, the model can also be stored inside the ZIP file, if desired. Any binaries not already on the target system at the model-specified location must be stored in the correct location in the ZIP file and the model must reflect the path into the ZIP file. For example, the example above shows the `simpleear` application `SourcePath` value of `wlsdeploy/applications/simpleear.ear`. This is the location of the application binary within the archive file. It will also be the location of the binary in the target environment; that location is relative to the domain home directory. The archive structure is as follows:
138-
139-
- `model` - The directory where the model is optionally located. Only one model file, either in YAML or JSON, is allowed and it must have the appropriate YAML or JSON file extension.
140-
- `wlsdeploy` - The root directory of all binaries, scripts, and directories created by the Oracle WebLogic Server Deploy Tooling.
141-
142-
Within the `wlsdeploy` directory, the binaries are further segregated as follows:
143-
144-
- `wlsdeploy/applications` - The root directory under which all applications are stored.
145-
- `wlsdeploy/sharedLibraries` - The root directory under which all shared libraries are stored.
146-
- `wlsdeploy/domainLibraries` - The root directory under which all `$DOMAIN_HOME/lib` libraries are stored.
147-
- `wlsdeploy/classpathLibraries` - The root directory under which all JARs/directories that are to be added to the server classpath are stored.
148-
- `wlsdeploy/stores` - The root directory under which empty File Store directories must exist.
149-
- `wlsdeploy/coherence` - The root directory under which empty Coherence persistent store directories must exist.
150-
- `wlsdeploy/scripts` - The root directory under which any scripts are stored.
138+
The example above shows the attribute `SourcePath` of the `simpleear` application with a value of `wlsdeploy/applications/simpleear.ear`. The prefix `wlsdeploy/` indicates that the resource is located in the archive file in the specified location, and will be deployed to that directory within the domain, in this case `<domain-home>/wlsdeploy/applications/simpleear.ear`. See [The Archive File](site/archive.md) for more details about using the archive file.
151139

152140
Users can create further directory structures underneath the above locations to organize the files and directories as they see fit. Note that any binary that already exists on the target system need not be included in the archive provided that the model specified the correct location on the target system.
153141

site/archive.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# The Archive File
2+
3+
The archive file is used to deploy binaries and other file resources to the target domain. The archive is a ZIP file with a specific directory structure. Any file resources referenced in the model that are not already on the target system must be stored in the correct location in the archive, and the model must reflect the path into the archive. The model itself can also be stored inside the archive, if desired.
4+
5+
Note that file resources that already exist on the target system need not be included in the archive, provided that the model specifies the correct location on the target system.
6+
7+
- [Example](#example)
8+
- [Archive Structure](#archive-structure)
9+
- [Using Multiple Archive Files](#using-multiple-archive-files)
10+
11+
## Example
12+
13+
This example shows an application with a `SourcePath` value referencing an EAR file resource contained in the archive.
14+
15+
```yaml
16+
appDeployments:
17+
Application:
18+
simpleear :
19+
SourcePath: wlsdeploy/applications/simpleear.ear
20+
Target: 'my-cluster'
21+
ModuleType: ear
22+
```
23+
24+
The example above shows the attribute `SourcePath` of the `simpleear` application with a value of `wlsdeploy/applications/simpleear.ear`. The prefix `wlsdeploy/` indicates that the resource is located in the archive file in the specified location, and will be deployed to that directory in the domain, in this case `<domain-home>/wlsdeploy/applications/simpleear.ear`.
25+
26+
## Archive Structure
27+
28+
These are the paths within the archive that are used for different types of resources. Users can create further directory structures underneath these locations to organize the files and directories as they see fit.
29+
30+
### `atpwallet`
31+
32+
The directory where a wallet can be stored for use with Oracle Autonomous Transaction Processing Cloud Database. The file resource name is not specified in the model, and is assumed to be a single ZIP file in the archive at this location.
33+
34+
### `model`
35+
The directory where the model is optionally located. Only one model file, either in YAML or JSON, is allowed, and it must have the appropriate YAML or JSON file extension.
36+
37+
### `opsswallet`
38+
39+
The directory where a wallet can be stored for use with Oracle Platform Security Services. The file resource name is not specified in the model, and is assumed to be a single ZIP file in the archive at this location.
40+
41+
### `wlsdeploy/applications`
42+
The root directory under which applications are stored. Applications can be stored in the archive as EAR or WAR files, or expanded* under this folder. A sample expanded WAR application might have these entries:
43+
```
44+
wlsdeploy/applications/myApp/index.jsp
45+
wlsdeploy/applications/myApp/META-INF/MANIFEST.MF
46+
wlsdeploy/applications/myApp/WEB-INF/classes/MyClass.class
47+
wlsdeploy/applications/myApp/WEB-INF/web.xml
48+
wlsdeploy/applications/myApp/WEB-INF/weblogic.xml
49+
```
50+
51+
\* Expanded application directories are supported after WebLogic Deploy Tooling release 1.6.2
52+
53+
### `wlsdeploy/classpathLibraries`
54+
The root directory under which JARs/directories used for server classpaths are stored. Every file resource under this directory is extracted, even those not referenced in the model.
55+
56+
### `wlsdeploy/coherence`
57+
The root directory under which empty directories must exist for Coherence persistent stores.
58+
59+
### `wlsdeploy/domainBin`
60+
The root directory under which $DOMAIN_HOME/bin scripts are stored. Only scripts referenced in the `domainInfo/domainBin` section of the model are extracted.
61+
62+
### `wlsdeploy/domainLibraries`
63+
The root directory under which `$DOMAIN_HOME/lib` libraries are stored. Only libraries referenced in the `domainInfo/domainLibraries` section of the model are extracted.
64+
65+
### `wlsdeploy/nodeManager`
66+
The root directory under which node manager file resources, such as keystore files, are stored.
67+
68+
### `wlsdeploy/scripts`
69+
The root directory under which scripts are stored. These can include JDBC create scripts, and WLDF action scripts.
70+
71+
### `wlsdeploy/servers`
72+
The root directory under which server files, such as keystore files, are stored. These are organized by server name, such as `wlsdeploy/server/my-server/mykey.jks`
73+
74+
### `wlsdeploy/sharedLibraries`
75+
The root directory under which shared libraries are stored. These are stored as JAR files within the archive.
76+
77+
### `wlsdeploy/stores`
78+
The root directory under which empty directories must exist for `FileStore` elements in the model.
79+
80+
## Using Multiple Archive Files
81+
82+
The Create Domain, Update Domain, Deploy Applications, and Validate Model Tools allow the specification of multiple archive files on the command line. For example:
83+
84+
weblogic-deploy\bin\createDomain.cmd -archive_file one.zip,two.zip,three.zip ...
85+
86+
File resources can be present in any of these archives. Resources in each archive will supersede resources found in previous archives.
87+
88+
When the model references a resource that is present in multiple archives, the latest in the list takes precedence. For example, if the model references `wlsdeploy/applications/myapp.ear`, and that resource is present in archives `one.zip` and `two.zip`, the resource in `two.zip` will be used.
89+
90+
A similar rule applies for resources that have an assumed location, but are not specifically called out in the model. For example, if archive `two.zip` has a wallet in location `atpwallet/wallet2.zip`, and `three.zip` has a wallet in location `atpwallet/wallet3.zip`, the wallet `atpwallet/wallet3.zip` will be used.
91+
92+
Resources that are extracted without being referenced directly are extracted from the archives in the order specified in the `archive_file` argument. For example, if `one.zip` and `two.zip` have resources under `wlsdeploy/classpathLibraries`, the resources in `one.zip` will be extracted to `<domain-home>/wlsdeploy/classpathLibraries`, then the resources of `two.zip` will be extracted to the same location, overwriting any overlapping files.

0 commit comments

Comments
 (0)