You can use several of the WDT tools
in a CI/CD pipeline. For example, the
createDomain
tool creates a new domain based on a simple model, and
updateDomain
(and deployApps
) uses the same model concept to update
an existing domain (preserving the same domain encryption key). The deployApps
tool is very similar to the updateDomain
tool, but limits what can be updated
to application-related configuration attributes such as data sources and
application archives. The model used by these tools is a sparse set of
attributes needed to create or update the domain. A model can be as sparse
as providing only the WebLogic Server administrative password, although not very
interesting. A good way to get a jumpstart on a model is to use the
discoverDomain
tool in WDT which builds a model based on an existing domain.
Other than the tools themselves, there are three components to the WDT tools:
You can use WLST scripts to create and/or update domains in a CI/CD pipeline. We recommend that you use offline WLST for this purpose. There may be some scenarios where it is necessary to use WLST online, but we recommend that you do that only as an exception, and when absolutely necessary.
If you do not already have WLST scripts, we recommend that you consider using WebLogic Deploy Tooling (WDT) instead. It provides a more declarative approach to domain creation, whereas WLST is more of an imperative scripting language. WDT provides advantages like being able to use the same model with different versions of WebLogic, whereas you may need to update WLST scripts manually when migrating to a new version of WebLogic for example.
WebLogic Server provides tools called “pack” and “unpack” that can be used to “clone” a domain. These tools do not preserve the domain encryption key. You can use these tools to make copies of domains in scenarios when you do not need the same domain encryption key.