cancel
Showing results for 
Search instead for 
Did you mean: 

Extensibility modules still auto deploying

tonyrivet
Champ in-the-making
Champ in-the-making
Hi,

I have some Share extensibility modules that depend on each other. Initially, I configured them to auto-deploy. Then I figured out that :
- there is no better way to order the module deployment than doing it manually on the module deployment page
- when the auto-deploy property is set to true, the modules redeploy each time the server is restarted and the manually set order is lost

I read <a href="http://stackoverflow.com/a/14954794">here</a> that the only way to manage extensibility modules deployment order is to set the auto-deploy property to false and to set the order manually.
That's quite a shame, but ok…

My problem is setting the auto-deploy to false seems to have no effect : my modules still deploy automatically each time I restart tomcat, and so I loose the deployment order…

I also changed the WebFramework configuration without any effect :

<config evaluator="string-compare" condition="WebFramework">
      <web-framework>
         <module-deployment>
            <!– Allow extension modules with <auto-deploy> set to true to be automatically deployed –>
            <mode>manual</mode>
            <enable-auto-deploy-modules>false</enable-auto-deploy-modules>
         </module-deployment>
      </web-framework>
</config>


Does someone know why the modules still auto deploy?
Is there any attribute persisted in database that I could reinitialize (I can't afford to wipe the database here)?

Thank you for your answers !

Tony
9 REPLIES 9

tonyrivet
Champ in-the-making
Champ in-the-making
Nobody?
I tried to deploy my AMPs on new WARs but the modules are still auto-deploying…
I tried to remove all modules, apply changes, add them again in the correct order, apply changes again : still no survive the restart.
By the way, the modules order is correct in :  /app:company_home/st:sites/cm:surf-config/cm:module-deployments


I still don't know where the information is persisted…

darkredd
Star Contributor
Star Contributor
Hi Tony,

I noted your auto-deploy tag is set to <strong>false</strong>, change it to <strong>true</strong> and add the following line on your module extension file:
<auto-deploy>true</auto-deploy>


This should solve your problem.

tonyrivet
Champ in-the-making
Champ in-the-making
Hi,

Thank you for your response but I don't think you understood my problem (or maybe it's me who didn't get it at all !)

I don't want my modules to auto-deploy anymore because auto-deploy changes the order of the modules (I need them in a specific order for dependencies matter).
I just want to set my modules order in the module deployment console and keep it unchanged.
The problem is, even with all "auto-deploy" set to false, the modules keep auto-deploying and their order keeps changing each time I restart tomcat…

Am I missing something ?

ddraper
World-Class Innovator
World-Class Innovator
If modules are still auto-deploying when you've got configured them not to then that sounds like a bug, however (as I have modules that aren't auto-deploying when set to manual it's more likely that something else is also overriding the configuration). If you are using auto-deploy or enable-auto-deploy-modules (even unintentionally) then it might be worth knowing that you can configure individual modules with an <auto-deploy-index> element - the value should be an integer, the lower the number the earlier they're auto-deployed - this allows you to control the order of your modules.

tonyrivet
Champ in-the-making
Champ in-the-making
Hi,

Thank you for your response !

Are you saying that there is a way to configure the modules deployment order ? That is totally what I need, but I didn't found anything about this. Can you be more explicit about the configuration element to use please ??

I will do more testing on a different environment next week and let you know if there is a chance that something else is overriding my configuration. I have no doubt manual deploying works, but maybe not after setting the auto-deploy to true the first time…

tonyrivet
Champ in-the-making
Champ in-the-making
Hi,

Sorry for the delay.
I tried the same thing on another environment on which the modules were also installed with the auto deploy activated. I undeployed and redeployed all the modules, restarted Tomcat : the modules order is still changing…

I would be really glad if you could be more explicit about the auto-deploy order configuration element you were talking about !

Thanks !

ddraper
World-Class Innovator
World-Class Innovator
Hi Tony,

Sorry for not replying to your previous question - subscriptions on this forum are very unreliable!!

Anyway, I've just tested this out with the following definition of three modules:


<extension>
  <modules>
    <module>
      <id>Third</id>
      <auto-deploy>true</auto-deploy>
      <auto-deploy-index>3</auto-deploy-index>
      <evaluator type="default.extensibility.evaluator"/>
    </module>

     <module>
      <id>First</id>
      <auto-deploy>true</auto-deploy>
      <auto-deploy-index>1</auto-deploy-index>
      <evaluator type="default.extensibility.evaluator"/>
    </module>

     <module>
      <id>Second</id>
      <auto-deploy>true</auto-deploy>
      <auto-deploy-index>2</auto-deploy-index>
      <evaluator type="default.extensibility.evaluator"/>
    </module>
  </modules>
</extension>


When these are defined and included in an extensions configuration file and Share is started you'll see in the /share/page/modules/deploy that they automatically order to be "First", "Second" and "Third". They could have been split across multiple extension configuration files but I just put them in the same file for brevity.

Hope that helps!

Regards,
Dave

tonyrivet
Champ in-the-making
Champ in-the-making
Thanks for your response.

That sounded perfect, but it seems to have no effect on my existing environment.
I tried to start the same Alfresco instance (same modules, same config) with a new database/content store, and the modules did deploy in the right order !

So I think there is a bug as the order the modules were deployed the first time seems to be persisted somewhere (but where ?!).
I thought it could depend on the nodes in the deployment space (/app:company_home/st:sites/cm:surf-config/cm:module-deployments) but the modules ARE in the right order in this space…

Do you think of a workaround (even dirty) that could let me remove that persitance on my existing environments ?

ddraper
World-Class Innovator
World-Class Innovator
If you've manually persisted the module deployment at any point then you're effectively persisting a new index for those modules and those indices will "win" each time. The module deployment is persisted as part of the Surf configuration files and are actually hidden from view in the Alfresco Repository. An inability to have a "Clear persisted order data" button (or similar) on the Module Deployment page is clearly an oversight on our part and we should probably look to implement one. This would be worth raising as a feature request in JIRA. If you need to continue working with previously persisted module data then you'll need clear out that old data. If you're still on a 4.x version this can actually be done in the old Explorer client.