Use > Application deployment > Administer Application Deployment > Administer code component source types

Administer code component source types

Application developers use Code components to specify files required by their applications. Code component source types tell Application Deployment how to access those files.

Source types can be enabled or disabled. At least one source type must be enabled at all times. Source types that are referenced cannot be disabled. Before you can disable a source type, you must delete any versions that reference that source type and modify any releases that reference that source type.

Application Deployment uses CruiseControl, an open source build system, to manage Code components whose source type is Filesystem or a specific source code control system (such as CVS or Subversion). For these source types, you must provide an XML snippet that contains the required CruiseControl configuration settings. Examples are provided here for a Filesystem and a Source code control system.

For more information about configuring CruiseControl, see the following resource:

http://cruisecontrol.sourceforge.net/main/configxml.html

Editing a code component source type

You must have permission to Manage Application Deployment in order to administer code component source types.

The Edit Code Component Source Type dialog enables you to configure the settings for any type of Code component source. Regardless of what type of Code component source you are editing, you must begin by opening this dialog.

To edit a code component source:

  1. Go to the Administration screen (click Administration in the lower left corner).
  2. In the left pane, select Code Component Source Types.
  3. In the right pane, do one of the following things:
    • To create a new source type, click Create Source Type.
    • To modify an existing source type, select it, and click Edit Properties. The Edit Lifecycle dialog opens.
  4. To make this Code component source type available to application developers, select Enabled.
  5. Follow the detailed instructions below for the specific component source type that you are editing:

Filesystem

To configure the Filesystem source for a Code component, you must specify the CruiseControl settings shown here.

Settings for the filesystem source type

The quietperiod is the number of seconds required to have passed since the last modification occurred before a new version can be created.

The $src variable represents the Source Directory specified in the Code component.

URL

The only configurable settings for a URL Code component source are its Name and the Enable field. The application developer must specify the URL itself. See Using a URL.

Source code control system

To integrate with source code control systems (such as CVS or Subversion), Application Deployment embeds CruiseControl, an open source build system. The CruiseControl configuration is stored as part of the Source Type as an XML snippet. Other source code control systems can be added by simply adding new XML snippets.

The time on your Server Automation cores must be synchronized with your source code control system servers. Otherwise, the determination of which files are included in a Code component can be wrong due to the time skew.

Be sure to install the source code control system client software on the SA Core server before you attempt to integrate it with Application Deployment.

To integrate a source code control system:

Install the source code control system client software on the SA Core server.

On the SA Core server, create a client copy of the source that you want to include in a Code component. In CVS and Subversion, this is called “checking out” a repository.

Open the Edit Code Component Source dialog (see Editing a code component source type above).

Add the CruiseControl configuration and any filter criteria required for your source code control system.

After you have done this, your application developers can reference the path to this client copy in their Code components. See Using a source code control System.

Example: Subversion

The following is a sample configuration for a Subversion Code component source.

Settings for the subversion source type

To check out this Subversion module on the SA Core server, you would use the following command:

svn checkout URL

For example:

svn checkout https://mySVNserver.mycompany.com:444/svn/proj1/trunk

Setting up an SVN client in an SA multi-core or multi-slice environment

To avoid having to install a Subversion (SVN) client on all the servers in a multi-core or multi-slice environment, you can use a Network File System (NFS) mount. The following process has been tested on Linux servers:

On the master core server:

  1. Install the SVN client—for example, the CollabNet Subversion client—in the following directory:
    /opt/CollabNet_Subversion
  2. Add the following line to the /etc/exports file:
    /opt/CollabNet_Subversion *(ro)
  3. Restart the NFS service using the following command:
    /etc/init.d/nfs restart

On the second server (and subsequent servers):

  1. Mount to the exported drive of the Master core. For example, perform the following steps:

    cd /opt
    mkdir CollabNet_Subversion
    mount <MasterCore>:/opt/CollabNet_Subversion /opt/CollabNet_Subversion

    Here, MasterCore can be either the DNS Name or IP address of the Master core server.
  2. Create a link to SVN from /usr/bin/svn:

    ln -s /opt/CollabNet_Subversion/bin/svn /usr/bin/svn

You can now use SVN as if it were installed on the second server.

You can use the same NFS mount strategy to set up a CVS client.