We need to manage two jackrabbit configuration files as templates.
This commit is contained in:
parent
c75648ffba
commit
5d5bc425c5
|
@ -7,3 +7,86 @@ home_library_name: home-library-webapp
|
||||||
home_library_group_id: org.gcube.data.access
|
home_library_group_id: org.gcube.data.access
|
||||||
home_library_extension: war
|
home_library_extension: war
|
||||||
home_library_file: '{{ home_library_name }}-{{ home_library_version }}.{{ home_library_extension }}'
|
home_library_file: '{{ home_library_name }}-{{ home_library_version }}.{{ home_library_extension }}'
|
||||||
|
|
||||||
|
# Standard jackrabbit configuration
|
||||||
|
#
|
||||||
|
jackrabbit_data_dir: /data/jackrabbit
|
||||||
|
|
||||||
|
jackrabbit_config_files:
|
||||||
|
- bootstrap.properties.txt
|
||||||
|
- repository.xml
|
||||||
|
|
||||||
|
jackrabbit_rmi_enabled: 'true'
|
||||||
|
jackrabbit_rmi_host: 'localhost'
|
||||||
|
jackrabbit_rmi_port: 0
|
||||||
|
jackrabbit_repository_config: 'jackrabbit/repository.xml'
|
||||||
|
jackrabbit_repository_name: 'jackrabbit.repository'
|
||||||
|
jackrabbit_jndi_enabled: 'true'
|
||||||
|
|
||||||
|
jackrabbit_db_type: 'postgresql'
|
||||||
|
jackrabbit_db_driver: 'org.postgresql.Driver'
|
||||||
|
jackrabbit_db_host: 'localhost'
|
||||||
|
|
||||||
|
jackrabbit_virt_fs_db_type: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_virt_fs_db_schema: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_virt_fs_db_driver: '{{ jackrabbit_db_driver }}'
|
||||||
|
jackrabbit_virt_fs_db_host: '{{ jackrabbit_db_host }}'
|
||||||
|
jackrabbit_virt_fs_db_name: 'workspace-db'
|
||||||
|
jackrabbit_virt_fs_db_user: 'workspace-db-user'
|
||||||
|
#jackrabbit_virt_fs_db_password: ''
|
||||||
|
jackrabbit_virt_fs_db_url: 'jdbc:{{ jackrabbit_virt_fs_db_type }}://{{ jackrabbit_virt_fs_db_host }}/{{ jackrabbit_virt_fs_db_name }}'
|
||||||
|
|
||||||
|
# By default the data store uses the same database of the virtual filesystem
|
||||||
|
jackrabbit_data_store_db_type: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_data_store_db_schema: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_data_store_db_driver: '{{ jackrabbit_db_driver }}'
|
||||||
|
jackrabbit_data_store_db_host: '{{ jackrabbit_db_host }}'
|
||||||
|
jackrabbit_data_store_db_name: '{{ jackrabbit_virt_fs_db_name }}'
|
||||||
|
jackrabbit_data_store_db_user: '{{ jackrabbit_virt_fs_db_user }}'
|
||||||
|
jackrabbit_data_store_db_password: '{{ jackrabbit_virt_fs_db_password }}'
|
||||||
|
jackrabbit_data_store_db_url: 'jdbc:{{ jackrabbit_data_store_db_type }}://{{ jackrabbit_data_store_db_host }}/{{ jackrabbit_data_store_db_name }}'
|
||||||
|
jackrabbit_data_store_db_tableprefix: 'datastore_'
|
||||||
|
|
||||||
|
jackrabbit_security_adminid: 'jr_admin'
|
||||||
|
#jackrabbit_security_admin_pwd: ''
|
||||||
|
|
||||||
|
jackrabbit_ws_default_workspace: 'default'
|
||||||
|
|
||||||
|
jackrabbit_ws_persistence_manager: 'org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager'
|
||||||
|
jackrabbit_ws_persistence_manager_db_type: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_ws_persistence_manager_db_schema: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_ws_persistence_manager_db_driver: '{{ jackrabbit_db_driver }}'
|
||||||
|
jackrabbit_ws_persistence_manager_db_host: '{{ jackrabbit_db_host }}'
|
||||||
|
jackrabbit_ws_persistence_manager_db_name: '{{ jackrabbit_virt_fs_db_name }}'
|
||||||
|
jackrabbit_ws_persistence_manager_db_user: '{{ jackrabbit_virt_fs_db_user }}'
|
||||||
|
jackrabbit_ws_persistence_manager_db_password: '{{ jackrabbit_virt_fs_db_password }}'
|
||||||
|
jackrabbit_ws_persistence_manager_db_url: 'jdbc:{{ jackrabbit_ws_persistence_manager_db_type }}://{{ jackrabbit_ws_persistence_manager_db_host }}/{{ jackrabbit_ws_persistence_manager_db_name }}'
|
||||||
|
jackrabbit_ws_persistence_manager_db_tableprefix: 'pm_${wsp.name}_'
|
||||||
|
|
||||||
|
jackrabbit_ver_persistence_manager: 'org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager'
|
||||||
|
jackrabbit_ver_persistence_manager_db_type: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_ver_persistence_manager_db_schema: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_ver_persistence_manager_db_driver: '{{ jackrabbit_db_driver }}'
|
||||||
|
jackrabbit_ver_persistence_manager_db_host: '{{ jackrabbit_db_host }}'
|
||||||
|
jackrabbit_ver_persistence_manager_db_name: '{{ jackrabbit_virt_fs_db_name }}'
|
||||||
|
jackrabbit_ver_persistence_manager_db_user: '{{ jackrabbit_virt_fs_db_user }}'
|
||||||
|
jackrabbit_ver_persistence_manager_db_password: '{{ jackrabbit_virt_fs_db_password }}'
|
||||||
|
jackrabbit_ver_persistence_manager_db_url: 'jdbc:{{ jackrabbit_ver_persistence_manager_db_type }}://{{ jackrabbit_ver_persistence_manager_db_host }}/{{ jackrabbit_ver_persistence_manager_db_name }}'
|
||||||
|
jackrabbit_ver_persistence_manager_db_tableprefix: 'pm_version_'
|
||||||
|
|
||||||
|
# Cluster configuration. Same db host by default, different DB
|
||||||
|
jackrabbit_cluster_db_host: 'localhost'
|
||||||
|
|
||||||
|
jackrabbit_cluster_db_type: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_cluster_db_schema: '{{ jackrabbit_db_type }}'
|
||||||
|
jackrabbit_cluster_db_driver: '{{ jackrabbit_db_driver }}'
|
||||||
|
jackrabbit_cluster_db_host: '{{ jackrabbit_cluster_db_host }}'
|
||||||
|
jackrabbit_cluster_db_name: 'ws-db-cluster-journal'
|
||||||
|
jackrabbit_cluster_db_user: 'ws-db-journal-user'
|
||||||
|
# jackrabbit_cluster_db_password: ''
|
||||||
|
jackrabbit_cluster_db_url: 'jdbc:{{ jackrabbit_cluster_db_type }}://{{ jackrabbit_cluster_db_host }}/{{ jackrabbit_cluster_db_name }}'
|
||||||
|
jackrabbit_cluster_db_tableprefix: 'journal_'
|
||||||
|
# Set it to true if we want to clean the journal daily
|
||||||
|
jackrabbit_cluster_janitor_enabled: 'false'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,15 @@
|
||||||
creates: '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}/WEB-INF/lib'
|
creates: '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}/WEB-INF/lib'
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
|
|
||||||
|
- name: Create the JackRabbit persistence directory
|
||||||
|
become_user: root
|
||||||
|
file: dest={{ jackrabbit_data_dir }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||||
|
|
||||||
|
- name: Install the repository configuration files
|
||||||
|
template: src={{ item }}.j2 dest={{ jackrabbit_data_dir }}/{{ item }}
|
||||||
|
with_items: '{{ jackrabbit_config_files }}'
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ smartgears_user }}'
|
become_user: '{{ smartgears_user }}'
|
||||||
when: home_library_install
|
when: home_library_install
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#bootstrap properties for the repository startup servlet.
|
||||||
|
#Fri Jul 21 05:19:29 CEST 2017
|
||||||
|
java.naming.factory.initial=org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory
|
||||||
|
repository.home=jackrabbit
|
||||||
|
rmi.enabled={{ jackrabbit_rmi_enabled }}
|
||||||
|
repository.config={{ jackrabbit_repository_config }}
|
||||||
|
repository.name={{ jackrabbit_repository_name }}
|
||||||
|
rmi.host={{ jackrabbit_rmi_host }}
|
||||||
|
java.naming.provider.url=http\://www.apache.org/jackrabbit
|
||||||
|
jndi.enabled={{ jackrabbit_jndi_enabled }}
|
||||||
|
rmi.port={{ jackrabbit_rmi_port }}
|
|
@ -0,0 +1,110 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||||
|
license agreements. See the NOTICE file distributed with this work for additional
|
||||||
|
information regarding copyright ownership. The ASF licenses this file to
|
||||||
|
You under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
|
this file except in compliance with the License. You may obtain a copy of
|
||||||
|
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
|
||||||
|
by applicable law or agreed to in writing, software distributed under the
|
||||||
|
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||||
|
OF ANY KIND, either express or implied. See the License for the specific
|
||||||
|
language governing permissions and limitations under the License. -->
|
||||||
|
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN" "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
|
||||||
|
<Repository>
|
||||||
|
<!-- virtual file system where the repository stores global state (e.g.
|
||||||
|
registered namespaces, custom node types, etc.) -->
|
||||||
|
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
|
||||||
|
<param name="driver" value="{{ jackrabbit_virt_fs_db_driver }}" />
|
||||||
|
<param name="schema" value="{{ jackrabbit_virt_fs_db_schema }}" />
|
||||||
|
<param name="url" value="{{ jackrabbit_virt_fs_db_url }}" />
|
||||||
|
<param name="user" value="{{ jackrabbit_virt_fs_db_user }}" />
|
||||||
|
<param name="password" value="{{ jackrabbit_virt_fs_db_password }}" />
|
||||||
|
<param name="schemaObjectPrefix" value="rep_" />
|
||||||
|
</FileSystem>
|
||||||
|
<!-- data store configuration -->
|
||||||
|
<DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
|
||||||
|
<param name="driver" value="{{ jackrabbit_data_store_db_driver }}" />
|
||||||
|
<param name="databaseType" value="{{ jackrabbit_data_store_db_type }}" />
|
||||||
|
<param name="url" value="{{ jackrabbit_data_store_db_url }}" />
|
||||||
|
<param name="user" value="{{ jackrabbit_data_store_db_user }}" />
|
||||||
|
<param name="password" value="{{ jackrabbit_data_store_db_password }}" />
|
||||||
|
<param name="minRecordLength" value="1024" />
|
||||||
|
<param name="maxConnections" value="3" />
|
||||||
|
<param name="copyWhenReading" value="true" />
|
||||||
|
<param name="tablePrefix" value="{{ jackrabbit_data_store_db_tableprefix }}" />
|
||||||
|
<param name="schemaObjectPrefix" value="" />
|
||||||
|
</DataStore>
|
||||||
|
<!-- security configuration -->
|
||||||
|
<Security appName="Jackrabbit">
|
||||||
|
<SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager" />
|
||||||
|
<AccessManager class="org.apache.jackrabbit.core.security.DefaultAccessManager" />
|
||||||
|
<LoginModule class="org.apache.jackrabbit.core.security.authentication.DefaultLoginModule">
|
||||||
|
<param name="adminId" value="{{ jackrabbit_security_adminid }}" />
|
||||||
|
<param name="adminPassword" value="{{ jackrabbit_security_admin_pwd }}" />
|
||||||
|
</LoginModule>
|
||||||
|
</Security>
|
||||||
|
<!-- location of workspaces root directory and name of default workspace -->
|
||||||
|
<Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="{{ jackrabbit_ws_default_workspace }}" />
|
||||||
|
<Workspace name="${wsp.name}">
|
||||||
|
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
|
||||||
|
<param name="path" value="${wsp.home}" />
|
||||||
|
</FileSystem>
|
||||||
|
<PersistenceManager class="{{ jackrabbit_ws_persistence_manager }}">
|
||||||
|
<param name="driver" value="{{ jackrabbit_ws_persistence_manager_db_driver }}" />
|
||||||
|
<param name="url" value="{{ jackrabbit_ws_persistence_manager_db_url }}" />
|
||||||
|
<param name="schema" value="{{ jackrabbit_ws_persistence_manager_db_schema }}" />
|
||||||
|
<param name="user" value="{{ jackrabbit_ws_persistence_manager_db_user }}" />
|
||||||
|
<param name="password" value="{{ jackrabbit_ws_persistence_manager_db_password }}" />
|
||||||
|
<param name="schemaObjectPrefix" value="{{ jackrabbit_ws_persistence_manager_db_tableprefix }}" />
|
||||||
|
<param name="bundleCacheSize" value="600" />
|
||||||
|
<param name="errorHandling" value="IGNORE_MISSING_BLOBS" />
|
||||||
|
<param name="consistencyFix" value="false" />
|
||||||
|
<param name="consistencyCheck" value="false" />
|
||||||
|
</PersistenceManager>
|
||||||
|
<!-- Search index and the file system it uses. class: FQN of class implementing
|
||||||
|
the QueryHandler interface -->
|
||||||
|
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
|
||||||
|
<param name="path" value="${wsp.home}/index" />
|
||||||
|
<param name="supportHighlighting" value="true" />
|
||||||
|
<param name="autoRepair" value="true" />
|
||||||
|
<param name="onWorkspaceInconsistency" value="log" />
|
||||||
|
<param name="indexingConfiguration" value="${rep.home}/indexing_configuration.xml" />
|
||||||
|
<param name="resultFetchSize" value="50" />
|
||||||
|
<param name="cacheSize" value="100000" />
|
||||||
|
<param name="enableConsistencyCheck" value="false" />
|
||||||
|
<param name="forceConsistencyCheck" value="false" />
|
||||||
|
</SearchIndex>
|
||||||
|
</Workspace>
|
||||||
|
<!-- Configures the versioning -->
|
||||||
|
<Versioning rootPath="${rep.home}/version">
|
||||||
|
<!-- Configures the filesystem to use for versioning for the respective
|
||||||
|
persistence manager -->
|
||||||
|
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
|
||||||
|
<param name="path" value="${rep.home}/version" />
|
||||||
|
</FileSystem>
|
||||||
|
<PersistenceManager class="{{ jackrabbit_ver_persistence_manager }}">
|
||||||
|
<param name="driver" value="{{ jackrabbit_ver_persistence_manager_db_driver }}" />
|
||||||
|
<param name="url" value="{{ jackrabbit_ver_persistence_manager_db_url }}" />
|
||||||
|
<param name="schema" value="{{ jackrabbit_ver_persistence_manager_db_schema }}" />
|
||||||
|
<param name="user" value="{{ jackrabbit_ver_persistence_manager_db_user }}" />
|
||||||
|
<param name="password" value="{{ jackrabbit_ver_persistence_manager_db_password }}" />
|
||||||
|
<param name="schemaObjectPrefix" value="{{ jackrabbit_ver_persistence_manager_db_tableprefix }}" />
|
||||||
|
<param name="bundleCacheSize" value="600" />
|
||||||
|
<param name="consistencyFix" value="false" />
|
||||||
|
<param name="consistencyCheck" value="false" />
|
||||||
|
</PersistenceManager>
|
||||||
|
</Versioning>
|
||||||
|
<!-- Cluster configuration -->
|
||||||
|
<Cluster id="node1" syncDelay="2000">
|
||||||
|
<Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
|
||||||
|
<param name="driver" value="{{ jackrabbit_cluster_db_driver }}" />
|
||||||
|
<param name="url" value="{{ jackrabbit_cluster_db_url }}" />
|
||||||
|
<param name="databaseType" value="{{ jackrabbit_cluster_db_type }}" />
|
||||||
|
<param name="schemaObjectPrefix" value="{{ jackrabbit_cluster_db_tableprefix }}" />
|
||||||
|
<param name="user" value="{{ jackrabbit_cluster_db_user }}" />
|
||||||
|
<param name="password" value="{{ jackrabbit_cluster_db_password }}" />
|
||||||
|
<param name="revision" value="${rep.home}/revision.log" />
|
||||||
|
<param name="janitorEnabled" value="{{ jackrabbit_cluster_janitor_enabled }}"/> <!-- set to true if you want to daily clean the journal table https://wiki.apache.org/jackrabbit/Clustering#Removing_Old_Revisions -->
|
||||||
|
</Journal>
|
||||||
|
</Cluster>
|
||||||
|
</Repository>
|
Loading…
Reference in New Issue