Patch a Domain

Learn how to patch a domain by using the tools provided with Oracle WebLogic Server for OKE. You can either run a Jenkins job to apply patches to a specific domain or automatically schedule patching for the required domains.

When you apply patches to a domain, the base image of a domain is automatically updated to a different base image.

You can apply patches also by creating a custom base image from WebLogic installer, JDK installer, and any set of WebLogic patches. See Create a Custom Base Image.

Apply a WebLogic Server Patch

Use the Jenkins job to apply patches to a WebLogic Server installation that you created with Oracle WebLogic Server for OKE.

You can use one of the following sources to specify the location of the WebLogic patch file:
  • Object Storage - Uses the pre-authenticated URL on the Object Storage.

  • Shared File System - Uses the path of the shared file storage.

    The NFS shared file system path is mounted on /u01/shared location on the administration host.

To apply the WebLogic patch file:

  1. Sign in to the Jenkins console for your domain. See Access the Jenkins Console.
  2. On the Dashboard page, click apply patch.
  3. Click Build with Parameters.
  4. From Domain_Name, select the domain to which you want to apply patches.
  5. In Domain_Restart_Timeout, specify the time in minutes to wait for the WebLogic Domain Server pods to restart and be back in the running state. The default wait time is 40 minutes.
  6. Select the source of the Weblogic patch file from the WLS_Opatches list.

    WLS_Opatches refers to any patch that may be required to patch WLS or Coherence product binaries (including ADR patches, OPSS, OWSM, OPatches).

  7. For Opatches_Location, specify the http pre-authenticated URL or the path of the zip file on the shared file system.
    For multiple patches, specify the location in separate lines.
  8. Deselect the Rollback_On_Failure check box if you do not want to rollback to the previous working domain image (optional).

    If you deselected this check box, you can rollback to the previous image later from the backup.

    Note:

    The Rollback_On_Failure check box is selected by default.
  9. Optional: Configure the Registry.
    If you want to use another user credentials, other than the one specified when creating a stack, then specify the credentials that Oracle WebLogic Server for OKE must use to access container images in the Oracle Cloud Infrastructure Registry (OCIR).
    1. In the Registry_Username field, enter a user name that Kubernetes uses to access the image in the registry.
      If your tenancy is federated with Oracle Identity Cloud Service, use the format: oracleidentitycloudservice/<username>, else use <username>.
    2. In the Registry_Authentication_Token field, enter the OCID of the secret for the auth token generated for the registry user.
  10. Click Build to run the Pipeline job.

Automatic Patching

Use the Jenkins job to automatically schedule patching for the required domains.

Following are the steps that you need to complete to utilize all the advantages of using automatic patching:
  1. Subscribe or unsubscribe domains for automatic patching
  2. Schedule automatic patching

Step 1: Subscribe or unsubscribe domains for automatic patching

To select a domain for automatic patching:

  1. Sign in to the Jenkins console for your stack. See Access the Jenkins Console.
  2. On the Dashboard page, click automatic patching.
  3. Click Build with Parameters.
  4. From Domain_Names, select the domains for automatic patching.
  5. Subscribe or unsubscribe domains.
    • Subscribe domains: Select Patch_Automatically, if you want to run automatic patching on the selected domains.

      Note:

      The Patch_Automatically option is selected by default.
    • Unsubscribe domains: Deselect the Patch_Automatically option, if you do not want to run automatic patching on the selected domains.
  6. Run the automatic patching job.
    • If you subscribe a domain and click Build, then:
      • If applicable, the latest patches are applied on the selected domain.
      • The default schedule for automatic patching is enabled. By default, your local time zone is used and the automatic patching schedule is set to midnight of that time zone. To change the default schedule, see Schedule automatic patching.
      • A corresponding Topic is created in the Notifications application in Oracle Cloud Infrastructure.

        By default, the Topic name is: <domain-name>-patching-topic

        After the Topic is created. You can create subscriptions as required. See Creating a Subscription.

    • If you unsubscribe a domain and click Build, then:
      • The selected domains are removed from the automatic patching list.
      • The related Topic is deleted in the Notifications application in Oracle Cloud Infrastructure.

Step 2: Schedule automatic patching

To schedule automatic patching:

  1. Sign in to the Jenkins console for your domain. See Access the Jenkins Console.
  2. On the Dashboard page, click automatic patching.
  3. Click Configure > Build Triggers.
  4. By default, the Build periodically is selected with the required parameters.
    Update the parameters to set the preferred patching schedule.

    Note:

    • Click the help icon next to the Build periodically field, to view information about the parameters you can use to schedule automatic patching.
    • When you schedule automatic patching, by default, your local time zone is used and the automatic patching schedule is set to midnight of that time zone.
  5. Click Save.