Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
454 stars 601 forks source link

Content Sync Hosts Settings #3352

Closed jarvislukow closed 5 months ago

jarvislukow commented 5 months ago

Required Information

Expected Behavior

I am looking for the approach to store the ACS Commons Content Sync Host properties in a code repository. I assume there is a way to store them in a folder that is not var.

I assumed coping /var/contentsync/hosts to /apps/contentsync/hosts would work, but it doesn't.

Actual Behavior

When I copy the /var/contentsync/hosts directory to /apps/contentsync/hosts the hosts are not picked up by the tool.

Steps to Reproduce

Copy /var/contentsync/hosts to /apps/contentsync/hosts and observe no hosts are loaded.

Links

YegorKozlov commented 5 months ago

You can define a repo-init script to create the /var/contentsync/hosts nodes, something like

create path (sling:Folder)/var/acs-commons/contentsync/hosts(nt:unstructured)/host-1 with properties
  set sling:ResourceType{String} to acs-commons/components/utilities/contentsync/configure/configurehostentry
  set host to http://localhost:4504
  set username to user-1
  set password to secret-1
end

create path (sling:Folder)/var/acs-commons/contentsync/hosts(nt:unstructured)/host-2 with properties
  set sling:ResourceType{String} to acs-commons/components/utilities/contentsync/configure/configurehostentry
  set host to http://localhost:4506
  set username to user-2
  set password to secret-2
end