|
| 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