transparencies

Download Report

Transcript transparencies

Enabling Grids for E-sciencE
gLite service instrumentation
Joachim Flammer
Integration Team
JRA1 all-hands-meeting,
Brno 21.06.2005
www.eu-egee.org
INFSO-RI-508833
Overview
Enabling Grids for E-sciencE
• Two management entry points
– Central management
 Information/control of the
different parts on the node
 GliteManager
– Individual service management
 Information/control of a single
service
 GliteService interface/stub
GliteManager
Tomcat
GliteService
Node
info
GliteServer
Java
Java
DM
Configurator
C++
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
daemon
Joachim Flammer
2
GliteManager
Enabling Grids for E-sciencE
• Central management point on node
– “Collects” information from different sources
– “Enables” management of different sources




Information/control about node
Information/control about container (Tomcat)
List of services on node + status
Information/Control over individual service (start/stop/…)
• Implementation
–
–
–
–
–
–
Java web service
Implements logic to talk to tomcat
Implements logic to collect information about node
Communication to stubs/instrumented java services via JMX
Communication via standard SOAP
Adapt CIM standard
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
3
Single service management
Enabling Grids for E-sciencE
• Each service should implement a proper service
instrumentation
– (A) Instrumented Java web services
– (B) Instrumented C++ service/Daemons
– (C) Non instrumented Java web services
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
4
(A) Instrumented Java web service
Enabling Grids for E-sciencE
• All instrumented java web service will
– Implement a common & extendable GliteService Management
interface
 Service can extend management interface for their needs
– Use a common management class
 Interface to configuration
 Implementation of basic management logic
– Connect to central management via JMX
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
5
(A) Instrumented Java web service
Enabling Grids for E-sciencE
Three easy steps to turn management on:
1. Define the management interface you want to support
•
Extend common baseline management interface
2. Implement your management interface in your service
•
•
Implement a stub for GliteService for the methods that you don’t
want to implement yourself
Implement the extra management functions
3. Setup the web environment
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
6
1. Define the management interface
Enabling Grids for E-sciencE
public interface GliteServiceMBean{
public String getServiceName();
public String getDescription();
public String getVersion();
public String getInterfaceVersion()
public String[] getConfiguration();
public String[] getLog()
public String[] getMethods();
}
public class MyServiceMBean extends GliteServiceMBean{
public String getUptime();
public int getNumConnections();
}
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
7
2. Implement the interface
Enabling Grids for E-sciencE
public class MyService implements MyServiceMBean{
static GliteService gliteService;
implement common functionality
public MyService(){
gliteService = GliteService.instance(this,serviceName);
}
implement functionality yourself
public String getDescription(){
return “This is my personal description”;
};
use common functionality
public String[] getMethods(){
return gliteService.getMethods();
}
implement extra functionality
public String getUptime(){
return uptime;
}
…
}
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
8
3. Get the configuration
Enabling Grids for E-sciencE
…via JNDI …
Context envCtx = (Context) initCtx.lookup("glite");
dataSource = (DataSource) envCtx.lookup(dbPoolName);
Advantages
Disadvantages
• Can use JNDI features: notification, …
• Duplication of efforts: JMX<-> JNDI
… via GliteService …
dataSource = (DataSource) gliteService.getConfigurationParameter(dbPoolName);
Advantages
• Easy retrieval of values
Disadvantages
• Extra features (e.g. notification) need to be implemented by hand
• Duplication of efforts (JMX for central, JNDI for application)
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
9
3. Get the configuration II
Enabling Grids for E-sciencE
… via JMX …
// get MBeanServer
List srvList = MBeanServerFactory.findMBeanServer(null);
ListIterator srvListItr = srvList.listIterator();
while(srvListItr.hasNext()) {
MBeanServer localMbs = (MBeanServer) srvListItr.next();
if (localMbs.getDefaultDomain().compareTo("glite") == 0)
mbs = localMbs; }
// get parameter
ObjectName objectName = new ObjectName(serviceName + configurationPath);
m_dataSource = (DataSource) mbs.getAttribute(objectName, “dbPoolName”);
Advantages
• Fully integrated solution
• Standard management solution
INFSO-RI-508833
• central management & local config. coupled
• use all JMX features (notification, old value ..)
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
10
4. Setup the web environment
Enabling Grids for E-sciencE
<web-app>
<display-name>MyService using Management</display-name>
<context-param>
<param-name>glite.management.serviceName</param-name>
<param-value>my-service-web-path</param-value>
</context-param>
<context-param>
<param-name>glite.management.implementationClass</param-name>
<param-value>MyService</param-value>
</context-param>
<listener>
<listener-class>
org.glite.management.service.GliteServiceContextListener
</listener-class>
</listener>
…
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
web.xml
Joachim Flammer
11
(B) Non-Java instrumented service
Enabling Grids for E-sciencE
• Management instrumentation inside service
– Similar to Java world:
 Implementation of common interface
 Common management part is done via an extended DM service
configurator
• Connection to central management via lightweight webservice
management stub
 one management stub type for all services
 Implements GliteService management interface
 Provides basic management interface
• Connection between stub and service
–
–
–
–
Shell command
SOAP
JNI
…
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
12
(C) Non-instrumented services
Enabling Grids for E-sciencE
•
Managed is delegated to a lightweight webservice
management stub




•
one management stub type for all services
Implements GliteService management interface & common
GliteService class
Provides basic management interface
Configure web service path / service script to be managed
Allows basic management



INFSO-RI-508833
Start / stop
Getting of log files
Getting of configuration
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
13
Demo
Enabling Grids for E-sciencE
• Used software
– Tomcat 5.0.28
– Axis 1.1
– MX4J 3.0.1
• Setup
– Installed web services




DummyService: java web service without management
Management Service for DummyService
Management Service for non-java service
gLite data catalog fireman service – managed directly by
GliteService
 gLite Manager
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
14
Demo II
Enabling Grids for E-sciencE
• This is just a prototype – due to time limitation
– No security included yet
– Does not use common service configurator
– Reads configuration from file
•
Functionality
– Show functionality of
 Individual service management
 Glite Manager
– Show usage examples for management interface
 Get list of glite services and their status
 Start/stop service
 Apply methods on individual web service
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
15
Enabling Grids for E-sciencE
• Start Demo ….
INFSO-RI-508833
JRA1 all-hands-meeting
Brno June 2005
Joachim Flammer
16