Expand my Community achievements bar.

how to validate cloud SDK dispatcher files without docker?

Avatar

Level 9

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?

 

6 Replies

Avatar

Employee Advisor

> 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)

Avatar

Level 9

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.

Avatar

Level 9

Yes, thats what I have installed. Docker is not the issue, the issue is that there are no instructions to setup or us dispatcher on the M1.  I could not get it working on windows either as the instructions here: https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/local-development-env... dont work, Presumably there are undocumented steps, such as you have to build a windows or unix VM first, and create a container. There is no info on this.

 

Someone suggested doing : 

docker build --platform linux/amd64 -t your_image

But this fails with: 

 

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/me/dev/docker/Dockerfile: no such file or directory 

 

There is no Dockerfile, and there are no instructions on how to create one (that I can find).

 

Any suggestions appreciated.

Avatar

Employee

Have you seen https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/content-delive... 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. 

Avatar

Level 9

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.