Patching the service

When a patch is available, the Maintenance tab displays a notification and a link to download the patch files. Once you have the files, you can copy them to your node and apply the patch. You can also apply WebLogic patches at the same time.

Important

To apply the patch, you must SSH into the BDDCS node as the opc user, then switch to the bdd user. For information, see Accessing the service node in a cluster.

You apply the patch by running a single script on your BDDCS node. In addition to patching your instance, the script makes a backup of your current instance, which you can use to roll back the patch if it fails. When the script completes, your instance will be completely updated and running.

To patch your BDDCS instance:

  1. Go to the Maintenance tab of the Administration page and click the link for the BDDCS patch.
    The patch request on the Oracle Automated Release Updates site displays.

    Note:

    On this page, there is also a heading Available Patches. This is a placeholder for patches that will be available for the future release. A heading Patch History is present but is also empty.
  2. Download all of the patch files in the table at the bottom of the page.
    The files are named p<patch_number>_Generic_XofX.zip.
  3. If you want to patch WebLogic Server:
    1. Log in to My Oracle Support and click the Patches & Updates tab.
    2. Use the Patch Search section to locate and download the patch you want.
  4. Open a command prompt and SSH into the BDDCS node as the opc user:
    ssh -i ~/.ssh/id_rsa opc@<hostname>
    
    Where <hostname> is the hostname of the BDDCS node. This is listed on the Overview page under BDD nodes.
  5. Switch to the bdd user:
    sudo su bdd
    
  6. Go to /opt/oracle/bdd and create a new directory called <patch_number>:
    cd /opt/oracle/bdd
    mkdir <patch_number>
    
    This should be the number from the patch filenames.
  7. Copy the patch files from your local machine to <patch_number>:
    scp -r <user>@<local_hostname>:</path/to/BDDCS/patches> /opt/oracle/bdd/<patch_number>
                            scp -r <user>@<local_hostname>:</path/to/WLS/patches> /opt/oracle/bdd/<patch_number>/WLSPatches
    
    Where:
    • <user> is your Linux username
    • <local_hostname> is your local machine's hostname
    • </path/to/BDDCS/patches> is the absolute path to the location of the BDDCS patches on your machine
    • </path/to/WLS/patches> is the absolute path to the location of the WebLogic Server patches on your machine
  8. Go into the <patch_number> directory and extract the patch tools:
    cd <patch_number>
    unzip bddcs_tools.zip
    
    This creates a directory called /bddcs/bin, which contains the scripts that install the patch.
  9. Set the following environment variables:
    Environment variable Value
    BDD_HADOOP_UI_USERNAME Username for the Cloudera Manager admin
    BDD_HADOOP_UI_PASSWORD Password for the Cloudera Manager admin
    BDD_WLS_USERNAME Username for the WebLogic Server admin
    BDD_WLS_PASSWORD Password for the WebLogic Server admin
    BDD_STUDIO_ADMIN_USERNAME Username for the Studio admin
    BDD_STUDIO_ADMIN_PASSWORD Password for the Studio admin
    These are required by the upgrade script. You can set them by running:
    export VARIABLE_NAME=<value>
    
  10. Go to /opt/oracle/bdd/<patch_number>/bddcs/bin and run the patch script:
    ./bdd-cloud.sh upgrade bdd --old_bdd_dir=/home/bdd/Oracle/Middleware/BDD --new_bdd_package_dir=/opt/oracle/bdd/<patch_number>
    

When the patch script completes, your instance is fully updated and running. The Overview page should display the new version number. Note that your system still contains some files and directories associated with the previous version of BDDCS; you can remove these if you want.

If the patch fails, you should roll it back and restore your previous cluster. For more information, see Rolling back a failed patch.