Your SlideShare is downloading. ×
0
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Runmodes and Configs for Fun and Profit
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Runmodes and Configs for Fun and Profit

1,715

Published on

Short Intro on how to use custom runmodes …

Short Intro on how to use custom runmodes
together with sling:OsgiConfig to easily
manage different configurations and
environments.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,715
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
27
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Runmodes and Configs for Fun and Profit Lightningtalks.adaptTo(Berlin, 2011) Mike PfaffFreelance [Day|Adobe] [CQ|WEM|ADEP] Consultant mike.pfaff@mpproductions.ch
  • 2. Huh?Short Intro on how to use custom runmodestogether with sling:OsgiConfig to easilymanage different configurations andenvironments.Info based on real-world usage of thesefeatures in CQ 5.4 Sling trunk might have added features (e.g. save-back of configs)
  • 3. RunmodesCQ - author or publish (Do NOT remove!)Multiple additional custom runmodes possibleSuggested Use Environment: local, dev, test, prod Location: berlin, basel, timbuktu Company: acme, partner, customer Special system type: importer
  • 4. Setting runmodesVia JVM Options (recommended) Usually via CQ_JVM_OPTS in start script -Dsling.run.modes=author,dev,berlinVia Sling Properties File launchpad/sling.properties sling.run.modes=author,dev,berlin
  • 5. Steps (as seen on South Park ;)sling:OsgiConfig
  • 6. 1) sling:OsgiConfig
  • 7. 2) Runmode-aware config
  • 8. 3) Profit
  • 9. Naming Config Locations /apps/adaptto/config/ All Systems, runmode-independent /apps/adaptto/config.berlin/ Systems with berlin runmode /apps/adaptto/config.dev.berlin/ Systems with berlin AND dev runmode
  • 10. Example - InstancesInstance Runmodes Type Environment Location #1 author dev berlin #2 author prod basel #3 author prod berlin
  • 11. Example - ConfigsDifferent mailserver configs per location config.basel/ com.day.cq.mailer.DefaultMailService.xml config.berlin/ com.day.cq.mailer.DefaultMailService.xmlEn-/Disabling debugging per environment config.prod/ com.day.cq.wcm.core.impl.WCMDebugFilter.xml config.dev/ com.day.cq.wcm.core.impl.WCMDebugFilter.xml
  • 12. Hints & Suggestions 1/2 Partial configs not supported Config with most matching runmodes wins Always set all properties to avoid confusion Use a type indicator (e.g. {Boolean}, {String}, etc.) in every property /apps wins over /libs (as always) KISS principle (“Keep it simple, stupid!”)
  • 13. Hints & Suggestions 2/2 JCR installer keeps a digest. Thus you can’t reinstall an identical config as just before. Config for same component at config.dev.berlin and config.berlin.author put on system with dev, berlin and author runmodes JCR installer gives them the same priority, so do this only if you want one of them randomly applied ;)
  • 14. Questions?

×