Under the covers
Here’s some insight into what’s happening under the covers during the Quick Start tutorial.
-
The Quick Start guide first installs the WebLogic Kubernetes Operator, then creates a domain using the Model in Image domain home source type.
- For a comparison of Model in Image to other domain home source types, see Choose a domain home source type .
- To learn more about Model in Image domains, see the detailed Model in Image user guide.
- Also recommended, review a detailed Model in Image sample here .
-
The WebLogic domain configuration is specified using the WebLogic Deployment Tool (WDT) model YAML file in a separate auxiliary image.
- The auxiliary image contains a WebLogic domain and WebLogic application defined by using WDT model YAML and application archive files.
- To learn more about auxiliary images, see the user guide .
- If you want to step through the auxiliary image creation process, follow the instructions in the Advanced do-it-yourself section.
-
The operator detects the domain and cluster resources, and deploys their WebLogic Server Administration Server and Managed Server pods.
Advanced do-it-yourself
The following instructions guide you, step-by-step, through the process of creating the Quick Start auxiliary image using the WebLogic Image Tool (WIT). These steps help you understand and customize auxiliary image creation. Then you’ll see how to use that image in the domain creation.
Prerequisites.
-
The
JAVA_HOMEenvironment variable must be set and must reference a valid JDK 8 or 11 installation. -
Download the latest WebLogic Deploy Tooling (WDT) and WebLogic Image Tool (WIT) installer ZIP files to a new directory; for example, use directory
/tmp/quickstart/tools. Both WDT and WIT are required to create your Model in Image auxiliary images.For example:
-
To set up the WebLogic Image Tool, run the following commands.
Note that the WebLogic Image Tool
cache deleteEntrycommand does nothing if thewdt_latestkey doesn’t have a corresponding cache entry. It is included because the WIT cache lookup information is stored in the$HOME/cache/.metadatafile by default, and if the cache already has a version of WDT in its--type wdt --version latestlocation, then thecache addInstallercommand will fail. For more information about the WIT cache, see the cache documentation.These steps install WIT to the
/tmp/quickstart/tools/imagetooldirectory and put awdt_latestentry in the tool’s cache, which points to the WDT ZIP file installer. You will use WIT and its cached reference to the WDT installer later in the sample for creating model images. -
Download the sample WDT model, web application, and properties files to be included in the auxiliary image and put them in your
/tmp/quickstart/modelsdirectory. Then use thejarcommand to put the web application files into a model archive ZIP file.For example:
Create the auxiliary image.
Follow these steps to create the auxiliary image containing WDT model YAML files, application archives, and the WDT installation files.
-
Use the
createAuxImageoption of the WebLogic Image Tool (WIT) to create the auxiliary image.When you run this command, the Image Tool will create an auxiliary image with the specified model, variables, and archive files in the image’s
/auxiliary/modelsdirectory. It will also add the latest version of the WDT installation in its/auxiliary/weblogic-deploydirectory. See Create Auxiliary Image for additional Image Tool options. -
If you have successfully created the image, then it should now be in your local machine’s Docker repository. For example:
-
After the image is created, it will have the WDT executables in
/auxiliary/weblogic-deploy, and WDT model, property, and archive files in/auxiliary/models. You can runlsin the Docker image to verify this. -
Copy the image to all the nodes in your cluster or put it in a container registry that your cluster can access.
Create the domain.
If you followed the previous steps to create an auxiliary image, then use these steps to create the domain.
-
Prepare the domain resource.
a. Download the domain and cluster resource sample YAML file to a file called
/tmp/quickstart/domain-resource.yamlor similar.b. If you chose a different name and tag for the auxiliary image you created, then update the image field under the
spec.configuration.model.auxiliaryImagessection to use that name and tag. For example, if you named the auxiliary imagemy-aux-image:v1, then update thespec.configuration.model.auxiliaryImagessection as shown.c. If you chose non-default values for any other fields, such as
spec.image,spec.imagePullSecrets,spec.webLogicCredentialsSecret, andspec.configuration.model.runtimeEncryptionSecret, then update those fields accordingly. -
Create the domain by applying the domain resource.
Delete the generated image and directories for tools and models.
Use following commands to delete the generated image and directories for tools and models.
-
Delete the generated image by using the
docker rmicommand. Use the following command to delete an image tagged withquick-start-aux-image:v1. -
Delete the directory where WebLogic Deploy Tooling and WebLogic Image Tool are installed.
-
Delete the directory where the WDT model file, archive, and variable files are copied.