Blog

Chapter 4: Deploy Sitecore into Kubernetes (AWS EKS)

Sitecore now has official support of deployments into kubernetes. This is a guide of what’s involved in deploying Sitecore into kubernetes (Tested with AWS). Download the Sitecore container deployment and extract the relevant (xp / XM) configuration files to a working folder.

Prepare certificates

Prepare the certificate (.crt) and private key (.key) files for content management, Content Delivery and Identity Server roles and copy them into the relevant folders as per below screenshot.

Mutli-Site configuration

If you have a multi site implementation you might need to create a separate folder for each domain name under the tls folder and copy the relevant cert and key files and update the Kustomization.yaml

Update the ingress configuration (ingress.yaml) with the domain names to content delivery as per below

Prepare and deploy secrets

  1. Update the database passwords in secrets folder text files and change the usernames if you have modified the database usernames.
  2. Generate 64 character keys for telerik encryption, identity secret and reporting api key and update the relevant text files
  3. Create a x509 certificate for identity server to be used for signing credentials and update the identity certificate and password text files. (sample)
  4. Update the license text file with base64 encoded string of the license file (sample)

Once the secret files are all prepared, run the following command to push the secrets into kubernetes environment.

kubectl apply -k ./secrets

Deploy external services (optional)

There is a option to use services like SOLR, Redis and SQL in containers for a non-prod environment. It is not recommended/supported to use these in a production environment. To deploy these external services run the following command

kubectl apply -f ./external/

Wait for the new pods to be in Running status. Use kubectl get pods -o wide -A to check the status of the external pods.

We would need to deploy the initialization jobs to finish setting up the SOLR and SQL pods. The default job configurtaion files provided by sitecore are missing the node selectors, so there is a chance that these jobs end up on linux nodes and fail or get stuck on ContainerCreating status. Add the below snippet just above imagePullSecrets under spec into both solr and mssql init job YAML files (in ./init folder)

      nodeSelector:
        kubernetes.io/os: windows

Run the following command to deploy the init jobs into the cluster.

kubectl apply -f ./init/

Wait for the jobs to return a Completed status, Use the get pods status command used previously.

Deploy Sitecore and Ingress configuration

To deploy sitecore and the nginx ingress configuration run the following command

kubectl apply -f ./ -f ./ingress-nginx/ingress.yaml

Wait for the deployments to be completed and all pods to return either a Running or a Completed status and Sitecore should now be ready.

Check out the other related posts:

Sitecore on AWS Kubernetes (EKS)

Chapter 1: Configure AWS and Kubernetes CLI

Chapter 2: AWS Kubernetes Cluster for windows workloads

Chapter 3: Deploy nginx ingress controller into AWS EKS Cluster

Chapter 3: Deploy nginx ingress controller into AWS EKS Cluster

Ingress controller is used in kubernetes to direct external traffic to the relevant containers/pods running in the cluster. nginx is a very common and popular ingress controller used with kubernetes. This article guides through the steps involved in deploying nginx ingress controller.

Install helm

helm is one of the popular ways of managing deployments into kubernetes environments. Use the below chocolatey command to install helm.

choco install kubernetes-helm -y

Register Repositories to helm

Add the default repository to helm using below command.

helm repo add stable https://kubernetes-charts.storage.googleapis.com/

Add the bitnami repository to helm using the below command

helm repo add bitnami https://charts.bitnami.com/bitnami

Once the above repos are added to helm. Search for nginx using the below command to ensure that we have pulled the latest nginx charts into the repository. Use the below command to search

helm search repo nginx

Deploy nginx ingress controller

Run the following command to install bitnami nginx controller on to the default linux nodes in the cluster.

helm install <deployment-name> bitnami/nginx-ingress-controller `
--set replicaCount=1 `
--set nodeSelector."beta\.kubernetes\.io/os"=linux `
--set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=linux `
--set-string controller.config.proxy-body-size=10m `
--set service.externalTrafficPolicy=Local `

Retrieve external ip for DNS

Run the following command to check the status of the ingress controller apps deployed into the cluster. Wait until the status changes to Running.

kubectl get pods -o wide -A

Run the below command to get the external ip of the ingress controller in the cluster. This returns a cname which can be used for managing the DNS entries going into the applications running in the cluster.

kubectl --namespace default get services -o wide -w bitnami-ingress-nginx-ingress-controller

