Giter VIP home page Giter VIP logo

aem-docker-getting-started's Introduction

AEM & Docker getting started guide

Getting started guide for development with Adobe Experience Manager together with Docker. The configuration contains an AEM author, publisher and dispatcher environment, running in three separate containers. Docker images also have support for installing AEM packages during build.

Prerequisites

This tutorial assumes running on a Mac. Installation on Windows might differ for certain steps. The following items are required:

  • Docker with at least 8GB memory allocated
  • AEM installation file, named AEM_6.2_Quickstart.jar or AEM_6.3_Quickstart.jar (other versions might work, but are not tested)
  • AEM license file, named license.properties
  • Oak runnable jar named oak-run-*.jar, where the * contains the version number. Make sure the Oak version is compatible with the AEM version.
  • Recommended: Homebrew package manager

Getting started: running AEM

  1. Clone this repository to a local directory and put the AEM installation file, license file and Oak runnable jar file in the root.
  2. Put AEM packages that need to be installed during build in ./author/packages/ and ./publisher/packages/. Order of installation will be alphabetically, based on package file name.
  3. Build the Docker images with docker build -t aem-base -f base/Dockerfile . && docker-compose build. This takes a couple of minutes (or more, depending on the number of packages), as the author and publisher are started during build to be able to install packages.
  4. Start the Docker containers with docker-compose up. This will also mount the ./logs directory on your local system to the containers, so you have easy access to the logs of all containers.
  5. Wait until AEM has fully started. To check for the author, open the bundles page and when all bundle statusses are either Active or Fragment the AEM environment has fully started.
  6. Navigate to http://localhost:4502 and you'll see a login screen. Login with username admin and password admin. Navigate to http://localhost to see the published site via the dispatcher. The publisher runs on http://localhost:4503.

Starting and stopping containers preserves AEM content. Images need to be rebuild when changing packages in the packages directories. After stopping a container, or after a system reboot, you can be quickly up-and-running again by starting the containers with docker-compose up.

Getting started: set-up development environment

  1. Install Java 8 SDK: brew cask install java8.
  2. Install Maven: brew install maven.
  3. Download and install IntelliJ IDEA from JetBrains or install with brew cask install caskroom/cask/intellij-idea-ce.
  4. Clone the AEM We.Retail sample repository to a local directory.
  5. Open the folder with the AEM We.Retail sample in IntelliJ. In IntelliJ, click on the right-top corner on the dropdown and select Edit Configurations. Add a New Configuration with the plus-icon on the top-left corner, select Maven. Set the name as Deploy author, set the working directory as aem-sample-we-retail, command line clean install -e and profiles autoInstallPackage. Now save the configuration.
  6. Click on the play button on the top-right corner to run the Deploy author configuration. You might get an error that the Java JDK can't be found: Project JDK is not specified. When this occurs, click on Configure next to the error and specify the location of your Java SDK (for instance, /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/). Now try again to run the Deploy author configuration and you should see a success message.
  7. Navigate to the AEM Package Manager and you should see the we.retail.* packages on top of the list.

Other tools

  • aem-front can be used to significantly speed-up your AEM front-end development workflow, as code changes will hot-reload in your browser.

Credits

Inspiration and code examples are taken from the following projects:

aem-docker-getting-started's People

Contributors

remcorakers avatar rerakers avatar thiagosanches avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aem-docker-getting-started's Issues

AEM installer fails during restart

Hi,

since around 2 weeks I get this exception during start:

