Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 2

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.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

9 Replies

Avatar

Correct answer by
Community Advisor

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.

Avatar

Level 2
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

Avatar

Community Advisor
it is stores under /apps/system/config or /apps/sling/config


Arun Patidar

Avatar

Community Advisor

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

Avatar

Level 2
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

Avatar

Community Advisor
So you have a custom config node, but when you update it via felix console , it is not getting saved under your config ?

Avatar

Community Advisor

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.... and it clearly says 

 

"

You must never edit the folders or files under:
/crx-quickstart/launchpad/config
"

Avatar

Level 10

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:

theop76211228_0-1588963934128.png

 

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

Selection_142.png

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

Selection_141.png

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 

Avatar

Employee Advisor

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.