This document describes some of the considerations for setting up your workstation to develop to WBEM and CIM.
Contents |
For the purposes of this implementation, we will be using SLED10 as the development platform. This article is not platform-specific, so any Linux distribution should work, but we will be expecting certain things that are primarily UNIX-based, such as PAM.
We will need to have the following installed:
We will be using a CIMOM to handle most of the management of the application on the server. The CIMOM we will use is the OpenWBEM implementation (www.openwbem.org). We can either obtain the source code from CVS and install the CIMOM by hand, or install an RPM that will install configure the CIMOM by itself.
The OpenWBEM CIMOM is PAM-enabled, so we will need the pam-devel package for our distribution in order to enable PAM authentication within the CIMOM.
You should choose the RPM installation method below if possible. You can also install OpenWBEM from source - see www.openwbem.org for information.
This is the easiest method of installing the requisite components if you have a supported SLES, SLED, or Open Enterprise Server installation. Using ZLM or YaST, select the following packages for installation:
These packages may already be installed. To check, run "rpm -q <package-name>" at a command line to see if the package is installed.
You will definitely want to install the SNIA CIM browser to help with your development tasks. This browser connects to your CIMOM and does basic object traversals to show the object instances that exist in the CIMOM and uses the associations between objects to traverse through them. You'll use this when you create your own MOF files to make sure that the data makes sense and is usable in the way you expected.
Download a copy of the SNIA browser Alternate Location
Once you have installed the CIMOM and schema as instructed above, you should be able to install the SNIA browser and connect to the CIMOM. You should be able to log into the CIMOM with the SNIA browser and see all your objects. Be sure you indicate the root/cimv2 namespace.
Figure 2: SNIA CIM Browser login screen
You will probably want to make a few changes to the way OpenWBEM runs when you are doing development. Many of these changes should not be used in a production environment, so take caution.
In the text editor of your choice, open the OpenWBEM configuration file. If you installed from an RPM, this file is probably located in /etc/openwbem/openwbem.conf. You can always check the owcimomd man page to see the default location for the configuration file if you can't find it at the above location.
The first value we are going to change is the configuration value for owcimomd.allow_anonymous. The default value for this parameter is false, which means that a user accessing the CIMOM must authenticate. For development purposes it will be easier if we don't require authentication, so we set this value to true.
The next value we should consider is the value for owcimomd.log_level. If desired, we can set the log level to a more granular level of logging, in order to see more of what is going on in the CIMOM. By default, all the log messages will be sent to the system log. Alternatively, we can choose to leave this parameter alone and run the CIMOM in debug mode from the command line, in which case all the error messages go to the console:
/usr/sbin/owcimomd -d.
The next value to check is http_server.http_port. The default configuration for OpenWBEM is to indicate that the CIMOM will only accept secure connections, via HTTPS. This is a good security practice, preferable for production environments, but not really suitable for development. If we simply comment this option out, we will get regular HTTP connections on the default port, 5988.
The last thing you may want to consider is the value for cppprovifc.prov_location. This parameter indicates a filesystem path where the CIMOM should look for C++ providers to load. It should be set to the default location. Multiple paths, separated by colons, are supported. Using this feature, you can keep your providers separate from the system providers.
© 2008 Novell, Inc. All Rights Reserved.