Hi
I want to add some OSGi configurations through environment variables in Adobe Managed Services (AMS). While I see an option to add environment variables in Adobe Cloud Service, I couldn’t find a similar feature in AMS. Could you suggest the best way to achieve this in AMS?
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @ayetkur,
I believe pipeline variables are only available during the build process, and OSGi configurations cannot reuse them.
Hi @ayetukur ,
As far as I know, there is no such option with AMS and you can only use the pipeline variables. I will be happy to be wrong, because we miss this feature as well.
Thank you for the reply @user62746 ,
If i use the pipeline variables can those values add to the osgi configs?,
I see the pipeline variable will apply for pom xml .
Please suggest
Views
Replies
Total Likes
Hi @ayetkur,
I believe pipeline variables are only available during the build process, and OSGi configurations cannot reuse them.
AMS is built on traditional virtualized infrastructure (AEM instances on VMs in Adobe's managed cloud env like AWS or Azure). OSGi configurations here are part of deployment package which remain static until the deployments.
You can try a workaround for AMS by using CAConfigs (Context-Aware Configurations). You can use the CAConfig API to retrieve the configuration dynamically.
Please refer Apache Sling Context-Aware Configuration for more details.
Hope this helps!
Rohan Garg
Hi @ayetukur
Before Environment variables, we used CryptoSupport to protect secrets https://sling.apache.org/documentation/bundles/commons-crypto.html
Another approach could be you can use pipeline variables or other secret manager and integrated with pipeline
https://medium.com/@arunpatidar26/secrets-manager-aem-configs-1c2a23124f7a
In Adobe Managed Services (AMS), the process of managing OSGi configurations via environment variables is slightly different compared to Adobe Cloud Services, but there are ways to achieve this.
Environment Variables in AMS:
AMS allows environment variables to be configured at the infrastructure level, but they are not directly tied to OSGi configurations in the same way they are in Adobe Cloud Services. However, you can still use environment variables in AMS to dynamically configure certain settings.
Use the OSGi Configuration API:
Custom Solution with Sling or Servlet:
Deployment Process:
While AMS doesn’t directly support adding OSGi configurations through environment variables like in Adobe Cloud Services, you can achieve this by creating a custom Java bundle that reads the environment variables and dynamically updates the OSGi configurations via the ConfigurationAdmin API.
Views
Replies
Total Likes
Views
Likes
Replies