Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Syncing between CRX instances and Git Repos.

Avatar

Level 1

Hey everyone, I just started working with AEM a few months ago and I come from a web dev background. I am transitioning a team from all developing on the same dev environment and moving code between environments using packages to working on local instances and using source control.

Currently I have a maven project git repo in which we only pay attention to the apps and etc directories but still have outdated directories (content, var, conf, bin, etc...). In order to get a new project done, we created and worked on specific subdirectories such as apps/newProject/... and etc/designs/newProject. We use a combination of VLT-sync and VLT commit to move from our working directory to our Local CRX instances and from their create packages and move to our QA and then Production environments. 

The issues we are facing come from the fact that our environments do not have the same codebases because we have just pushed up new and separate code without maintaining the previously existing. Technically, we only push from our working instance(git repo) to our local crx instance and then go from our local instance to our dev instance to our testing instance to our production instance. This workflow would be fine except for the fact that we are only pushing a subset instead of pushing the entire repo which leads to our unsyncing and conflicts.

 

My questions and goals:

Goals

  • Have one repo that rules them all
  • Make sure that our local crx instance and working directory is a one to one copy so that we are confident in building packages

Questions

  • How do I pull down all of the information from a CRX instance? I keep running into Java Heap space errors
  • Out of these directories, which should I keep in my git repo?
  • How do we move the entire working directory onto our local instance? Currently we try to do a vlt status, grep for 'M's, grep out all content.xml and jcr_contents and then commit those files. This feels terrible at times so we also just go to the specific directory which also feels terrible.

 

With all of those answered, I hope to pull down a copy of all three of our environments and merge them into one. Then with the ability to push a working directory in its entirety to a local instance, we can comfortably move packages. Eventually, I need to figure out the mvn install stuff so we can just install through CI. But for now, does this plan make sense to all of you?

1 Accepted Solution

Avatar

Correct answer by
Level 9

joey leung wrote...

 
  • How do I pull down all of the information from a CRX instance? I keep running into Java Heap space errors

Just keep apps and etc directory in git.  Content might be the one giving trouble to you for Heap error.   Backup of instance should cover it and does not make sense for me to keep /content sync.   If apps and etc itself giving heap error engage with official support team or create a seperate forum thread with all the error details. Attaching heap dump will help. https://helpx.adobe.com/experience-manager/kb/AnalyzeMemoryProblems.html

  • Out of these directories, which should I keep in my git repo?

/apps/<custom_overlay_projects>

/etc/design/<Custom_projects>

/etc/workflow/models/<Custom_models>

/etc/workflow/launcher/config/<Custom_models>

/etc/cloudservices/*/<Custom_Integrations_config_framework>

/etc/map/(http|https)/<Custom_configs>

/etc/truststore  (This is option deponding on usecase )

Few clients store /etc/replication/agents.author , /etc/replication/agents.publish , /etc/cloudservices/*/<Custom_Integrations_config_framework> .  I am against it but depends on your security rules.

  • How do we move the entire working directory onto our local instance? Currently we try to do a vlt status, grep for 'M's, grep out all content.xml and jcr_contents and then commit those files. This feels terrible at times so we also just go to the specific directory which also feels terrible.

make use of maven. For content create a package and deploy it Or use external tools like grabbit, adobe content import, etc....

 But for now, does this plan make sense to all of you?

Looks good. Make use of run mode. Because Merging will not always work & there are conflict which is environment specific.  https://docs.adobe.com/docs/en/aem/6-2/deploy/configuring/configure-runmodes.html

 

Thanks,

View solution in original post

1 Reply

Avatar

Correct answer by
Level 9

joey leung wrote...

 
  • How do I pull down all of the information from a CRX instance? I keep running into Java Heap space errors

Just keep apps and etc directory in git.  Content might be the one giving trouble to you for Heap error.   Backup of instance should cover it and does not make sense for me to keep /content sync.   If apps and etc itself giving heap error engage with official support team or create a seperate forum thread with all the error details. Attaching heap dump will help. https://helpx.adobe.com/experience-manager/kb/AnalyzeMemoryProblems.html

  • Out of these directories, which should I keep in my git repo?

/apps/<custom_overlay_projects>

/etc/design/<Custom_projects>

/etc/workflow/models/<Custom_models>

/etc/workflow/launcher/config/<Custom_models>

/etc/cloudservices/*/<Custom_Integrations_config_framework>

/etc/map/(http|https)/<Custom_configs>

/etc/truststore  (This is option deponding on usecase )

Few clients store /etc/replication/agents.author , /etc/replication/agents.publish , /etc/cloudservices/*/<Custom_Integrations_config_framework> .  I am against it but depends on your security rules.

  • How do we move the entire working directory onto our local instance? Currently we try to do a vlt status, grep for 'M's, grep out all content.xml and jcr_contents and then commit those files. This feels terrible at times so we also just go to the specific directory which also feels terrible.

make use of maven. For content create a package and deploy it Or use external tools like grabbit, adobe content import, etc....

 But for now, does this plan make sense to all of you?

Looks good. Make use of run mode. Because Merging will not always work & there are conflict which is environment specific.  https://docs.adobe.com/docs/en/aem/6-2/deploy/configuring/configure-runmodes.html

 

Thanks,