Expand my Community achievements bar.

SOLVED

config.author.prod or config.prod.author?

Avatar

Level 9

when setting up osgi configs, you put them in a dir to target a particular env and type.

The problem is that cloud and non cloud seem to have different behavior.

 

Should it be config.author.prod or config.prod.author?

 

We see both in various posts.  we are using config.prod.author for example.  This works fine on non cloud AEM, but on cloud AEM, it doesn't.

 

Or maybe the issue is that we have "default" osgi configs in /config, which we then assume will be overridden by config files in say /config.prod or /config.prod.author.  Is this assumption incorrect?  I.e. if we want a config applied to a specific env, we must not have it also in a more generic env? 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @TB3dock,

In case of AEM as a cloud service, you need to create it as config.(author/publish).(dev/qa/stage/prod).

 

Thanks

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @TB3dock ,

 

Below format is the right one for AEMaaCS.

 

 

/apps/example/config.<author|publish>.<dev|stage|prod>

 

Actual syntax is

 

config.<service>.<environment_type>

 

  • service - author / publish
  • environment_type - dev,stage,prod

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/deploying/conf... 

 

If you configure it like above it will pick the right Osgi run mode config, else it will fallback to generic.

Avatar

Employee Advisor

Hi @TB3dock ,

 

You need to create as config.(author|publish).(dev|qa|stage|prod) in AEM as a cloud service. PFB the image

Bimmi_Soi_0-1631699684862.png

 

Hope this helps!!!

 

Thanks!!!

Avatar

Level 4

Hi @TB3dock ,

 

Answering your query, The best match or the most match configuration will be taken

Eg:

If you have some configuration say /config.prod== abc

And /config.prod.author == def

And if the runmode of your instance have both prod and author in it then "def" configuration will take priority as it has more matches with run mode.

 

On Cloud check if correct run modes are set or not. 

 

Thanks!

Avatar

Community Advisor

@TB3dock ,

 

Runmode resolution can be done based on the node pattern that we create under apps. Below pattern of configuration should work fine in AEM Cloud and AEM instances.

 

/apps/example/config.<author|publish>.<dev|stage|prod>/

Please find the documentation here : https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/deploying/co...

 

ArunaSurukunta_0-1631721950220.png

 

Avatar

Correct answer by
Level 4

Hi @TB3dock,

In case of AEM as a cloud service, you need to create it as config.(author/publish).(dev/qa/stage/prod).

 

Thanks