This topic outlines the prerequisites for linking an EBS R12.2 instance to the Delphix Engine.

Ensure your EBS R12.2 instance is supported

See Source EBS R12.2 Instance Requirements to ensure you can link your EBS R12.2 instance to the Delphix Engine.

Ensure your EBS 12.2 environments comply with Oracle's documentation

Your environments must comply with Oracle's requirements for installing EBS. These requirements are outlined on Oracle E-Business Suite Release 12 Installation Guidelines (Doc ID 405565.1) found at https://support.oracle.com. 

Prepare the dbTier for linking

Delphix Engine's Unix Environment Requirements

The dbTier must meet the source requirements outlined in Requirements for Unix Environments. These requirements are generic to all source Unix environments added to the Delphix Engine.

oracle User

The Delphix Engine must have access to an oracle user on the dbTier.

  • This user should be a member of both the EBS dba and oinstall groups.
  • The user should own the stage directory for DBTechStack and database files that will be cloned.
  • Ensure that the "expect" utility exists on the remote host.

dbTechStack Binary Permissions

Verify that the oracle user described above has read permissions at the group level for:

  • $ORACLE_HOME/bin/nmb
  • $ORACLE_HOME/bin/nmhs
  • $ORACLE_HOME/bin/nmo

The Delphix Engine's Oracle Database Requirements

The dbTier must meet the source requirements outlined in Oracle Support and Requirements. These requirements are generic to all Unix environments containing an Oracle database to be linked.

Prepare the appsTier for Linking

Delphix Engine's Unix Environment Requirements

The appsTier must meet the source requirements outlined in Requirements for Unix Environments. These requirements are generic to all source Unix environments added to the Delphix Engine.

applmgr User

The Delphix Engine must have access to an applmgr user on the appsTier.

  • This user should be a member of the EBS oinstall group.
  • The user should own the stage directory for Appstier files that will be cloned.

delphix_os OS user account

In order to separate authentication and perform privileged operations with a non-privileged OS account, first create an OS user account (i.e. "delphix_os") on the EBS DB Tier and appsTier node to be used as a source.
This user is easily created by the createDelphixOSUser.sh (located below on this page) script. 

  • The primary OS group of the Delphix Engine software owner account's (i.e. delphix_os) should be the same as the EBS Database/AppsTier software owner account (i.e. oravis or applmgr).
  • Primary group = Oracle Install Group (typically oinstall), secondary group = OSDB Group (typically dba). There are lots of cases where the OS group named dba fills this role, so be sure to check the group membership of the EBS Database and AppsTier software owner account.
  • Please note, the non-privileged OS account must have the same group as assigned to EBS Database or AppsTier privileged account (like oravis or applmgr).

Host Requirements:

To accomplish necessary tasks on the EBS Database and appsTier source hosts, the Delphix OS user account (henceforth referred to as "delphix_os") requires privilege elevation specifications.

Here is an example specification for the "sudo" privilege elevation utility, using the "visudo" to edit the "sudoers" configuration file.  This specification makes the following assumptions:

  • OS = Linux/Solaris
  • OS account owning Oracle EBS Database Tier is named oravis
  • OS account owning Oracle EBS appsTier is named applvis
  • EBS Database and appsTier system base directory is /u01/oracle/VIS. This can be prefixed before all the below-mentioned commands to ensure the same are being executed from relevant paths.

    The following sudoers entry is only for template purpose. Modify the path in the below sudoers entry with the appropriate binary paths of your environment.

Entries required for Linking via low privileged user (delphix_os):

EBS DB Tier

Defaults:delphix_os !requiretty

delphix_os ALL=NOPASSWD: /bin/su - oravis -c echo *, /bin/su - oravis -c rm -f */dlpx_force_autoflush*, /bin/su - oravis -c cp -f */dlpx_force_autoflush*; chmod 755 */dlpx_force_autoflush*, /bin/su - oravis -c rm -rf */appsutil/clone/dbts*, /bin/su - oravis -c export PERL5LIB*perl -mdlpx_force_autoflush */adpreclone.pl dbTier*, /bin/su - oravis -c */rsync*, /bin/su - oravis -c test*mkdir*, /bin/su - oravis -c test*touch*chmod 750*cat*, /bin/su - oravis -c */EBS_kill/kill_script.sh*, /bin/su - oravis -c rm -f */test_status.tmp*, /bin/ps, /bin/su - oravis -c cp *dlpx_force_autoflush.pm*, /bin/su - oravis -c chmod 755 */dlpx_force_autoflush*

EBS appsTier

Defaults:delphix_os !requiretty

