Database Reference
In-Depth Information
Note that you should run EDK only on one of the supported platforms. For example, while most of the
functionality works on my Mac OS X, plug-in packaging simply hangs as it's an unsupported platform because EDK
uses the Oracle Universal Installer to perform some of its functions.
the Oracle Enterprise Manager Cloud Control Extensibility Programmer's Reference (Chapter 1, section 1.3) has
more-detailed instructions for installing the edK.
Note
Sample Plug-ins Deployment
Before we proceed, let's package and deploy three sample plug-ins that are shipped with EDK—performing
steps 2 and 3 of the plug-in lifecycle described in the previous section. Assuming you are on Unix/Linux, go to
<EDK>/samples/utl and run ./build_sample_plugin.sh oracle.samples.xsh1 . (You might need to add executable
permissions to the script beforehand. And if you are using Windows instead, look inside the shell script and modify
it to run on Windows or just call the commands yourself using Windows notation.) This script will create the OPAR
package in your home directory: 12.1.0.0.0_oracle.samples.xsh1_2000_0.opar . Run the script for two other
versions of the plug-in, which are more advanced: xsh2 and xsh3 . We will deploy them, and you can see how the
plug-in evolves during development from simple to more complex. You now have three OPAR files in your home
directory.
Note that creating an OPAR archive will call the Oracle Universal Installer behind the scenes, so you will need to
comply with its generic requirements, such as having enough free swap space.
Before going further, you need to perform one extra step: configuring a Software Library. (See Chapter 6 for
more-detailed Software Library coverage.) This is done only once after you install OMS, and you normally do it for
patching and provisioning functionality as well as for EM12c Self Update. One way to do it is to use EMCLI
(you can also add it by using the EM12c console). By now you should already have EMCLI working, so log in
by using emcli login -username=SYSMAN . I also have a habit of syncing EMCLI with the OMS, so I run emcli sync ,
but in practice it doesn't need to run every time. Next, create the Software Library location:
emcli add_swlib_storage_location -name=swlib -path=/some/path/on/OMS/server
If you think that the Software Library location has already been configured, just run emcli list_swlib_storage_locations
to verify. You need to have at least one active location.
Now you are ready to upload the OPAR files to the OMS. If your OPAR files are locally on the same server where
the OMS is running, upload each file by using the following:
emcli import_update -file=<absolute path to .opar file> -omslocal
Note that emcli doesn't actually upload the file but just sends a command to OMS (a verb in EMCLI terminology)
to perform the import action. If an OPAR file is not local to the OMS, you can specify the host and credentials so that
OMS can retrieve the file from that remote host. This example can be found in the Oracle Enterprise Manager Cloud
Control Extensibility Programmer's Reference (Chapter 13, Section 13.5.2).
Now is the time to deploy the plug-in to the OMS. This is when the OMS activates a certain version of the plug-in
and makes its target type(s) an integral part of its interface and API, just like the Database Instance target type, for
example. You can deploy a plug-in by using the EM12c console, as indicated in the Oracle Enterprise Manager Cloud
Control Extensibility Programmer's Reference (Chapter 13, Section 13.5.3). However, we will use the command line
here because it's more repeatable and quicker to document. We will use EMCLI again:
emcli deploy_plugin_on_server -plugin=oracle.samples.xsh1
 
 
Search WWH ::




Custom Search