Skip to content

Commit ba206b3

Browse files
committed
updating the archive documentation to reflect the current state
1 parent 50dc68d commit ba206b3

File tree

3 files changed

+263
-108
lines changed

3 files changed

+263
-108
lines changed

core/src/main/java/oracle/weblogic/deploy/util/WLSDeployArchive.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ public class WLSDeployArchive {
7676
*/
7777
public static final String ARCHIVE_OPSS_WALLET_PATH = WLSDPLY_ARCHIVE_BINARY_DIR + "/opsswallet";
7878

79-
/**
80-
* Top-level archive subdirectory where the model is stored and the subdirectory to which it will be extracted.
81-
*/
82-
public static final String ARCHIVE_MODEL_TARGET_DIR = "model";
83-
8479
/**
8580
* Top-level archive subdirectory where the applications are stored and the subdirectory to which
8681
* they will be extracted.

documentation/3.0/content/concepts/archive.md

Lines changed: 103 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ weight: 2
66
---
77

88

9-
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.
9+
The archive file is used to deploy binaries and other file resources to the target domain. The archive is a ZIP file
10+
with a specific directory structure. Any file resources referenced in the model that are not already on the target
11+
system must be stored in the correct location in the archive, and the model must reflect the path into the archive.
1012

11-
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.
13+
Note that file resources that already exist on the target system need not be included in the archive, provided that
14+
the model specifies the correct location on the target system.
1215

1316
### Contents
1417

@@ -29,28 +32,20 @@ appDeployments:
2932
ModuleType: ear
3033
```
3134
32-
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`.
35+
The example shows the attribute `SourcePath` of the `simpleear` application with a value of
36+
`wlsdeploy/applications/simpleear.ear`. The prefix `wlsdeploy/` indicates that the resource is located in the archive
37+
file in the specified location, and will be deployed to that directory in the domain, in this case
38+
`<domain-home>/wlsdeploy/applications/simpleear.ear`.
3339

3440
### Archive structure
3541

36-
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.
37-
38-
#### `atpwallet`
39-
40-
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.
41-
42-
#### `model`
43-
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.
44-
45-
#### `opsswallet`
46-
47-
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.
42+
These are the paths within the archive that are used for different types of resources. You can create further
43+
directory structures underneath some of these locations to organize the files and directories as you see fit. The
44+
Archive Helper Tool makes it easy to add, update, and remove entries from the archive file.
4845

4946
#### `wlsdeploy/applications`
50-
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.
51-
52-
{{% notice note %}} Expanded application directories are supported after WebLogic Deploy Tooling release 1.6.2.
53-
{{% /notice %}}
47+
The root directory under which applications and their deployment plans are stored. Applications can be stored in the
48+
archive as EAR, WAR, or JAR files, or as an exploded directory at this location.
5449

5550
A sample expanded WAR application might have these entries:
5651

@@ -63,46 +58,119 @@ wlsdeploy/applications/myApp/WEB-INF/weblogic.xml
6358
```
6459

6560
#### `wlsdeploy/classpathLibraries`
66-
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.
61+
The root directory under which JARs/directories used for server classpaths are stored. Every file resource under this
62+
directory is extracted, even those not referenced in the model.
6763

6864
#### `wlsdeploy/coherence`
69-
The root directory under which empty directories must exist for Coherence persistent stores.
65+
The root directory under which Coherence config files and/or empty directories for Coherence persistent stores.
66+
67+
#### `wlsdeploy/config`
68+
The directory where a MIME mapping property file can be stored.
7069

7170
#### `wlsdeploy/custom`
72-
This is the root directory where your custom files can be stored and extracted from the archive. These files are not collected by the Discover Domain Tool.
73-
Every file resource under this directory is extracted during `createDomain` and `updateDomain`.
71+
This is the root directory where your custom files and directories can be stored and extracted from the archive. These
72+
files are not collected by the Discover Domain Tool. Every file resource under this directory is extracted during
73+
`createDomain` and `updateDomain`.
74+
75+
This location is particularly useful when handling files that live outside an application; for example, a property
76+
file used to configure the application. The general steps to make applications that use such files work when
77+
provisioning them with WDT are:
78+
79+
1. Place the file in the required location inside the `wlsdeploy/custom` folder inside the archive; for example,
80+
`wlsdeploy/custom/com/mycompany/myapp/myapp-config.properties`.
81+
2. Make sure the application is locating the file by `CLASSPATH`; for example, using
82+
`ClassLoader.getResourceAsStream("com/mycompany/myapp/myapp-config.properties")`.
83+
3. Make sure that the server's CLASSPATH includes the `$DOMAIN_HOME/wlsdeploy/custom` directory. One way to achieve
84+
this would be to add a `setUserOverrides.sh` that includes this directory in the `PRE_CLASSPATH` environment
85+
variable to the `wlsdeploy/domainBin` location in the archive file. Don't forget to add `setUserOverrides.sh` to
86+
the `domainInfo/domainBin` of the model so that it gets extracted.
87+
88+
#### `wlsdeploy/dbWallets/<wallet-name>`
89+
90+
The directory where named database wallets can be stored for use with the Oracle database. The `rcu` name is used as
91+
the default location to store a wallet for RCU data sources. The wallet placed into the archive can be either a ZIP
92+
file or a set of one or more files. If it is a ZIP file, that ZIP file will be expanded in place when running WDT
93+
tools like the Create Domain or Update Domain tools.
7494

7595
#### `wlsdeploy/domainBin`
76-
The root directory under which `$DOMAIN_HOME/bin` scripts are stored. Only scripts referenced in the `domainInfo/domainBin` section of the model are extracted.
96+
The root directory under which `$DOMAIN_HOME/bin` scripts are stored. Only scripts referenced in the
97+
`domainInfo/domainBin` section of the model are extracted, as shown in the example.
98+
99+
```yaml
100+
domainInfo:
101+
domainBin:
102+
- wlsdeploy/domainBin/setUserOverrides.sh
103+
```
77104

78105
#### `wlsdeploy/domainLibraries`
79-
The root directory under which `$DOMAIN_HOME/lib` libraries are stored. Only libraries referenced in the `domainInfo/domainLibraries` section of the model are extracted.
106+
The root directory under which `$DOMAIN_HOME/lib` libraries are stored. Domain libraries must be
107+
stored as JAR files. Only libraries referenced in the `domainInfo/domainLibraries` section of the model are extracted,
108+
as shown in the example.
109+
110+
```yaml
111+
domainInfo:
112+
domainLibraries:
113+
- wlsdeploy/domainLibraries/myLibrary.jar
114+
```
115+
116+
#### `wlsdeploy/jms/foreignServer/<jms-foreign-server-name>`
117+
The directory under which a JMS Foreign Server binding file is stored.
80118

81119
#### `wlsdeploy/nodeManager`
82-
The root directory under which Node Manager file resources, such as keystore files, are stored.
120+
The root directory under which Node Manager keystore files are stored.
121+
122+
#### `wlsdeploy/opsswallet`
123+
The directory where a wallet can be stored for use with Oracle Platform Security Services. The wallet placed into the
124+
archive can be either a ZIP file or a set of one or more files. If it is a ZIP file, that ZIP file will be expanded
125+
in place when running WDT tools like the Create Domain or Update Domain tools.
83126

84127
#### `wlsdeploy/scripts`
85-
The root directory under which scripts are stored. These can include JDBC create scripts, and WLDF action scripts.
128+
The root directory under which script files are stored. These can include JDBC create scripts and WLDF action scripts.
86129

87-
#### `wlsdeploy/servers`
88-
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`.
130+
#### `wlsdeploy/servers/<server-name>`
131+
The root directory under which server keystore files are stored. These are organized by server name, such as
132+
`wlsdeploy/server/AdminServer/mykey.jks`.
89133

90134
#### `wlsdeploy/sharedLibraries`
91-
The root directory under which shared libraries are stored. These are stored as JAR files within the archive.
135+
The root directory under which shared libraries and their deployment plans are stored. Shared libraries can be stored
136+
in the archive as EAR, WAR, or JAR files, or as an exploded directory at this location.
92137

93138
#### `wlsdeploy/stores`
94139
The root directory under which empty directories must exist for `FileStore` elements in the model.
95140

141+
#### `wlsdeploy/structuredApplications`
142+
The root directory under which "structured" applications are stored. Applications inside the specified directory
143+
structure can be stored in the archive as EAR or WAR files, or as an exploded directory.
144+
145+
A sample "structured" application might have these entries:
146+
147+
```
148+
wlsdeploy/structuredApplications/myApp/app/webapp.war
149+
wlsdeploy/structuredApplications/myApp/plan/plan.xml
150+
wlsdeploy/structuredApplications/myApp/plan/WEB-INF/weblogic.xml
151+
wlsdeploy/structuredApplications/myApp/plan/AppFileOverrides/updated.properties
152+
```
153+
96154
### Using multiple archive files
97155

98-
The Create Domain, Update Domain, Deploy Applications, and Validate Model Tools allow the specification of multiple archive files on the command line. For example:
156+
The Create Domain, Update Domain, Deploy Applications, and Validate Model Tools allow the specification of multiple
157+
archive files on the command line. For example:
99158

100159
$ weblogic-deploy\bin\createDomain.cmd -archive_file one.zip,two.zip,three.zip ...
101160

102-
File resources can be present in any of these archives. Resources in each archive will supersede resources found in previous archives.
161+
File resources can be present in any of these archives. Resources in each archive will supersede resources found
162+
in previous archives.
103163

104-
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.
164+
When the model references a resource that is present in multiple archives, the latest in the list takes precedence.
165+
For example, if the model references `wlsdeploy/applications/myapp.ear`, and that resource is present in archives
166+
`one.zip` and `two.zip`, the resource in `two.zip` will be used.
105167

106-
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.
168+
A similar rule applies for resources that have an assumed location, but are not specifically called out in the model.
169+
For example, if archive `two.zip` has a wallet in location `atpwallet/wallet2.zip`, and `three.zip` has a wallet in
170+
location `atpwallet/wallet3.zip`, the wallet `atpwallet/wallet3.zip` will be used.
107171

108-
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.
172+
Resources that are extracted without being referenced directly are extracted from the archives in the order specified
173+
in the `archive_file` argument. For example, if `one.zip` and `two.zip` have resources under
174+
`wlsdeploy/classpathLibraries`, the resources in `one.zip` will be extracted to
175+
`<domain-home>/wlsdeploy/classpathLibraries`, then the resources of `two.zip` will be extracted to the same location,
176+
overwriting any overlapping files.

0 commit comments

Comments
 (0)