The SCMI application that you create will allow Krugle Enterprise to access code files and history comments from a code repository of your choice. SCMI software handles file/data access requests from Krugle Enterprise and helps ensure that the correct information is uploaded to Krugle Enterprise.
The following example shows how Krugle Enterprise uses SCMI software to access code files and repository comments. This is a common task performed by Krugle Enterprise when it needs to bring new and updated information (code files, comments) about a project into its index. The process begins when Krugle Enterprise issues a Files request for the latest files to the SCMI application. In subsequent steps, Krugle Enterprise and SCMI exchange information and files in an orderly process. See Figure 1 for a diagram of messaging and file exchange between Krugle Enterprise and the SCMI application.
- Krugle Enterprise uses the History request to access the SCM comments posted for check - in activity that occurred between the two most recent checkpoint markers.
- Krugle Enterprise sends a Files request to the SCMI application. Note: the protocol, server, port, address and any necessary credentials used to envoke the SCMI application must first be specified in Krugle’s Project definition.
- SCMI maps the Krugle Enterprise request into a form that can be handled by the particular SCM / file system being accessed and issues the file checkout request to the SCM / file system.
- The SCMI passes a response to the Files command that includes the result file list and a checkpoint token identifying the most version of files accessed. Krugle stores this token to define the “starting point” for the next update.
- Krugle Enterprise issues the FilesRetrievalComplete command to notify the SCMI that the Files request was successfully completed.
The calling and return xml for the commands used in the preceding example are included in the SCMI Command Reference section below.
The SCMI architecture is designed to provide flexibility in several key areas. Options include:
Repository types - repositories can include SCM systems, document systems, file systems and databases. If a repository can be configured to return file lists or data as xml, then that repository can be integrated with Krugle Enterprise through SCMI.
Repository configuration data - Information needed to access the files or records in a particular system (i.e. network address, path, credentials, access options, etc.) can be stored and managed from the Krugle Enterprise Administration Console - or from the SCMI application. For the former option, any necessary options are managed through the “SCMI project parameter” field that is specifi ed, stored and managed by in the Krugle Enterprise project definition. Alternatively, some or all of this information can be stored/accessed on the SCMI host in a manner that is suitable for your organization.
File access - Files to be accessed by KE can be cached by the SCMI or accessed directly from the file / record repository. The technique that you choose must be reflected in the URLs that are returned from the SCMI in the fi le list. In the example above, the files are cached on the SCMI host (and the URLs that are returned to Krugle Enterprise refer to the file locations on the SCMI host). Another approach would be to specify that files / records be accessed directly from the SCM system, in this case the SCMI is configured to return URLs that point directly at the files on the SCM system. Both approaches have advantages, the caching method is generally more versatile, but it also can be more complicated; the SCMI must maintain some state information to know what resources keep available for download by the KE appliance. You can choose the approach that best suits your requirements.
Note: When using an SSH connection type or the SCP file transfer method on a unix based SCMI host, create a new user account that: a) is free of startup scripts and b) uses bash as the default shell.
A unique instance of SCMI software is required for each repository type. Multiple instances of a single SCMI script can be accessed by one or more Krugle Enterprise appliances. Multiple SCMI scripts can be deployed on a single SCMI host system. The SCMI modules available from Krugle target specific source code management systems (such as SVN, Microsoft TFSWork Items, and the file system) and are written in languages that are easily integrated through http(s) and ssh. Other languages can be used to implement the SCMI functionality