AutoConfig - PowerPoint PPT Presentation

1 / 59
About This Presentation
Title:

AutoConfig

Description:

Stores values in an hierarchical fashion. ... Template's Directory. ... Destination directory for the instantiated template. ... – PowerPoint PPT presentation

Number of Views:171
Avg rating:3.0/5.0
Slides: 60
Provided by: rob872
Category:
Tags: autoconfig

less

Transcript and Presenter's Notes

Title: AutoConfig


1
AutoConfig
  • Introduction
  • Amit Poddar
  • Yale University

2
Agenda
  • Introduction
  • How does it work?
  • AutoConfig Components
  • Making Configuration Changes
  • Customizing AutoConfig
  • Troubleshooting AutoConfig

3
Background (Before AutoConfig)
  • Configuration files and profile options
    maintained manually
  • If it was required to make a change such as web
    server port, there were many files and profile
    options to update manually
  • This opens up significant risks of typographical
    and human errors.
  • This manual process is no longer supported.

4
What is AutoConfig
  • Configuration tool supplied by E-Business suite
    to maintain configuration files and profile
    options
  • Is basically a set of java classes run from
    perl/shell scripts (adconfig.sh/adconfig.pl).
  • It obviates any need to change configuration
    files or profile options manually
  • Helps oracle to rollout the recommended
    configuration options to all customers via
    templates.

5
What does autoconfig do?
  • Maintains the 11i environment specific values in
    a xml context file.
  • Maintains template files for each configuration
    file and for script (sql/shell) which update the
    database.
  • Provides methods to update this context file, to
    facilitate configuration changes
  • When run in normal mode overwrites the existing
    configuration files with new ones updates the
    database with generated scripts.

6
What does autoconfig do (cont..)?
  • Automatically creates a script to revert all the
    changes, at each run.
  • Provides an option to run in test mode
  • adconfig.pl contextfileltCONTEXT_NAMEgt.
    xml test.
  • When run in test mode, generates a report
    detailing the changes between existing
    configuration files and new ones it would create.

7
What does autoconfig not do?
  • Autoconfig essentially generates new
    configuration files and updates the database
    information like profile options etc.
  • It does not do any validation on the input data
    provided in the context file, like availability
    of ports, correctness of host names, existence of
    a directory etc.
  • All the prerequisite check on the input data must
    be done by you before running autoconfig.

8
Agenda
  • Introduction
  • How does it work?
  • AutoConfig Components
  • Making Configuration Changes
  • Customizing AutoConfig
  • Troubleshooting AutoConfig

9
How does it work?
  • Each configuration file has a corresponding
    template file. Some of them have two different
    versions, one for NT and one for UNIX. For e.g.
  • - jserv_ux.conf and jserv_nt.conf
  • - adapcctl_ux.sh and
    adapcctl_nt.cmd
  • Templates are located in PROD_TOP/admin/template
    directory. For example
  • - AD_TOP/admin/template/REP60_serv
    er.ora

10
How does it work cont..?
  • Database updates are done by sql scripts called
    from perl/shell scripts.
  • These scripts have corresponding templates. For
    example script that generates listener.ora file
    have following templates
  • - admk80ln.cmd and admk80ln.sh
  • - admk80ln_nt.sql and
    admk80ln_ux.sql
  • Also located in PROD_TOP/admin/template.

11
How does it work cont..?
  • All the instance specific values in the templates
    are replaced by context variables.
  • All the context variables and their respective
    values are maintained in a xml context file.
  • Context file located in APPL_TOP/admin.
  • Each node has its own context file.
  • Context files are named as ltCONTEXT_NAMEgt.xml

12
How does it work cont..?
  • Driver files drive what autoconfig does with each
    template.
  • Located in PROD_TOP/admin/driver directory, and
    named as ltPRODgttmpl.drv. For e.g.
  • - adtmpl.drv, fndtmpl.drv, icxtmpl.drv
    etc..
  • Driver and template files are updated by
    autoconfig patches.

13
How does it work cont..?
  • Autoconfig processes each driver file line by
    line.
  • Each line corresponds to a autoconfig template,
    the driver manages.
  • Autoconfig replaces all the context variables
    with their respective values from the context
    file.
  • Replaces the configuration files with the new
    ones it creates.
  • Runs the instantiated template if instructed by
    the driver file.

14
(No Transcript)
15
Agenda
  • Introduction
  • How does it work?
  • AutoConfig Components
  • Making Configuration Changes
  • Customizing AutoConfig
  • Troubleshooting AutoConfig

