Sitecore Container based Development
Abhinav Kumar Singh
Associate Principal Engineer | 7x Azure Certified | 4x Sitecore Certified | Sitecore Content Hub | Sitecore Search | Coveo | DevOps | Terraform
Introduction
Container based development is in fashion now days and developer wants to setup container based environment because it installs all dependencies at once. You can get more information on container from here.
Sitecore has also started support to container based environment means we can host Sitecore to containers also apart from Azure App Services, ASE, VM and Amazon VPC etc. since Sitecore 10 is released. Sitecore has released 10.1 and 10.2 major version. You can get more information about Sitecore Containers here. Sitecore has also started to update their repository on container approach what you can see on Sitecore GitHub repository.
Pre-requisites
Sitecore suggest that 16GB RAM based machine is suitable for container but practically when we install Sitecore on this configuration, start getting issue memory and CPU utilization. So, I would prefer to install on 32GB RAM based machine.
If your machine doesn't have this configuration then you can install on Azure D8 series Virtual Machine.
After creating Azure Virtual machine, please follow below steps to start Sitecore setup.
2. Check for windows update and install if available even you have just created a new virtual machine because Docker requires latest OS.
3. Enable Hyper-V on virtual machine as per here.
5. Download and Install linux kernel update package.
6. Restart virtual machine.
7. Star Docker if it is not open on startup.
8. Switch to windows container and will get below error screen.
领英推荐
8. But the same error suggests a script to execute. So, execute that script through PowerShell in administrator mode.
Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All
9. Now, your virtual machine is ready for Sitecore Setup. If you will skip any steps then you will start getting some other issues.
10. You may need to install some other packages/SDK/runtime depending upon which Sitecore Solution you are going to install on local. Those dependencies are mentioned in readme.md file of each repository.
Issues Resolved
Sitecore XM-Cloud is recently release and i was trying to setup locally but were getting below error while installation. I have pushed its solution to my repository because currently main repo doesn't accept any PR and the same is mentioned in readme.md file.
Once the Sitecore XM-Cloud would be setup successfully, you will see below screen.
But, if you will try to access each site, you will experience errors on page. But, this is known issue. MVP site can be set up providing OKTA variables in .env file.
If you are trying to setup Sitecore-MVP on virtual machine, then you might be get below error while installation. I have pushed its solution to my repository and PR is also raised to update main repository.