New WebLogic feature: one deployment to rule them allPublished on: Author: Maarten Droogendijk Category: Java & Web
The release of WebLogic 12.2.1 has introduced some cool features. One of them: the domain partition exports. Could this feature really reduce all the deployments to just one deployment? Let’s find out!
To fully grasp the idea of just needing one deployment, we need to explain Domain Partitions first. As Oracle states: “A domain partition (partition for short) is an administrative and runtime slice of a WebLogic domain. In many ways you can think of a partition as a WebLogic micro-container.” A Domain Partition can be assigned as micro-containers called Resource Groups. Resource Groups can contain WebLogic components such as applications, libraries, JMS Servers and Data Sources.
Resource Groups and Templates
In previous WebLogic versions you would deploy WebLogic components to the whole domain (global) and have it targeted to servers or clusters. Starting from 12.2.1, you can now also deploy these WebLogic components to specific Resource Groups and Resource Groups Templates. Resource Groups can be used to group every component needed in a business flow to one container.
Using Virtual Targets, Administrators can specify on which servers or clusters the Domain Partition is available.
Override set of values
One of the most important things to note, is that you can override a set of values within the Domain Partition. For example, you can override the credentials and URL for a Data Source.
Exporting and importing
Oracle has provided an export and import function for Domain Partitions.
The really nice part is when you export a Domain Partition, you can choose to include the deployed components. This means you will have all the components needed in a single zip-file. Check the full content of the zip-file here.
So for example the development team can create a domain partition with the latest release on their development environment. When they are finished, you simply export the domain partition to a zip-file and import it to your other environments.
Environments with Deployment and Platform Automation tools such as XL Deploy and Puppet will also profit, because of the hugely reduced number of deployments needed to be configured.
Furthermore, using this approach eliminates issues such as missing Data Sources and wrong application versions in the deployment. By using the overrides in the Domain Partitions, Administrators needn’t worry about environment specific values being overwritten.
Cleaning the environment is simple: just delete the Domain Partition.
Note that the import of a Domain Partition will create a new Domain Partition and cannot update an existing Domain Partition.
Domain Partitions can be exported and imported by using WLST commands.
The following WLST command exports Finance-Partition to the /tmp directory.
Application and library binaries are included (optional). /home/oracle/partitionEncryption.key is the encryption key used (optional).
- wls:/mydomain/serverConfig> exportPartition("Finance-Partition", "/tmp/", true, "/home/oracle/partitionEncryption.key")
The following WLST command imports the Finance-Partition.zip archive located in the /tmp directory. /home/oracle/partitionEncryption.key is used as the encryption key.
- wls:/mydomain/serverConfig> importPartition("/tmp/Finance-Partition.zip", keyFile="/home/oracle/partitionEncryption.key")
Oracle JRF support
Unfortunately products that depend on Oracle JRF (Java Required Files) are currently not supported, as described here. This includes the following products:
- Oracle Web Service Manager
- SOA Suite
- Application Development Framework (ADF)
- Oracle Service Bus
- Oracle Enterprise Scheduler
- WebLogic SCA
So… one deployment to rule them all?
Is one deployment all that is needed? Is it really that simple?
It requires your development and deployment process to incorporate domain partitions,
and your deployments cannot include any of the mentioned Oracle JRF products.
But if that’s the case, then yes… One deployment to rule them all!