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.
To configure the Build Management system on one server and the Artifact Repository Manager on another, please follow these steps:
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.
For the Build Management and the Artifact Repository modules there are three options to choose from:
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.
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.
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.
To configure the index elsewhere requires editing the archiva.xml file:
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.
<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>
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.