Make WebLogic Domain Provisioning and Deployment Easy!

The Oracle WebLogic Deploy Tooling (WDT) makes the automation of WebLogic Server domain provisioning and applications deployment easy. Instead of writing WLST scripts that need to be maintained, WDT creates a declarative, metadata model that describes the domain, applications, and the resources used by the applications. This metadata model makes it easy to provision, deploy, and perform domain lifecycle operations in a repeatable fashion, which makes it perfect for the Continuous Delivery of applications.

The WebLogic Deploy Tooling provides maximum flexibility by supporting a wide range of WebLogic Server versions from 10.3.6 to 12.2.1.3. WDT supports both Windows and UNIX operating systems, and provides the following benefits:

Introspects a WebLogic domain into a metadata model (JSON or YAML).

Creates a new WebLogic Server domain using a metadata model and allows version control of the domain configuration.

Updates the configuration of an existing WebLogic Server domain, deploys applications and resources into the domain.

Allows runtime alterations to the metadata model (also referred as the model) before applying it.

Allows the same model to apply to multiple environments by accepting value placeholders provided in a separate property file.

Passwords can be encrypted directly in the model or property file.

Supports a sparse model so that the model only needs to describe what is required for the specific operation without describing other artifacts.

Provides easy validation of the model content and verification that its related artifacts are well-formed.

Allows automation and continuous delivery of deployments.

Facilitates Lift and Shift of the domain into other environments, like Docker images and Kubernetes.

Currently, the project provides five single-purpose tools, all exposed as shell scripts:

The Create Domain Tool (createDomain) understands how to create a domain and populate the domain with all the resources and applications specified in the model.

The Update Domain Tool (updateDomain) understands how to update an existing domain and populate the domain with all the resources and applications specified in the model, either in offline or online mode.

The Deploy Applications Tool (deployApps) understands how to add resources and applications to an existing domain, either in offline or online mode.

The Discover Domain Tool (discoverDomain) introspects an existing domain and creates a model file describing the domain and an archive file of the binaries deployed to the domain.

The Encrypt Model Tool (encryptModel) encrypts the passwords in a model (or its variable file) using a user-provided passphrase.

The Validate Model Tool (validateModel) provides both standalone validation of a model as well as model usage information to help users write or edit their models.

The WebLogic on Docker and Kubernetes projects take advantage of WDT to provision WebLogic domains and deploy applications inside of a Docker image or in a Kubernetes persistent volume (PV). The Discover and Create Domain Tools enable us to take a domain running in a non-Docker/Kubernetes environment and lift and shift them into these environments. Docker/Kubernetes environments require a specific WebLogic configuration (for example, network). The Validate Model Tool provides mechanisms to validate the WebLogic configuration and ensure that it can run in these environments.

We have created a sample in the GitHub WebLogic Docker project, https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain-wdt, to demonstrate how to provision a WebLogic 12.2.1.3 domain inside of a Docker image. The WebLogic domain is configured with a WebLogic dynamic cluster, a simple application deployed, and a data source that connects to an Oracle database running inside of a container. This sample includes a basic WDT model, simple-topology.yaml, that describes the intended configuration of the domain within the Docker image. WDT models can be created and modified using a text editor, following the format and rules described in the README file for the WDT project in GitHub. Alternatively, the model can be created using the WDT Discover Domain Tool to introspect an already existing WebLogic domain.

Domain creation may require the deployment of applications and libraries. This is accomplished by creating a ZIP archive with a specific structure, then referencing those items in the model. This sample creates and deploys a simple ZIP archive, containing a small application WAR. The archive is built in the sample directory prior to creating the Docker image.

This sample deploys a simple, one-page web application contained in a ZIP archive, archive.zip. This archive needs to be built before building the domain Docker image.

$ ./build-archive.sh

Before the domain image is built, we also need the WDT model simple-topology.yaml. If you want to customize this WebLogic domains sample, you can either use an editor to change the model simple-topology.yaml or use the WDT Discover Domain Tool to introspect an already existing WebLogic domain.

The image below shows you a snippet of the sample WDT model simple-topology.yaml where the database password will be encrypted and replaced by the value in the properties file we will supply before running the WebLogic domain containers.

In this sample, each of the Managed Servers in the WebLogic domain have a data source deployed to them. We want to connect the data source to an Oracle database running in a container. Pull the Oracle database image from the Docker Store or the Oracle Container Registry into your local repository.

Verify that the database is running and healthy. The STATUS field shows (healthy) in the output of docker ps.

The database is created with the default password 'Oradoc_db1'. To change the database password, you must use sqlplus. To run sqlplus pull the Oracle Instant Client from the Oracle Container Registry or the Docker Store, and run a sqlplus container with the following command:

The above scenario will give you a WebLogic domain with a dynamic cluster set up on a single host environment. Let’s verify that the servers are running and that the data source connects to the Oracle database running in the container. Invoke the WLS Administration Console by entering this URL in your browser, ‘http://localhost:7001/console’. Log in using the credentials you provided in the domain.properties file.

The WebLogic Deploy Tooling simplifies the provisioning of WebLogic domains, deployment of applications, and the resources these applications need. The WebLogic on Docker/Kubernetes projects take advantage of these tools to simplify the provisioning of domains inside of an image or persisted to a Kubernetes persistent volume. We have released the General Availability version of the WebLogic Kubernetes Operator which simplifies the management of WebLogic domains in Kubernetes. Soon we will release the WebLogic Kubernetes Operator version 2.0 which provides enhancements to the management of WebLogic domains. We continue to provide tooling to make it simple to provision, deploy, and manage WebLogic domains with the goal of providing the greatest degree of flexibility for where these domains can run. We hope this sample is helpful to anyone wanting to use the WebLogic Deploy Tooling for provisioning and deploying WebLogic Server domains, and we look forward to your feedback.