Closed mahgo closed 2 years ago
Hi @mahgo,
you can use an extraEnvVarsCM
with a script to connect to airflow. You have a little information about this in the README.md.
Can this solve your problem?
Hi @Mauraza,
Thanks - which environment variable/s do I need to use from there for Redis? In case it matters, I'll also be using Varnish for full-page cache.
Hi @mahgo,
for adding support to Redis you'd need to specify MAGENTO_EXTRA_INSTALL_ARGS
(i.e. via --set magentoExtraInstallArgs
) to an appropriate value. In this issue, you can find an example of the required flags: https://github.com/bitnami/bitnami-docker-magento/issues/165#issue-726598549
I hope that helps you.
Is something like this right?
--set magentoExtraInstallArgs="--cache-backend=redis --cache-backend-redis-server=redis-cluster"
I've tried using the following: --set magentoExtraInstallArgs="--cache-backend=redis --cache-backend-redis-server=redis-cluster --cache-backend-redis-password={password}"
but I get the following error in the logs:
Enabling caches:
In Cache.php line 209:
Error cleaning cache by mode matchingTag: CROSSSLOT Keys in request don't hash to the same slot
In Client.php line 1299:
CROSSSLOT Keys in request don't hash to the same slot
I'm using this redis chart: https://github.com/bitnami/charts/tree/master/bitnami/redis-cluster
Hi @mahgo,
I think this could be related to this https://stackoverflow.com/questions/38042629/redis-cross-slot-error. Could you check it?
Hi @Mauraza,
What particular in that should I check? Redis is new to me, and a lot of that is going over my head. I've just created a Redis cluster from that helm chart and am trying to connect it to Magento.
Hi @mahgo,
What values to deploy Redis are you using? Maybe this page will be helpful https://aws.amazon.com/premiumsupport/knowledge-center/elasticache-crossslot-keys-error-redis/
Hi @Mauraza,
Right now I believe I am just calling it like helm install redis-cluster bitnami/redis-cluster
Are there some required values that I need to set?
Thanks!
Hi @mahgo,
What values to deploy Magento? Do you have this line https://github.com/bitnami/charts/blob/master/bitnami/magento/templates/deployment.yaml#L164 in your deployment of magento?
Hi @Mauraza
Here's how my magento values are looking (with various variables omitted):
helm install magento bitnami/magento \
--set mariadb.enabled=false \
--set externalDatabase.host={host} \
--set externalDatabase.user={user} \
--set externalDatabase.password={password} \
--set externalDatabase.database={database} \
--set ingress.enabled=true \
--set ingress.tls=true \
--set ingress.hostname={hostname} \
--set ingress.annotations."nginx\.ingress\.kubernetes\.io/proxy-buffer-size"=\"16k\" \
--set ingress.annotations."cert-manager\.io/issuer"=\"letsencrypt-prod\" \
--set extraEnvVars[0].name=MYSQL_CLIENT_ENABLE_SSL \
--set extraEnvVars[0].value=yes \
--set service.port=443 \
--set magentoUseSecureAdmin=true \
--set magentoExtraInstallArgs="--cache-backend=redis --cache-backend-redis-server={redis} --cache-backend-redis-password={redis-password}"
Hi @mahgo,
Could you try with the redis
chart instead of the redis-cluster
?
Hi @Mauraza
Thanks for that suggestion. I've tried that and it seems to be working. I've set --cache-backend-redis-server to be redis-master (where the name of the release is "redis"), just to confirm, is this correct?
Can you also please point me in the direction of the extra steps required to use redis-cluster instead? Thanks!
Hi @mahgo,
In these link appears:
In a cluster topology, the keyspace is divided into hash slots. Different nodes will hold a subset of hash slots.
The topology of redis and redis-cluster are different.
Did you check the link of this comment https://github.com/bitnami/charts/issues/6447#issuecomment-849414607?
Hi @Mauraza,
Thanks, yeah I'm starting to understand that they are different.
In the link you sent, the first solution mentioned using a client which provides support for "Redis (cluster mode enabled) clusters". Does Magento have this? Is there a setting in the chart/environment variable I need to turn on for this?
Hi @mahgo,
I'm going to create an internal task to investigate this. We will update the thread when we have more information.
Thanks @Mauraza!
Hi, unfortunately, if the issue is not solved in recent versions means the task is still on our backlog and there are no plans to work on it in the short/middle term.
In the same way, please, note the Bitnami team is not actively working on new features/improvements nor providing support through GitHub Issues for this Helm Chart since this asset was marked as a “Community supported solution”.
At this point, the best option to fix any issue or add a new feature is to contribute by creating a PR; the Bitnami team will be happy to review it and provide feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Which chart: Magento
Describe the solution you'd like It would be good to connect Magento to a Redis setup when installing the chart.
Information about setting up Redis with Magento can be found here https://devdocs.magento.com/guides/v2.4/config-guide/redis/redis-pg-cache.html