Hi Matteo,

I think I see 2 errors in your cluster configuration (jackrabbit configuration):

1) AFAIK the repository file-system *should not* be shared among the cluster 
nodes. Each cluster node has its own repository level file-system.
2) AFAIK you *cannot* use the disk based file-system implementations for the 
workspace level file-system. The workspace level file-system needs to be shared 
among the cluster nodes, but you need to use a transactionally safe 
implementation. So you need to use DbFileSystem based implementations.

The rest of the configuration looks ok to me. It is ok to use the shared 
file-system for the DataStore.

Regards from Vienna,

Richard


> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:user-list-owner@magnolia-
> cms.com] Im Auftrag von Matteo Colombo Speroni (via Magnolia Forums)
> Gesendet: Donnerstag, 20. März 2014 13:01
> An: Magnolia User List
> Betreff: [magnolia-user] Magnolia DAM clustering between author and
> public
> 
> Hi guys,
> 
> we need to configure out magnolia to have an author and a public instance
> sharing DAM workspace. We are working with magnolia 5.2.2 version under
> JBOSS 7.1.1 GA.
> Unfortunately we did not reach the expected result.
> the installation of magnoliaAuthor and magnoliaPublic instances did not
> return any error.
> we have created a DAM folder using the Asset App through the
> magnoliaAuthor instance; we expected to see the same folder also under
> the magnoliaPublic Asset App, without any "publish" operation. noway!
> the magnoliaPublic instance did not automatically show the folder (created
> through magnoliaAuthor).
> we have also "tried" to publish the DAM folder from magnoliaAuthor
> instance, but at that moment there was an error. take in account that we
> were able to publish our website pages and config module.
> 
> below you can find the files we have used an the performed actions.
> 
> 
> 1)
> We created 3 schema: one for public, one for author and one for shared
> DAM:
> - mgnl_author
> - mgnl_public
> - mgnl_shared_dam
> 
> 2)
> we created a shared folder for the DAM repository under a local path:
> "D:/Progetti/MagnoliaSharedDam"
> 
> 3)
> we modified magnolia.properties files under:
> 
> [b]/WEB-INF/config/magnoliaAuthor[/b]
> [code]
> # the directories in which the bootstrap files are searched
> magnolia.bootstrap.dir=WEB-INF/bootstrap/author WEB-
> INF/bootstrap/common
> 
> #mysql configuration
> magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-
> conf/jackrabbit-bundle-mysql-search-author.xml
> #cluster of dam configuration
> magnolia.repositories.jackrabbit.cluster-dam.config=WEB-INF/config/repo-
> conf/jackrabbit-bundle-mysql-search-dam.xml
> 
> magnolia.clusterid=magnoliacluster-dam-auth
> [/code]
> 
> [b]/WEB-INF/config/magnoliaPublic[/b]
> [code]
> # this is only used for the initial installation afterward the configuration 
> in the
> config repository is used # the value is saved in /server/admin
> magnolia.bootstrap.authorInstance=false
> 
> # the directories in which the bootstrap files are searched
> magnolia.bootstrap.dir=WEB-INF/bootstrap/public WEB-
> INF/bootstrap/common
> 
> 
> #mysql configuration
> magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-
> conf/jackrabbit-bundle-mysql-search-public.xml
> #cluster of dam configuration
> magnolia.repositories.jackrabbit.cluster-dam.config=WEB-INF/config/repo-
> conf/jackrabbit-bundle-mysql-search-dam.xml
> magnolia.clusterid=magnoliacluster-dam-publ
> [/code]
> 
> 
> 4)
> we modified [b]WEB-INF/config/default/repositories.xml[/b] adding our
> shared dam repository:
> [code]
>     <RepositoryMapping>
>         <Map name="website" repositoryName="magnolia"
> workspaceName="website" />
>         <Map name="config" repositoryName="magnolia"
> workspaceName="config" />
>         <Map name="users" repositoryName="magnolia"
> workspaceName="users" />
>         <Map name="userroles" repositoryName="magnolia"
> workspaceName="userroles" />
>         <Map name="usergroups" repositoryName="magnolia"
> workspaceName="usergroups" />
>         <Map name="mgnlSystem" repositoryName="magnolia"
> workspaceName="mgnlSystem" /> <!-- System internal data -->
>         <Map name="mgnlVersion" repositoryName="magnolia"
> workspaceName="mgnlVersion" /> <!-- magnolia version workspace -->
>         <Map name="dam" repositoryName="magnoliacluster-dam"
> workspaceName="dam" />
>     </RepositoryMapping>
> 
>     <!-- magnolia default repository -->
>     <Repository name="magnolia"
> provider="info.magnolia.jackrabbit.ProviderImpl" loadOnStartup="true">
>         <param name="configFile"
> value="${magnolia.repositories.jackrabbit.config}" />
>         <param name="repositoryHome"
> value="${magnolia.repositories.home}/magnolia" />
>         <!-- the default node types are loaded automatically
>                       <param name="customNodeTypes" value="WEB-
> INF/config/repo-conf/nodetypes/magnolia_nodetypes.xml" />
>               -->
>         <param name="contextFactoryClass"
> value="org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactor
> y" />
>         <param name="providerURL" value="localhost" />
>         <param name="bindName" value="${magnolia.webapp}" />
>         <workspace name="website" />
>         <workspace name="config" />
>         <workspace name="users" />
>         <workspace name="userroles" />
>         <workspace name="usergroups" />
>         <workspace name="mgnlSystem" />
>         <workspace name="mgnlVersion" />
>     </Repository>
> 
>     <!-- DAM CLUSTERED REPOSITORY -->
>     <Repository name="magnoliacluster-dam"
> provider="info.magnolia.jackrabbit.ProviderImpl" loadOnStartup="true">
>               <param name="configFile"
> value="${magnolia.repositories.jackrabbit.cluster-dam.config}" />
>               <param name="repositoryHome"
> value="${magnolia.repositories.home}/magnoliacluster-dam" />
>               <param name="contextFactoryClass"
> value="org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactor
> y" />
>               <param name="providerURL" value="localhost" />
>                <param name="bindName" value="cluster-dam-
> ${magnolia.webapp}" />
>               <workspace name="dam" />
>       </Repository>
> [/code]
> 
> 5)
> we created 3 files copying the standard mysql jackrabbit configuration:
> 
> - jackrabbit-bundle-mysql-search-author.xml
> - jackrabbit-bundle-mysql-search-public.xml
> - jackrabbit-bundle-mysql-search-dam.xml
> 
> in the author and public files we modified only datasource url, user and
> password.
> In dam file we defined two clusters (one for each instance with the same id
> of the correspondent magnolia.properties property)and we changed
> filesystem and datastore path to our shared folder created at point 2) below
> the entire dam jackrabbit file.
> 
> [code]
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
> Jackrabbit 2.0//EN" "http://jackrabbit.apache.org/dtd/repository-2.0.dtd";>
> <Repository>
>   <Cluster id="magnoliacluster-dam-auth" syncDelay="2000">
>     <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>       <param name="revision" value="${rep.home}/revision.log" />
>       <param name="driver" value="com.mysql.jdbc.Driver" />
>       <param name="url"
> value="jdbc:mysql://localhost:3306/MGNL_SHARED_DAM" />
>       <param name="user" value="root" />
>       <param name="password" value="root" />
>       <param name="schema" value="mysql" />
>       <param name="schemaObjectPrefix" value="journal_" />
>     </Journal>
>   </Cluster>
> 
>   <Cluster id="magnoliacluster-dam-publ" syncDelay="2000">
>     <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>       <param name="revision" value="${rep.home}/revision.log" />
>       <param name="driver" value="com.mysql.jdbc.Driver" />
>       <param name="url"
> value="jdbc:mysql://localhost:3306/MGNL_SHARED_DAM" />
>       <param name="user" value="root" />
>       <param name="password" value="root" />
>       <param name="schema" value="mysql" />
>       <param name="schemaObjectPrefix" value="journal_" />
>     </Journal>
>   </Cluster>
> 
>   <DataSources>
>     <DataSource name="magnolia">
>       <param name="driver" value="com.mysql.jdbc.Driver" />
>       <param name="url"
> value="jdbc:mysql://localhost:3306/MGNL_SHARED_DAM" />
>       <param name="user" value="root" />
>       <param name="password" value="root" />
>       <param name="databaseType" value="mysql"/>
>       <param name="validationQuery" value="select 1"/>
>     </DataSource>
>   </DataSources>
>   <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>      <param name="path"
> value="D:/Progetti/MagnoliaSharedDam/repository" />
>   </FileSystem>
>   <Security appName="magnolia">
>     <SecurityManager
> class="org.apache.jackrabbit.core.DefaultSecurityManager"/>
>     <AccessManager
> class="org.apache.jackrabbit.core.security.DefaultAccessManager">
>     </AccessManager>
>     <!-- login module defined here is used by the repo to authenticate every
> request. not by the webapp to authenticate user against the webapp
> context (this one has to be passed before thing here gets invoked -->
>     <LoginModule
> class="info.magnolia.jaas.sp.jcr.JackrabbitAuthenticationModule">
>     </LoginModule>
>   </Security>
>   <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
>     <param name="path"
> value="D:/Progetti/MagnoliaSharedDam/repository/datastore"/>
>     <param name="minRecordLength" value="1024"/>
>   </DataStore>
>   <Workspaces rootPath="${rep.home}/workspaces"
> defaultWorkspace="default" />
>   <Workspace name="default">
>     <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>       <param name="path" value="${wsp.home}/default" />
>     </FileSystem>
>     <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManag
> er">
>       <param name="dataSourceName" value="magnolia"/>
>       <param name="schemaObjectPrefix" value="pm_${wsp.name}_" />
>     </PersistenceManager>
>     <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>       <param name="path" value="${wsp.home}/index" />
>       <!-- SearchIndex will get the indexing configuration from the 
> classpath, if
> not found in the workspace home -->
>       <param name="indexingConfiguration"
> value="/info/magnolia/jackrabbit/indexing_configuration.xml"/>
>       <param name="useCompoundFile" value="true" />
>       <param name="minMergeDocs" value="100" />
>       <param name="volatileIdleTime" value="3" />
>       <param name="maxMergeDocs" value="100000" />
>       <param name="mergeFactor" value="10" />
>       <param name="maxFieldLength" value="10000" />
>       <param name="bufferSize" value="10" />
>       <param name="cacheSize" value="1000" />
>       <param name="forceConsistencyCheck" value="false" />
>       <param name="autoRepair" value="true" />
>       <param name="queryClass"
> value="org.apache.jackrabbit.core.query.QueryImpl" />
>       <param name="respectDocumentOrder" value="true" />
>       <param name="resultFetchSize" value="100" />
>       <param name="extractorPoolSize" value="3" />
>       <param name="extractorTimeout" value="100" />
>       <param name="extractorBackLogSize" value="100" />
>     </SearchIndex>
>     <WorkspaceSecurity>
>       <AccessControlProvider
> class="info.magnolia.cms.core.MagnoliaAccessProvider" />
>     </WorkspaceSecurity>
>   </Workspace>
>   <Versioning rootPath="${rep.home}/version">
>     <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>       <param name="path" value="${rep.home}/workspaces/version" />
>     </FileSystem>
>     <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManag
> er">
>       <param name="dataSourceName" value="magnolia"/>
>       <param name="schemaObjectPrefix" value="version_" />
>     </PersistenceManager>
>   </Versioning>
> </Repository>
> 
> [/code]
> 
> --
> Context is everything: http://forum.magnolia-
> cms.com/forum/thread.html?threadId=bbd4fc6e-a0a7-4dbf-a8ac-
> c80ffab57973
> 
> 
> ----------------------------------------------------------------
> For list details, see http://www.magnolia-cms.com/community/mailing-
> lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to