27 Middleware Provisioning using the EM CLI

This chapter describes how you can use the command line option Enterprise Manager Command Line Interface offered by Oracle to create, describe, list, delete, and customize the Middleware Profiles.

In particular, this chapter covers the following:

27.1 Creating Middleware Provisioning Profiles

Profiles are like templates that you can create and store in Software Library. Once a profile is created, it can be launched numerous times to provision WebLogic Domain and/or Oracle Home. The advantage of using a profile is that you can ensure that future WebLogic installations follow a standard, consistent configuration.

Profiles can be created from an:

27.1.1 Creating a WebLogic Domain Profile

To create a Fusion Middleware Provisioning Profile from a WebLogic Domain, use the EM CLI verb create_fmw_domain_profile.

emcli create_fmw_domain_profile
-name="Profile Name"
-ref_target="Reference Target Name"
[-description="Profile Description"]
[-oh_cred="Oracle Home Owner Credentials"]
[-includeOh]
[-schedule=
start_time:yyyy/MM/dd HH:mm;
[tz:{java timezone ID}];
[grace_period:xxx];
]

[ ] indicates that the parameter is optional.

Description for the options:

-name
Name of the WebLogic Domain profile.
 
-ref_target
Name of the reference target used to create the WebLogic Domain profile.
 
-description
A short description for the WebLogic Domain profile you create.
 
 -oh_cred 
        Named credential that will be used to access the reference host. 
        Format: CREDENTIAL_NAME:CREDENTIAL_OWNER. 
        All operations will be performed on the Administration Server host. 
        Credentials of the Oracle Home owner on the Administration Server host are required. 
        If no named credential is provided, then preferred host credentials for the Oracle Home target will be used.

-wls_cred 
        Named credential used to access the Administration Server. This is an optional parameter. 
        To pass the credential parameter, enter a name:value pair in the following format: 

credential_name:credential_owner. 
           Where, 
             Credential_name is the name of the named credential. 
             Credential_owner is the credentials of the Administrator of the WebLogic Domain. 
        All operations are performed in online mode (using T2P) in case of a Fusion Middleware domain. 
        If no named credential is provided, the preferred administrator credentials for the domain target will be used.

-includeOh 
        Whether the Oracle Home binaries have to be included in the profile or not.

-schedule 
        The schedule for the Deployment Procedure. 
        If not specified, the procedure will be executed immediately. 
                 start_time: when the procedure should start. 
                         tz: the timezone ID. 
               grace_period: grace period in minutes. 

Following examples describe how to create a WebLogic Domain profile:

  • A WebLogic Domain called BitlessDomainProfile is created using the reference target /Farm01_base_domain/base_domain at the specified schedule. Since the Oracle home parameter is not passed, a plain WebLogic domain without the Oracle home binaries is created. Also, since the Oracle home credentials haven't been specified, the preferred host credentials for the target home is used.

    emcli create_fmw_domain_profile
    -name="BitlessDomainProfile"
    -ref_target="/Farm01_base_domain/base_domain"
    -description="A domain profile without software bits"
    -schedule="start_time:2014/6/21 21:23;tz:America/New_York;grace_period:60"
    
  • A WebLogic Domain profile along with Oracle home binaries called DomainProfilewithBits is created immediately. This profile is created from the reference target /Farm01_base_domain/base_domain using the specified named credentials.

     emcli create_fmw_domain_profile
    -name="DomainProfileWithBits"
    -ref_target="/Farm01_base_domain/base_domain"
    -oh_cred="MY_HOST_CRED:SYSMAN"
    -includeMWH
    
  • The is created in the Software Library in Fusion Middleware Provisioning/Profiles directory. Since the schedule is not mentioned, the job runs immediately.

     emcli create_fmw_domain_profile
    -name=D=SoaProfile
    -ref_target="="Farm01_SoaDomain/SoaDomain"
    

    Output:

    For example you will see following attributes when the profile has been submitted successfully:

    • instance_name: 'CreateFmwProfile-SoaProfile_SYSMAN_07_09_2014_11_36_AM'

    • instance_guid: 'FDC7FC56E2CF2972E04373B1F00A1512'

    Note:

    To track the status of the profile being created, use the command:

    emcli get_instance_status -instance=FDC7FC56E2CF2972E04373B1F00A1512 -xml -details -showJobOutput

