Pegasus Enhancement Proposal (PEP)

PEP #: 235

Title: OpenPegasus Version 2.5 Release Readme file

Version: 1.4

Created: 6 Sept 2005

Authors: Warren Grunbok

Status: draft

Version History:

Version | Date | Author | Change Description
--- | --- | --- | ---
1.0 | 5, Sept 2005 | Warren Grunbok | Initial draft
1.1 | 13, Sept 2005 | Warren Grunbok/Roger Kumpf | Updates based on Architecture team review
1.2 | 22, Sept 2005 | Warren Grunbok | Updates from posted comments to 1.1
1.3 | 22,Sept 2005 | Warren Grunbok | changed _ to -
1.4 | 26, Sept 2005 | Warren Grunbok/Dave Sudlik | Cleanup on example lists

Abstract: Installation, build, operation information on the OpenPegasus Version 2.5.0 Release. Note that if this readme conflicts with the documentation in the release notes or interface definition documents for a particular release, those documents should be considered authorative. This is a simplified overview to act as an introduction to OpenPegasus.

OpenPegasus - A Manageability Services Broker for the DMTF CIM/WBEM Standards

Tagline: OpenPegasus is an object manager for DMTF CIM objects written in C++ and hosted by The Open Group

STATUS: Revised Sept 2005 for Pegasus release version 2.5.0 - Draft

Overview

> Availability of Pegasus
> Pegasus Supported Platforms
> Pegasus Dependencies
> Commands
> Documentation
> How to Participate

Install Pegasus

> Download or checkout Pegasus
> Verify that you have the required software
> Set the environment variables
> Build the Pegasus runtime, test files, test clients, and repository
> Populate the Pegasus repository
> Register providers in the Pegasus environment
> Notes about Building Pegasus on Linux
> Notes on building Pegasus with SSL
> Building Pegasus on Windows 2000 or Windows XP With Microsoft Visual C++

> > The MU Utility

Test the Pegasus installation

> Testing with ICU enabled

# Overview

OpenPegasus (also referred to as Pegasus): Pegasus is an open-source CIM Server for DMTF CIM objects. It is written in C++ and includes the Object manager (CIMOM), a set of defined interfaces, an implementation of the CIMOperations over HTTP operations and their cimxml HTTP encodings, and Interface libraries for both client and providers. It is maintained consistent with the DMTF CIM and WBEM specifications except for exceptions noted in the documentation.
OpenPegasus includes components for:

1. DMTF compliant CIMServer that processes CIM operations, CIM Indications, and includes class and instance repositories and interfaces for creating CIM Providers and CIM Clients.
2. Provider interfaces so that providers may be build in multiple languages (i.e. C++, C, Java).
3. A number of CIM providers.
4. A mof compiler.
5. A number of CIM CLients to provide usage examples, CIMServer test functions, and administration functions.
6. More complete information on the exact functions and their functional state is available from the release notes for each OpenPegasus release.

OpenPegasus is open source and is covered under the MIT open-source license.

OpenPegasus is being developed and maintained under the auspices of The Open Group. OpenPegasus is maintained under the license defined in the doc directory of this release. The specific file is: pegasus/doc/license.txt. This licensing is intended to support as wide a distribution as possible with minimal demands on the users.

More information on this project, access to the CVS, and documentation on Pegasus are available from the OpenGroup WEB site.

http://www.openpegasus.org

## Availability of Pegasus

##

##

Pegasus can be obtained via any of the following:

1. Released tarballs (see Relase tarballs link)
2. CVS (See CVS code repository for more information.)
3. Linux RPMs. See (RPM link for more information )

NOTE: The Linux RPM reference is for 2.4.1 because that is all we have. We need a general page to get to the RPMs, not one per release.

Pegasus is distributed as open source under the MIT open-source license. The distribution is available via CVS and snapshot images in tar and zip file formats on the web site. The source code from CVS can be found at the following Open Group CVS server;

CVS write accounts are managed by Martin Kirk of The Open Group (m.kirk@opengroup.org)

## Pegasus Supported Platforms

Pegasus is regularly tested against a variety of platforms by the development group. The results of the nightly tests can be found here: Nightly test status . The Release notes provides additional details regarding the platforms. PEP 230 is the release notes PEP for 2.5.

## Pegasus Dependencies

We have worked to minimize the dependence of Pegasus on other software packages and tools. Currently Pegasus has the following dependencies:

