Skip to main content
Level 2
Oct 8, 2024 10:36 AM UTC
Solved

How to check environment in aem cloud like QA/UAT ?

Since in AEM cloud custom runmode are not supported so how we can detect that which environment it is since AEMCaaS give feasibility to detect dev/stage/prod but what about UAT and QA ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Adobe Employee
Oct 9, 2024 4:42 PM UTC

while you always implement code like suggested by @narendiran_ravi , I would like to understand why you need to that distinction.

If you need to configure different OSGI configuration for DEV and UAT (which is a DEV in AEM CS terms), you can manage them through environment variables. See https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/deploying/configuring-osgi#environment-specific-configuration-values

5 replies

narendiran_ravi
Level 6
Oct 8, 2024 11:51 AM UTC

You can use the Cloud environment variables and update this for specific environments. This can be assigned to an OSGI config variable.

 

{ "environmentType":"$[env:ENVIRONMENT_TYPE]" }

 

Translate
arunpatidar
Community Advisor
Community Advisor
Oct 8, 2024 1:13 PM UTC
daniel-strmecki
Adobe Champion, Community Advisor, UG Leader
Adobe Champion, Community Advisor, UG Leader
Oct 8, 2024 1:27 PM UTC

Hi @pratikshah,

to achieve this you will need to create custom configuration for your different DEV environments and set DEV/QA/INT as environment variable. For example, your configuration might look like this:

{ "instanceEnvironment": "$[env:INSTANCE_ENVIRONMENT;default=dev]", "instanceType": "author" }

 

Hope this helps,

Daniel

Translate
kautuk_sahni
Level 9
Oct 9, 2024 9:47 AM UTC

@pratikshah Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Translate
Kautuk Sahni
joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
Oct 9, 2024 4:42 PM UTC

while you always implement code like suggested by @narendiran_ravi , I would like to understand why you need to that distinction.

If you need to configure different OSGI configuration for DEV and UAT (which is a DEV in AEM CS terms), you can manage them through environment variables. See https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/deploying/configuring-osgi#environment-specific-configuration-values

Translate