16
AutoConfig Components
  • The Context file.
  • The AutoConfig Template Files
  • The AutoConfig Driver files
  • The AutoConfig Executable

17
Components (The Context File)
  • All the environment specific values in the 11i
    environment is stored in a xml file called
    context file.
  • Generated by running adbldxml.sh/adbldxml.pl or
    adclonectx.pl.
  • Generated by plugging in instance specific values
    in the context file template AD_TOP/admin/templat
    e/adxmlctx.tmp.
  • Replacement values gotten from config.txt (old
    version) or existing configuration files (new
    version)

18
Components (The Context File)
  • Stores values in an hierarchical fashion.
  • Divided in five different sub nodes oa_system,
    oa_host, oa_install, oa_environments and
    oa_processes.
  • Each lowest level, non text node corresponds to a
    context variable.
  • Context variables value stored in its child text
    node.
  • Has one mandatory attribute oa_var. This
    attributes value is used in template files.

19
Values replaced by oa_var attribute value in the
config files, to create template files
Context Variable Name
ltmaxclients oa_var"s_maxclients"gt512lt/maxclientsgt
ltkeepalive oa_var"s_keepalive"gtONlt/keepalivegt ltk
eepalivetimeout oa_var"s_keepalive_timeout"gt15lt/k
eepalivetimeoutgt ltminspareservers
oa_var"s_minspare_servers"gt5lt/minspareserversgt ltm
axspareservers oa_var"s_maxspare_servers"gt10lt/max
spareserversgt
ltmaxclients oa_var"s_maxclients"gt512lt/maxclientsgt
ltkeepalive oa_var"s_keepalive"gtONlt/keepalivegt ltk
eepalivetimeout oa_var"s_keepalive_timeout"gt15lt/k
eepalivetimeoutgt ltminspareservers
oa_var"s_minspare_servers"gt5lt/minspareserversgt ltm
axspareservers oa_var"s_maxspare_servers"gt10lt/max
spareserversgt
ltmaxclients oa_var"s_maxclients"gt512lt/maxclientsgt
ltkeepalive oa_var"s_keepalive"gtONlt/keepalivegt ltk
eepalivetimeout oa_var"s_keepalive_timeout"gt15lt/k
eepalivetimeoutgt ltminspareservers
oa_var"s_minspare_servers"gt5lt/minspareserversgt ltm
axspareservers oa_var"s_maxspare_servers"gt10lt/max
spareserversgt
ltmaxclients oa_var"s_maxclients"gt512lt/maxclientsgt
ltkeepalive oa_var"s_keepalive"gtONlt/keepalivegt ltk
eepalivetimeout oa_var"s_keepalive_timeout"gt15lt/k
eepalivetimeoutgt ltminspareservers
oa_var"s_minspare_servers"gt5lt/minspareserversgt ltm
axspareservers oa_var"s_maxspare_servers"gt10lt/max
spareserversgt
oa_var attribute value. Used in template files to
replace the environment specific values
MaxClients 512 MaxClients s_maxclients
20
AutoConfig Components
  • The Context file.
  • The AutoConfig Template Files
  • The AutoConfig Driver files
  • The AutoConfig Executable