Note: If you are working with a dummy DNS names you can perform a nslookup on the CNAME and extract the IP Address to add them to your local hosts file with the relevant host names.

Check out the other related posts:

Sitecore on AWS Kubernetes (EKS)

Chapter 1: Configure AWS and Kubernetes CLI

Chapter 2: AWS Kubernetes Cluster for windows workloads

Chapter 4: Deploy Sitecore into Kubernetes

Chapter 2: AWS Kubernetes Cluster for windows workloads

AWS has been supporting windows workloads in kubernetes since march 2019. The default cluster created only supports linux workloads, this article is a detailed account of how to create a kubernetes cluster in AWS for windows workloads.

Create Cluster

Create a new EKS cluster using the below command. This command creates the default nodes that have to be linux. These nodes host the default applications (pods) that manage the orchestration of kubernetes. Please ensure to update <Cluster-Name> and <Node-Group-Name> and adust the number of nodes accordingly. Its a good practice to have at least 2 nodes to ensure the high availability.

eksctl create cluster `
--name <Cluster-Name> `
--version 1.17 `
--nodegroup-name <Node-Group-Name> `
--node-type t3.medium `
--nodes 2 `
--nodes-min 1 `
--nodes-max 3 `
--node-ami auto

Export Kube config

Run the following command to export the kubernetes cluster configuration into the user profile so the context is set for kubectl

aws eks --region ap-southeast-2 update-kubeconfig --name <cluster name>

Ensure that all the default pods are in running state using the below command.

kubectl get pods -o wide -A

Install VPC controller

Install vpc controller to support windows nodes in the cluster using the below command.

eksctl utils install-vpc-controllers --cluster <Cluster-Name> --approve

Run the get pods command again to see the VPC controller pods running as per below and wait until all the pods are in Running status.

Create windows nodes

Create a node group with windows nodes to support windows workloads using the below command. Please update the <Cluster-Name> and <Node-Group-Name>. Adjust the number of nodes according to the need.

