Adobe Experience Manager

This AEM config example starts with a Tugboat Debian image, installs Java, and launches both the author and publisher instances. You’ll need to do some customizing for your app, but this should get you started.

Configure Tugboat

The Tugboat configuration is managed by a YAML file at .tugboat/config.yml in your git repository. For the full config file, along with installation instructions, please see the corresponding GitHub repository for configuring Adobe Experience Manager on Tugboat.

 1services:
 2  author:
 3    image: tugboatqa/debian:10
 4    default: true
 5    expose: 4502
 6
 7    commands:
 8      init:
 9        # Install Java SDK and Maven.
10        - apt-get update && apt-get install -y openjdk-11-jdk maven
11
12        # Create directory structure. license.properties is base64 encoded as a TB repos variable.
13        - mkdir -p /opt/aem/author
14        - echo "${LICENSE_PROPERTIES}" | base64 --decode > /opt/aem/author/license.properties
15        - ln -snf ${TUGBOAT_ROOT} /opt/aem/code
16
17        # Download AEM quickstart file and install
18        - wget -O /opt/aem/author/aem-author-p4502.jar "${AEM_FILE_URL}"
19        - cd /opt/aem/author && java -jar aem-author-p4502.jar -unpack
20
21        # Configure Adobe public profile.
22        - cp -r ${TUGBOAT_ROOT}/.tugboat/resources/.m2 ~/.m2
23        - mvn help:effective-settings
24
25        # Cleanup
26        - apt-get clean
27        - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
28
29        # Start aem for the first time and wait for a 200, authenticated response
30        - CQ_PORT=4502 /opt/aem/author/crx-quickstart/bin/start
31        - while [ "$(curl -u admin:admin --head --location --connect-timeout 5 -s -o /dev/null -w ''%{http_code}''
32          localhost:4502)" != "200" ]; do sleep 5; done
33
34      start:
35        # Start aem a second time (faster)
36        - CQ_PORT=4502 /opt/aem/author/crx-quickstart/bin/start
37        - while [ "$(curl -u admin:admin --head --location --connect-timeout 5 -s -o /dev/null -w ''%{http_code}''
38          localhost:4502)" != "200" ]; do sleep 5; done
39
40        # Update the host of the default replication agent from localhost to the publish service.
41        - curl -u admin:admin -F"sling:resourceType=cq/replication/components/agent"
42          -F"transportUri=http://publish:4503/bin/receive?sling:authRequestLogin=1"
43          http://localhost:4502/etc/replication/agents.author/publish/jcr:content
44
45  publish:
46    image: tugboatqa/debian:10
47    default: false
48    checkout: true
49    expose: 4503
50
51    commands:
52      init:
53        # Install Java SDK and Maven.
54        - apt-get update && apt-get install -y openjdk-11-jdk
55
56        # Create directory structure. license.properties is base64 encoded as a TB repos variable.
57        - mkdir -p /opt/aem/publish
58        - echo "${LICENSE_PROPERTIES}" | base64 --decode > /opt/aem/publish/license.properties
59        - ln -snf ${TUGBOAT_ROOT} /opt/aem/code
60
61        # Download AEM quickstart file and install
62        - wget -O /opt/aem/publish/aem-publish-p4503.jar "${AEM_FILE_URL}"
63        - cd /opt/aem/publish && java -jar aem-publish-p4503.jar -unpack
64
65        # Start aem for the first time
66        - CQ_PORT=4503 CQ_RUNMODE='publish' /opt/aem/publish/crx-quickstart/bin/start
67        - while [ "$(curl --head --location --connect-timeout 5 -s -o /dev/null -w ''%{http_code}'' localhost:4503)" !=
68          "200" ]; do sleep 5; done
69
70      start:
71        - CQ_PORT=4503 CQ_RUNMODE='publish' /opt/aem/publish/crx-quickstart/bin/start
72        - while [ "$(curl --head --location --connect-timeout 5 -s -o /dev/null -w ''%{http_code}'' localhost:4503)" !=
73          "200" ]; do sleep 5; done

Want to know more about something mentioned in the comments of this config file? Check out these topics:

Start Building Previews!

Once this Tugboat configuration file is committed to your git repository, you can start building previews!