Configuring Maestro Across Multiple Servers

Overview

The Maestro Project Server comes with a Build Management system and an Artifact Repository Manager configured and installed together. However, you may opt not to use all the built-in modules or you may chose to specify them as remote locations. This document will serve as a guide to each of these scenarios and provide an in-depth look at one such scenario.

An example of using multiple servers is shown in the figure below.

An internal or external request for an artifact comes into the network via HTTP to be routed by a load balancer to the appropriate server. The machines running the Artifact Repository Manager receive the request via Apache. Apache then routes the request to the Artifact Repository Manager which by default runs on port 8080. The repositories actually exist in the Storage Area Network (SAN). The repository servers are configured to mount the repositories via NFS or SMB from the SAN, thereby making the repositories appear local to the Archiva box.

The internal developers have access to the Build Farm. This is several machines of varying hardware and software running Maestro's Build Management (Continuum) and accessing the repositories remotely.

Maestro Implementation

Configuring on Multiple Servers

To configure the Build Management system on one server and the Artifact Repository Manager on another, please follow these steps:

  1. Install and start the Maestro Project Server per instructions in the Maestro Project Server User Guide.
  2. In a browser, enter the URL of your Maestro Project Server, for example: http://localhost:8080/

    Note: Replace localhost with the name of your server, for example http://buildserver.exist.com:8080. If you installed Maestro on a different port than 8080 you will need to use your port number in the URL.

  3. Click the Project Server link under Configure on the left menu of the Project Server page.
  4. On the screen (see figure below) each built-in module has its own options you can set.Configure Project Server

    For the Build Management and the Artifact Repository modules there are three options to choose from:

    1. Built-in: select this option to use the built-in module in Maestro.
    2. URL: select this option if you prefer not to use the built-in module in Maestro and specify the URL location of the module you want to use. Some example URLs:

      http://myprojectserver.mydomain.com:8080/archiva/index.action

      http://myprojectserver.mydomain.com:8080/continuum/groupSummary.action

      http://myprojectserver.mydomain.com/archiva/index.action

      Note: The last URL does not specify a port number. It would be used if you had Apache installed and configured to accept requests for Maestro. See Additional Resources for more information on the Apache configuration.

    3. None: select this option if you don't want to use the built-in module and also tell Maestro that you don't have the module installed elsewhere.

    Warning: If you choose not to use the built-in modules, these will be removed from your Maestro installation. The action is irreversible so if you wish to run the built-in version you will have to re-install Maestro.

    In the example configuration shown in the Maestro Implementation figure, the Archiva boxes have only the Artifact Repository installed, so None was selected for Build Management. On the Build Farm machines, Build Management is left as Built-in, and a URL was specified for the Artifact Repository.

  5. You have the option to Enable Project Server Services (SLP) for MDC installations. By default this is set to enabled. Uncheck the check box if you wish to disable this module.

    Note: Maestro Developer Client's use the SLP service to locate project servers, so if you disable SLP all clients will have to know the location of your project servers as the client will no longer be able to discover the project server itself.

  6. Click Change.
  7. A verification page will open if you made changes to the Build Management and the Artifact Repository built-in modules options. Click Uninstall Module(s) if you want to proceed, otherwise click Cancel.
  8. If you have multiple instances of Archiva utilizing the same repositories on the same external storage (as shown in the diagram) you must manually configure Archiva to have the repository indexes stored in separate directories from each other, although the repository data can be shared. This prevents the multiple instances of Archiva from writing over each other's indexes and possibly corrupting the index. By default the index for each repository is stored in the repository directory.

    To configure the index elsewhere requires editing the archiva.xml file:

    1. Shutdown Maestro or just Archiva if you have it installed separately.
    2. Open archiva.xml file in your favorite editor. The location of this file might be in the [maestro_home]/projectserver/conf/archiva.xml or [user_home]/.m2/archiva.xml where [user_home] is the home directory of the user that runs Archiva.

      Warning: The [maestro_home]/projectserver/conf/archiva.xml file is Maestro's default Archiva configuration file. When an instance of archiva.xml is found in both [maestro_home]/projectserver/conf/ and [user_home]/.m2/, modifying the repositories (adding, editing, and deleting) is not possible and will display an error message. To resolve this you can move archiva.xml from [maestro_home]/projectserver/conf/ to to [user_home]/.m2/, and use it as your default.

      Note: that the [user_home] directory is the home directory of the user who starts-up or runs Maestro.

    3. Add the <indexDir> element to the repository element of your choice. For example:
        <configuration> 
          <version>1</version> 
          <repositories> 
            <repository> 
              <id>corporate</id> 
              <name>Managed Corporate Repository</name> 
              <url>file:/home/maestro/repositories/corporate/</url> 
              <indexDir>[maestro_home]/indexes/corporate/</indexDir>
            </repository> 
          </repositories> 
        </configuration>
    4. Save the archiva.xml file.
    5. Restart Maestro (or Archiva if it is running by itself).

    Warning: Do not create the index directory by hand. Let Archiva (or more accurately, Lucene) create it. Otherwise you will end up with very hard to diagnose errors/warnings. Each repository should have its own unique <indexDir> location on disk, do not attempt to share a single <indexDir> among multiple repositories. Lucene can support this, but the security around a repository cannot.

    Note: Repeat the steps on each machine you want to configure. For example if you want to configure one machine to run the Artifact Repository Manager and another machine to run Build Management you will need to perform these steps on each machine.