1. GNUMAKE - To simplify the building of Pegasus across multiple platforms we have standardized on a set of build tools including: GNUMAKE. We are using GNUMAKE 3.79.1 successfully both in Windows and Linux environments.

GNUMAKE is available from :

http://www.gnu.org

2. FLEX and BISON - These tools were used to develop the MOF compiler and WQL parser. These tools are required only for development of the parsers, not for building Pegasus.

3. DOC++ - The Pegasus documentation is taken from a combination of text files and the Pegasus header files themselves. This documentation is formatted with DOC++ and GAWK. These tools are required to build the interface documentation set.

4. ICU Internationalization libraries - These libraries are used as the basis for message catalogs for message internationalization. See the ICU website (http://oss.software.ibm.com/icu/) for more information on these libraries

5. OpenSSL - If it is intended to use SSL on the communication protocol, the OpenSSL libraries are required.

NOTE: A set of the required tools for windows platforms is available on the openpegasus web site. www.openpegasus.org

# Commands

The manpages for each of the commands are in rpm/manLinux/man1.Z directory (on CVS)

To see simple help for each of the commands, use the "--help" flag.

Here is a list of useful commands:
Some of the basic commands:
NOTE: Refer to the admin guide in pegasus/doc/Admin_Guide_Release.pdf for more information about administering the Pegasus CIMServer.

- cimserver daemon=true (Start the server cimserver)
- cimserver -s (Shuts down the cimserver)
- cimserver traceLevel=4 traceComponents=ALL (Starts server with config flags)
- cimprovider -l -s (Lists providers and their status)
- cimprovider -e -m OperatingSystemModule (Enables the OperatingSystem provider)
- cimuser -a -u guest _w <ThePassword> (Adds the user guest with specified password)
- cimuser -l (Lists the users )

Note: there are some differences between windows and other platforms in starting the server as a daemon/service. Whereas most supported platforms use the configuration option daemon to start the server as a service, on windows it must be specifically installed as a service (ex. cimserver -install) and then started as a service (cimserver -start). The cimserver --h option explains the exact format of the start and stop options.
Makefile commands
Pegasus includes several make files that enable you to quickly build or refresh the Pegasus runtime, test files, test client and the repository. To use these make files, type "make" followed by one of the supplied targets.
The following list contains some of the make targets that are supported:

- <default> - Build everything.
- clean - Clean out all objects, libs, and executables.
- depend - Create the dependencies.
- repository - Create the repository in $PEGASUS_HOME/repository
- tests - Execute all tests (except client server tests).
- rebuild - clean, depend, <default>
- world - depend, <default>

For a comprehensive list of the make targets, refer to the make files.
TestMakefile commands
TestMakefile is a make file that in the top level Pegasus source directory that defines functionality to initiate the Pegasus tests. The targets defined in this makefile allow the user to run the various tests and test suites that are included in the Pegasus source package.
Example: From the $PEGASUS_ROOT directory. make -f TestMakefile [testoption]
## rebuild - Rebuild
## build - Build
## prestarttests - Execute functional tests
## poststarttests - Execute poststarttests (No security, No SSL)
## tests - Execute prestarttests and poststarttests
## standardtests - Execute poststarttests and a series of
## posstarttests using multiple options.
##
Some examples:
make -f TestMakefile prestarttests - runs the unit tests, builds the repositories.
make -f TestMakefile poststarttests - starts the server, runs the poststarttest suites (make poststarttests plus more)
make -f TestMakefile tests - combines prestarttests and poststarttests
make -f TestMakefile standardtests - runs the basic poststarttests (make poststarttests) multiple times with various options.
BuildMakefile commands
Some examples:
make -f pegasus/mak/BuildMakefile cleanbuild - Remove the existing pegasus directory, perform a CVS checkout of the pegasus source, build, and run tests.
make -f pegasus/mak/BuildMakefile removeall - Remove the existing pegasus directory.
make -f pegasus/mak/BuildMakefile recheckout - Remove the existing pegasus directory and perform a CVS checkout of the pegasus source.
The following sequence builds the tree, the repository, the testrepository, starts the server and runs the server tests suites.
make world
make testrepository
make -f TestMakefile poststarttests

# Pegasus Documentation

The documentation is currently in preparation. Much of Pegasus is documented in the PEGASUS PEPs which are the basis for approval of Pegasus functionality, changes, plans, etc. These documents are openly available on the PEGASUS web site. The preliminary documentation is not provided with this release. The current documentation is maintained both as a manual created under the tool DOC++ in the runtime subdirectory manual/html (see doc/devManual to create), as an api document also creatable from the source tree (see doc/apidoc) and as other miscellaneous documentation in the doc directory. Also there is a set of release notes. Normally the release notes for the current release are available in the root source directory of CVS.

Note that the Pegasus WEB site at The Open Group will be the source of most documentation in the future and today is the source of most discussion and design documentation.

# How to Participate

Contributors are welcome to participate in the OpenPegasus development effort. Join the mailing list by visiting www.openpegasus.org and clicking on Mailing Lists.

# Pegasus Install

RPM installation instructions can be found here: http://www.openpegasus.org/pr

Verify Dependencies

Before you install Pegasus be sure you have the proper set of software Pegasus is dependent on. See Dependencies section.

Set the environment variables

Before installing or running OpenPegasus, environment variables may have to be defined or updated.

PEP 200 contains the list of environment variables and setup necessary to use OpenPegasus.

## Populate the Pegasus repository

Before using Pegasus you must populate the repository. Typically, this is done during the build process when you run the makefile. However, you can also do it manually after the Pegasus has been built.

1. Register the MOF (Managed Object Format) file describing the skeleton of the object.
2. Register a second MOF which only points out which lib*.so file to be loaded when a specific object is activated.

The providers included with Pegasus are automatically entered into the repository by running the following command: `make repository`

The 'make repository' in the pegasus directory does three things:

- Removes the existing repository if one exists.
- Generates the CIM Schema v2.9 in the repository (skeleton of CIM objects).
- Loads schema for CIM Server functions (shutdown, add users, etc) and CIM indications (SNMP, Events, Alert, Threshold, etc) internal to the Pegasus.
- Registers included CIM Providers (libOSProvider.so, libDNSProvider.so, … ) in Pegasus (which are located in src/Providers)

## Registering Providers in the Pegasus Environment

Pegasus registers providers with a set of provider registration classes, not using the provider qualifier as is done in most DMTF CIM CIMOM implementations today. This set of classes is close to but not exactly the same as the experimental DMTF definition (See the DMTF Interop schema, experimental versions starting with 2.6). This will be harmonized in the future when the DMTF scheme is moved to final status.

Registration is performed by creating instances of the registration classes that represent the provider module, providers, classes, etc. to be registered. The easiest way to create a new registration today is to copy from one of the existing registration MOFs. See the providers/sample/load directory for examples of several registration instance implementations that do work with OpenPegasus today.

## Notes about Building OpenPegasus on Linux

To build OpenPegasus on Linux, ensure that you you have the environment variables set (PEGASUS_HOME, PEGASUS_ROOT, PEGASUS_PLATFORM. For 32 bit linux, the definition of PEGASUS_PLATFORM is normally LINUX_IX86_GNU).

## Notes on building OpenPegasus on Windows 2k or Windows XP with Microsoft Visual C++

Use of Windows 2000 SP3 or later is recommended. OpenPegasus is regularly tested on both Windows 2000 and Windows XP using the Microsoft compilers.

Today we build OpenPegasus on Windows using a set of make files contained in the source distribution, the Microsoft compilers (DevStudio 5.x is not supported, Visual Studio 6.0, SP5 is supported) and the GNUMAKE make utility. Note that you MUST have the OpenPegasus mu.exe utility compiled and available before trying to compile OpenPegasus on the normal windows platform. The following is the basic setup steps for the environment.

Setup the environment variables and path for the Micrososft Visual C compiler. Typically this can be done by running the VCVARS32.BAT file supplied with Microsoft Visual C++. (contained in the same directory as cl.exe).

For Windows, try the following for an example environment:

>     REM call the standard Microsoft .bat for VC 6 setup.
>     call 'C:/Program Files\Microsoft Visual Studio\VC98\Bin\Vcvars32.bat'
>     REM Set debug to something if you want compile in debug mode
>     set PEGASUS_DEBUG=true
>     REM set PEGASUS_ROOT to top of source tree
>     set PEGASUS_ROOT=C:/cimom/pegasus (Note: The '/' characters are intentional and required by the OpenPegasus build system)
>     REM set PEGASUS_HOME to where you want repository and executables
>     set PEGASUS_HOME=%PEGASUS_ROOT%
>     REM setup the path to the runtime files.
>     set path=%path%;%PEGASUS_HOME%\bin

### The MU Utility

In order to provide a consistent build structure across multiple platforms, we developed a small utility to provide a consistent set of small utilities across these platforms. The MU utility is a simple utility that contains many commands. For example:

C:\> mu rm myfile.cpp yourfile.cpp

You may type "mu" to get a list of valid commands. Here are some of them:

rm, rmdirhier, mkdirhier, echo, touch, pwd, copy, move, compare depend

The MU utility supports globing (expansion of wildcards) so you can do things like this:

C:\> mu rm *.obj *.exe

MU is required to build under the Windows environment. MU is available as part of the distribution of OpenPegasus.

NOTE: The binary for MU.EXE is not distributed in the OpenPegasus bin directory. You must build it separately. MU source code is part of the distribution in the directory src/utils/MU with its own make file. You must compile MU before you initiate the OpenPegasus make.
A copy of the binary is made available as a zip file on the OpenPegasus WEB site.

## Notes about Building OpenPegasus with SSL

To build with SSL you need the OpenSSL libraries and header files. They are NOT distributed with OpenPegasus. Make sure you have them in a standard directory so OpenPegasus can find them. If that's not the case, set the environment variable OPENSSL_HOME= to point where your OpenSSL installation is.

Also have the PEGASUS_HAS_SSL=yes variable set. Then just run 'make' in Pegasus directory and you will have OpenPegasus with SSL enabled. See "Creating SSL certificates" below for more information on how to use SSL.

Refer to the SSL Admin guide found in the doc directory for details on using OpenPegasus with SSL.

# Testing a OpenPegasus Installation

OpenPegasus includes an extensive set of test facilities as part of the CVS environment, including:

- Test Clients - There are several clients that have been built specifically to test OpenPegasus, or parts of OpenPegasus, including TestClient, Client, CLI, ipinfo, osinfo, WbemEsec, etc. See the src/Clients directory for more information. These programs require a server complete with repository to be running. Note that some of these tests use classes and instances that are only installed with the "make testrepository" functions including test namespaces and extra classes and instances in those namespaces and additional providers from the providers/sample and providers/testproviders directories.
- Sample and test providers - Test providers exist for the major provider types in the providers/sample directories and the providers/testProviders directory
- Unit Tests - Most OpenPegasus functions include unit tests for the functions. These are normally executed with the "make tests" command which can be executed at many different levels of the source tree from the top level to execute all of the unit tests to individual directories. Usually the unit test functions can be found in test directories immediately below their corresponding source code (i.e common/tests is the unit test functions for the common directory). Unit tests are executed without the server being operational and normally do not require the existence of a Class repository.
- An end-to-end Test Suite - the directory "test" contains a set of operations tests that cover the major CIM operations. See the make file TestMakefile in the PEGASUS_ROOT directory to execute these tests. This set of tests executes an extensive set of fixed tests and compares the results against predefined results.

## Testing with ICU enabled

ICU (International Components for Unicode) refers to the set of libraries that OpenPegasus uses to run globalized. For example: these libraries are used to load messages in different languages, format currency and numbers according to a specific locale etc. In order to enable globalization in OpenPegasus, OpenPegasus must be built with ICU enabled, ie. the right environment variables must be set prior to running "make". Refer to the GlobalizationHOWTO.htm in the docs directory for details.

When users run "make poststarttests" to verify the integrity of a OpenPegasus download, a series of tests are run that require the cimserver to be running. These tests currently depend on specific messages returned from the server. When ICU is enabled, all messages come from the resource bundles and these usually do not match the hardcoded default messages within OpenPegasus. These hardcoded default messages are what the various test programs expect in order to complete successfully. If the ICU enabled server is started without disabling message loading from the bundles, "make poststartests" will fail. In order to run "make poststarttests" successfully with ICU enabled, an environment variable called PEGASUS_USE_DEFAULT_MESSAGES must exist prior to starting the server. Once this is defined, when the cimserver starts, all messages generated will be the default hardcoded messages. This will enable "make poststarttests" to complete successfully. Once "make poststarttests" is complete, you should stop the cimserver and then undefine PEGASUS_USE_DEFAULT_MESSAGES. If this variable is left defined, OpenPegasus will not be able to load messages using ICU resource bundles.

When running the make tests command with ICU enabled, the PEGASUS_MSG_HOME environment variable must be set to the home directory where the ICU resource bundles are built. By default the resource bundles are built into directories below PEGASUS_HOME/msg, so that should be the setting for PEGASUS_MSG_HOME.

-------------------------------------------------------------------------------------------------------------------------------------

Copyright (c) 2005 EMC Corporation; Hewlett-Packard Development Company, L.P.; IBM Corp.; The Open Group; VERITAS Software Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

------------------------End of Document-------------------------