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

Avatar

Avatar

KotiSyamala1

Avatar

KotiSyamala1

KotiSyamala1

07-05-2020

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.

AEM 6.4.5 osgi

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Ankur_Khare

MVP

Avatar

Ankur_Khare

MVP

Ankur_Khare
MVP

07-05-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.

Answers (4)

Answers (4)

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

916

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

916

Correct Answer

1.0K
Jörg_Hoh
Employee

09-05-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.

Avatar

Avatar

Theo_Pendle

MVP

Avatar

Theo_Pendle

MVP

Theo_Pendle
MVP

08-05-2020

Hi @KotiSyamala1,

As you mentioned in a comment to @Veena_Vikram, 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

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

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

 

"

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

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

08-05-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 ?