Sharepoint Connector

Download the latest version of the SharePoint connector here.


This is the README for the Krugle reference implementation of SharePoint Source Control Management Interface (SCMI).


Requirements:

* Windows, *nix or OS X
* Java 1.6 or greater
* 100 megabytes of free RAM, for most regular sized repositories. The SCMI may use as much as 512 megabytes on larger repositories. If an 'out of memory' condition occurs, the maximum java memory argument (-Xmx) can be adjusted in scmi-env.bat (windows) and run.sh (*nix).
* Enough space to hold (in total) each of the SVN working copies the SCMI will crawl, plus 1-2 gigabytes of working space, depending on the size of the largest project that will be indexed. If several large (multiple-gigabyte) projects will be crawled at once, the amount of working space required will increase. "stateDir" is a configurable parameter which indicates where all this space will be required on the filesystem.



WINDOWS INSTALLATION



1. Prepare the windows host

* It is recommended that you create a new user specifically for this SCMI application. "sharepointscmi" is a good choice. This is not necessary, especially if this is not a long term install.
* Verify you have java 1.6 or greater.

2. Decompress the contents of the SharePoint SCMI distribution. The path "C:\SCMI\sharepoint-scmi\" is suggested.

3. Edit the settings in <installed location>\sharepoint.properties

* It is likely that this file will have unix newlines, so use an editor more advanced than notepad. Wordpad is sufficient. You must be sure to use "\\" when a "\" character is needed, because java will assume these strings use character escapes.

* By default, all state files (including checked out working copies) will be placed in the stateDir subdirectory of the SCMI install path. This can be changed by setting: scmi.stateDir=C:\\path\\to\\custom\\stateDir You might want to change this if you're running out of space where the SCMI is installed, or if the stateDir directory structure is creating filepaths with too many characters for Windows to support.

4. Edit the settings in <installed location>\run.bat

* Set JAVA to a command which will invoke java 1.6 or greater. "java" will probably work, and you can test this by running "java -version" from the command line.
* Set SCMI_HOME to the <installed location> where you unzipped the scripts. If you followed the suggestion from (2) above, this would be "C:\\SCMI\\sharepoint-scmi\\"

5. Execute run.bat as the appropriate user.

6. Validate that the SCMI is running correctly by pointing your browser to the following URL:
http://<hostname of SCMI>:<port of SCMI>/status
The port usually is 8765 (or what you set in sharepoint.properties).

If this doesn't return a status page the SCMI didn't start up properly. Check the activity log for details in this case: logs/scmi-activity.log
7. Continue to USAGE instructions below.



*NIX INSTALLATION



1. Prepare the *nix server where the client will be installed

* Verify you have java 1.6 or greater.
* Create a user (e.g. "sharepointscmi") that will be used to run the client. Not necessary but suggested.

2. Copy and unpack the contents of the SharePoint SCMI distribution on your server.

Ideally these files should go into /home/<user>, where <user> is the user you created in step 1 above.

For example, if the SCMI archive name is sharepoint-scmi-1.0.0-release.zip
and you wanted to have the resulting files located at /home/sharepointscmi/, you would execute:

unzip sharepoint-scmi-1.0.0-release.zip
mv sharepoint-scmi-1.0.0 /home/sharepoint/

3. Change settings in the sharepoint.properties file according to your needs.

* By default, all state files (including checked out working copies) will be placed in the stateDir subdirectory of the SCMI install path. This can be changed by setting:
scmi.stateDir=/path/to/custom/stateDir
You might want to change this if you're running out of space on the mount where the SCMI is installed.

4. Change settings in the <installed location>/init.d/sharepointscmi.sh file to match your server setup.

* Note that you can start right away by executing bin/run.sh from the scmi folder, but to kill that process you will need to kill its PID by hand. It is suggested you follow the steps below to properly install the SCMI application.
* Uncomment and set the USER= parameter at the top of /init.d/sharepointscmi.sh. For the example above, the value for USER should be set to sharepointscmi.
* Edit the SCMIDIR= parameter, also at the top of the file. This must match the location where you unpacked the files, for example /home/sharepointscmi/sharepoint-scmi-1.0.0
* Make sure MYNAME is unique for every scmi script you may have installed. This will be used by sharepointscmi.sh to store the pid of the running process.

5. Set the owner for all the installed files to be the user specified above. For example

chown -R sharepointscmi /home/sharepointscmi/sharepoint-scmi-1.0.0

6. Create a symlink from /etc/init.d/sharepointscmi to <installed location>/init.d/sharepointscmi.sh

cd /etc/init.d
ln -s /home/sharepointscmi/sharepoint-scmi-1.0.0/init.d/sharepointscmi.sh sharepointscmi