21
Components (The Template Files)
  • Each configuration file has one (sometimes two)
    corresponding template file maintained by
    autoconfig (ADX) patches.
  • Each script used to update the database also has
    a corresponding template file.
  • Template files are created by replacing all the
    instance specific values with context variables.
    (To be more precise with the oa_var value of the
    context variables.

22
Creating Template Files
  • nlssupportyes
  • maxconnect20
  • cachedir" /config/ /8.0.6/reports60/server/cache"
  • cachesize50
  • minengine0
  • maxengine1
  • initengine0
  • maxidle30
  • security1
  • englife50

nlssupports_nlssupport maxconnects_maxconnect
cachedir" s_cachedir" cachesizes_cachesize
minengines_minengine maxengines_maxengine in
itengines_initengine maxidles_maxidle securi
tys_security englifes_englife
REP60_SID.ora
REP60_server.ora
23
Components (The Template Files)
  • AutoConfig replaces all the context variables in
    the template by their corresponding values from
    the context file.
  • This process of replacing context variables is
    termed as instantiating the template in oracle
    speak.
  • Uses the instantiated template to overwrite the
    existing configuration file.
  • Uses the instantiated script to update the
    database for script templates.

24
Template Instantiation
  • nlssupportyes
  • maxconnect20
  • cachedir"s_806config_home/cache"
  • cachesize50
  • minengines_minengine
  • maxengines_maxengine
  • initengine0
  • maxidle30
  • security1
  • englife50

ltconfighome oa_var"s_806config_home"gt/u01/8.0.6lt/
confighomegt ltrptsminengine oa_var"s_minengine"gt0lt
/rptsminenginegt ltrptsmaxengine oa_var"s_maxengine
"gt1lt/rptsmaxenginegt
nlssupportyes maxconnect20 cachedir/u01/8.0.6/
cache" cachesize50 minengines_minengine maxeng
ines_maxengine initengine0 maxidle30 security
1 englife50
nlssupportyes maxconnect20 cachedir/u01/8.0.6/
cache" cachesize50 minengine0 maxengines_maxen
gine initengine0 maxidle30 security1 englife5
0
nlssupportyes maxconnect20 cachedir/u01/8.0.6/
cache" cachesize50 minengine0 maxengine1 initen
gine0 maxidle30 security1 englife50
nlssupportyes maxconnect20 cachedir/u01/8.0.6/
cache" cachesize50 minengine0 maxengine1 initen
gine0 maxidle30 security1 englife50
REP60_SID.ora
A section of context file
Rep60_server.ora
25
AutoConfig Components
  • The Context file.
  • The AutoConfig Template Files
  • The AutoConfig Driver files
  • The AutoConfig Executable

26
The Driver files
  • Each product maintained by autoconfig has a
    driver file.
  • Located in PROD_TOP/admin/driver directory
  • Named as ltPROD_TOPgttmpl.drv. For e.g. adtmpl.drv,
    fndtmpl.drv etc.
  • Contains one line for each template it manages.
  • Each line tells autoconfig what to do with the
    given template using a special syntax.

27
ad admin/template adconfig.txt INSTE8
lts_atgt/admin adconfig.txt 600
ad admin/template adconfig.txt INSTE8
lts_atgt/admin adconfig.txt 600
ad admin/template adconfig.txt INSTE8
lts_atgt/admin adconfig.txt 600
ad admin/template adconfig.txt INSTE8
lts_atgt/admin adconfig.txt 600
ad admin/template adconfig.txt INSTE8
lts_atgt/admin adconfig.txt 600
ad admin/template adconfig.txt INSTE8
lts_atgt/admin adconfig.txt 600
ad admin/template adconfig.txt INSTE8
lts_atgt/admin adconfig.txt 600
ad admin/template adconfig.txt INSTE8
lts_atgt/admin adconfig.txt 600
Templates Product. This tells autoconfig that
the template is located in AD_TOP
Templates Directory. This tells autoconfig that
this template is located in admin/template
directory under product top. So in this case the
template will be located inAD_TOP/adminte/templat
e directory.
Template Name. So combining this information
with last two fields, autoconfig can deduce that
the template referred here is AD_TOP/admin/templa
te/adconfig.txt
Action Field. This tells autoconfig what to do
with this template. Different options are INSTE8,
INSTE8_SETUP, INSTE8_APPLY, INSTE8_PRF, INSTALL.
Next few slides discusses them in detail
Destination directory for the instantiated
template. We can use context variables enclosed
in ltgt to specify this directory.
Destination configuration file/script for the
instantiated template. We can use context
variables enclosed in ltgt to specify this file
name.
Unix like permission for the destination file.
Autoconfig will change the permission after
creating this file.
28
Action INSTE8
  • Instantiate the template identified by first
    three fields in the driver file
  • Copy the instantiated template to the destination
    file as identified by 5th and 6th field in the
    driver file. Overwrites any existing file.
  • Change the permission on the copied file as
    identified by 7th field in the driver file.

29
Action INSTE8_SETUP
  • Instantiate the template identified by first
    three fields in the driver file
  • Copy the instantiated template to the destination
    file as identified by 5th and 6th field in the
    driver file. Overwrite any existing file.
  • Change the permission on the copied file as
    identified by 7th field in the driver file.
  • Run the copied file.

30
Action INSTE8_APPLY
  • Instantiate the template identified by first
    three fields in the driver file
  • Copy the instantiated template to the destination
    file as identified by 5th and 6th field in the
    driver file. Overwrite any existing file.
  • Change the permission on the copied file as
    identified by 7th field in the driver file.
  • Run the copied file.

31
Action INSTE8_PRF
  • Instantiate the template identified by first
    three fields in the driver file
  • Copy the instantiated template to the destination
    file as identified by 5th and 6th field in the
    driver file. Overwrite any existing file.
  • Change the permission on the copied file as
    identified by 7th field in the driver file.
  • Run the copied file.

32
Action INSTALL
  • Instantiate the template identified by first
    three fields in the driver file
  • Copy the instantiated template to the destination
    file as identified by 5th and 6th field in the
    driver file only if the configuration file does
    not exist.
  • Change the permission on the copied file as
    identified by 7th field in the driver file.

33
Action cont..
  • Autoconfig runs in phases.
  • The phases are named after the action types i.e.
    INSTE8, INSTE8_SETUP ..
  • The order of execution of phases is INSTE8,
    INSTE8_SETUP, INSTE8_APPLY, INSTE8_PRF.
  • Its possible to run autoconfig up to a particular
    phase
  • perl adconfig.pl contextfileltContext Filegt
    runINSTE8

34
AutoConfig Components
  • The Context file.
  • The AutoConfig Template Files
  • The AutoConfig Driver files
  • The AutoConfig Executable

35
AutoConfig executable
  • Autoconfig is run using a perl wrapper (stored in
    AD_TOP/bin) script adconfig.pl which runs the
    necessary java classes.
  • Typically to run autoconfig we run
  • perl adconfig.pl contextfileltcontext_filegt
    appspassltpasswgt
  • There are many other options we can supply to
    adconfig.pl to control the autconfig execution.
    Their details can be obtained by running
  • perl adconfig.pl helpY

36
(No Transcript)
37
Agenda
  • Introduction
  • How does it work?
  • AutoConfig Components
  • Making Configuration Changes
  • Customizing AutoConfig
  • Troubleshooting AutoConfig

38
Making Configuration Changes
  • With the advent of autoconfig, making
    configuration changes have become a very simple
    process involving the following
  • Find the template file corresponding to the
    configuration file that has the configuration
    option.
  • Find the context variable corresponding to the
    relevant configuration option.
  • Updating the context variable value in the
    context file.
  • Running autoconfig

39
Find the template file
  • Find the template file corresponding to the
    configuration file that has the configuration
    option.

adtmplreport.sh contextfile/appltop/admin/TEST_
host.xml \ target/oracle/product/iAS/Ap
ache/Apache/conf/httpd.conf verbose

Generating Report .....

APPL_TOP
Context AD_TOP TEMPLATE FILE
/appltop/fnd/11.5.0/admin/template/httpd_ux_ias102
2.conf TARGET FILE /oracle/product/iAS/A
pache/Apache/conf/httpd.conf
40
Find the context variable
  • grep the configuration option in the template
    file.
  • In the above case the context variable we are
    looking for has the oa_var value of s_webport
  • Grep for oa_var value in the context file and you
    will get the context variable name

grep Listen httpd_ux_ias1022.confgrep v
Listen s_webport
grep s_webport HOP1_blueeyes.xml ltweb_port
oa_var"s_webport" oa_type"PORT"gt8086lt/web_portgt
41
Updating the context file
  • Use editcontext or Oracle Applications manager to
    update the context variables value.
  • Save your changes.
  • Restart editcontext and Oracle Applications
    manager to verify your changes.
  • In a multi node installation context file of each
    node needs to be updated.

42
Running Autoconfig
  • Run autoconfig in test mode to verify the
    differences
  • perl adconfig.pl contextfileltcontext file
    namegt test
  • Run autoconfig
  • perl adconfig.pl contextfileltcontext
    file namegt
  • Review log files in APPL_TOP/admin/log/MMDDhhmm
  • On a multi node installation you will have to go
    through the process for each node.

43
Agenda
  • Introduction
  • How does it work?
  • AutoConfig Components
  • Making Configuration Changes
  • Customizing AutoConfig
  • Troubleshooting AutoConfig

44
Customizing AutoConfig
  • Customizing autoconfig mainly implies one of the
    following.
  • Adding custom context variables to the context
    file
  • Customizing an AutoConfig template file delivered
    by Oracle.
  • Creating custom Autoconfig templates.

45
Adding custom context variables
  • Use Oracle Applications manager to add custom
    context variable.
  • The name and oa_var value need to start with c_
    to distinguish from seeded variables that start
    with s_.
  • Save the changes.
  • Oracle Applications manager regenerates all (In
    case multi-node installation) the context file to
    include this custom context variable. It also
    inserts one row in fnd_oam_context_custom.

46
Customizing an AutoConfig template
  • Find the template file you want to customize.

adtmplreport.sh contextfile/appltop/admin/TEST_
host.xml \ target/oracle/product/iAS/Ap
ache/Apache/conf/httpd.conf verbose

Generating Report .....

APPL_TOP
Context AD_TOP TEMPLATE FILE
/appltop/fnd/11.5.0/admin/template/httpd_ux_ias102
2.conf TARGET FILE /oracle/product/iAS/A
pache/Apache/conf/httpd.conf
47
Customizing an AutoConfig template
  • Create a custom directory in the seeded template
    directory.
  • /appltop/fnd/11.5.0/admin/template/custom
  • Copy the seeded template to the custom directory.
  • cd /appltop/fnd/11.5.0/admin/template/custom
  • cp ../httpd_ux_ias1022.conf .
  • Customize the template in the custom directory.
    You can use seeded or custom context variables.

48
Creating custom Autoconfig templates
  • Creating custom Autoconfig template mainly
    involves
  • Creating custom product top in APPL_TOP
  • Adding the custom product top to context file
  • Creating custom template in CUSTOM_TOP/admin/temp
    late
  • Creating custom driver file in CUSTOM_TOP/admin/d
    river.

49
Creating custom product top in APPL_TOP
  • Create a custom product top directory in APPL_TOP
  • The custom top directly should match the Oracles
    standards of creating product tops i.e.
    APPL_TOP/ltPRODUCT_NAMEgt/11.5.0
  • mkdir APPL_TOP/custom/11.5.0
  • Create directories to hold templates and drivers
  • mkdir APPL_TOP/custom/11.5.0/template
  • mkdir APPL_TOP/custom/11.5.0/driver

50
Adding the custom product top to context file
  • Add a custom context variable to the context file
    with the following details
  • oa_var c_customtop
  • default - s_at/custom/11.5.0
  • Title Custom Product Top
  • Description Custom Product Top
  • oa_type PROD_TOP
  • Autoconfig will now recognize our custom top as a
    product top and process any driver files present.

51
Creating custom template
  • Create the template in our ltcustom_topgtadmin/templ
    ate.
  • It can have any file name, and it can be of any
    type i.e. a text file, shell script , perl script
    etc.
  • It can use seeded or custom context variables.
  • When instantiating this template autoconfig will
    replace all the referred context variables with
    their respective values.

52
Creating custom template cont..
  • For example a template for custom environment
    file could be

CUSTOM_TOPc_customtop export
CUSTOM_TOP FORMS60_PATHFORMS60_PATHs_at/cust
om/11.5.0/forms/US export FORMS60_PATH
53
Creating custom driver file
  • Create the custom driver file in
    ltcustom_topgt/admin/driver.
  • The name of the file has to be customtmpl.drv for
    autoconfig to recognize it as a driver file.
  • In our example of custom environment file, we
    just need one line in the driver file to
    instantiate the file.
  • If it was a script we would need two lines, one
    to instantiate (INSTE8) it and second to run the
    script(INSTE8_SETUP/APPLY/PRF)

54
Creating custom driver file
  • For e.g. in this case the driver file would have
    only one line.

custom admin/template custom_env_ux.env \
INSTE8 lts_atgt custom_lts_contextnamegt.env 600
55
Agenda
  • Introduction
  • How does it work?
  • AutoConfig Components
  • Making Configuration Changes
  • Customizing AutoConfig
  • Troubleshooting AutoConfig

56
Troubleshooting AutoConfig
  • autoconfig outputs verbose logging message in the
    logfile for each template it instantiates and
    each script it runs.
  • Logfile is located in APPL_TOP/admin/ltcontext_nam
    egt/out/MMDDhhmi directory.

57
Logfile
  • For each template following is emitted to the
    logfile
  • instantiate file
  • source ltFull path to the template filegt
  • dest ltFull path to destination filegt
  • backup ltoriginal configuration filegt to
    ltAPPL_TOPgt/admin/ltcontext_namegt/out/MMDDhhmm/ltorig
    inal configuration_filegt
  • setting permissions 755
  • setting ownership applHOP1hop1

58
Troubleshooting autoconfig
  • Provides a option to disable any customizations.
  • ltAD_TOPgt/bin/adconfig.sh nocustom \
    contextfileltCONTEXTgt appspassltAPPSpwdgt
  • Backs up existing configuration files before
    overwriting them.
  • Creates a script restore.sh in APPL_TOP/admin/out
    to restore the original configuration files.

59
Conclusion
  • AutoConfig obviates any need for manual changes
    to configuration files and configuration options
    in the database.
  • Works fine at most of the sites.
  • With fully supported customizations (from ADX.F)
    we can make modifications to it so that it can be
    made to work at any site.
Write a Comment
User Comments (0)
About PowerShow.com