27.1.2 Creating an Oracle Home Profile

To create a Fusion Middleware Provisioning Profile from an Oracle Home target, use the EM CLI verb create_fmw_home_profile_verb.

emcli create_fmw_home_profile
-name="Profile Name"
-ref_target="Reference Target Name"
[-description="Profile Description"]
[-oh_cred="Oracle Home Owner Credentials"]
[-schedule=
start_time:yyyy/MM/dd HH:mm;
[tz:{java timezone ID}];
[grace_period:xxx];
]
 
 
[ ] indicates that the parameter is optional.

Description for the options:
-name
Name of the Oracle home profile.
 
-ref_target
Name of the Oracle Home target used as reference to create the profile.
 
-description
A short description for the Oracle home profile you create.
 
-oh_cred
Named credentials used to access the reference host. This is an optional parameter.
To pass the credential parameter, enter a name:value pair in the following format: credential_name:credential_owner.
Where,
Credential_name is the name of the named credential.
Credential_owner is the credentials of the Oracle home owner on the Administration Server host.
If no named credential is provided, the preferred host credential for the Oracle home target will be used.
 
-schedule
The schedule for the Deployment Procedure.
If not specified, the procedure will be executed immediately.
To specify a value, enter:
start_time: when the procedure should start.
tz: the timezone ID.
grace_period: grace period in minutes. 

Following examples describe how to create an Oracle Home profile:

  • An Oracle Home profile is created in the Software Library in Fusion Middleware Provisioning/Profiles directory. Since the schedule is not mentioned, the job runs immediately.

    emcli  create_fmw_home_profile
    -name=SoaProfile
    -ref_target="WebLogicServer10_3_6_0_slc00tkv.example.com_6316"
    

    Output:

    You will see the following attributes when the profile has been submitted successfully:

    • instance_name: 'CreateFmwProfile-SoaProfile_SYSMAN_07_09_2014_11_36_AM'

    • instance_guid: 'FDC7FC56E2CF2972E04373B1F00A1512'

    Note:

    To track the status of the profile being created, use the command:

    emcli get_instance_status -instance=FDC7FC56E2CF2972E04373B1F00A1512 -xml -details -showJobOutput

  • An Oracle home profile called OhProfile1 is created using the reference host target at the specified schedule using preferred credentials.

    emcli create_fmw_home_profile
    -name="OhProfile1"
    -ref_target=""WebLogicServer_10.3.6.0_myhost.example.com_5033""
    -description="An Oracle Home profile"
    -schedule="start_time:2014/6/21 21:23;tz:America/New_York;grace_period:60"
    
  • An Oracle home profile named OhProfile2 is created immediately from the reference host target using named credentials.

    emcli create_fmw_home_profile
    -name="OhProfile2" -ref_target="WebLogicServer_11.4.1.0_myhost.example.com_5023"
    -oh_cred="MY_HOST_CRED:SYSMAN"
    

27.1.3 Creating an Installation Media Profile

To create a profile using the Oracle Fusion Middleware installation media, use the EM CLI verb create_inst_media_profile_verb

emcli create_inst_media_profile
-name="Profile Name"
-host="Reference Target Name"
-version="Reference Target Name"
-platform="Reference Target Name"
[-description="Profile Description"]
[-host_cred="Oracle Home Owner Credentials"]
-files=
WebLogic:WLSFile1;
SOA:SOAFile1,SOAFile2;
OSB:OSBFile;
RCU:RCUFile;

[ ] indicates that the parameter is optional.

Description for the options:
-name
Name of the installation media profile.
 
-host
Name of the host target where the installation media files are stored.
 
-version
Version of the installation media files.
 
-platform
Platform for which the installation media is applicable.
 
-description
A short description for the installation media profile.
 
-host_cred
Named credentials used to access the reference host. This is an optional parameter. To pass the credential parameter, enter a name:value pair in the following format: credential_name:credential_owner.
Where,
Credential_name is the name of the named credential.
Credential_owner is the credentials of the Oracle home owner on the Administration Server host.
If no named credential is provided, the preferred host credential for the host target will be used.
.
-files
List of files that have to be uploaded to Software Library. These files are passed in the format product:file1,file2. The Installation Media profile supports the following products: WebLogic, SOA, OSB, and RCU. Note that, to create any of these profiles, you must upload the WebLogic media file.

Following examples describe how to create an Oracle Home profile:

  • Upload an installation media profile named WebLogic1036Installer containing WebLogic jar file called wls1036_generic.jar to the Software Library from the host myhost.example.com. Additionally, you must provide the platform and version details for the installation media file. Since you have not passed any credential as a parameter, the preferred host credentials will be used to access the WebLogic jar file.

    emcli create_inst_media_profile
    -name="WebLogic1036Installer"
    -host="myhost.example.com"
    -description="WebLogic Server 10.3.6.0 installer"
    -version="10.3.6.0"
    -platform="Generic"
    -files="WebLogic:/u01/media/weblogic/wls1036_generic.jar"
    
  • Upload the SOA and WLS installation media files to the Software Library from the host myhost.example.com. Additionally, you must provide the platform and version details for the installation media file. The profile called SOA+WLSInstaller is created using the named credentials specified.

     emcli create_inst_media_profile
    -name="SOA+WLSInstaller"
    -host="myhost.example.com"
    -description="SOA 11.1.1.7.0 and WebLogic Server 10.3.6.0 installer"
    -version="11.1.1.7.0"
    -platform="Generic"
    -host_cred="MY_HOST_CRED:SYSMAN"
    -files="WebLogic:/u01/media/weblogic/wls1036_generic.jar;SOA:/u01/media/soa/soa1.zip,/u01/media/soa/soa2.zip"
    
  • An Oracle Home profile is created in the Software Library in Fusion Middleware Provisioning/Profiles directory. Since the schedule is not mentioned, the job runs immediately.

    emcli  create_inst_media_profile
    -name="WebCenter Install Media"
    -host=slc03qtn.example.com
    -description="WC 11.1.1.8.0 and WebLogic Server 10.3.6.0 installer and RCU"
    -version="11.1.1.8.0"
    -platform="2000"
    -host_cred="BBANTHIA:SYSMAN"
    -files="WebLogic:/net/adcnas438/export/emgpqa/provisioning/fmwprov/linux64/shiphomes/upinsmed_wls/wls1036_generic.jar;WCP:/net/slcnas478/export/farm_em_repos/emgpqa/provisioning/fmwprov/linux64/shiphomes/wcp_11.1.1.8.0/wc.zip;WCC:/net/slcnas478/export/farm_em_repos/emgpqa/provisioning/fmwprov/linux64/shiphomes/wcc_11.1.1.8.0/ecm_main1.zip,/net/slcnas478/export/farm_em_repos/emgpqa/provisioning/fmwprov/linux64/shiphomes/wcc_11.1.1.8.0/ecm_main2.zip;RCU:/net/slcnas478/export/farm_em_repos/emgpqa/provisioning/fmwprov/linux64/shiphomes/wcrcu_11.1.1.8.0/rcuHome.zip"
    

27.2 Submitting the Procedure using EM CLI

To automate the process of provisioning using the command line, submit your procedure using the Enterprise Manager Command Line Interface (EMCLI) utility. The EMCLI enables you to access Enterprise Manager Cloud Control functionality from text-based consoles (shells and command windows) for a variety of operating systems. You can call Enterprise Manager functionality using custom scripts, such as SQL*Plus, OS shell, Perl, or Tcl, thus easily integrating Enterprise Manager functionality with your company's business process.

27.3 Listing Middleware Provisioning Profiles

This section describes how you can list all the Fusion Middleware Provisioning profiles that you have created in Enterprise Manager.

In particular, this section covers the following topics:

27.3.1 Listing All the Profiles

To list all the Fusion Middleware Profiles, run the following command:

emcli list_fmw_profiles 
        [-source_type="Profile Source"]

Description for the options:
    -source_type 
        Valid values: weblogic_domain, oracle_home or install_media. 
        Profiles of only this type as source will be shown.

Following examples describe how to create an Oracle Home profile:

  • To list all the Middleware Provisioning Profiles, run the following command:

    emcli list_fmw_profiles 
    

    Output:

    Location Products Platform Version Owner
    Fusion Middleware Provisioning/Profiles/SoaBitlessProfile Oracle SOA Linux x86-64 10.3.6.0 SYSMAN
    Fusion Middleware Provisioning/Profiles/SoaGoldImage Oracle SOA Linux x86-64 10.3.6.0 SYSMAN
    Fusion Middleware Provisioning/Profiles/WebCenter Install Media Oracle WebCenter Content Generic Platform 11.1.1.8.0 SYSMAN

