This tutorial walks through setting up a local development environment for Adobe Experience Manager (AEM) using the AEM as a Cloud Service SDK. Adobe official document Adobe Experience Manager as a Cloud Service Tutorials explain steps in more detail.
But Objective of this document to share steps to setup AEM git project, AEM Author, AEM Publish, and AEM Dispatcher and covers the
- Download latest AEM SDK from Software Distribution
- Create a Maven Project
- Download JAVA 11
- File System Organization
- Install the AEM Jar with JDK 11.
- Run AEM with JDK 11.
- Setup Replication Agent
- Dispatcher
- Windows Hyper-V Feature
Download latest AEM SDK from Software Distribution
The Downloaded ZIP contains AEM Jar and Dispatcher files -
Create a maven project using the latest archetype
mvn -B archetype:generate -D archetypeGroupId=com.adobe.granite.archetypes -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=23 -D aemVersion=cloud -D appTitle="AEM Lab" -D appId="aem-lab" -D groupId="com.community.aemlab" -D frontendModule=none -D includeExamples=n
Example - https://github.com/arunpatidar02/aemaacs-aemlab
Update Parent POM to update AEM SDK api version
Download JAVA 11
Download Java 11 from Software Distribution https://experience.adobe.com/#/downloads/content/software-distribution/en/general.html
Extract JAVA 11 at C:\Program Files\Java
Note: You can copy java11 in any other folder as well.
File System Organization
Extract the downloaded aemsdk zip and create the folder structure like below:
~/aem-sdk is an organizational folder containing the various tools provided by the AEM as a Cloud Service SDK
~/aem-sdk/author contain s the AEM Author Service
~/aem-sdk/publish contains the AEM Publish Service
~/aem-sdk/dispatcher contains the Dispatcher Tools
~/git-repo/<AEM maven project> contains the custom AEM Project source code
I have created aem-sdk and git-repo folder at C:\Users\Arun.Patidar\Desktop\AEM\AEMaaCS
Inside aem-sdk create author, publish and dispatcher folder
Inside author and publish folder copy AEM jar from extracted aem-sdk and rename jar file based on author and publish run mode.
Unpack the Dispatcher Tools into ~/aem-sdk/dispatcher
Install AEM with JDK 11.
- Open CMD and go to author folder i.e. C:\Users\Arun.Patidar\Desktop\AEM\AEMaaCS\aem-sdk\author
- Run C:\Program Files\Java\jdk-11.0.6\bin\java -jar aem-author-p14502.jar
Setup Replication Agent
Setup default replication agent to publish content on local AEM Publisher. You just need to enable the Agent and update Transport URI and transport User
Dispatcher
To set up dispatcher in local you need to follow the detailed document at https://docs.adobe.com/content/help/en/experience-manager-learn/cloudservice/local-development-environment-set-up/dispatcher-tools.html but I will try to summarize here.
- Download Docker Desktop from https://www.docker.com/products/dockerdesktop
- Install Docker Desktop (with Hyper -V feature enable in Windows). Caution: When you enabled the Hyper-V feature in windows it will disabled the Wifi and you may no longer to use wifi with Hyper-V feature enable. To use wifi again, you need to disabled Hyper- V feature from windows.
- Open the docker and start if the docker is not started. Once Docker is started you will see Docker is running in the dashboard.
- Once Docker is started. Open the command line and go to the dispatcher folder i.e. C:\Users\Arun.Patidar\Desktop\AEM\AEMaaCS\aemsdk\dispatcher and run below command
- Windows: bin\validator full -d out src
- macOS / Linux: ./bin/validator full -d ./out ./src
This command will generate the dispatcher configs inside out folder based on the src folder. So whenever you have new dispatcher changes you need to delete out a folder and generate new configs.
Run Dispatcher locally in the Docker container.
run below command
Windows: bin\docker_run <deployment-folder> <aem-publish-host>:<aem-publish-port> <dispatcher-port>
macOS / Linux: ./bin/docker_run.sh <deployment-folder> <aem-publish-host>:<aem-publish-port> <dispatcher-port>
e.g. host.docker.internal is used for localhost IP, so need to change this, only update AEM port and dispatcher port. example :
bin\docker_run out host.docker.internal:14503 8085
Once the dispatcher is running in docker container(This can be checked from Docker desktop dashboard), you can access the site using localhost:8085/<page_path>
No comments:
Post a Comment
If you have any doubts or questions, please let us know.