Setting up several repositories

How do I set up Nuxeo with several repositories? I want to store some of my documents in the standard Nuxeo database (PostgreSQL for instance, and binaries in the filesystem) and others in Amazon S3.

1 votes

2 answers

2847 views

ANSWER



To set up several Nuxeo repositories, you just have to basically duplicate the default-repository-config.xml file (when using Tomcat).

Start with a one-repository configuration that works. Supposing your database is PostgreSQL, the basic configuration template will live in templates/postgresql/nxserver/config/default-repository-config.xml. Note that, in this file, the variables will be replaced based on your nuxeo.conf.

Copy this file into templates/custom/nxserver/second-repository-config.xml (create the nxserver folder if needed). Make sure that you activate your custom config by adding custom in your nuxeo.conf in the nuxeo.templates section (so for this example you would then have nuxeo.templates=postgresql,custom). Then edit your new second-repository-config.xml file to point to your second repository:

  • change the name="default" that appears in two places, replace default with the second repository name, for instance second,
  • replace the variables that should be different in this repository,
  • replace the configuration elements that should be different.

For instance, for a second PostgreSQL database with a different name on the same server, you can just replace the ${nuxeo.db.name}, ${nuxeo.db.user} and ${nuxeo.db.password} with new values.

See the VCS Configuration page for more on repository configuration.

As an other example, for an Amazon S3 configuration, you will want to replace the <binaryStore> section with something like:

<binaryManager class="org.nuxeo.ecm.core.storage.sql.S3BinaryManager" />

And add to your nuxeo.conf the S3 configuration values you need:

  • nuxeo.s3storage.bucket: your bucket name
  • nuxeo.s3storage.awsid: your AWS_ACCESS_KEY_ID
  • nuxeo.s3storage.awssecret: your AWS_SECRET_ACCESS_KEY
  • nuxeo.s3storage.region: your region code
  • nuxeo.s3storage.cachesize: size of the local cache (default is 100 MB)

See the Amazon S3 Online Storage installation instructions for details on this particular configuration.

3 votes



Something change for 5.9.3 version ? Can't add more them one repository :(

0 votes



A few things have changed (NXP-11551) but this shouldn't impact you.
05/02/2014

Florent I still need create a platform-config.xml ?
05/02/2014

Not, this file is not used anymore.
05/02/2014

works perfect!
05/02/2014

Rafael, can you give a few hints about your solution ?
04/17/2015