27.3.2 Listing All the WebLogic Domain Profiles

To list all the WebLogic Domain Profiles, run the following command:

emcli list_fmw_profiles 
        [-source_type="Profile Source"]

Description for the options:
    -source_type 
        Valid values: weblogic_domain, oracle_home or install_media. 
        Profiles of only this type as source will be shown.

Following examples describe how to create an Oracle Home profile:

  • To list all the WebLogic Domain Provisioning Profiles, run the following command:

    emcli list_fmw_profiles
    -source_type=weblogic_domain
    

    Output:

    Location Products Platform Version Owner
    Fusion Middleware Provisioning/Profiles/SoaBitlessProfile Oracle SOA Linux x86-64 10.3.6.0 SYSMAN

27.3.3 Listing All the Oracle Home Profiles

To list all the Oracle Home Profiles, run the following command:

emcli list_fmw_profiles 
        [-source_type="Profile Source"]

Description for the options:
    -source_type 
        Valid values: weblogic_domain, oracle_home or install_media. 
        Profiles of only this type as source will be shown.

Following examples describe how to create an Oracle Home profile:

  • To list all the WebLogic Domain Provisioning Profiles, run the following command:

    emcli list_fmw_profiles
    -source_type=oracle_home
    

    Output:

    Location Products Platform Version Owner
    Fusion Middleware Provisioning/Profiles/SoaGoldImage Oracle SOA Linux x86-64 10.3.6.0 SYSMAN

27.3.4 Listing All the Installation Media Profiles

To list all the Oracle Home Profiles, run the following command:

emcli list_fmw_profiles 
        [-source_type="Profile Source"]

Description for the options:
    -source_type 
        Valid values: weblogic_domain, oracle_home or install_media. 
        Profiles of only this type as source will be shown.

Following examples describe how to create an Oracle Home profile:

  • To list all the WebLogic Domain Provisioning Profiles, run the following command:

    emcli list_fmw_profiles
    -source_type=install_media
    

    Output:

    Location Products Platform Version Owner
    Fusion Middleware Provisioning/Profiles/WebCenter Install Media Oracle WebCenter Content Generic Platform 11.1.1.8.0 SYSMAN

27.4 Describing Provisioning Profiles

To view the summary of the Fusion Middleware Provisioning Profile that you have created in Cloud Control, run the following command:

Usage:

emcli describe_fmw_profile
-location="Profile Location

Description for the options:
-location 
        Complete Software Library path to the Profile. 
        Use list_fmw_profiles to know the complete path. 

In particular, this section covers the following topics:

27.4.1 Describing a WebLogic Domain Profile

To view a summary of the WebLogic Domain Profile, run the following command:

Usage:

emcli describe_fmw_profile
-location="Fusion Middleware Provisioning/Profiles/SoaBitlessProfile"

Output
Location: Fusion Middleware Provisioning/Profiles/SoaBitlessProfile
Created By: SYSMAN
Created On: Sun, 6 Jul 2014
URN: oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_FMWBundle:FD8AEF47A15C0874E04373B1F00AEC31:0.1

Attachments:

Name Size Content Type Added By Added On
nmMovePlan.xml 6.95 KB text/plain SYSMAN Sun, 6 Jul 2014
mdm-url-resolver.xml 268 Bytes text/plain SYSMAN Sun, 6 Jul 2014
domainMovePlan.xml 56.91 KB text/plain SYSMAN Sun, 6 Jul 2014

Source: WebLogic Domain
Oracle Home Included: No
Node Manager Included: Yes
Platform: Linux x86-64
Version: 10.3.6.0

Oracle Homes:

Product: Oracle SOA
Version: 11.1.1.7.0

WebLogic Domain:

Domain Name: SoaDomain
Size: 611.45 MB
Products: Oracle SOA
Name Host Listen Address Port Machine Cluster Maximum Heap Average CPU Usage
AdminServer slc00tkv.example.com slc00tkv.example.com 7001 LocalMachine   1365 0.361
Soa_server1 slc00tkv.example.com slc00tkv.example.com 8001LocalMachine cluster_soa 1365 0.717

