Friday, February 26, 2021

Sitecore Containers Prerequisite Check for Local Environments with PowerShell

If you're looking to finally dive into the world of Docker, there's no better time than now with the release of 'Sitecore XP 10.1 Initial Release'.  If you haven't worked with Sitecore Containers yet, you'll need to settle several prerequisites before starting. 

As a callback to when Sitecore 9 and SIF were all the rage and new machine prerequisites were aplenty (ref Sitecore 9 Machine Prerequisites Check with PowerShell), I spent some time developing a new,  menu-driven PowerShell script to facilitate the validation of prerequisites when setting up a local development environment using Sitecore Containers.

The sitecore-containers-prerequisites.ps1 script sets out to:

Quickly verify Sitecore Container:
  • Hardware requirements (CPU, RAM, Disk Storage, and presence of SSD)
  • Operating system compatibility (OS Build Version, Hyper-V/Containers Feature Check, IIS Running State)
  • Software requirements (Docker Desktop, Docker engine OS type Linux vs. Windows Containers)
  • Network Port Check (443, 8079, 8984, 14330)
Download and Install required software:
  • Chocolatey
  • Docker Desktop
  • mkcert 
Enables required Windows Features
  • Containers
  • Hyper-V 
Download latest 10.1.0
  • Container Package ZIP 
  • Local Development Installation Guide PDF

Demo

Selecting 'Scan All Prerequisites' option will execute all scan options (effectively each individual scans -- which are also available):


Here's a demo of the script identifying that Docker is set to use Linux Containers instead of the required Windows Containers:



I hope this helps folks new to Sitecore Containers get started confidently, knowing their machine is ready - and also bring some simplicity to those accustomed to developing with Sitecore Containers and are just setting up a new machine.

You can grab a copy of the script here: https://github.com/strezag/sitecore-containers-prerequisites 

As always, feel free to use and modify the script to fit your needs.
Leave a comment if you have any suggestions or recommendations, too!

0 comments:

Post a Comment