Hi,
I have 2 different projects/sites with two separate code base. I have some custom configurations for accessing webservices from different server (WS URL) etc. These URLs are different for different environments (Dev, QA, Pre-Prod, Prod).
What is the best way to handle these configurations? Is it via creating different config folders for different run modes?
Please suggest and it would be helpful if you can give me a link that explains how to create configurations (custom configurations) for different run modes.
Thanks,
Solved! Go to Solution.
Views
Replies
Total Likes
Yes, the best way to handle configurations for the same class, same project but in different environments is via run modes. Please refer to http://docs.adobe.com/docs/en/aem/6-0/deploy/configuring/configuring-osgi.html#OSGi%20Configuration%... .
Views
Replies
Total Likes
Yes, the best way to handle configurations for the same class, same project but in different environments is via run modes. Please refer to http://docs.adobe.com/docs/en/aem/6-0/deploy/configuring/configuring-osgi.html#OSGi%20Configuration%... .
Views
Replies
Total Likes
Hi Kalyanar,
Thanks for the reply. That was very informative.
Quick one, in AEM 6 where can I see the PID for my bundle/service?
Thanks,
-A
Views
Replies
Total Likes
In configuration tab in system console, you will see the pid for each configuration. When you click open the configuration model, you will see something like this.
Persistent Identity (PID) | com.adobe.acs.commons.wcm.impl.ComponentHelperImpl |
Views
Replies
Total Likes
Hi Kalyanar,
I have created a config folder in my project with a sling:OsgiConfig node for one of my service (com.test.impl.DistanceServiceImpl) and added properties to the node. I'm able to read the value in the bundle and all works fine !
Now, how do I change the value of one of this property? Go to CRXDE Lite and change it? I would like to change the value through Felix console as CRXDE Lite is disabled in Production.
Thanks,
-A
Views
Replies
Total Likes
since you have the osgiconfig node, this can be safely in your git/svn. So always change the nodes in prod by installing a new config package which does this. This allows you better control.
Views
Replies
Total Likes
Problem with that approach is, we have got application support/management guys who has access to production and does the support. And there are some values specific to production environment that shouldn't be accessible to developers. These values needs to be added to the production environment directly.
What I have done to overcome this issue is, added osgiConfig node (com.test.impl.DistanceServiceImpl.config) and stored the non-changable parameters here. Then in the class, added @Property values that needs to be configured through Felix console.
Please let me know if this is the right approach.
Thanks
Views
Replies
Total Likes
Manual intervention to a production system could be risky and not many allow that. We can rather store these configs in svn but only giv access to these support guys. Nowadays, a simple script can be written to fetch the correct file and package it and install in prod. This helps versioning as well. Ofcourse, training the team on how to use svn and running scripts will help.
Views
Replies
Total Likes
Views
Likes
Replies