Session ID:
Prepared by:
After the Clone: Things
adcfgclone
doesn’t do…
10581
@jjmorrow
James J. Morrow
Sr. Oracle Applications DBA BlueStone Solutions Group, Inc
James Morrow
• Oracle Applications DBA
• Atherio, Inc. SME/Consultant
• 21+ years as an E-Business Suite DBA • 23+ years as a Unix/Linux Administrator
• E-Business Suite versions 9.4 through R12.2 • Oracle RDBMS 7.0.16 through 12.1.0.1
What is AutoConfig?
• Single-point for configuration • Simplifies cloning
• Manages dozens of configuration files in E-Business Suite
How does it work?
• Context file: ${CONTEXT_FILE}
<global_db_name
oa_var="s_dbSid">VIS</global_db_name>
• Template File:
${AD_TOP}/admin/template/APPSORA_ux.env
# Source the custom file if it exists customfile=%s_custom_file%
if [ -f $customfile ]; then . %s_custom_file%
fi
How does it work?
• Driver File:
${AD_TOP}/admin/driver/adtmpl.drv
if installation-type admin node forms
web
if platform UNIX
ad admin/template APPSORA_ux.env
INSTE8 <s_appl_config_home>
APPS<s_contextname>.env 644
ad admin/template APPLSYS_ux.env
INSTE8 <s_appl_config_home>
<s_contextname>.env 644
endif
endif
7How does it work?
• Configuration File: ${APPL_TOP}/APPSSID_host.env # $Header: APPSORA_ux.env 120.0 2005/06/20 15:33:34 appldev noship $
#
# Source the custom file if it exists
customfile=/oracle/VIS/apps/apps_st/appl/custom VIS_myhost.env if [ -f $customfile ]; then . /oracle/VIS/apps/apps_st/appl/customVIS_myhost. env fi . /oracle/VIS/inst/apps/VIS_myhost/ora/10.1.2/VIS _myhost.env . /oracle/VIS/apps/apps_st/appl/VIS_myhost.env
AutoConfig and Rapid Clone
• AutoConfig used to manage system configurations • Integral part of the Rapid Clone process
AutoConfig and Rapid Clone
• Normal dbTier Cloning Procedure
– Restore database and binaries (assumes cold backup)
– Run adcfgclone.pl dbTier to configure environment and generate controlfile.
• Alternate dbTier Cloning Procedure
– Restore database binaries
– Run adcfgclone.pl dbTechStack to configure environment
– Recover database (RMAN, snapshots, hot backup, etc.)
– Run adcfgclone.pl dbconfig
${CONTEXT_FILE} to finish
AutoConfig and Rapid Clone
• Normal appsTier Cloning Procedure
– Restore binaries
– Run adcfgclone.pl appsTier to configure environment – Run post-clone steps
Post-Clone Steps (my partial list)
• Update context file (s_smtphost)
• Change passwords
• Create/Update directory objects
• Create/Update database links • Update Various Profile
Options
• Update SITE NAME Profile
Option
• Update Workflow Mailer FROM Name
• Set Workflow Mailer TEST
address
• Update
FND_LOOKUP_VALUES • Delete the check printer • Cancel concurrent requests • Schedule concurrent requests
• Update Java Color Scheme
Extending AutoConfig:
Adding A Custom Module
• Add a custom module [MOS 270519.1, Section 3]
– Add through the Context Editor in Oracle Applications Manager
• OAM System Configuration AutoConfig Custom Parameters
• Create Custom Top OA_VAR = c_xxmytop
Default Value = %s_at%/xxmy/12.0.0 Title = My Custom Product Top
Description = My Custom Product Top OA_TYPE = PROD_TOP
Extending AutoConfig:
Creating A Custom Driver
• Take this one step further…
– Create Directories
mkdir –p ${XXMY_TOP}/admin/template \ ${XXMY_TOP}/admin/driver
– Create Custom Driver
${XXMY_TOP}/admin/driver/xxmytmpl.drv
#
# Driver file for custom template #
if installation-type admin node forms web if platform UNIX
# Create APPL_TOP/customCONTEXT_NAME.env file
xxmy admin/template custom_env.txt INSTE8 <s_appl_config_home> custom<s_contextname>.env 755
endif endif
Extending AutoConfig:
Creating A Custom Driver
• Custom Driver Syntax:
xxmy admin/template custom_env.txt INSTE8
<s_appl_config_home>
custom<s_contextname>.env 755
– Product Short Name – Template directory – Template File
Extending AutoConfig:
Creating A Custom Driver
• Custom Driver Syntax (continued):
xxmy admin/template custom_env.txt INSTE8 <s_appl_config_home>
custom<s_contextname>.env 755
– Action
• INSTE8 Instantiate the template file
• INSTE8_SETUP Instantiate and execute during SETUP phase
• INSTE8_PRF Instantiate and execute during PROFILE phase
• INSTE8_APPLY Instantiate and execute during APPLY phase
• INSTALL Instantiate only if it doesn’t already exist
Extending AutoConfig:
Creating A Custom Driver
• Custom Driver Syntax (continued):
xxmy admin/template custom_env.txt INSTE8
<s_appl_config_home>
custom<s_contextname>.env 755
– Configuration Directory – Configuration File
Extending AutoConfig:
Creating Your Own Custom Template
• Take this one step further…
– Create your custom template
${XXMY_TOP}/admin/template/custom_env.t xt # # TEMPLATE: ${xxmy_TOP}/admin/template/custom_env.txt # DRIVER: ${xxmy_TOP}/admin/driver/xxmytmpl.drv #
# Custom template to create
${APPL_TOP}/custom${CONTEXT_NAME}.env file #
export SMTPHOST=%s_smtphost%.%s_smtpdomainname%
Extending AutoConfig
Post Clone Solution
Post Clone Solution
• Create (INSTE8) the following files:
– ${APPL_TOP}/custom${CONTEXT_NAME}.env – ${XXMY_TOP}/admin/postclone/pc_sitename.sql – ${XXMY_TOP}/admin/postclone/pc_wftest.sql – ${XDO_TOP}/resource/xdodelivery.cfg – ${XXMY_TOP}/admin/postclone/run_postclone.ksh 23
Post Clone Solution (driver)
xxmytmpl.drv
#
# Driver file for custom template #
if installation-type admin node forms web if platform UNIX
# Create APPL_TOP/customCONTEXT_NAME.env file
xxmy admin/template custom_env.txt INSTE8 <s_appl_config_home> custom<s_contextname>.env 755 # Create PostClone Scripts
xxmy admin/template pc_sitename.sql.tmpl INSTE8 <s_xxmytop>/admin/postclone pc_sitename.sql 640 xxmy admin/template pc_wfmail_from.sql.tmpl INSTE8 <s_xxmytop>/admin/postclone pc_wfmail_from.sql 640 xxmy admin/template pc_wftest.sql.tmpl INSTE8 <s_xxmytop>/admin/postclone pc_wftest.sql 640
# Create PostClone Shell Script
xxmy admin/template run_postclone.ksh.tmpl INSTE8 <s_xxmytop>/admin/postclone run_postclone.ksh 750 # Create XDO_TOP/resource/xdodelivery.cfg
xxmy admin/template xdodelivery.cfg.tmpl INSTE8 <s_xdotop>/resource xdodelivery.cfg 640 endif
Post Clone Solution (template)
custom_env.txt
# # TEMPLATE: ${xxmy_TOP}/admin/template/custom_env.txt # DRIVER: ${xxmy_TOP}/admin/driver/xxmytmpl.drv ## Custom template to create ${APPL_TOP}/custom${CONTEXT_NAME}.env file #
export SMTPHOST=%s_smtphost%.%s_smtpdomainname%
Post Clone Solution (template)
pc_sitename.sql.tmpl
set echo on time on trimspool on termout on feedback on---- PostClone Script: pc_sitename.sql.tmpl
---- All post-clone scripts should expect -- ARG 1: FROM SID
-- ARG 2: Backup Date
-- All post-clone scripts should also end with a commit and an exit.
--DEF FROMSID=&1 DEF BUDATE=&2
---- Update SITE_NAME Profile
--UPDATE fnd_profile_option_values fpov
SET fpov.profile_option_value='%s_dbSid% -- Created from &&FROMSID data as of &&BUDATE' WHERE
1=1
AND fpov.application_id=0 AND fpov.level_id=10001 AND fpov.profile_option_id=(
SELECT distinct profile_option_id FROM fnd_profile_options
WHERE profile_option_name='SITENAME') ;
Post Clone Solution (template)
pc_wfmail_from.sql.tmpl
set echo on time on trimspool on termout on feedback on
---- PostClone Script: pc_wfmail_from.sql.tmpl
---- All post-clone scripts should expect
---- ARG 1: FROM SID
-- ARG 2: Backup Date
---- All post-clone scripts should also end with a commit and an exit.
--DEF FROMSID=&1 DEF BUDATE=&2
---- Change the "FROM" name for the Workflow Mailer
---- Define-->Details-->Email Servers-->Message Generation
--exec FND_SVC_COMP_PARAM_VALS_PKG.LOAD_ROW ( x_component_name => 'Workflow Notification Mailer', x_parameter_name => 'FROM', x_parameter_value => '[%s_dbSid%] Notification Mailer', x_customization_level => 'L',
x_object_version_number => -1, x_owner => 'ORACLE'); commit;
exit;
Post Clone Solution (template)
xdodelivery.cfg.tmpl
<?xml version="1.0" encoding="UTF-8" ?><config xmlns="http://xmlns.oracle.com/oxp/delivery/config"> <servers>
<server name="mysmtp1" type="smtp_email" default="true"> <host>%s_smtphost%.%s_smtpdomainname%</host> <port>25</port> </server> </servers> <properties> <property name="ds-temp-dir">/tmp</property> <property name="ds-buffering">true</property> <property name="SMTP_CONTENT_TYPE:String">"application/pdf"</property> </properties> </config>
Post Clone Solution (script)
run_postclone.ksh.tmpl
#!/bin/kshexport DTTM=`date +%Y%m%d-%H%M`
export LOG=${APPL_TOP}/admin/${TWO_TASK}/postclone_${DTTM}.log export APPSPW=${1} export SYSTEMPW=${2} export FROMSID=${3} export BUDATE=${4} sqlplus apps/${APPSPW} \
@${CUSTOM_TOP}/admin/postclone/pc_sitename.sql ${FROMSID} ${BUDATE} 2>&1 1>> ${LOG} sqlplus apps/${APPSPW} \
@${CUSTOM_TOP}/admin/postclone/pc_wfmail_from.sql 2>&1 1>> ${LOG} sqlplus apps/${APPSPW} \
@${CUSTOM_TOP}/admin/postclone/pc_wftest.sql 2>&1 1>> ${LOG}
Extending Autoconfig
Running Post clone
Run the post-clone solution
• Run adcfgclone.pl appsTier
– This generates all of the
${XXMY_TOP}/admin/postclone files
• Run the post-clone shell script
cd ${XXMY_TOP}/admin/postclone
./run_postclone.ksh appspw systempw \ PROD 01-FEB-2015
• Shell script approach chosen to avoid postclone
scripts being run during an ordinary AutoConfig run.
Please complete the session evaluation
We appreciate your feedback and insightAfter the Clone: Things adcfgclone doesn’t do
Session #10581
James J. Morrow
BlueStone Solutions Group, Inc.