Monitoring Sitecore Containers

The ability to monitor your Sitecore instances is essential. Knowing your application is available and performing in production as expected is critical. To be proactive and respond to changes in performance as opposed to reactive after an incident has occurred, you need a continuous overview of the state of the application and the underlying infrastructure. This involves gathering metrics like CPU, memory usage, and storage consumption as well as any application-related metrics. However, when monitoring a containerized Sitecore instance we cannot apply our usual methods and tools to provide us with all the data we need. In this post, I will show you some of the native tools to help you monitor Sitecore containers.

Docker stats

The docker stats command display a live stream (updated every second) of running containers resource usage statistics docker stats:

dockerstats

  • CPU % – the percentage of the host’s CPU the container is using.
  • PRIV WORKING SET – refers to the total physical memory (RAM) used by the process.
  • NET I/O – the amount of data the container has sent and received over its network interface.
  • BLOCK I/O – the amount of data the container has read to and written from block devices on the host.

Continue reading

Tips for managing Sitecore containers

In this post, I will show you some useful commands and tips for managing your Sitecore containers, images and other docker resources that get created when standing up your containers. The Docker documentation is awesome but it is fairly extensive so I’ll cover some useful commands you should be familiar with.

PS> docker container ls – lists running containers by default, you need to use -a flag to list all containers not just running containers. You can use -f flag to filter containers.

PS> docker container ls -f “name=93x*”

dockercontainerslsfilter

If you want to see the most recently created use -l flag.

Continue reading

How to move Sitecore container images to an Azure Registry

If you have built your Sitecore container images and they reside locally and you want to share them with your team the recommended approach is a private registry and there are a few services available. However, Azure Container Registry (ACR) allows you to store docker images in repositories and can take advantage of the azure pipelines to automatically rebuild these images when they need to be updated. In this post, I will show you how to push your local images to a private ACR. This also works if you need to move your images from one private registry to another.

Shore crane loading containers in freight ship

Continue reading

Running Windows and Linux Containers Simultaneously

If you are running Sitecore in a container then you’ve most likely switched Docker desktop to Windows container mode. But what if you want to run a Linux container simultaneously? For example, you might want to fire up, JMeter and Grafana on Linux containers. It turns out this is possible in your local development environment and is fairly straightforward.

Crane lifting up container in yard

Continue reading

docker-compose up is music to one’s Sitecore ear!

Don’t worry this is not another post about running Sitecore in a container! No this is a post about getting the Sitecore HabitatHome demo solution up and running quickly and I mean quickly without too much effort. I just happen to use docker in the process. HabitatHome is a solution built using SXA on Sitecore XP following Helix principles. It is extremely useful if you need to showcase SXA capabilities to an existing or a potential new customer.

This is where my good friend Andy Uzick found himself a few weeks ago but had already started down the path of standing up the SXA HabitatHome demo on a temporary Azure PAAS instance not using docker. I thought with docker surely this would be much easier.

habitathomedemo

Continue reading