Adobe Experience Manager as a Cloud Service Dispatcher Tools

In the following referred to as dispatcher for readability purposes. For further information please read the public documentation.

Contents

The Dispatcher Tools are part of the AEM as a Cloud Service SDK and contains the following:

Dispatcher Configuration

The src subdirectory contains a dispatcher configuration that you can use as a starting point. See Validating and Debugging using Dispatcher Tools for more information. When you have finished working on your configuration you can validate it.

Dispatcher Validator

The bin subdirectory contains a validator binary for macOS and Linux. See Validating and Debugging using Dispatcher Tools for more information. When validation succeeds, you can dump deployment information to a folder and use it as input to a local docker image for testing.

Dispatcher Docker Image

The bin subdirectory also contains a docker image and a shell script to execute that will use your deployment information and run an Apache and dispatcher in a docker container. For usage just call the docker-run.sh (docker-run.cmd on windows) without parameters.

Quick walkthrough of local development and testing

The following three validation steps are newly wrapped in the validate.sh script as phases 1-3.

$ ./bin/validate.sh src

validate.sh and validate.cmd scripts changes

The validate.sh (*nix) / validate.cmd (Windows) will now prompt the user to update the immutable files during the phase 3, if they got changed. The default behavior is to prompt whether the user wants to update or not the immutable files. It is highly recommended to accept the prompt in order to keep the immutable files in line with the configuration provided by Adobe.

This behavior can be disabled by setting the environment variable:

$ IMMUTABLE_FILES_UPDATE=false ./bin/validate.sh src

On Windows, type:

$ set IMMUTABLE_FILES_UPDATE=false
$ bin\validate.cmd src

Step 1: Validate the Dispatcher configuration contained in this SDK

$ ./bin/validator full -d out src

On Windows, type:

> bin\validator full -d out src

This validates the configuration and generates deployment information in out.

Step 2: Validate the deployment information by the Dispatcher in a docker image

$ ./bin/docker_run.sh out localhost:4503 test

On Windows, type:

> bin\docker_run.cmd out localhost:4503 test

This will start the container, run Apache in configuration test mode (httpd -t), dump processed dispatcher.any config (-D DUMP_ANY) and exit.

Step 3: Confirm that no immutable config file was changed against a docker image ones

$ ./bin/docker_immutability_check.sh src

On Windows, type:

> bin\docker_immutability_check.cmd src

This will start the container and run comparisons against changes in immutable config files. See also description on Immutable Configuration Files

To get back the original immutable files (e.g. in case of any changes made to them locally) or to get the latest version of immutable files compatible with this version of SDK and replace your local ones in-place with them, type:

$ ./bin/docker_immutability_check.sh src extract

On Windows, type:

> bin\docker_immutability_check.cmd src extract

Step 4: Start the Dispatcher in a docker image with that deployment information

With your AEM publish server running on your computer, listening on port 4503, you can start the dispatcher in front of that server as follows:

$ ./bin/docker_run.sh out host.docker.internal:4503 8080

On Windows, type:

> bin\docker_run.cmd out host.docker.internal:4503 8080

This will start the container and expose Apache on local port 8080.