What is the best way to export and import OSGI configurations from one environment to other? | Community
Skip to main content
Level 2
May 7, 2020
Solved

What is the best way to export and import OSGI configurations from one environment to other?

  • May 7, 2020
  • 5 replies
  • 11601 views

Hi Team,

 

I'm not sure we are not storing OSGI configurations in node structure it's always saves under launchpad

can you please help me is there a better way to export selected OSGI Configuration from one AEM instance to other?

 

Thanks,

Koti.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ankur_Khare

Best way to store environment specific configuration in config folders specific to an environment like below-

 

/apps/project/config

/apps/project/dev.author.config

/apps/project/dev.publish.config

 

Environment runmodes needs to be used to create environment specific folders.

In this way your environment specific config will move automatically.

5 replies

Ankur_Khare
Community Advisor
Ankur_KhareCommunity AdvisorAccepted solution
Community Advisor
May 7, 2020

Best way to store environment specific configuration in config folders specific to an environment like below-

 

/apps/project/config

/apps/project/dev.author.config

/apps/project/dev.publish.config

 

Environment runmodes needs to be used to create environment specific folders.

In this way your environment specific config will move automatically.

Level 2
May 7, 2020
Thanks for quick answer @ankur_khare, but we the configurations are not saved under /apps/project/config all the configurations updated using the OSGI console are saved under launch pad not under config
VeenaVikraman
Community Advisor
Community Advisor
May 8, 2020

Always make sure to have a custom config node for your configurations under your apps. For now the existing one , can you package it ? 

Level 2
May 8, 2020
Hi @veenavikraman, The challenge is that if we update OSGI configurations in the filix console it's not reflecting on node of config, we end up taking old config package
VeenaVikraman
Community Advisor
Community Advisor
May 8, 2020

I am exactly not sure exactly how you are modifying the configurations, because as per my understanding, if you have a config under your apps config folder, then when you modify it via system console, it shud get saved under the same path or else if no specific path is mentioned, it will get saved under system folder. But might be this https://stackoverflow.com/a/42340483 reply might help you in solving your issue .

 

Also here is the official documentation https://docs.adobe.com/content/help/en/experience-manager-65/deploying/configuring/configuring-osgi.html and it clearly says 

 

"

You must never edit the folders or files under:
/crx-quickstart/launchpad/config
"
Theo_Pendle
Level 8
May 8, 2020

Hi @kotisyamala1,

As you mentioned in a comment to @veenavikraman, if you update a configuration it is not automatically appearing in your application config.

This is because by default, configurations are saved under /apps/system/config.

Here is an example. My config on a (relatively) fresh AEM 6.5 instance:

 

And now I if I modify the com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl config as so (enabling code minification):

Now my configs under /apps/system/config are updated:

It's up to you at this point to add the file to your project (under /apps/yoursite/config) and deploy it to AEM.

Hope this helps 🙂

joerghoh
Adobe Employee
Adobe Employee
May 9, 2020

A general guideline: It has always been best practice to maintain all OSGI configurations (the ones deviating from the default configuration) in a version control system, typically along side to your code. Because this does prevent situations like yours where you struggle with knowing what you have actually changed in that environment.