6 Replies Latest reply: Jan 28, 2013 7:46 AM by EdSpn RSS

    Plug-In development lifecycle

    EdSpn
      Hi,

      I am trying to develop a very simple plug-in which is basically a stripped version of the host sample plug-in.
      To deploy the plug-in I go through the steps of: validation, creation, import and finally deployment.

      Is there another way to quickly trial/error a small change in one of the plug-in's xml files?

      Versions I am using:
      - OEM 12c
      - DB Server 11g

      I read in the 12c Programmer's Reference, chapter 13.7, that you can update deployed metadata files using the Metadata Registration Service (MRS). However, it looks as if this command is not available when using DB Server 11g?! This makes that even for very small changes I have to go through all steps to test that small change?

      Many thanks for your feedback,
      Ed
        • 1. Re: Plug-In development lifecycle
          Subhadeep-Oracle
          I suggest a reading of the section "13.7 Updating Deployed Metadata Files Using the Metadata Registration Service (MRS)" at "Cloud Control Extensibility Programmer’s Reference 12c Release 2 (12.1.0.2)"

          As part of the plug-in development process, you will package your plug-in as an archive and deploy it to an Enterprise Manager Cloud Control installation to test it. However, you will likely not want to re-deploy the plug-in each time you make changes to various metadata files.

          This service is invoked through the emctl register oms metadata command. The syntax is as follows:
          emctl register oms metadata -service Metadata Service Id (-file metadata file to register | -file_list file containing list of files to register) [-core | -pluginId Plugin Id] [-sysman_pwd "sysman password"]
          • 2. Re: Plug-In development lifecycle
            EdSpn
            Hi,

            Thanks for the response, however our emctl utility is from Oracle EE 11R2, it doesn't seem to support the register verb:
            [oracle@dwbi-durl-oel ~]$ emctl register
            Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
            Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
             Register Targettype Usage :
            emctl register oms targettype [-o <Output filename>] <XML filename> <rep user> <rep passwd> <rep host> <rep port> <rep sid> OR
            emctl register oms targettype [-o <Output filename>] <XML filename> <rep user> <rep passwd> <rep connect descriptor>
            Am I correct in saying that I need Oracle EE 12c for this?

            [edit]
            P.S. I also tried the emctl in the agent home directory (as the above emctl is found in $ORACLE_HOME/bin.

            [oracle@dwbi-durl-oel agent_base_em]$ echo $AGENT_HOME
            /data/u01/agent_base_em/core/12.1.0.2.0
            
            [oracle@dwbi-durl-oel agent_base_em]$ $AGENT_HOME/bin/emctl register oms | head
            Oracle Enterprise Manager Cloud Control 12c Release 2
            Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
            Oracle Enterprise Manager Cloud Control 12c Release 2 Agent Commands:
            Lifecycle Commands Usage:
            emctl start agent
               Starts the agent.
            emctl stop agent
               Stops the agent.
            
            Agent Operations Usage:
            [oracle@dwbi-durl-oel agent_base_em]$
                 :
            Thank you for your support.

            Regards,
            Ed

            Edited by: 977814 on Jan 23, 2013 12:15 PM
            • 3. Re: Plug-In development lifecycle
              Subhadeep-Oracle
              Yes. Use EM 12c PS1 i.e. 12.1.0.2 version of OMS.
              • 4. Re: Plug-In development lifecycle
                EdSpn
                Hi,
                Thanks again for the feedback. My apologies, I still seem to miss something, as the command is not accepted?

                We are using:
                     - Oracle Enterprise Manager 12c Cloud Control Console 12.2.0.1
                     - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 (for the repository database)

                I read chapter 13.7 in the 12.1.0.2 Ext Progr Ref Guide, about the Metadata Registration Service.

                When I run emctl from $AGENT_HOME/bin in v12.2.0.1, *it doesn't seem to recognize the register oms use of emctl and exits with an exit code value of 100*. It looks like this is the exit code each time I pass emctl unrecognized parameters.
                [oracle@dwbi-durl-oel ~]$ cd $AGENT_HOME/bin
                
                [oracle@dwbi-durl-oel bin]$ pwd
                /data/u01/agent_base_em/core/12.1.0.2.0/bin
                
                [oracle@dwbi-durl-oel bin]$ ./emctl register oms metadata -service default_collection -file /home/oracle/stage_upload_ed/agent/default_collection/oracle_edtarget1_dc.xml -pluginid abc.oem.et1 -sysman_pwd sysmanpwd
                Oracle Enterprise Manager Cloud Control 12c Release 2
                Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
                Oracle Enterprise Manager Cloud Control 12c Release 2 Agent Commands:
                Lifecycle Commands Usage:
                emctl start agent
                   Starts the agent.
                emctl stop agent
                     :
                     : <all usage text>
                     :
                Secure Agent Usage :
                emctl secure agent [registration password] [-emdWalletSrcUrl <url>]
                emctl unsecure agent
                emctl secure add_trust_cert -trust_certs_loc <loc>
                emctl secure add_trust_cert_to_jks [-password <password> -trust_certs_loc <loc> -alias <alias>]
                   where
                      password - password to the AgentTrust.jks (if not specified will be prompted for)
                      trust_certs_loc - location of the cert file to import
                      alias - alias for the cert to import
                
                [oracle@dwbi-durl-oel bin]$ echo $?
                100
                Thanks again,
                Regards,
                Ed
                • 5. Re: Plug-In development lifecycle
                  Subhadeep-Oracle
                  You are Mixing up on 2 things.

                  a. Enterprise Manager 12c OMS Version 12.1.0.2.0 : I think this is the Correct version u r working on.
                  b. Run emctl register oms metadata --from $OMS_HOME/bin & Not AGENT_HOME/bin.

                  Then all will b fine.
                  • 6. Re: Plug-In development lifecycle
                    EdSpn
                    Hi,

                    This seems to have solved the issue indeed. When I use $OMS_HOME/bin it works:
                    [oracle@dwbi-durl-oel ~]$ cd $OMS_HOME/bin
                    [oracle@dwbi-durl-oel bin]$ ./emctl register oms metadata -service default_collection -file /home/oracle/stage_upload_ed/agent/default_collection/oracle_edtarget1_dc.xml -pluginId abc.oem.et1 -sysman_pwd sysman_pwd
                    Oracle Enterprise Manager Cloud Control 12c Release 2
                    Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
                    Metadata registration successful
                    Many thanks for your feedback,
                    Ed