Data Sources:

Name Username URL Target
EDNDataSource SOA_SOAINFRA jdbc:oracle:thin:@slc00dbv.example.com:1521/dbv.example.com cluster_soa
EDNLocalTxDataSource SOA_SOAINFRA jdbc:oracle:thin:@slc00dbv.example.com:1521/dbv.example.com cluster_soa
OraSDPMDataSource SOA_SOAINFRA jdbc:oracle:thin:@slc00dbv.example.com:1521/dbv.example.com cluster_soa
OraSDPMDataSource SOA_SOAINFRA jdbc:oracle:thin:@slc00dbv.example.com:1521/dbv.example.com cluster_soa
SOALocalTxDataSource SOA_SOAINFRA dbc:oracle:thin:@slc00dbv.example.com:1521/dbv.example.com cluster_soa
mds-owsm SOA_MDS jdbc:oracle:thin:@slc00dbv.example.com:1521/dbv.example.com cluster_soa
mds-soa SOA_MDS jdbc:oracle:thin:@slc00dbv.example.com:1521/dbv.example.com cluster_soa

JMS Servers:

Name Persistent Store Directory Target
BPMJMSServer_auto_1 BPMJMSFileStore_auto_1 UMSJMSFileStore_auto_1 soa_server1
PS6SOAJMSServer_auto_1 PS6SOAJMSFileStore_auto_1 UMSJMSFileStore_auto_1 soa_server1
SOAJMSServer_auto_1 SOAJMSFileStore_auto_1 SOAJMSFileStore_auto_1 soa_server1
UMSJMSServer_auto_1 UMSJMSFileStore_auto_1 UMSJMSFileStore_auto_1 soa_server1

27.4.2 Describing an Oracle Home Profile

To view a summary of the Oracle Home Profile, run the following command:

Usage:

emcli describe_fmw_profile
-location="Fusion Middleware Provisioning/Profiles/SoaGoldImage"

Output
Location: Fusion Middleware Provisioning/Profiles/SoaGoldImage
Created By: SYSMAN
Created On: Tue, 8 Jul 2014
URN: oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_FMWBundle:FDB228F176CA1B47E04373B1F00AF708:0.1
Source: Oracle Home
Platform: Linux x86-64
Version: 10.3.6.0

Oracle Homes:

Product: Oracle SOA
Version: 11.1.1.7.0

27.4.3 Describing an Installation Media Profile

To view a summary of the Installation Media Profile, run the following command:

Usage:

emcli describe_fmw_profile
-location="Fusion Middleware Provisioning/Profiles/WebCenter Install Media"
Output:
Location: Fusion Middleware Provisioning/Profiles/WebCenter Install Media
Description: WC 11.1.1.8.0 and WebLogic Server 10.3.6.0 installer and RCU
Created By: SYSMAN
Created On: Sun, 6 Jul 2014
URN: oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_InstallationMedia:FD8AA7EEEEA369A5E04373B1F00AE77C:0.1
Source: Installation Media
Product: Oracle WebCenter
Platform: Generic Platform
Version: 11.1.1.8.0

Files:

Product File Size
Oracle WebCenter Content ecm_main1.zip

ecm_main2.zip

2.34 GB

1.91 GB

Oracle RCU PS6SOAJMSFileStore_auto_1 496.16 MB
Oracle WebCenter Portal SOAJMSFileStore_auto_1 1.96 GB
Oracle WebLogic Server UMSJMSFileStore_auto_1 1,019.01 MB

27.5 Deleting Provisioning Profiles

To delete the Fusion Middleware Provisioning Profile from Software Library, run the following:

Usage:

emcli delete_fmw_profile 
        -location="Profile Location" 
Description for the options:
    -location 
Complete Software Library path to the Profile. 
        Use list_fmw_profiles to know the complete path.

Examples:

To delete a profile by the name MyProfile, run the following command:

emcli delete_fmw_profile 
              -location="Fusion Middleware Provisioning/Profiles/MyProfile" 

To delete a DomainProfile, run the following command:

emcli delete_fmw_profile 
              -location="Fusion Middleware Provisioning/Profiles/DomainProfile" 

Output: The profile Fusion Middleware Provisioning/Profiles/DomainProfile has been deleted successfully.