Naming a CollectionSpace system with an instance identifier

If you plan to share a single database server between two or more CollectionSpace systems, you'll first need to give each of these CollectionSpace systems their own unique names ("instance identifiers").

Doing so helps keep the database objects associated with each CollectionSpace system separate, and thus avoids "name collisions."

Configuring an instance identifier for a CollectionSpace system is simple. During the initial installation process, just after you have checked out the source code for CollectionSpace's Services layer:

  1. Within that source code directory, edit the top-level build.properties file

  2. In the cspace.instance.id property, enter a unique instance identifier for your CollectionSpace system. (By convention, this should be a short name that uniquely identifies your museum or collection, and begin with an underscore.)
    For instance, you might change:

    cspace.instance.id=

    to:

    cspace.instance.id=_mymuseumname
  3. Save the file.
  4. If you haven't already done so, also make the related configuration change of Configuring CollectionSpace to connect to a remote PostgreSQL database server.
  5. Proceed with the installation.

Effects of using an instance identifier

By using an instance identifier, the names of databases and database users (roles) associated with your CollectionSpace system will be changed, in the following ways:

  • The cspace database, which stores users, roles, and permissions for your CollectionSpace system, will be renamed by adding your instance identifier as a suffix; e.g. cspace_mymuseumname
  • The nuxeo database, which stores nearly all of the rest of your CollectionSpace system's data, managed by the Nuxeo enterprise context management system, will be renamed by adding your instance identifier as a suffix; e.g. nuxeo_mymuseumname
  • If you have set up one or more of your CollectionSpace system's tenants to store their data in their own databases, these too will be renamed by adding your instance identifier as a suffix. For instance, the sample lifesci tenant is configured to store its data in its own lifesci_domain database, and that database's name would be renamed to e.g. lifesci_domain_mymuseumname
  • A set of PostgreSQL database users associated with your CollectionSpace system, whose default names currently include cspacenuxeo, and reader, will all be renamed as well, by adding your instance identifier as a suffix; e.g. cspace_mymuseumnamenuxeo_mymuseumname, and reader_mymuseumname. (Technically, within PostgreSQL, database "users" are PostgreSQL roles that have been granted login privileges.)