Archiva

Buggy documentation on "separating the base from the installation"

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.2
  • Component/s: Documentation
  • Labels:
    None
  • Number of attachments :
    0

Description

The documentation on http://maven.apache.org/archiva/docs/1.0.1/adminguide/standalone.html says in "Separating the base from the installation"
"2. Move the conf and data directories from the Archiva installation to the new location."

But there is no "data" directory in a fresh installation.

Activity

Hide
Martin Höller added a comment -

There are more issues with this documentation than just the missing data-directory. See also this thread on nabble.com.

I rewrote one section from the adminguide (adminguide/standalone.html):

Separating the base from the installation

The standalone instance of Archiva uses the Plexus application server, which is capable of separating it's configuration from installation,
in much the same way Tomcat does, for example, with it's CATALINA_BASE and CATALINA_HOME environment variables.

This is achieved by the following steps:

1. Creating the base location. For example, you might install Archiva in /opt/archiva-1.0 and the data in /var/archiva.
Create the directories /var/archiva/logs, /var/archiva/data and /var/archiva/conf.
2. Copy the coniguration files from /opt/archiva-1.0/conf to the new location /var/archiva/conf. If you've previously run Archiva,
you may need to edit conf/archiva.xml to change the location of the repositories.
3. Set the environment variable PLEXUS_BASE to the data location, i.e. /var/archiva (in bash, be sure to export the variable).
4. Edit /var/archiva/conf/plexus.xml and change the location of the derby databases. This is done by replacing ${plexus.home}
with ${appserver.base} in the two occurences.
5. Start Archiva standalone as described above from the installation location.

Note, that Archiva still needs write access to the installation directory, as the application server needs to extract the WAR and the like.

Could someone please include this update in the documentation.

Show
Martin Höller added a comment - There are more issues with this documentation than just the missing data-directory. See also this thread on nabble.com. I rewrote one section from the adminguide (adminguide/standalone.html):
Separating the base from the installation
The standalone instance of Archiva uses the Plexus application server, which is capable of separating it's configuration from installation, in much the same way Tomcat does, for example, with it's CATALINA_BASE and CATALINA_HOME environment variables. This is achieved by the following steps: 1. Creating the base location. For example, you might install Archiva in /opt/archiva-1.0 and the data in /var/archiva. Create the directories /var/archiva/logs, /var/archiva/data and /var/archiva/conf. 2. Copy the coniguration files from /opt/archiva-1.0/conf to the new location /var/archiva/conf. If you've previously run Archiva, you may need to edit conf/archiva.xml to change the location of the repositories. 3. Set the environment variable PLEXUS_BASE to the data location, i.e. /var/archiva (in bash, be sure to export the variable). 4. Edit /var/archiva/conf/plexus.xml and change the location of the derby databases. This is done by replacing ${plexus.home} with ${appserver.base} in the two occurences. 5. Start Archiva standalone as described above from the installation location. Note, that Archiva still needs write access to the installation directory, as the application server needs to extract the WAR and the like.
Could someone please include this update in the documentation.
Hide
Robin Roos added a comment -

I followed the procedure laid down by Martin above and it worked perfectly first-time.

Show
Robin Roos added a comment - I followed the procedure laid down by Martin above and it worked perfectly first-time.
Hide
Brett Porter added a comment -

applied, thanks. I left out step 4 since that will be fixed by MRM-618

Show
Brett Porter added a comment - applied, thanks. I left out step 4 since that will be fixed by MRM-618
Hide
Doron Solomon added a comment -

I too was able to get this working following the procedure above, although I didn't need to do step 4 since I'm using Archiva 1.0.2. However, in my opinion copying the conf directory could cause confusion for someone who is unsure which conf directory (the one in the installation or the one in $PLEXUS_BASE) is the "real" configuration. I would suggest instead one of the following two options.

The first option would be to modify the procedure to say that only the xml files in conf/ should be moved to PLEXUS_BASE; the classworlds.conf file should remain with the installation.

The second option would be to modify the path to classworlds.conf in all wrapper.conf files as well as the plexus.bat and plexus.sh files; the path should find classworlds.conf in $PLEXUS_BASE instead of $PLEXUS_HOME. I personally prefer this option since it makes a simpler manual process to separate the base from the installation.

Show
Doron Solomon added a comment - I too was able to get this working following the procedure above, although I didn't need to do step 4 since I'm using Archiva 1.0.2. However, in my opinion copying the conf directory could cause confusion for someone who is unsure which conf directory (the one in the installation or the one in $PLEXUS_BASE) is the "real" configuration. I would suggest instead one of the following two options. The first option would be to modify the procedure to say that only the xml files in conf/ should be moved to PLEXUS_BASE; the classworlds.conf file should remain with the installation. The second option would be to modify the path to classworlds.conf in all wrapper.conf files as well as the plexus.bat and plexus.sh files; the path should find classworlds.conf in $PLEXUS_BASE instead of $PLEXUS_HOME. I personally prefer this option since it makes a simpler manual process to separate the base from the installation.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: