how to validate cloud SDK dispatcher files without docker? | Community
Skip to main content
Level 8
October 26, 2021
Question

how to validate cloud SDK dispatcher files without docker?

  • October 26, 2021
  • 2 replies
  • 2321 views

The instructions to use dispatcher tools here are missing some information, e.g. where to install it, and how to link it to a particular project.  I installed it in my home dir for want of a better option.

 

It says to use:

 

./bin/validate.sh ./src

 

Here we are guessing we need to substitute ./src for our config files?  e.g.

 

./bin/validate.sh /Users/me/dev/git/some-project/dispatcher/src?

 

Or maybe we are supposed to copy the files into the src dir in the dispatcher tools dir?

 

Running this does the following:

 

me@my-M1 dispatcher % ./bin/validate.sh ./src

Phase 1: Dispatcher validator

Cloud manager validator 2.0.32

2021/10/26 12:54:01 No issues found

Phase 1 finished

Phase 2: httpd -t validation in docker image

values.csv found in deployment folder: /tmp/dispatcher_validation_1635245641 - using files listed there

Required image not found, trying to load from archive...

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

** error: required image still not found: adobe/aem-ethos/dispatcher-publish:2.0.57

 

It seems to be doing the validation (and throwing up syntax errors) before trying to run docker, which is all we need.

 

Im using an M1 mac, and don't have docker working. Also, we want to do the validate in the azure devops build pipeline, without starting up the dispatcher (just check the files).  Not sure how we would merge the dispatcher and our project into the same pipeline though - presumably we need to create a VM, install dispatcher tools, then pull in our source from git, then run the validator (without docker), then run mvn build as normal? we do this mvn build in the pipline before pushing the source to the real AEM Cloud git becuase when we run the mvn build, it takes a few minutes, but the Adobe one takes around 2 hours.  We dont want to wait for 2 hours to find there was a syntax error, so we build first, and throw awawy the result.

 

is here any way to check the dispatcher files without starting docker?  Could we use plain old apache for this, or does the dispatcher tools do some AEM specific checks?

 

2 replies

joerghoh
Adobe Employee
Adobe Employee
October 29, 2021

> Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

 

Do you have Docker desktop running? (From what I read Docker Desktop on M1 should be able to run x86-64 binaries in the Rosetta emulation)

TB3dockAuthor
Level 8
October 29, 2021

Yes I have docker running, but I have M1 Mac (not intel), so I dispatcher doesn't work.  There have been a few posts saying its possible to run dispatcher on M1 mac, but they have no useable instructions.

joerghoh
Adobe Employee
Adobe Employee
October 29, 2021
Adobe Employee
November 4, 2021

Have you seen https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html?lang=en and on that page, the "Validation and Debugging using the Dispatcher Tools" section, which links to a separate validation documentation article (for either the flexible or legacy mode, although flexible mode is recommended).

 

Do those pages provide additional insight? It should be possible to run the "phase 1" validation (which doesn't need Docker) independently of the wrapper script. 

TB3dockAuthor
Level 8
November 7, 2021

Hi, Yes, I have followed this article, but validate.sh tries to start a docker instance, but there are no instructions how to create the docker image it needs. I tried creating one manually, but I can't find any Dockerfile.   This seems to be a critical gap in the documentation - you cant run the local dispatcher or validator without a docker image, but to create a docker image you need a Dockerfile which specifies what the image contains, and this appears to be missing from the dispatcher tools distribution.   I have no idea how anyone gets the local dispatcher working without this.