In the first blog of this series (
here), I laid the foundation of why I chose this POC and my investigation into potential tools such as
MiniKube and
Kind, and why these did not work for me. I eventually settled on
AKS Edge Essentials from Microsoft. Now I will take a slightly deeper dive into how I put things together.
The Solution
Putting things together, was relatively straight forward.. sort of
-
AKS creates the infrastructure such as Clusters and the Linux and Windows Nodes
-
Use the existing K8s deployment yaml files from the Sitecore deployment files of my choosing. Not all the files will be used and I created some Powershell scripts to help with the installation at each phase
-
Verifying the installation by connecting to the CM/CD service to see the Sitecore landing page and attempt to login.
AKS Edge Essentials
Using the ASK Edge Essentials was relatively easy due to the comprehensive documentation in the How-to section on their site.
For installation ensure that the msi file for the AKS executable and the windows node files are extracted into the folder you are using for the deployment, then do:
msiexec.exe /i "AksEdge-kXs-x.xx.x.msi" ADDLOCAL=CoreFeature,WindowsNodeFeature
After installation we need to consider what type of machine deployment we are doing. For my setup I used a Single Machine Cluster with both Linux and Windows Node (mixed workload cluster). The tool has a command tool which generates a json config file based on the deployment type and node type you specify.
New-AksEdgeConfig -DeploymentType SingleMachineCluster -NodeType LinuxAndWindows -outFile .\aksedge-config.json | Out-Null
After this, the infrastructure setup is started using:
New-AksEdgeDeployment -JsonConfigFilePath .\aksedge-config.json
Sit back and watch the magic.
*Note*: A compatibility check will be executed which will verify your hardware resources during the setup, which may fail, so take note of the hardware requirements.
(
Kubernetes Dashboard: By default the Kubernetes Dashboard is not enabled. See
scripts in repo to install dashboard and create admin user to login.)
Sitecore Deployment
For the Sitecore part of this installation, I reused the standard Kubernetes deployment package that comes with comes with the Sitecore 10.3 Container Deployment under the k8s folder. However, I did not use all the yaml files, as that setup was geared to an Azure AKS type of deployment. I had to do some modifications and basically remove anything Azure AKS related.
Ended up with a folder structure similar to the following:
external– (Linux deployed services)
helm– Streamlines installation of Kubernetes applications
ingress-nginx – Cluster Load Balancing goodness
init – To bootstrap Sitecore and solr databases
license – For you valid Sitecore license file
secrets – files to store passwords and secret information used by your kubernetes deployment
volumes – used to configure mount points
So to not make installation a pain, and having to run the kubectl command to load each and every configuration, I created Powershell scripts to be run in the order they are named to ensure a smooth and predictable installation flow.
At the end of the day I had a working Kubernetes Dashboard showing all my workloads, Pods and Services
And with some bit of port forwarding and hacking for the CM/CD (will discuss in the next part of this series)
Sitecore Launcher
Next post, I will go through the issues I faced getting things up, and certain caveats to look for.
In the meantime feel free to check out the project Github repo
here.