[Sitecore and Docker] Part 1: Understanding concepts

With the launch of Sitecore 10, Sitecore also has released the full support to configure and deliver powerful solutions to containerized environment. Containers enable us to package and run code quickly between environments using platforms such as Docker. And in this blog, I will be with you to play around with Sitecore Docker step by step and separate into 2 parts:

  1. Understanding concepts about Sitecore Docker
  2. Install Sitecore 10.0.1 on Docker Desktop for Windows

This article is about part 1. In this part, we will go through basics about Sitecore Docker such as identify supported Sitecore topologies, Sitecore Docker Compose and Sitecore Docker Examples Repository. Having a deep insight will help us a lot when working and interact with Sitecore Docker.

Sitecore Topologies

Basically, it is about the different containers designed to support install Sitecore on Docker against with different usages: XP Workstation, XM Server and XP Server.

– XP Workstation (XP Single):

It is the Sitecore Experience Platform (XP) which is designed to be used as a Developer workstation for Docker. As Developers, we want to use this topology if we are looking to reduce memory overhead, download size, or complexity, and to improve startup or shutdown time. Below are its Sitecore roles accordingly:

  1. Content Management – CM (Standalone)
  2. MSSQL Server
  3. Apache Solr
  4. xConnect Server (Standalone)
  5. xConnect Search Indexer
  6. xDB Automation Engine
  7. Cortex Processing Engine
  8. RedisLabs Redis Server
  9. Traefik Reverse Proxy

– XM Server (XM Scaled):

It is the Sitecore Experience Manager, or (XM) Server, which is designed for use in production and non-production environments for Docker. This topology supports the following Sitecore roles:

  1. Product Environment
    • Content Management (CM)
    • Content Delivery (CD)
    • Sitecore Identity Server
  2. Non-Production Environment
    • MSSQL Server
    • Apache Solr
    • RedisLabs Redis Server
    • Traefik Reverse Proxy

As Developers, if we want to reduce deployment time and lower the resource overhead in non-production environment, we can remove the Content Delivery role from the Docker Compose configuration.

– XP Server (XP Scaled):

The third topology is Sitecore Experience (XP) Server, which is designed for production and non-production environments for Docker. Below are its Sitecore roles:

  1. Production Environment
    • Content Management
    • Content Delivery
    • Sitecore Identity Server
    • xDB Processing
    • xDB Reporting Service
    • xDB Collection Service
    • xDB Search Service
    • Marketing Automation Service
    • xDB Reference Data Service
    • Sitecore Cortex Processing Service
    • Sitecore Cortex Reporting Service
    • xDB Search Worker
    • Marketing Automation Engine
    • Sitecore Cortex Processing Engine
  2. Non-Production Environment
    • MSSQL Server
    • Apache Solr
    • RedisLabs Redis Server
    • Traefik Reverse Proxy

As Developers, we use this topology if we want to replicate configuration exactly used in production. When using it in a non-production environment, it’s recommended that running with the hardware requirements because the resource to run can be significant.

Sitecore Docker Compose

Docker Compose is included as part of the Docker Desktop installation. You can access further direction on installing Docker Compose from http://docs.docker.com/compose/install site. Sitecore for Docker Compose require two text files to deploy the containers:

  1. docker-compose.yml: is a Docker Compose configuration file that contains information about the different containers and configuration of each Sitecore role.
  2. .env: is an environment variable configuration file that stores the configuration information for the environment we want to deploy. It’s the mechanism used by Sitecore to pass the configuration settings into containers.

Docker Compose files for each Sitecore topology are included in the Sitecore Container Support Package that we can download from https://dev.sitecore.net.

Sitecore Docker Examples Repository

Sitecore Docker Examples repository is an example solution to launch a containerized Sitecore solution. Now, let explore it:

Create a folder for this repo, for example: D:\sitecore\docker. Download and extract or clone the Docker Examples repository here to this path.

Navigate to getting-started folder to see the content:

  • mssql-data: this folder will contain the Sitecore databases
  • solr-data: this folder will contain the Apache Solr
  • traefik: is used by Sitecore to serve as the default reverse proxy or edge router for Docker Compose
    • certs: an empty folder where we will need to place our generated certificates. As the provided container topologies use HTTPS by default, the creation and configuration of certificates is necessary.
    • config/dynamic/certs_config.yaml: a Traefik configuration file which is used by the Traefik container.
    • The Traefik service maps the relative ./traefik folder to the running container at C:\etc\traefik. This path is then used by the Traefik service configuration, setting the --providers.file.directory to C:\etc\traefik\config\dynamic (where the certs_config.yaml file resides).
  • clean.ps1: is used to clean up the already generated database files and solr under mssql-data and solr-data folders.
  • init.ps1: actually, this is the file run to initialize the Sitecore installation on Docker. It supports to automatically install related tools such as SitecoreDockerTools (contains various cmdlets to support Docker-based Sitecore development); support to generate and update variables to .env file; add Windows hosts file entries.

That’s all for part 1. Next, we will start to install Sitecore 10 on Docker. You can check it out here.

Thanks for reading and happy Sitecore Docker!

Related Articles:

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s