Peter Nazarov presentation at Sitecore User Group Switzerland (SUGCH) on 2020-02-26. Provides guidance on how to start Sitecore Development in Containers.
2. About Me
● Implementing & Leading Sitecore Solutions
Implementation since 2013
○ 2013 - 2018: London
○ 2018: Paris
○ 2018 - Present: St. Gallen @ Namics - A Merkle
Company
3. What is Docker?
● Docker Engine is the industry’s de facto container runtime that runs on
various Linux and Windows operating systems.
● Docker creates simple tooling and a universal packaging approach that
bundles up all application dependencies inside a container.
● Solving “dependency hell” for developers and operations teams, and
eliminating the “it works on my laptop!” problem.
● Free Docker Online Training: https://training.play-with-docker.com/
4. Containerisation - Scaling and Orchestration
Containerisation Technology Automates
● Service Discovery
● Load Balancing
● Secrets/configuration/storage management
● Health checks
● Auto-[scaling/restart/healing] of containers and nodes
● Zero-downtime deployments
5. Orchestration Platforms Overview
● Docker Swarm [by Docker]
○ Already runs Sitecore in Production
■ More details and the current challenges:
Sitecore on Docker Swarm in Production by Per Manniche Bering (@pbering)
● Kubernetes (k8s) [originally developed by Google]
○ Version 1.14 supports Windows Containers
■ Google Kubernetes Engine (GKE) - Beta
■ Azure Kubernetes Service (AKS) - Preview
■ Amazon Elastic Kubernetes Service (EKS) - General Availability
6. Running Sitecore in Azure Kubernetes Service (AKS)
A detailed XC9 + K8S + AKS = Bingo?!
walkthrough by Joost Meijles (@joostmeijles)
9. Install Docker on Development Workstation
● Download and Install Docker Desktop for Windows
https://docs.docker.com/docker-for-windows/install/
● *Set custom DNS server for containers runtime
○ Find Docker Desktop icon in windows tray
(next to the clock in the task bar) and open
Settings. Navigate to Daemon section and set
"dns" in the JSON.
10. Get Ready to Build Sitecore Docker Images
1. Clone Sitecore Docker from GitHub.
2. Preparing to build XM&XP Docker images with SXA, JSS and PS modules:
docker login yourcontainerregisry.azurecr.io
./Download-PS-Prerequisites.ps1`
-SitecoreUsername " name.surname@yourorg.com "`
-SitecorePassword "yourPa$$word!"`
12. Sitecore Docker – How to Set the License for Sitecore 9.3 containers?
https://sitecore.namics.com/2020/02/13/sitecore
-docker-how-to-set-the-license-for-sitecore-9-3-
containers
15. Sitecore Publishing Service on Docker
● PublishingService.UrlRoot is not set incorrectly (default value is not
changed) on CM: https://github.com/Sitecore/docker-images/issues/208
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<settings>
<!-- The HTTP endpoint for the service →
<setting name="PublishingService.UrlRoot" value="http://localhost:5000/"></setting>
...
● Interim fix: Deploy a custom config include file to CM wich sets
PublishingService.UrlRoot to `http://ps/`.
16. Sitecore JSS on Docker (Microsoft)
● ServiceMonitor.exe which launches w3wp process pases
PSMODULEPATH environment variable to the process context which has a
clash with PSModulePath environment variable. Due to this issue Sitecore
fails to start Node process during JSS deployment.
https://github.com/microsoft/IIS.ServiceMonitor/issues/48
● Fix: Get the code from https://github.com/microsoft/IIS.ServiceMonitor and
compile ServiceMonitor.exe yourself. Then mound your version of
ServiceMonitor.exe and change the entrypoint to use your version.
18. Pros
● Orchestration
● Scaling
● Fast Sitecore Environment Rollout
○ XM, XP, XC
○ PSE, SXA, JSS and Publishing Service
(PS)
● Efficient Resource Distribution and
Utilisation in Hosting Environment
○ Up to 40% hosting cost savings
Cons
● Troubleshooting is a bit harder due
to limited access to the container
runtime.
● Extra performance overheads on
dev workstation.
● Extra hardware requirements for
dev workstations.
Sitecore Contarisation
21. Questions?
Staying in touch
Peter Nazarov
https://www.linkedin.com/in/peternazarov/
References
● Free Docker Online Training
https://training.play-with-docker.com/
● Sitecore Docker GitHub
https://github.com/Sitecore/docker-images
● Install Docker Desktop for Windows
https://docs.docker.com/docker-for-windows/install/
● Sitecore Containerisation Support
https://kb.sitecore.net/articles/161310
● Sitecore on Docker Swarm in Production
https://www.valtech.com/insights/sitecore-on-docker-swarm
-in-production/
● XC9 + K8S + AKS = Bingo?!
https://joost.meijles.com/xc9_k8s_aks/
● Set the License for Sitecore 9.3 containers
https://sitecore.namics.com/2020/02/13/sitecore-docker-ho
w-to-set-the-license-for-sitecore-9-3-containers
22. Thank You
Staying in touch
Peter Nazarov
https://www.linkedin.com/in/peternazarov/
References
● Free Docker Online Training
https://training.play-with-docker.com/
● Sitecore Docker GitHub
https://github.com/Sitecore/docker-images
● Install Docker Desktop for Windows
https://docs.docker.com/docker-for-windows/install/
● Sitecore Containerisation Support
https://kb.sitecore.net/articles/161310
● Sitecore on Docker Swarm in Production
https://www.valtech.com/insights/sitecore-on-docker-swarm
-in-production/
● XC9 + K8S + AKS = Bingo?!
https://joost.meijles.com/xc9_k8s_aks/
● Set the License for Sitecore 9.3 containers
https://sitecore.namics.com/2020/02/13/sitecore-docker-ho
w-to-set-the-license-for-sitecore-9-3-containers