PILLUTLAAVINASH / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
0 stars 0 forks source link

Allow retrieval of CM and/or Connector config by the GSA #105

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Similar to retrieving the log files, a support engineer should be able to 
retrieve the configuration of 
the connector manager and/or the connectors.

Jeff Ling suggested: "get configuration file (applicationContext, 
connectorxxx.properties, and 
connectorInstance.xml)"

Rather than fetching individual configuration files, we might just zip up 
everything under 
connector-manager/WEB-INF (except the lib directory) and return it.

Of course, as soon as we a mechanism to retrieve the configuration, the support 
guys will want a 
mechanism to deploy a new one.  (See Issue 104 changing logging levels.)

Original issue reported on code.google.com by Brett.Mi...@gmail.com on 28 Jul 2008 at 7:18

GoogleCodeExporter commented 8 years ago

Original comment by jeffreyl...@gmail.com on 28 Jul 2008 at 7:25

GoogleCodeExporter commented 8 years ago
It would also be good to get additional information from the 
connector/connector 
manager, like the version of the connector, CM, the jdk/jre being used.
I would like to propose the use of some kind of admin SPI addition which can be 
implemented by the connector developer to fulfill these (above mentioned) as 
well as 
other administrative retrieval/configurations.
E.g. This SPI could have a retrieval function which takes in a parameter and 
based 
on its interpretation and context implements the return information. E.g. 
Version, 
state file incase of SP connector, etc.
This would also minimize the changes to the CM for implementing such retrieval 
functionality. The CM could provide the basic & globally common functionalities.

Original comment by mwarti...@gmail.com on 4 Aug 2008 at 8:31

GoogleCodeExporter commented 8 years ago
Phase 1 commited to revision r935

These first set of changes primarily address comments provided by mwartikar:
  "It would also be good to get additional information from the
   connector/connector manager, like the version of the connector,
   CM, the jdk/jre being used."

These changes address this issue specifically:
  - The Connector Manager version, Java version, and OS version are
    logged at startup.
  - The Connector version for each loaded Connector is logged at
    startup.
  - TestConnectivity, GetConnectorList, and GetConnectorInstanceList
    servlets return the Connector Manager version, Java version,
    and OS version in the response.
  - GetConnectorList, and GetConnectorInstanceList servlets return
    the Connector version for each Connector in the response.

Change Log:
----------
M  
connector-manager/source/java/com/google/enterprise/connector/servlet/StartUp.ja
va
   - Log the Connector Manager version, Java version, OS version at startup.

M 
connector-manager/source/java/com/google/enterprise/connector/instantiator/TypeM
ap.java
   - Log the Connector Jar version of installed connectors at startup.

M 
connector-manager/source/java/com/google/enterprise/connector/servlet/GetConnect
orList.java
   - Reponse contains Connecter Manager version, Java version, OS version.
   - Each ConnectorType tag contains that connector's Jar version.

M 
connector-manager/source/java/com/google/enterprise/connector/servlet/GetConnect
orInstanceList.java
   - Reponse contains Connecter Manager version, Java version, OS version.
   - Each Connector instance response includes the ConnectorType and that
     connector's Jar version.

A  
connector-manager/source/java/com/google/enterprise/connector/common/JarUtils.ja
va
   - New class for Jar file utilities.
   - Added getJarVersion(Class) method that fetches the Implementation-Version
     string from the jar file containing the class.

M  
connector-manager/source/java/com/google/enterprise/connector/servlet/ServletUti
l.java
   - Added getManagerSplash() and writeManagerSplash() methods that return
     or write out the Connecter Manager version, Java version, OS version.
   - Added a couple of string constants used here and elsewhere.
   - Change writeXMLElementWithAttrs() to writeXMLTagWithAttrs()
     (since that is all it did) and make the write-to-printwriter
     and write-to-stringbuffer version similar to each other and
     to writeXMLTag().

M 
connector-manager/source/java/com/google/enterprise/connector/servlet/Authentica
te.java
   - Use updated ServletUtils.writeXMLTagWithAttrs()

M 
connector-manager/source/java/com/google/enterprise/connector/importexport/Impor
tExport.java
   - Use updated ServletUtils.writeXMLTagWithAttrs()

M  
connector-manager/source/java/com/google/enterprise/connector/manager/Manager.ja
va
   - Changed the getConnectorTypes() method, renaming it to getConnectorTypeNames()
     (because that is what it actually does) and returns a Set (outstanding TODO).
   - Added a getConnectorType(String typeName) method that returns the ConnectorType
     for the supplied name.

M 
connector-manager/source/java/com/google/enterprise/connector/manager/Production
Manager.java
   - Updated to conform the the new Manager Interface.
   - Added a getConnectorType(String typeName) method that is a pass-through to
     Instantiator.getConnectorType(String typeName).

M 
connector-manager/source/javatests/com/google/enterprise/connector/manager/MockM
anager.java
   - Updated to conform the the new Manager Interface.

M 
connector-manager/source/javatests/com/google/enterprise/connector/test/Connecto
rTestUtils.java
   - Added a removeManagerVersion() method that strips the Connector Manager 
     version string from servlet output.  This makes unit tests much easier.

M 
connector-manager/source/javatests/com/google/enterprise/connector/servlet/TestC
onnectivityTest.java
   - Remove Manager version string from servlet response before comparing to
     expected output.

M 
connector-manager/source/javatests/com/google/enterprise/connector/servlet/GetCo
nnectorListTest.java
   - Adaped to the changed interface to GetConnectorList.handleDoPost().
   - Remove Manager version string from servlet response before comparing to
     expected output.

Original comment by Brett.Mi...@gmail.com on 4 Sep 2008 at 12:13

GoogleCodeExporter commented 8 years ago
Phase 2 Submitted in revision r1098 | Brett.Michael.Johnson | 2008-11-06 
16:29:48 -0800 (Thu, 06 Nov 
2008)

Description:

This set of changes addresses Connector Manager Issue 105_part2 -
Allow retrieval of CM and/or Connector config by the GSA

Admin servlet to retrieve the configuration of the Connector Manager
and all Connector instances.  This servlet returns a ZIP archive of all
the configuration files.  Access to this servlet is restricted to either
localhost or gsa.feed.host, based upon the HTTP RemoteAddress.

Usage:
To retrieve the zipped configuration archive:
 http://[cm_host_addr]/connector-manager/getConfig
or
 http://[cm_host_addr]/connector-manager/getConfig/configuration.zip

Redirects and curl:
When requesting the configuration files, this servlet returns a redirect
to the actual ZIP filename, configuration.zip.
This allows the browser, wget, or curl to pull the true filename off
the redirected URL so that it can name the file when storing locally.
If using curl to retrieve the files, please to use 'curl -L' to tell
curl to follow the redirect.  Unfortunately, when using 'curl -O' to
save the file locally, curl uses the pre-redirected name, rather than
the post-redirected name when naming the local file.  This forces you
to use 'curl -L -o output_filename'.

Wget handles redirects appropriately without intervention, and names
the saved file as expected.

Change Log:
----------
A  
projects/connector-manager/source/java/com/google/enterprise/connector/servlet/G
etConfig.java
  - New admin servlet aimed a support personel.
    It writes to the output a ZIP archive containing the connector manager
    and connector instance configuration files.

M  projects/connector-manager/source/webdocs/web.xml
  - Add getConfig command to GetConfig servlet.

Original comment by Brett.Mi...@gmail.com on 15 Nov 2008 at 4:02

GoogleCodeExporter commented 8 years ago

Original comment by jl1615@gmail.com on 12 Jan 2009 at 3:35