delphix_os ALL=NOPASSWD: /bin/su - applvis -c echo *, /bin/su - applvis -c rm *.dlpx_run_edition*, /bin/su - applvis -c rm -f */dlpx_force_autoflush*, /bin/su - applvis -c cd *echo *dlpx_force_autoflush*, /bin/su - applvis -c export PATH* export PERL5LIB* cd *perl -mdlpx_force_autoflush ./adpreclone.pl appsTier*, /bin/su - applvis -c */rsync*, /bin/su - applvis -c test*mkdir*, /bin/su - applvis -c test*touch*chmod 750*cat*, /bin/su - applvis -c */EBS_kill/kill_script.sh*, /bin/su - applvis -c rm -f */test_status.tmp*, /bin/su - applvis -c *.env* sqlplus -s apps*, /bin/su applvis -c *.env* sqlplus -s apps*, /bin/su - applvis -c */*.env*echo*adadminsrvctl.sh status -nopromptmsg*, /bin/ps, /bin/su - applvis -c cp *dlpx_force_autoflush.pm*, /bin/su - applvis -c export PERL5LIB* cd *perl -mdlpx_force_autoflush */adpreclone.pl appsTier*


Requirement for Privilege Elevation Script: DLPX_DB_EXEC

In order to elevate privileges from a non-privileged OS account (like delphix_os) to a privileged OS account (like applmgr), we need to push a privilege elevation script (dlpx_db_exec) up into the Delphix virtualization engine to become part of the Delphix common plugin.

Why we need DLPX_DB_EXEC

Some customers want to use low privilege users to perform delphix operations like linking and provisioning. It means their low privilege user should have sudo permissions to execute EBS application and DB related commands. The privilege elevation profile script dlpx_db_exec allows them to execute commands that require superuser privileges on customer source and target machines.

The privilege elevation script dlpx_db_exec can be created or pushed to Delphix Engine using Web API calls, CURL or dxtoolkit.

For steps on creating a Privilege Elevation Profile please refer to CLI Cookbook: How to Create or Edit a Privilege Elevation Profiles and profile Scripts

Content of DLPX_DB_EXEC Privilege Elevation Profile:

#!/bin/sh
#
# Copyright (c) 2018 by Delphix. All rights reserved.
#
# This script allows customization of command execution with an alternate user
# account.
# Arg $1 contains "-u<optional user account>" for the desired user under
# which database commands will be executed.
# By default this argument is ignored and the script is executed as the default
# account.
#
if [[ $1 != -u* ]]; then
   echo "Incorrect command line parameters, -u<optional user account> is required as the first parameter"
   exit 1
fi
user_id=`echo $1 | sed -e "s/^-u//"`
shift 1
if [[ $user_id != "delphix_os" ]]; then
    command=$(printf "%s " "$@")
    sudo su - $user_id -c "$command"
else
    $@
fi


Below is an example of how we can push privilege elevation script “dlpx_db_exec” on a customer Delphix Engine:

  • Create a session to Delphix Engine as Delphix os User:

curl -i -c cookies.txt -X POST -H "Content-Type:application/json" http://<Delphix-Engine>/resources/json/delphix/session -d '{
    "version":{
        "minor":11,
        "major":1, 
        "micro": 5, 
        "type":"APIVersion"
        },
        "type":"APISession"}'

Note: The API Version needs to be identified as per the Delphix Engine installed at the customer site.

  • Login to Delphix Engine as Delphix OS User:

curl -i -c cookies.txt -b cookies.txt -X POST -H "Content-Type:application/json" http://<Delphix-Engine>/resources/json/delphix/login -d '{
    "password":"delphix",
    "type":"LoginRequest",
    "target":"DOMAIN",
    "username":"delphix_admin"
  }'
  • Push DLPX_DB_EXEC contents to Delphix Engine:
curl -i -b cookies.txt -X POST -H "Content-Type:application/json" http://<Delphix-Engine>/resources/json/delphix/host/privilegeElevation/profileScript/HOST_PRIVILEGE_ELEVATION_PROFILE_SCRIPT-7 -d '{
    "type": "HostPrivilegeElevationProfileScript",
    "contents": "#\n# Copyright (c) 2018 by Delphix. All rights reserved.\n#\n\n#\n# This script allows customization of command execution with an alternate user\n# account.\nif [[ $1 != -u* ]]; then\n    echo \"Incorrect command line parameters, -u<optional user account> is required as the first parameter\"\n exit 1\nfi\nuser_id=`echo $1 | sed -e \"s\/^-u\/\/\"`\n\nshift 1\nif [[ $user_id != \"delphix_os\" ]]; then\ncommand=$(printf \"%s \" \"$@\")\nsudo su - $user_id -c \"$command\"\nelse\n$@\nfi\n"
  }'


Script

createDelphixOSUser.sh

Related Topics