Then set this script to be started at the correct runlevels. The exact method for this will depend on your flavor of *nix. If your system supports chkconfig (try 'which chkconfig' to test this):

chkconfig --levels 35 sharepointscmi on

If you have an Ubuntu system you will need to use update-rc.d:

update-rc.d sharepointscmi defaults

If you do not have chkconfig of update-rc.d commands available, you will need to determine the appropriate substitute for your OS in order to enable automatic startup.

7. Start the SharePoint SCMI by running the service after installation, for example

service sharepointscmi start

If you experience problems with 'service':

a) Run as root, and if you su to root, make sure you run 'su -' so that paths are setup correctly.
b) If you cannot get the 'service' command to work as intended, you can directly execute 'run.sh' but this must be done as the SCMI user, and not as root. The process will have to be killed with the 'kill' command.

Then you should watch the log file located at <installed location>/logs/scmi-activity.log to ensure the service has started up properly.

8. Validate that the SCMI is running correctly by pointing your browser to the following URL:
http://<hostname of SCMI>:<port of SCMI>/status
The port usually is 8765 (or what you set in sharepoint.properties).

If this doesn't return a status page the SCMI didn't start up properly. Check the activity log for details in this case: logs/scmi-activity.log



USAGE



1. Once the SCMI script is setup correctly, navigate to your Krugle Enterprise Search Appliance (KE) admin page. Typically this is http://<hostname>:8080/projects/project_listing.html

2. Create a new Data Repository of the SCMI type.

* The "Data Repository Host Location" should be set the hostname or IP address of the machine hosting this SCMI.
* The "Data Repository name" can be anything, "SharePoint scmi" is a good start.
* The "Login" and "Password" are blank.
* The "Path" should be set to /repository
* The "Port" should be set to 8765 (or what you set in sharepoint.properties), and the protocol set to HTTP.
* The project source box should be unchecked for most cases. It should only be set if you are sure this SCMI is source of project definitions.

3. Create a new project or edit an existing one.

* Select a Data Set for the Data Repository you just created in step 2.

* The "Location" field should be a valid SharePoint Site Collection url. Ex:

http://192.168.100.122:48582

Note: If you want to crawl the documents from a subsite, the "Location" field should be a valid sub site url, Ex:

http://192.168.100.125/subsite

* The "Parameter" field takes URL encoded parameters. The supported parameters currently are 'account', 'password', 'domain' and 'listname'. Usage:
account=account1&password=password1&domain=domain1&listname=List Name&folder=folder

Common Parameters:
account=xxx: the account name can access to SharePoint Service.
password=xxx: the account's password
domain=xxx: domain which the account belong to
listname=xxx: the display name of the list which you want to crawl its documents, e.g.Shared Documents
folder=xxx: the value of "RootFolder" in browser address bar when you click the folder which one you want to crawl files under it

NOTE:
If there is no domain control for the SharePoint Service, please ignore 'domain' parameter. Like:
account=account1&password=password1&listname=List Name&folder=folder
If you want to crawl all files of a whole library, please ignore the 'folder' parameter. Like:
account=account1&password=password1&listname=List Name &domain=domain

Note also that the values for account, password, domain and listname must be URL encoded, so any characters which are not 0-9 a-z A-Z ._-* must be encoded. See: http://www.w3schools.com/TAGS/ref_urlencode.asp

If you don't want to store your sharepoint parameters in plaintext on Krugle Enterprise, you can use an parameters file. You can pass in an params-file name by setting the "params-file" parameter in the parameters field. If you do not provide a account or params-file parameter, the SCMI will attempt to use "default-params.properties" which was included with this SCMI.

Note that the auth-file must live in the SCMI_HOME directory, alongside this README. See the default-params.properties file for more details.

* Once the project is being crawled, you may watch the <installed location>/logs/scmi-activity.log file on the SCMI client system to verify that no errors are occurring.

For more information on setting up Krugle Enterprise with these SCMI clients, please see the Krugle Enterprise Administration Guide and the SCMI SDK documentation.



PLUGINS



Plugins allow functionality of the SCMI application to be added or modified. A plugin is installed if it is placed in the /plugins directory. Every plugin has a properties file in the /plugins directory as well, and this properties file controls various configuration values as well as whether or not the plugin is enabled.

All SCMIs which crawl source code should include the file-filter plugin. It will be enabled by default but it will only filter out known binary file types. To modify the list of files and directories filtered out, edit /plugins/filter.properties



LOGGING



If you wish you may change log settings by editing the log4j.properties file. The first line currently looks like:

log4j.rootLogger = info, ActivityRFA, ErrorRFA

You can increase the amount of information being logged by changing "info" to "debug". Note that this change must be made before the SCMI client is started.