eksctl create nodegroup `
--region ap-southeast-2 `
--cluster <Cluster-Name> `
--version 1.17 `
--name <Node-Group-Name> `
--node-type t3.large `
--nodes 2 `
--nodes-min 1 `
--nodes-max 3 `
--node-ami-family WindowsServer2019FullContainer `
--node-ami auto `

Check the status of all the nodes running correctly using the below command

kubectl get nodes -L kubernetes.io/os `
--sort-by=".status.conditions[?(@.reason == 'KubeletReady' )].lastTransitionTime" `

Check out the other related posts:

Sitecore on AWS Kubernetes (EKS)

Chapter 1: Configure AWS and Kubernetes CLI

Chapter 3: Deploy nginx ingress controller into AWS EKS Cluster

Chapter 4: Deploy Sitecore into Kubernetes

Chapter 1: Configure AWS and Kubernetes CLI

AWS supports kubernetes workloads for windows through EKS and also supports use of command line interface for deploying and configuring resources. Using CLI makes it easy for automating this process through a CI/CD pipeline when required. This article guides through the configuration of CLI for AWS and Kubernetes.

Install and configure AWS CLI

Install AWS CLI using chocolatey

choco install awscli -y

Once successfully installed run aws --version to check if the cli is correctly installed.

Configure AWS CLI with the relevant access key for CLI. This can be generated using the My Security Credentials page through AWS Console. (detailed instructions)

Use the below command to start configuring the CLI

aws configure

Install CLI for EKS

eksctl is the command line utility used for managing the EKS cluster. Use below chocolatey command to install eksctl

choco install eksctl -y

Once successfully installed run eksctl version to verify the version (see below)

Note: eksctl seemed to only use default profile. If you are using named profile for aws cli. this will always use default profile. Hopefully in the newer versions of the cli this will be addressed by AWS.

Install CLI for kubernetes

Install kubectl using chocolatey using the below command

choco install kubernetes-cli -y

Check out the other related posts:

Sitecore on AWS Kubernetes (EKS)

Chapter 2: AWS Kubernetes Cluster for windows workloads

Chapter 3: Deploy nginx ingress controller into AWS EKS Cluster

Chapter 4: Deploy Sitecore into Kubernetes

Sitecore on AWS Kubernetes (EKS)

Sitecore with release of version 10 now officially supports deployments into container workloads using kubernetes. Sitecore has officially marked PaaS would be deprecated in the future releases (more details). This article is about how to deploy Sitecore 10 into AWS kubernetes (EKS). This article is broken down into four chapters as per below with a brief summary.

1. Configure AWS and Kubernetes CLI

AWS command line interface could be used to create or manage resources in AWS. This chapter guides through the installation and configuration of AWS CLI and Kubernetes CLI. Click here to start configuring your CLI.

2. Create AWS Kubernetes Cluster

A Kubernetes cluster needs to be provisioned to deploy Sitecore workloads. This chapter guides through the creation and configuration of AWS EKS Cluster. Click here to start provisioning the cluster.

3. Deploy ingress controller into EKS Cluster

An ingress controller is used to create external access to the applications deployed into the Kubernetes cluster. This chapter guides through the preparation and deployment of ingress controller. Click here to start deploying the ingress controller.

4. Deploy Sitecore into AWS EKS

This is the last chapter that guides through the preparation of the configuration files and deploying Sitecore into kubernetes cluster. Click here to start deploying Sitecore.

Credits

Credit to Gurpreet (Garry) Singh & Jason Umiker for sharing their knowledge and expertise on AWS EKS.

Aceik Announces Platinum Sitecore Implementation Partner Status

Today, the Aceik team is excited to share our new status as a Sitecore Platinum Implementation Partner.

Sitecore is the global leader in customer experience management software and this promotion recognises the partnership between the two companies and the commitment to deliver outstanding customer experiences through the use of the Sitecore platform.

Platinum Partners are recognised for their deep knowledge of Sitecore, thought leadership and best practices in delivering flawless customer experiences at scale.

Jason Horne, Chief Executive Officer at Aceik said, “This is the highest-ranking tier of partner status in the Sitecore network, and it is a recognition of the success and expertise Aceik’s team has demonstrated for our customers across the full breadth of Sitecore products.”

It has been a busy year for our team

In recent months, Sitecore recognised Aceik’s contribution to the Sitecore community with two Most Value Professional status and a Sitecore Experience Award Honorable Mention.

Aceik’s CEO, Jason Horne was recognised as a Sitecore Technology MVP for a fifth consecutive year alongside colleague, Thomas Tyack who was named Sitecore Technology MVP for the second year in a row.

Aceik was awarded Sitecore Experience Award (SEA) Honorable Mention in the Most Sophisticated Implementation category for its work with customer, RAA.

Last month, Aceik appointed Wayne Vickers, former Head of Customer Experience for the Australian Football League (AFL) as Chief Operating Officer and Creative Director.

The new hire demonstrates Aceik’s continued commitment to its Sitecore clients, as well as the Sitecore partnership.

People of Aceik: Thomas Tyack, Chief Technical Architect

Earlier this year, we launched a new series to introduce you to our talented and hard working team mates. They’re behind the success of our client’s projects – working diligently to ensure we exceed our customers’ expectations.

This month, we sat down with our recently promoted Chief Technical Architect, Thomas Tyack.

Tom, tell me about your background.

Tom: I grew up in Manly West, Brisbane, on a 12-acre property (before it was all housing estates).  My family also has a family farm near Kingscliff, New South Wales. So, I spent a lot of time traveling back and forth across the QLD/New South Wales border when I was younger. I attended QUT for university studying a bachelor of IT and afterwards spent 2 years in the UK where I started out as a Java Developer. Eventually, I returned to Australia and switched from Java to .NET. I’ve worked on .NET and Sitecore projects since around 2007.

Can you tell us a little bit about your Sitecore experience because you are a Sitecore MVP?

Tom: I was named a Sitecore MVP in 2019 and 2020 after spending the two years prior working towards the status. Sitecore recognises individuals who make community contributions, blog posts, open-source contributions and share and present at user groups.

I contracted for a number of agencies in Melbourne. And after a little travel and a move back to Northern NSW I eventually joined Aceik.

Tell us a little bit about joining Aceik, your role, and then your new role.

Tom: I started out at Aceik when it was very small consultancy. I went straight onto managing our key relationship with Fitness Life Group and building out Fitness First on Sitecore. RAA was the other major big project I was involved in. I spent a reasonable amount of time flying to Adelaide every second week.

Tom: Recently I have taken on the lead Architect role, which has me looking at Aceik’s processes and high-level delivery framework. We are continuously streamlining how we deliver projects and ways to provide rock solid consistency and great outcomes for our clients.

Why did you choose to join this Aceik Team?

Tom: Flexibility at first. It was a good opportunity. It’s been almost 4 years now and the interesting projects keep coming.

And why do you stay at Aceik?

Tom: Flexibility remains. We have some great technical minds on our team and it’s enjoyable to work them across different projects and achieve great results for our customers.

Is there a project or a project campaign in just few months that you have enjoyed working on?

Tom: RAA – it was a big challenging project and I am glad we were able to contribute our Sitecore expertise to help get that delivered.

Check out the case study and video here.

We are in the second wave of coronavirus and still working from home. How did you make it work for you? Any particular tip or advice that you have for working remotely?

Tom: Aceik has been working remotely for many years not just this period, so it hasn’t changed too much for me. Over the years I have managed remote teams and across many projects and it is all about keeping client communication constantly flowing. We let them know what we are doing, providing a morning update on top of stand-ups. The morning update is provided in Slack and is like a written ledger of what the team has done. The best part for the client is being able to review their project history over any given day.

Tell us about Tom outside of Aceik – who are you when you are not working? What do you get up to?

Tom: I have two young kids, two and four years of age, so life is pretty busy as soon as I get home from work. They both love the beach, riding bikes (or scooters) and camping so we spend our time doing those things on the weekend at the moment. 

Any tips or advice for those wanting a developer career?

Tom: Mention the technologies that you have worked with and those you want to work with. Basically, sell the projects that you have worked on, the achievements you have on those projects, and how you helped the client obtain their goals that would stand out to me.

But then if you do not have those skills yet, and you want to get into that space then work on open-source projects where you might be able to contribute. Essentially something that can show what your capable of. Having experience is very valuable but if you don’t yet have that experience show potentially employers what your capable of.

Aceik is looking for Solutions Architect and Developers at the moment. We’re after people who can work in a fast-based environment and solve problems.

Page Speed – The Smaller 7th Pillar – Micro Boosts

You may have read my previous blog post: One Performance Blog to Rule them all – Combining the 6 Pillars of Speed

This is just a quick update to list out some further optimisations that might help you achieve a few extra points.


Prolong the Cache Expiry Setting

The default cache expiry settings is 7 days OOTB in Sitecore. This is a little short for the likes of GTMetrix but may be passable for Lighthouse. I found it best to bump it up to 30 days (if you can).

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
  <sitecore>
      <settings>
	  <setting name="MediaResponse.MaxAge" set:value="30.00:00:00"/>
      </settings>
  </sitecore>
</configuration>

Web.config and applicationHosts.config changes

These three changes are from a blog written by Sergio Gisbert

1) Add the ‘Accept-Encoding’ header to responses:

<httpProtocol>
    <customHeaders>
        <remove name="Vary"/>
        <add name="Vary" value="Accept-Encoding"/>
    </customHeaders>
</httpProtocol>

2) Enable Dynamic compression on IIS (this should already be done if you followed the Sitecore setup document) and then add in specific mime types that need coverage to web.config.

<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
    <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
    <dynamicTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/javascript" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="application/json" enabled="true" />
        <add mimeType="image/jpeg" enabled="true" />
        <add mimeType="image/jpg" enabled="true" />
        <add mimeType="image/gif" enabled="true" />
        <add mimeType="image/png" enabled="true" />
        <add mimeType="application/vnd.ms-fontobject" enabled="true" />
        <add mimeType="application/x-font-truetype" enabled="true" />
        <add mimeType="image/svg+xml" enabled="true" />
        <add mimeType="*/*" enabled="false" />
    </dynamicTypes>
    <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/javascript" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="image/jpeg" enabled="true" />
        <add mimeType="image/jpg" enabled="true" />
        <add mimeType="image/gif" enabled="true" />
        <add mimeType="image/png" enabled="true" />
        <add mimeType="application/vnd.ms-fontobject" enabled="true" />
        <add mimeType="application/x-font-truetype" enabled="true" />
        <add mimeType="image/svg+xml" enabled="true" />
        <add mimeType="application/json" enabled="true" />
        <add mimeType="application/x-woff" enabled="true" />
        <add mimeType="*/*" enabled="false" />
    </staticTypes>
</httpCompression>

3) Update applicationHosts.config to compress SVG and JSON payloads. As Sergio mentions in his blog this has to done in applicationHosts.config. (great find Sergio)

<add mimeType="image/svg+xml" enabled="true" />
<add mimeType="application/json" enabled="true" />

GZIP your main HTML document

Google Page Speed insights calls this criteria “Text Compression” but this does actually make a download size difference if your HTML payload is large. After doing this I witnessed my initial HTML delivery drop from 130KB to 40KB.

Inside your web.config and the <httpCompression> tags we added just previously add the mimeType for document into both staticTypes and dynamicTypes.

<add mimeType="document" enabled="true" />

Cleanup all missing fonts and 404s

Be sure to check you network tab and make sure any missing font references or external resources are not throwing 404s. This will result in a score reduction particularly on GTMetrics.

Aceik adds Chief Operating Officer and Creative Director to staff

Wayne Vickers
COO & Creative Director, Aceik

Aceik is excited to announce the recent appointment of Wayne Vickers, former Head of Customer Experience for the Australian Football League (AFL) as Chief Operating Officer and Creative Director.

The new hire demonstrates Aceik’s continued commitment to its Sitecore clients, as well as the Sitecore partnership. The Aceik team is already in a strong partnership with both the Chief Executive Officer, Jason Horne and Chief Technology Officer, Thomas Tyack holding Sitecore MVP recognition over multiple years.

The appointment highlights Aceik’s desire to introduce more and more brands to the power of Sitecore, to enable them to drive personalised experiences and positive marketing ROI.

Vickers has more than 20 years digital experience, having worked client side for AFL, Myer, Quiksilver in Customer Experience and eCommerce roles, as well as founding two digital agencies that included brands such as Seek and Fosters.

“I’m thrilled to join Aceik. The agency has always shown outstanding technical Sitecore prowess, and I’m excited to take our Sitecore marketing and creative expertise to the next level, so we continue to help new and existing customers to grow their digital businesses through the use of Sitecore’s best-in-class marketing features,” said Vickers.

Jason Horne, Chief Executive Officer at Aceik said, “Aceik’s Sitecore knowledge is vast and our agility is unmatched. We keep up with evolving technology and can change direction more easily than larger companies, giving our clients the most innovative Sitecore solutions to their business problems.

Horne continued, “Helping our clients to realise the full potential of Sitecore’s experience platform is at the centre of everything we do. With Wayne’s digital experience expertise, we’re looking forward to creating stronger long term relationships with our clients and Sitecore”.

Aceik named a 2020 Sitecore Experience Award Honorable Mention in Most Sophisticated Implementation category for work with RAA

Aceik today announced it has been named a Sitecore Experience Award (SEA) Honorable Mention in the Most Sophisticated Implementation category for its work with customer RAA. The agency was recognised for RAA’s improved website performance, increased automation, making site services more efficient and providing customers and visitors with a better experience.

“We now have a great foundation for our primary digital channel, a more capable team and a business that has confidence in our delivery thanks to our partnership with Aceik,” said Matt Mitchell, Senior Manager, Digital Technology Services, RAA.

The Sitecore Experience Awards 2020 recognize brands that have built truly customer-centric digital experiences with Sitecore® technology. The SEAs are awarded to Sitecore customers and their partners whose entries clearly demonstrate that their Sitecore solution delivers an outstanding experience for all users from partner developers and internal customer marketers to business and IT users and end-user customers.

“We are honored to have worked closely with the RAA team to deliver this next step in the business’ digital strategy: a customer-centric website that not only meets the needs of their customers, but is now also recognized by Sitecore,” said Jason Horne, Chief Executive Officer, Aceik.

“Showcasing the complex capabilities and scalability that Sitecore enables for organisations and brands, we’re proud to recognise some of the most sophisticated implementations we’ve seen from customers and partners at the 2020 Sitecore Experience Awards,” said Paige O’Neill, CMO, Sitecore. “Helping organizations make data-informed marketing decisions, utilize content more effectively across channels and regions, and deliver more personalised experiences is at the heart Sitecore’s integrated platform. We have seen exceptional customer work this year, unlocking new levels of audience engagement and shortened time-to-market for content creation to provide superior digital experiences that drive ROI and deliver business value.”

SEA 2020 Honorable Mentions were selected as they demonstrated to the judges that they used Sitecore solutions to make notable impact in terms of experience or content management.

Through the rigorous selection process, each entry was judged by a panel of Sitecore leadership from that entry’s region. There are five regions that evaluated and approved all regional selections based on specific selection and scoring criteria.