Ir al contenido principal

Creating Docker containers for Adobe Experience Manager

This is a Docker tutorial for creating a docker image for the Galen framework, above is the vid and below you will find some of the steps followed.
  • Adobe experience manager is a content management system which in a nutshell is an application that allows us to create web sites to be consumed by end users. You might be familiar with other such applications like wordpress or drupal which serves the same purpose

  • A typical deployment would be comprised of two AEM instances, the author instance used for creating and modifying content, the publish instance which serves the content and finally we have a dispatcher which is a static web server used for caching, load balancing and some security purposes.

  • We can configure an AEM instance to work as an author or publish instance by either changing the file name for the jar file

  •   
    java -jar cq-author-4502.jar
    java -jar cq-publish-4503.jar
      
    
  • Or by using the run modes to configure the instance

  •   
    java -jar cq-quickstart.jar -Dsling.run.modes=author -p 4502
    java -jar cq-quickstart.jar -Dsling.run.modes=publish -p 4503
      
    
  1. 1.

    Pre-reqs

    • Have Java installed (If you want to start AEM outside docker)
    • Have an AEM instance jar and the license.properties files
      And docker installed
  2. 2.

    Create a base AEM image in docker so it can be reused

    • Start from a clean ubuntu image
        
      FROM ubuntu
        
      
    • Create default/working directory
        
      WORKDIR /opt/aem
        
      
    • Install Oracle's Java 8 inside the docker container
        
      RUN apt-get update && \
          apt-get install -y curl && \
          apt-get install -y software-properties-common && \
          add-apt-repository ppa:openjdk-r/ppa && \
          apt-get update && \
          apt-get install -y openjdk-8-jdk && \
          rm -rf /var/lib/apt/lists/* && \
          rm -rf /var/cache/oracle-jdk8-installer
        
      
    • Copy the license and jar file into the image
        
      ADD license.properties ./
      ADD cq-quickstart-6.3.0.jar cq-quickstart.jar
        
      
    • Unpack the jar for future use on other images, child images should use the cq-quickstart.jar file when interacting with AEM
        
      RUN java -jar cq-quickstart.jar -unpack
        
      
    • Build the image
        
      docker build -t aem .
        
      
  3. 3.

    Create a container for the author or publish instances

    • Use the base image
        
      FROM aem
        
      
    • Export the port number
        
      EXPOSE PORT-NUMBER
        
      
    • Start AEM using the same port as above and provide the run mode value: author or publish and for the port: 4502 or 4503
        
      ENTRYPOINT ["java", "-Xmx1024M", "-jar", "cq-quickstart.jar", "-Dsling.run.modes=RUN-MODE", "-p", "PORT-NUMBER"]
        
      
    • Build the image and define the name for the type of instance: author or publish
        
      docker build -t INSTANCE-TYPE .
      docker build -t author .
        
      
    • And finally start the container using the name for the type of instance: author or publish and map the corresponding ports the port: 4502 or 4503
        
      docker run -p PORT-NUMBER:PORT-NUMBER INSTANCE-TYPE
      docker run -p 4502:4502 author
        
      
  4. 4.

    Create a docker container for the dispatcher using default configurations

    • Use an apache image as a base (This one already have some configurations like the port 80 already exposed)
        
      FROM httpd:2.4
        
      
    • Create default/working directory
        
      WORKDIR /usr/src/app
        
      
    • Download the dispatcher module
        
      ADD https://www.adobeaemcloud.com/content/companies/public/adobe/dispatcher/dispatcher/_jcr_content/top/download_8/file.res/dispatcher-apache2.4-linux-x86-64-4.2.3.tar.gz ./dispatcher/
        
      
    • Unzip it and then copy the module file into apache's modules folder
        
      RUN tar -xzvf ./dispatcher/dispatcher-apache2.4-linux-x86-64-4.2.3.tar.gz -C ./dispatcher && \
          cp ./dispatcher/dispatcher-apache2.4-4.2.3.so /usr/local/apache2/modules/mod_dispatcher.so
        
      
    • Copy a local version of the dispatcher.any file already modified to work with the publish instance, take into account that the configuration on that file is expecting that you are starting the containers using docker-compose and that the service for the publish instance is also called publish.

      If you need another name or to start the container using just docker change any text matching the text "publish" to the new one or the ip of your publish container

      ADD dispatcher.any /usr/local/apache2/conf/dispatcher.any
    • Copy a local version of the httpd.conf file already modified to use the dispatcher module.

        
      COPY httpd.conf /usr/local/apache2/conf/httpd.conf
        
      
    • Start all the containers using docker-compose
        
      docker-compose up
        
      
  5. 5.

Comentarios

  1. For the most part, Windows Phone and Blackberry customers will also have entry to apps, but in sure circumstances they may should ante-up via an in-browser casino web site. Learn method to|tips on how to} play slots or leap straight into {playing|enjoying|taking part in} actual cash slots. In distinction, cell slots corresponding to Merlin's Millions look extra like conventional online video games in a smaller setting. Instead of 토토사이트 stripping again lots of the bells and whistles as the builders do in video games like Bar Bar Blacksheep, the designers merely optimize their software so that each one|that each one} similar old} features may be considered in a cell setting.

    ResponderEliminar

Publicar un comentario

Entradas populares de este blog

How to copy files from and to a running Docker container

Sometimes you want to copy files to or from a container that doesn’t have a volume previously created, in this quick tips episode, you will learn how. Above is the vid and below you will find some useful notes. 1. Pre-reqs Have Docker installed 2. Start a Docker container For this video I will be using a Jenkins image as an example, so let’s first download it by using docker pull docker pull jenkins/jenkins:lts

How to create an AEM component using Reactjs

In this tutorial, I will show how to use use Adobe's archetype to create an AEM application with React.js support and also how to add a new React.js component so that it can be added into a page, above is the vid and below you will find some useful notes. In the second part we will see how to configure the Sling Model for the AEM React component. 1. Pre-reqs Have access to an Adobe Experience Manager instance. You will need aem 6.4 Service Pack 2 or newer. Have Maven installed, understand how it works and also understand how to use Adobe's archetype, you can watch my video about maven here: Creating an AEM application using Maven and Adobe's archetype 2.

House price prediction 3/4: What is One Hot Encoding

A series about creating a model using Python and Tensorflow and then importing the model and making predictions using Javascript in a Vue.js application, above is the vid and below you will find some useful notes. Here, in part 3 of this series, I will show what is and how does one hot encoding works. In the first post, called House price prediction 1/4: Using Keras/Tensorflow and python , I talked about how to create a model in python, pre-process a dataset I've already created, train a model, post-process, predict, and finally about creating different files for sharing some information about the data for use on the second part. Then in part 2, called House price prediction 2/4: Using Tensorflow.js, Vue.js and Javascript , I took the model, the data for pre and post processing and after loading everything we were finally able to predict