0

We are using Sitecore 10.2 with SXA and it is deployed on docker using AKS. We are trying to generate a static error page from the Site grouping site the error page is created but if we are again doing the deployment the static error page is not loading. The POD is created as a new so again we need to generate the error page on our site.

We are managing around 10 sites. We can't do each and every time to generate the static page.

Is there any permanent solution please suggest.

3 Answers 3

1

You need to take the path where the ErrorPages folder is being generated and map it to a persistent storage volume. This is quite similar to how the logs are stored and persisted.

If you check the cd.yaml file you can find a reference to do this.

enter image description here

0

The easiest way is to generate error pages on PROD and source control them. But you will need to maintain it (modify source controlled file if error pages change)

Otherwise, you can write a PowerShell script that triggers generation of error pages after deployment.

Hope this helps.

0

It sounds like you're facing an issue where the static error page you've generated within Sitecore is not persisting across deployments in your Docker-based AKS environment. This could be due to the statelessness of your containers, which might not be preserving the changes you make to the static error page between deployments.

To address this issue, you can consider the following approaches:

  1. External Content Store: Instead of relying solely on the content within the containers, you can store your Sitecore media and content in an external storage solution, such as Azure Blob Storage or a dedicated content repository. This way, your content will be decoupled from the container instances, allowing you to keep consistent content even when containers are redeployed.

  2. Persistent Volumes: If you're using Kubernetes, consider using Persistent Volumes (PVs) and Persistent Volume Claims (PVCs) to store your Sitecore data. This can help in persisting data across container instances and deployments. By ensuring that the generated static error page is stored in a persistent volume, it should remain intact even when pods are recreated.

  3. Custom Docker Image: Create a custom Docker image for your Sitecore application that includes the static error page as part of the image. This way, the error page will be baked into the image itself, and each new deployment will automatically include the static error page without needing manual generation.

  4. Automated Deployment Scripts: Develop automated deployment scripts or processes that ensure the static error page is generated and deployed as part of your deployment pipeline. This way, the error page generation becomes a standard step in your deployment process, reducing the manual effort required.

  5. Infrastructure as Code (IaC): Utilize Infrastructure as Code tools like Terraform or Azure Resource Manager templates to manage your AKS environment and ensure that the necessary resources for your static error pages are provisioned consistently.

  6. Configuration Management: Use a configuration management tool like Ansible, Puppet, or Chef to handle the configuration of your Sitecore application, including the static error page. This ensures that the configuration is consistent across deployments.

  7. Content Synchronization: Consider implementing a content synchronization mechanism between your Sitecore instances. This can involve using Sitecore's built-in content serialization features or third-party tools that allow you to sync content between different environments.

Ultimately, the goal is to decouple the content, including the static error page, from the ephemeral nature of container instances and ensure that it is managed in a way that persists across deployments. The specific approach you choose will depend on your architecture, deployment process, and familiarity with the different tools and technologies mentioned above. Hope this will help you to pick an approach that could be better to implement in your case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.