Deployment Config Alfresco 3.2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2010 12:49 PM
I'm upgrading from Alfresco 3.0 to 3.2 - I've got stuck on the config in the Deployment application-context.xml
My original 3.0 application-context.xml
I'm trying to replicate the functionality in "configurartion" bean that sets "targetData" property that calls "deployScript".
My new 3.2 application-context.xml
Any ideas what I should be setting/doing/adding?
Thanks in advance…
My original 3.0 application-context.xml
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'><beans> <bean id="deployScript" class="org.alfresco.deployment.ProgramRunnable"> <property name="program"><value>/opt/application/deployments/deploy.sh</value></property> <!– Arguments that get appended to the final command line –> <property name="arguments"> <list> <value></value> </list> </property> <!– The directory that the program runs in. –> <property name="directory"><value>/</value></property> </bean> <bean id="properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders"> <value>true</value> </property> <property name="locations"> <list> <value>classpath:deployment.properties</value> </list> </property> </bean> <bean id="configuration" class="org.alfresco.deployment.config.Configuration" init-method="init"> <property name="dataDirectory"> <value>${dep.datadir}</value> </property> <property name="logDirectory"> <value>${dep.logdir}</value> </property> <property name="metaDataDirectory"> <value>${dep.metadatadir}</value> </property> <!– Target Configuration. Modify for your site. –> <property name="targetData"> <map> <entry key="default"> <map> <entry key="root"><value>/opt/application/deployments/data</value></entry> <entry key="user"><value>user</value></entry> <entry key="password"><value>password</value></entry> <entry key="runnables"> <list> <ref bean="deployScript"/> </list> </entry> </map> </entry> </map> </property> </bean> <bean id="deploymentReceiverService" class="org.alfresco.deployment.impl.server.DeploymentReceiverServiceImpl" init-method="init"> <property name="configuration"> <ref bean="configuration"/> </property> </bean> <bean id="deploymentReceiverTransport" class="org.alfresco.deployment.impl.server.DeploymentReceiverTransportImpl"> <property name="deploymentReceiverService"> <ref bean="deploymentReceiverService"/> </property> </bean> <bean id="deploymentReceiverTransportRMI" class="org.springframework.remoting.rmi.RmiServiceExporter"> <property name="service"> <ref bean="deploymentReceiverTransport"/> </property> <property name="serviceInterface"> <value>org.alfresco.deployment.DeploymentReceiverTransport</value> </property> <property name="serviceName"> <value>deployment</value> </property> <property name="registryPort"> <value>${dep.rmi.port}</value> </property> </bean></beans>
I'm trying to replicate the functionality in "configurartion" bean that sets "targetData" property that calls "deployScript".
My new 3.2 application-context.xml
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'><!– Stand alone deployment server –><beans> <bean id="deployScript" class="org.alfresco.deployment.ProgramRunnable"> <property name="program"><value>/opt/application/deployments/deploy.sh</value></property> <!– Arguments that get appended to the final command line –> <property name="arguments"> <list> <value></value> </list> </property> <!– The directory that the program runs in. –> <property name="directory"><value>/</value></property> </bean> <bean id="properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders"> <value>true</value> </property> <property name="locations"> <list> <value>classpath:deployment.properties</value> </list> </property> </bean> <import resource="classpath*:deployment/*-context.xml" /> <import resource="classpath*:deployment/*-target.xml" /> <!– command queue for deployment service –> <bean id="deploymentReceiverCommandQueue" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueImpl" > </bean> <!– Reader management –> <bean id="deploymentReaderManagement" class="org.alfresco.deployment.impl.server.ReaderManagementPool" > </bean> <!– This is the common configuration for all file system receivers –> <bean id="fileSystemReceiverService" class="org.alfresco.deployment.impl.fsr.FileSystemReceiverServiceImpl" init-method="init"> <!– Will an error be thrown if the FSR overwrites files outside its control –> <property name="errorOnOverwrite"><value>${deployment.filesystem.errorOnOverwrite}</value></property> <!– Where to store temporary data –> <property name="dataDirectory"> <value>${deployment.filesystem.datadir}</value> </property> <!– Where to log information –> <property name="logDirectory"> <value>${deployment.filesystem.logdir}</value> </property> <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property> </bean> <!– Housekeeper for the file system service deployment receivers –> <bean id="fileSystemReceiverHousekeeper" class="org.alfresco.deployment.impl.fsr.FileSystemReceiverHousekeeper" init-method="init"> <property name="fileSystemReceiverService"><ref bean="fileSystemReceiverService"/></property> </bean> <!– Housekeeper for the deployment queue –> <bean id="commandQueueHousekeeper" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueHousekeeper" init-method="init"> <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property> </bean> <!– This is the deployment engine –> <bean id="deploymentReceiverEngine" class="org.alfresco.deployment.impl.server.DeploymentReceiverEngineImpl" init-method="init"> <!– How long to wait before polling housekeeping –> <property name="pollDelay"><value>5000</value></property> <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property> <property name="readerManagement"> <ref bean="deploymentReaderManagement" /> </property> <!– The authenticator to access the deployment receiver engine (for shutdown) –> <property name="authenticator"> <bean class="org.alfresco.deployment.impl.server.DeploymentReceiverAuthenticatorSimple"> <property name="user"><value>${deployment.user}</value></property> <property name="password"><value>${deployment.password}</value></property> </bean> </property> <!– Define your content transformers here <property name="transformers"> <list> </list> </property> –> <!– Define your housekeepers here –> <property name="housekeepers"> <set> <ref bean="commandQueueHousekeeper"/> </set> </property> </bean> <!– The remote interface for the deployment server –> <bean id="deploymentReceiverTransportRMI" class="org.springframework.remoting.rmi.RmiServiceExporter"> <property name="service"> <ref bean="deploymentReceiverEngine"/> </property> <property name="serviceInterface"> <value>org.alfresco.deployment.DeploymentReceiverTransport</value> </property> <property name="serviceName"> <value>deployment</value> </property> <property name="registryPort"> <value>${deployment.rmi.port}</value> </property> <property name="servicePort"> <value>${deployment.rmi.service.port}</value> </property> </bean> <!– Defines and registers the deployment target with the name "default" Which is a FileSystemDeploymentTarget with the "deploymentReceiverEngine" –> <bean class="org.alfresco.deployment.impl.server.DeploymentTargetRegistrationBean" init-method="register"> <property name="name"> <value>${deployment.filesystem.default.name}</value> </property> <property name="registry"> <ref bean="deploymentReceiverEngine" /> </property> <property name="target"> <bean class="org.alfresco.deployment.impl.fsr.FileSystemDeploymentTarget" init-method="init"> <!– Where too store content –> <property name="rootDirectory"> <value>${deployment.filesystem.default.rootdir}</value> </property> <!– Where to store metadata –> <property name="metaDataDirectory"> <value>${deployment.filesystem.metadatadir}/${deployment.filesystem.default.name}</value> </property> <property name="autoFix"> <value>${deployment.filesystem.autofix}</value> </property> <property name="fileSystemReceiverService"> <ref bean="fileSystemReceiverService" /> </property> <!– how to authenticate for this particular target –> <property name="authenticator"> <bean class="org.alfresco.deployment.impl.server.DeploymentReceiverAuthenticatorSimple"> <property name="user"> <value>${deployment.filesystem.default.user}</value> </property> <property name="password"> <value>${deployment.filesystem.default.password}</value> </property> </bean> </property> <property name="name"> <value>${deployment.filesystem.default.name}</value> </property> </property> <!– Target Event Handlers <property name="prepare"> <list> <bean class="org.alfresco.deployment.SampleRunnable"/> </list> </property> <property name="postCommit"> <list> <bean class="org.alfresco.deployment.SampleRunnable"/> </list> </property> –> </bean> </property> </bean> </beans>
Any ideas what I should be setting/doing/adding?
Thanks in advance…
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2010 04:46 PM
The configuration has change for 3.2.
http://wiki.alfresco.com/wiki/File_System_Deployment_Targe
You need to define a filesystem target, which you should be able to do for your case just by changing a couple of values in deployment.properties.
If you have a more complex requirement then take a look at the filesystem-target.xml file which replaces the file you used to change on previous versions of alfresco.
http://wiki.alfresco.com/wiki/File_System_Deployment_Targe
You need to define a filesystem target, which you should be able to do for your case just by changing a couple of values in deployment.properties.
If you have a more complex requirement then take a look at the filesystem-target.xml file which replaces the file you used to change on previous versions of alfresco.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2010 04:11 PM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2010 07:17 AM
For completeness - this is what I ended up with
In my target, I added a postCommit to run my deployScript
?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'><!– Stand alone deployment server –><beans> <bean id="deployScript" class="org.alfresco.deployment.ProgramRunnable"> <property name="program"><value>/opt/app/deployments32/deploy.sh</value></property> <!– Arguments that get appended to the final command line –> <property name="arguments"> <list> <value></value> </list> </property> <!– The directory that the program runs in. –> <property name="directory"><value>/</value></property> </bean> <bean id="properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders"> <value>true</value> </property> <property name="locations"> <list> <value>classpath:deployment.properties</value> </list> </property> </bean> <import resource="classpath*:deployment/*-context.xml" /> <import resource="classpath*:deployment/*-target.xml" /> <!– command queue for deployment service –> <bean id="deploymentReceiverCommandQueue" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueImpl" > </bean> <!– Reader management –> <bean id="deploymentReaderManagement" class="org.alfresco.deployment.impl.server.ReaderManagementPool" > </bean> <!– This is the common configuration for all file system receivers –> <bean id="fileSystemReceiverService" class="org.alfresco.deployment.impl.fsr.FileSystemReceiverServiceImpl" init-method="init"> <!– Will an error be thrown if the FSR overwrites files outside its control –> <property name="errorOnOverwrite"><value>${deployment.filesystem.errorOnOverwrite}</value></property> <!– Where to store temporary data –> <property name="dataDirectory"> <value>${deployment.filesystem.datadir}</value> </property> <!– Where to log information –> <property name="logDirectory"> <value>${deployment.filesystem.logdir}</value> </property> <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property> </bean> <!– Housekeeper for the file system service deployment receivers –> <bean id="fileSystemReceiverHousekeeper" class="org.alfresco.deployment.impl.fsr.FileSystemReceiverHousekeeper" init-method="init"> <property name="fileSystemReceiverService"><ref bean="fileSystemReceiverService"/></property> </bean> <!– Housekeeper for the deployment queue –> <bean id="commandQueueHousekeeper" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueHousekeeper" init-method="init"> <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property> </bean> <!– This is the deployment engine –> <bean id="deploymentReceiverEngine" class="org.alfresco.deployment.impl.server.DeploymentReceiverEngineImpl" init-method="init"> <!– How long to wait before polling housekeeping –> <property name="pollDelay"><value>5000</value></property> <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property> <property name="readerManagement"> <ref bean="deploymentReaderManagement" /> </property> <!– The authenticator to access the deployment receiver engine (for shutdown) –> <property name="authenticator"> <bean class="org.alfresco.deployment.impl.server.DeploymentReceiverAuthenticatorSimple"> <property name="user"><value>${deployment.user}</value></property> <property name="password"><value>${deployment.password}</value></property> </bean> </property> <!– Define your content transformers here <property name="transformers"> <list> </list> </property> –> <!– Define your housekeepers here –> <property name="housekeepers"> <set> <ref bean="commandQueueHousekeeper"/> </set> </property> </bean> <!– The remote interface for the deployment server –> <bean id="deploymentReceiverTransportRMI" class="org.springframework.remoting.rmi.RmiServiceExporter"> <property name="service"> <ref bean="deploymentReceiverEngine"/> </property> <property name="serviceInterface"> <value>org.alfresco.deployment.DeploymentReceiverTransport</value> </property> <property name="serviceName"> <value>deployment</value> </property> <property name="registryPort"> <value>${deployment.rmi.port}</value> </property> <property name="servicePort"> <value>${deployment.rmi.service.port}</value> </property> </bean> <!– Defines and registers the deployment target with the name "default" Which is a FileSystemDeploymentTarget with the "deploymentReceiverEngine" –> <bean class="org.alfresco.deployment.impl.server.DeploymentTargetRegistrationBean" init-method="register"> <property name="name"> <value>${deployment.filesystem.default.name}</value> </property> <property name="registry"> <ref bean="deploymentReceiverEngine" /> </property> <property name="target"> <bean class="org.alfresco.deployment.impl.fsr.FileSystemDeploymentTarget" init-method="init"> <!– Where too store content –> <property name="rootDirectory"> <value>${deployment.filesystem.default.rootdir}</value> </property> <!– Where to store metadata –> <property name="metaDataDirectory"> <value>${deployment.filesystem.metadatadir}/${deployment.filesystem.default.name}</value> </property> <property name="autoFix"> <value>${deployment.filesystem.autofix}</value> </property> <property name="fileSystemReceiverService"> <ref bean="fileSystemReceiverService" /> </property> <!– how to authenticate for this particular target –> <property name="authenticator"> <bean class="org.alfresco.deployment.impl.server.DeploymentReceiverAuthenticatorSimple"> <property name="user"> <value>${deployment.filesystem.default.user}</value> </property> <property name="password"> <value>${deployment.filesystem.default.password}</value> </property> </bean> </property> <property name="name"> <value>${deployment.filesystem.default.name}</value> </property> <property name="postCommit"> <list> <ref bean="deployScript"/> </list> </property> <!– Target Event Handlers <property name="prepare"> <list> <bean class="org.alfresco.deployment.SampleRunnable"/> </list> </property> <property name="postCommit"> <list> <bean class="org.alfresco.deployment.SampleRunnable"/> </list> </property> –> </bean> </property> </bean></beans>
In my target, I added a postCommit to run my deployScript
<property name="postCommit"> <list> <ref bean="deployScript"/> </list> </property>