Hi David,

I find Magnolia has a very nice Module mechanism.

It is true, if you delete the module node under /modules in the config 
workspace, magnolia will perform a complete reinstall of the module.
For some modules, this works fine (eg when you didn’t change the default 
config), other modules need to be reconfigured after reinstalling them.

In my projects, I make active use of Magnolia’s module mechanism. For each 
module I write a ModuleVersionHandler, which controls the bootstrapping of the 
module. I make sure to include “basic” configurations for the module, so 
everything just works immediately when the module is installed.

When there are changes to the module, I increase the version number of the 
module. Then, when magnolia detects the new version, magnolia performs an 
“upgrade” of the module. To support this, if there are any configuration 
changes or new resources to bootstrap, my ModuleVersionHandler registers a 
“DeltaBuilder” to perform these changes in the config repository.
In this way, just installing the new version of the module takes care of all 
required config-changes at the same time.

Since some of my modules are “general” (ie the same module is used for 
different customers or websites), but often each website or customer has 
specific configurations, I usually create a “customer-specific” module. This 
“customer-specific” module does not really contain any functionality, but it 
depends on the “general” module (and other modules needed by this customer), 
and it has a ModuleVersionHandler.
This customer-specific ModuleVersionHandler  modifies the entire configuration 
(magnolia and the other modules) according to the needs of the customer.

>From the description of your problem, you could look at the 
>ModuleVersionHandler to do two things:


1.       Always bootstrap *all* your FTLs, CSSs etc…

2.       Include the configs you are “retyping” each time in the module 
bootstrapping process

Then you should be able to reinstall from scratch each time without requiring 
any typing.

Regards from Vienna,

Richard




Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Toniolo, David
Gesendet: Freitag, 27. Jänner 2012 10:03
An: Magnolia User List ‎[[email protected]]‎
Betreff: [magnolia-user] Installation of a module

Hi all,

what is the best way to install or update a Magnolia module?

Currently, i just delete the module node under /modules/my-module and restart 
Tomcat with new module JAR. Then i have 13 tasks in installation process. This 
way i can re-install a module with same version number in module descriptor.

When i just update the module by new version number without deleting the module 
node before i get less then 13 installation tasks and my module did not have 
all updates in CSS, FTL, etc. files.

Deleting the module node is very bad, because configs get lost and i have to 
re-type the configs for each environment except the one what is already 
bootstrapped.

How do you deploy your modules?


Greetings from Germany,
David

________________________________
----------------------------------------------------------------
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]<mailto:[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