Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Unable to migrate OSGI Configuration from Local to Stage

Avatar

Level 2

Hi Everyone,

 

To preface my use case, I want to create an OSGI configuration for the "Apache Sling Connection Pooled DataSource" in Config Manager, in my local environment, and I want to move this configuration over to my Stage environment.

 

At first I created a package for the config file found under "/apps/system/config/". When I installed this package to my Stage environment and viewed the Config Manager, the config did not seem to have been installed correctly.

 

In the ConfigManager, the DataSource config I installed was found to be nested outside of the "Apache Sling Connection Pooled DataSource" and the properties for the config does not seem to be correct either. I've attached some images to clarify the issue. Thank you in advance.

 

ConfigError.PNG

NestedOutside.PNG

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @ScribbleScrabble 

 

As you have mentioned that you created the config from system/console/configMgr on your local instance and the configuration was present under /apps/system/config which is correct.

 

If the config is common for all the instances i.e. dev, qa, stage, prod (including the author, publish tier), you should move the config from /apps/system/config to /apps/yourprojectfolder/runmodes/config or whatever is your config location else you can move to the run mode specific folder depending upon the value. Once the config is moved, you can import the changes from server to your local file system using vlt plugin or you can manually create the config as xml file on code base so that the changes are now available as part of your code repo.

 

Now you can deploy the changes as part of the code base and the same changes will be propagated across all the instances and also will be available on the system/console/configMgr.

 

Thanks!

View solution in original post

1 Reply

Avatar

Employee Advisor

I would say, compare the OSGI config file on both instances and make sure there is no syntax error. Also, make sure the package filter.xml has the filter param correctly set. If it is set to merge, it might not update the existing nodes.

 

[1] https://jackrabbit.apache.org/filevault/filter.html

 

Avatar

Level 2
Hi Jbrar, thank you for the comment. Unfortunately I dont believe there is an syntax error everything looks correct. As for the filter.xml, the filter parameter is set to the default, replace. I'm not sure where to go from here.

Avatar

Community Advisor
 
 

Hi @ScribbleScrabble ,

 

Since your question is for Stage environment so I believe your code configuration must have run-modes specific folders inside ui.apps/..config.stage. You should create respective xml file for props and then push it via git (anyways going forwards with AEM as a cloud Service, manual config update/install is going to be stopped). You can also check on your local by changing the run mode to stage that the config is being picked from stage run-mode. 

Avatar

Correct answer by
Community Advisor

Hi @ScribbleScrabble 

 

As you have mentioned that you created the config from system/console/configMgr on your local instance and the configuration was present under /apps/system/config which is correct.

 

If the config is common for all the instances i.e. dev, qa, stage, prod (including the author, publish tier), you should move the config from /apps/system/config to /apps/yourprojectfolder/runmodes/config or whatever is your config location else you can move to the run mode specific folder depending upon the value. Once the config is moved, you can import the changes from server to your local file system using vlt plugin or you can manually create the config as xml file on code base so that the changes are now available as part of your code repo.

 

Now you can deploy the changes as part of the code base and the same changes will be propagated across all the instances and also will be available on the system/console/configMgr.

 

Thanks!

Avatar

Level 2

Hi asutosh_jena, Thank you for your feedback and suggestions! I'll go ahead and try these methods and will report my progress for reference.

With that said I have one more question since this is my first time. Is there more information, or documentation, on creating config files as xml and compiling them onto the code base?