Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENDOC-660 make same edits for redis on 7.1 #707

Merged
merged 1 commit into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vuepress/docs/.vuepress/v71.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ module.exports = {
path: path + 'consume/accessibility.md'
},
{
title: 'Caching and Clustering',
path: path + 'consume/caching-and-clustering.md'
title: 'High Availability',
path: path + 'consume/high-avail-application.md'
},
{
title: 'Cluster Resource Limits',
Expand Down Expand Up @@ -426,7 +426,7 @@ module.exports = {
{
title: 'Consume an Application',
children: [
path + 'consume/caching-and-clustering.md',
path + 'consume/high-avail-tutorial.md',
path + 'consume/external-id-management.md',
path + 'consume/entando-operator.md',
path + 'consume/invoking-api.md'
Expand Down
4 changes: 2 additions & 2 deletions vuepress/docs/next/tutorials/consume/high-avail-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ kubectl get ingress -n YOUR-NAMESPACE
```
kubectl delete YOUR-POD-NAME -n YOUR-NAMESPACE
```
- There are other ways to do this. You could also shell into the server-container and manually kill the running app process with `kill -9 357`.
- If you want to test at the hardware level, you could manually terminate a node in your cluster (ensuring that the pods are scheduled to different nodes).
- There are other ways to do this. You could also shell into the server-container and manually kill the running app process with `kill -9 357`.
- If you want to test at the hardware level, you could manually terminate a node in your cluster (ensuring that the pods are scheduled to different nodes).
6. In your private/incognito browser window, open the URL to your `entando-de-app`.
7. Check that the application continues to render while the pod you deleted is no longer present.
8. Wait for Kubernetes to restore your deleted pod.
Expand Down
2 changes: 1 addition & 1 deletion vuepress/docs/v7.1/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ In the development lifecycle of an application, Consume is the execution stage w

| Documentation | Tutorials |
| :------------ | :-------- |
| [Accessibility](./consume/accessibility.md) | [Caching and Clustering](../tutorials/consume/caching-and-clustering.md) |
| [Accessibility](./consume/accessibility.md) | [High Availability on Entando](../tutorials/consume/high-avail-tutorial.md) |
| [Entando Operator](./consume/operator-intro.md) | [Add API Claim](../tutorials/create/ms/add-api-claim.md) |
| [Entando APIs](./consume/entando-apis.md) | [Invoke Entando core APIs](../tutorials/consume/invoking-api.md) |
| [Entando Identity Management System](./consume/identity-management.md) | [External Identity Management System](../tutorials/consume/external-id-management.md) |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
# Caching and Clustering in an Entando Application
---
sidebarDepth: 2
---
# High Availability in an Entando Application

## App Engine Clustering and High Availability

The Entando App Engine can be deployed as a clustered set of instances using the clustering and replication ability of Kubernetes. It is backed by a shared cache with two default choices for implementation.
The Entando App Engine can be deployed as a clustered set of instances using the clustering and replication ability of Kubernetes. It is backed by a shared cache with two default choices for implementation.

This guide demonstrates how to configure and test a clustered instance of the Entando App Engine.
This document examines the issues to consider when creating highly availailable clusters of the Entando App Engine.

Microservices clustering that adds functionality to an Entando Application is different from clustering used by the Entando App Engine. Microservices rely on a custom clustering configuration and setup based on implementation and selections made during their creation. Refer to documentation addressing [clustered microservices and caching implementation](../../tutorials/consume/caching-and-clustering.md) for configuration and deployment details.
Microservices clustering that adds functionality to an Entando Application is different from clustering used by the Entando App Engine. Microservices rely on a custom clustering configuration and setup based on implementation and selections made during their creation. Refer to documentation addressing [clustered microservices and caching implementation](../../tutorials/consume/high-avail-tutorial.md) for configuration and deployment details.

## Storage Requirements for Clustered Entando Applications

To scale an Entando Application across multiple nodes, a storage class that supports a `ReadWriteMany` access policy must be created. There are a number of ways to accomplish this, inclusive of dedicated storage providers such as GlusterFS. Cloud Kubernetes providers also offer clustered storage options specific to their implementation, such as Google Cloud File in GKE or Azure Files in AKS.

Two different storage classes can be used for clustered vs. non-clustered storage if the default class doesn't support `ReadWriteMany`. Add the following properties to the operator ConfigMap:

```
entando.k8s.operator.default.clustered.storage.class: "[clustered RWX storage class]"
entando.k8s.operator.default.non.clustered.storage.class: "[RWO storage class]"
```

Set both values to the storage class appropriate to the configuration.

::: tip
To scale an Entando Application without the use of clustered storage assumes all instances are scheduled to a single node and requires a `ReadWriteOnce (RWO)` policy in conjunction with taints on other nodes. Understanding the pros and cons of same-node scheduling is critical for node resource optimization and application recovery should the instance become unreachable. Note that if the node quits or is shut down, the application will be unavailable until Kubernetes reschedules the pods to an alternate node.
Expand All @@ -29,7 +20,7 @@ To scale an Entando Application without the use of clustered storage assumes all

### Data Management

At startup, the Entando App Engine will load all database data into the shared cache. Applicable content will be served from the cache when a page is rendered or content is fetched. In the event of a write to the cache, both the cache and database will be updated.
At startup, the Entando App Engine loads all database data into the shared cache. Applicable content is served from the cache when a page is rendered or content is fetched. In the event of a write to the cache, both the cache and database will be updated.

The following objects are cached in the base implementation of the Entando App Engine:

Expand All @@ -48,13 +39,13 @@ The following objects are cached in the base implementation of the Entando App E

## Redis Implementation

An Entando Application can be configured to utilize an external [Redis](https://redis.io/) cache. In a Redis implementation of an Entando Application, the cache is deployed independently of the Entando App Engine and the Entando App Engine is configured to connect to the deployed instance.
An Entando Application can be configured to utilize an external [Redis](https://redis.io/) cache. In a Redis implementation of an Entando Application, the cache is deployed independently of the Entando App Engine and the App Engine is configured to connect to the deployed instance.

![Redis Caching](./img/redis-caching.png)

The Redis cache is not deployed by the Entando Operator and must be managed by a DevOps team member or Kubernetes cluster administrator.

[Check out the Caching and Clustering tutorial](../../tutorials/consume/caching-and-clustering.md#configuring-and-deploying-with-redis) for more information and step-by-step instructions to use a Redis cache in an Entando Application.
Check out the [High Availability on Entando tutorial](../../tutorials/consume/high-avail-tutorial.md#configuring-and-deploying-with-redis) for more information and step-by-step instructions to use a Redis cache in an Entando Application.

## Performance

Expand All @@ -69,3 +60,4 @@ It is generally recommended that performance testing on clustered instances corr
### Cache Management

When a new replica of an Entando Application joins a cluster of applications, the cache is replicated to that node. If the cache is relatively large or the network is slow, this may add to the total startup time of the new instance. Existing instances will continue to function.

4 changes: 2 additions & 2 deletions vuepress/docs/v7.1/docs/reference/entandoapp-cr.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebarDepth: 2
# EntandoApp Custom Resource
The EntandoApp CR is the deployment of a Docker image that hosts the Entando and Java-based web application. Server-side components include the Entando App Engine, Entando Component Manager, Entando App Builder, and the user-facing application.

Entando offers standard WildFly or EAP images for the definition, but typically customers provide their own CRD.
Entando offers standard WildFly, EAP, or Tomcat images for the definition, but typically, customers provide their own CRD

## Example EntandoApp

Expand Down Expand Up @@ -38,6 +38,6 @@ spec:
|`spec.replicas`| The number of replicas to be made available on the deployment.|
|`spec.resourceRequirements`| The minimum and maximum [resource allocation](../reference/custom-resources.md#general-resourcerequirements-specifications) for the Entando App Engine container.|
|`spec.serviceAccountToUse`| The Kubernetes service account in the namespace of the EntandoApp used for the pods hosting the EntandoApps. The default is 'default'.|
|`spec.standardServerImage`| Either a `wildfly` or `eap` image. This property and the `spec.customServerImage` are mutually exclusive. Refer to the [Docker image section](https://github.com/entando-k8s/entando-k8s-controller-coordinator/blob/master/charts/entando-k8s-controller-coordinator/README.md#how-it-resolves-docker-images) to determine how the Docker registry and versions are calculated.|
|`spec.standardServerImage`| Either a `wildfly`,`eap`, or `tomcat` image. This property and the `spec.customServerImage` are mutually exclusive. Refer to the [Docker image section](https://github.com/entando-k8s/entando-k8s-controller-coordinator/blob/master/charts/entando-k8s-controller-coordinator/README.md#how-it-resolves-docker-images) to see how the Docker registry and versions are calculated.|
|`spec.storageClass` | Name of the StorageClass to use for PersistentVolumeClaims created for this EntandoApp. For more information, go to [Kubernetes explanation of storage classes](https://kubernetes.io/docs/concepts/storage/storage-classes/).|
|`spec.tlsSecretName` | The name of a standard Kubernetes [TLS Secret](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) that will be used for the resulting ingress. This is only required if the [globally configured TLS Secret](https://github.com/entando-k8s/entando-k8s-controller-coordinator/blob/master/charts/entando-k8s-controller-coordinator/README.md#tls) for the operator is absent. |
2 changes: 1 addition & 1 deletion vuepress/docs/v7.1/tutorials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ table th:nth-of-type(3) {
| [Set Up Entando on Amazon Elastic Kubernetes Service (EKS)](./getting-started/eks-install.md) | [Connect Your Entando Application to an External Database](./devops/external-db.md) | [Install Bundle Microservices from a Private Registry](./curate/ms-private-images.md)
| [Set Up Entando on Azure Kubernetes Service (AKS)](./getting-started/azure-install.md) | [Install the Standard Demo Application](./solution/install-standard-demo.md) | [Add a GitHub Actions CI Workflow](./create/pb/github-actions-workflow.md)
| [Set Up Entando on Google Kubernetes Engine (GKE)](./getting-started/gke-install.md) | [Configure the Entando Operator](./consume/entando-operator.md) | [Manage NGINX](./devops/manage-nginx.md)
| [Set Up Entando on Red Hat OpenShift](./getting-started/openshift-install.md) | | [Set Up Plugin Profiles](./devops/plugin-configuration.md) |
| [Set Up Entando on Red Hat OpenShift](./getting-started/openshift-install.md) | [High Availability on Entando](./consume/high-avail-tutorial.md) | [Set Up Plugin Profiles](./devops/plugin-configuration.md) |
| [Entando Installation on Kubernetes](./getting-started/kubernetes-install.md) | | |
| [Entando CLI Reference](../docs/getting-started/entando-cli.md) | |

Expand Down
Loading