Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

COSMOS Design 208274

Revision as of 17:53, 22 January 2008 by David whiteman.us.ibm.com (Talk | contribs) ('''Data Manager Project Artifacts''')

Create a data manager toolkit that will allow adopters to easily register and use a data provider inside COSMOS framework

This is the design document for bugzilla 208274.

Change History

Name: Date: Revised Sections:
Mark Weitzel and Hubert Leung 11/7/2007
  • Initial version
Martin Simmonds 1/18/2008
  • Initial design details of project wizard
David Whiteman 1/22/2008
  • Added rest of design template
  • Added screen mockups

Workload Estimation

Rough workload estimate in person weeks
Process Sizing Names of people doing the work
Design 1 David
Code 2 David/Hubert
Test 1 David/Hubert/QA
Documentation 2 David/Rich
Build and infrastructure 0
Code review, etc.* 0
TOTAL 6.0

Terminologies/Acronyms

The terminologies/acronyms below can be used throughout this document.

Note: These definitions are not meant to be general definitions of these terms, but rather refer to how the terms are used within this design document as applied to COSMOS.

Term Definition
CMDB Configuration Management Database as defined by ITIL
CMDBf CMDB Federation Specification
MDR Management Data Repository as defined by CMDBf
Federating CMDB As defined by the CMDBf spec, a CMDB that federates data from multiple MDRs
CMDBf toolkit The code provided by COSMOS that interacts with the query and registration service framework, and provides the WSDM endpoints needed to communicate with the federating CMDB

Purpose

There are a number of manual steps that adopters are required to take when creating a data manager, MDR, or federating CMDB using the COSMOS framework. Much of these steps can be automated by an Eclipse-based toolkit that will greatly simplify the steps required for an adopter to use COSMOS framework. The toolkit should automatically generate code stubs, configuration files, and any other artifacts that will greatly simplify the procedure for adding a custom data manager to COSMOS.

Deliverables

  • Development environment - install a number of plugins into eclipse workbench
  • Include examples and documentation on how to extend the COSMOS framework.
  • Developers will create extensions to the COSMOS framework in the eclipse workbench environment.
  • Testing environment: WSDM Tooling allows the launching of endpoints within eclipse
  • Export the end result into deployment enviroment
    • J2EE, OSGi
    • Server component
    • Client component


Design Considerations

  • Decide on project multiplicity, e.g. one for client, one for server etc...
  • What other things are available, e.g. STP or WTP may have annotations for web services.

Detailed Design

Creating a new Data Manager project

We will provide a new Eclipse menu option for creating a data manager project. As mentioned previously, this will greatly simplify the process and reduce the human error in configuring a data manager or MDR for use with COSMOS.

The menu option will be accessible from the Eclipse menu bar, as follows:

File > New > Systems Management > Data Manager Project

208274 New project wizard.jpg

The wizard for creating a data manager project will have the following responsibilities:

  • Creates org.eclipse.cosmos.*mdrname.mdr project
  • Creates org.eclipse.cosmos.*mdrname.mdr.test junit project
  • Creates Activator.java
  • Creates *mdrnameMdr.java
  • Creates Junit test *mdrnameTest.java
  • Create config.proprties
  • Create domainEPR.xml
  • Create MANIFEST.MF
  • Creates Plug-in Dependencies
    • org.apache.xerces_2.8.0*
    • org.apache.xml.resolver*
    • muse-complete-2.2.0.jar
    • org.eclipse.osgi_3.3.2.R33x*
    • org.eclipse.cosmos.common
    • org.eclipse.dc.cmdbf.services
    • org.eclipse.dc.dataManager
    • org.eclipse.dc.mdr
    • org.eclipse.dc.mdr.common
    • org.eclipse.cosmos.management.common
    • org.eclipse.cosmos.samples.cmdbf.services


Create Data Manager Project Wizard

When the 'Create Data Manager' project wizard is launched, the following properties can be set:

  1. MdrName
  2. Resource_ID
  3. Display Name
  4. Description
  5. Deployment target (Tomcat/OSGI)
  6. Type of data manager (standard data manager / MDR (query service) / federating CMDB (query & reg service)

Here is a mockup of the appearance of the wizard:
208274 create data mgr wizard.jpg

Data Manager Project Artifacts

The following examples illustrate the artifacts that would be generated if a data manager of type MDR is specified in the project wizard.

Activator.java

package org.eclipse.cosmos.*mdrname.dataManager;

import org.eclipse.cosmos.dc.dataManager.api.IDataManager;
import org.eclipse.cosmos.dc.dataManager.impl.AbstractDataManagerActivator;

public class Activator extends AbstractDataManagerActivator {

	@Override
	protected IDataManager getDataManagerInstance() {
		return new *MdrnameDataManager();
	}

}

*MdrnameDataManager.java

package org.eclipse.cosmos.*mdrname.dataManager;

import org.eclipse.cosmos.dc.cmdbf.services.query.service.IQueryHandlerFactory;
import org.eclipse.cosmos.dc.dataManager.api.IDataManager;
import org.eclipse.cosmos.dc.mdr.api.IMdrQuery;
import org.eclipse.cosmos.dc.mdr.impl.AbstractMdr;
import org.eclipse.cosmos.dc.mgmt.annotations.ManagedResource;
import org.eclipse.cosmos.samples.cmdbf.services.query.ICMDBfSampleConstants;
import org.eclipse.cosmos.samples.cmdbf.services.query.QueryHandlerFactory;
import org.eclipse.cosmos.samples.cmdbf.services.query.XMLRepository;

@ManagedResource
public class *MdrnameDataManager extends AbstractMdr implements IDataManager, IMdrQuery 
{	
	public ExampleMdr() 
	{
	}

	@Override
	public IQueryHandlerFactory getQueryHandlerFactory() 
	{
		return QueryHandlerFactory.getInstance();
	}

}

config.properties

RESOURCE_ID=Example
DISPLAY_NAME=MDR Example
DESCRIPTION=An example of an MDR
MGMT_DOMAIN_EPR_FILE=META-INF/domainEPR.xml

domainEPR.xml

<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address>http://localhost:8080/cosmos/services/domain</wsa:Address>
</wsa:EndpointReference>

MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Example MDR
Bundle-SymbolicName: org.eclipse.cosmos.*mdrname.mdr
Bundle-Version: 1.0.0
Bundle-Activator: org.eclipse.cosmos.*mdrname.mdr.Activator
Import-Package: org.osgi.framework;version="1.3.0"
Require-Bundle: org.eclipse.cosmos.dc.mdr,
 org.apache.xerces,
 org.eclipse.cosmos.common,
 org.eclipse.cosmos.dc.cmdbf.services,
 org.apache.muse.complete,
 org.eclipse.cosmos.samples.cmdbf.services
Export-Package: org.eclipse.cosmos.*mdrname.mdr

Open Issues/Questions

All reviewer feedback should go in the Talk page for 208274.

References

  1. COSMOS Programming Model
  2. Providing a CMDBf Query and Registration Service

Back to the top