2020-03-18 15:09:34: aem_installer.py called with params: {'runmode': 'publish,nosamplecontent,local', 'port': '4503', 'filename': 'AEM_6.x_Quickstart.jar'}
2020-03-18 15:09:34: Start installing packages
2020-03-18 15:09:34: Starting AEM with arguments: file: AEM_6.x_Quickstart.jar, port: 4503, runmode: publish,nosamplecontent,local
2020-03-18 15:09:34: Trying to start AEM (attempt 1)
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 7851 MB, meets our expectation of 1024 MB +/- 20
No console, will fork to get enough memory
Not forking JVM as -nofork option is set
Setting properties from filename '/opt/aem/AEM_6.x_Quickstart.jar'
Setting 'sling.run.modes' to 'publish,nosamplecontent,local' from command line.
Unable to setup Swing UI, will use system console only (java.awt.HeadlessException)
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to /opt/aem/crx-quickstart/logs/stdout.log
Redirecting stderr to /opt/aem/crx-quickstart/logs/stderr.log
Press CTRL-C to shutdown the Quickstart server...
2020-03-18 15:12:21: AEM started; file: AEM_6.x_Quickstart.jar, port: 4503, runmode: publish,nosamplecontent,local
2020-03-18 15:12:21: Disabling asset workflow
2020-03-18 15:12:21: Asset workflow disabled
2020-03-18 15:12:21: File ".gitkeep" is no zip-file
2020-03-18 15:12:21: Finished installing packages.
2020-03-18 15:12:21: Start system clean-up...
2020-03-18 15:12:21: Enabling asset workflow
2020-03-18 15:12:21: Asset workflow enabled
2020-03-18 15:12:21: Stopping AEM...
Traceback (most recent call last):
  File "aem_installer.py", line 21, in <module>
    helpers.import_packages(file_name, port, runmode)
  File "/opt/aem/helpers.py", line 179, in import_packages
    stop_aem_server(server_process_id)
  File "/opt/aem/helpers.py", line 251, in stop_aem_server
    for childProcess in parent_aem_process.get_children():
AttributeError: 'Process' object has no attribute 'get_children'
ERROR: Service 'publisher' failed to build: The command '/bin/sh -c python aem_installer.py -i AEM_6.x_Quickstart.jar -r publish,nosamplecontent,local -p 4503' returned a non-zero code: 1

Since my repo wasn't changed and it worked fine before (I just rebuilded it from the scratch) I guess a dependency got updated and now fails.

Did somebody experienced the same issue or know whats going on?

Stuck while starting AEM (Step 4)

Stuck with the AEM startup output

Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 7851 MB, meets our expectation of 1024 MB +/- 20
No console, will fork to get enough memory
Not forking JVM as -nofork option is set
Setting properties from filename '/opt/aem/AEM_6.x_Quickstart.jar'
Setting 'sling.run.modes' to 'publish,nosamplecontent,local' from command line.
Unable to setup Swing UI, will use system console only (java.awt.HeadlessException)
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to /opt/aem/crx-quickstart/logs/stdout.log
Redirecting stderr to /opt/aem/crx-quickstart/logs/stderr.log
Press CTRL-C to shutdown the Quickstart server...

@remcorakers @sveneh - Can you help. Have you come across this before?

Failed starting server (attempt 2): [Errno 98] Address already in use

Hi,

I'm getting a lot of address in use errors when building the projects with custom added packages.

I add multiple different packages into author/packages, and sometimes it runs through, but most of the time it hangs in the install procedure of a package, e.g.

2019-03-25 12:26:43: Restarting AEM...                                                    
2019-03-25 12:26:43: Stopping AEM...                                          
2019-03-25 12:26:50: AEM stopped                                                                                                 
2019-03-25 12:26:50: Starting AEM with arguments: file: AEM_6.x_Quickstart.jar, port: 4502, runmode: author,nosamplecontent,local
2019-03-25 12:26:50: Trying to start AEM (attempt 1)           
2019-03-25 12:26:50: Failed starting server (attempt 1): [Errno 98] Address already in use
Loading quickstart properties: default           
Loading quickstart properties: instance                                                                              
Low-memory action set to fork                                                  
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 7851 MB, meets our expectation of 1024 MB +/- 20         
No console, will fork to get enough memory                                                                                                                                                                  
Not forking JVM as -nofork option is set                                                                                                                                                                    
Setting properties from filename '/opt/aem/AEM_6.x_Quickstart.jar'                                                                                                                                          
Setting 'sling.run.modes' to 'author,nosamplecontent,local' from command line.                          
Unable to setup Swing UI, will use system console only (java.awt.HeadlessException)
Verbose option not active, closing stdin and redirecting stdout and stderr                                                                                 
Redirecting stdout to /opt/aem/crx-quickstart/logs/stdout.log
Redirecting stderr to /opt/aem/crx-quickstart/logs/stderr.log                                                                    
Press CTRL-C to shutdown the Quickstart server...                           
2019-03-25 12:27:10: Trying to start AEM (attempt 2)                                                     
2019-03-25 12:27:10: Failed starting server (attempt 2): [Errno 98] Address already in use                            
2019-03-25 12:27:30: Trying to start AEM (attempt 3)                                                                        
2019-03-25 12:27:30: Failed starting server (attempt 3): [Errno 98] Address already in use                                 
2019-03-25 12:27:50: Trying to start AEM (attempt 4)                                      

and it hangs here.
Any clue how to continue?

Running Linux machine w/ 16GB RAM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.