bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.83k stars 9.12k forks source link

RabbitMq extraPlugins #2985

Closed ramzes13 closed 4 years ago

ramzes13 commented 4 years ago

Which chart: name: rabbitmq version: 7.3.3

Describe the bug I want to install prometheus_rabbitmq_exporter plugin, this plugin depends on:

accept-0.3.5.ez
prometheus-4.3.0.ez
prometheus_cowboy-0.1.7.ez
prometheus_httpd-2.1.10.ez
prometheus_process_collector-1.4.3.ez
prometheus_rabbitmq_exporter-3.7.9.1.ez

see here

from README:

customPlugins="http://some-public-url/my-custom-plugin-X.Y.Z.ez"
extraPlugins="my-custom-plugin"

To Reproduce Steps to reproduce the behavior:

extraPlugins: 'prometheus_rabbitmq_exporter'
customPlugins: "https://github.com/deadtrickster/prometheus_rabbitmq_exporter/releases/download/v3.7.9.1/prometheus_rabbitmq_exporter-3.7.9.1.ez"

After deploy with this config:

I have no name!@rabbitmq-0:/opt/bitnami/rabbitmq/plugins$ rabbitmq-plugins list
Listing plugins with pattern ".*" ...
WARNING - plugins currently enabled but missing: prometheus_rabbitmq_exporter

 Configured: E = explicitly enabled; e = implicitly enabled
 | Status: * = running on rabbit@rabbitmq-0.rabbitmq-headless.app-system.svc.cluster.local
 |/
[  ] rabbitmq_amqp1_0                  3.8.5
[  ] rabbitmq_auth_backend_cache       3.8.5
[  ] rabbitmq_auth_backend_http        3.8.5
[  ] rabbitmq_auth_backend_ldap        3.8.5
[  ] rabbitmq_auth_backend_oauth2      3.8.5
[  ] rabbitmq_auth_mechanism_ssl       3.8.5
[  ] rabbitmq_consistent_hash_exchange 3.8.5
[  ] rabbitmq_event_exchange           3.8.5
[  ] rabbitmq_federation               3.8.5
[  ] rabbitmq_federation_management    3.8.5
[  ] rabbitmq_jms_topic_exchange       3.8.5
[E*] rabbitmq_management               3.8.5
[e*] rabbitmq_management_agent         3.8.5
[  ] rabbitmq_mqtt                     3.8.5
[  ] rabbitmq_peer_discovery_aws       3.8.5
[e*] rabbitmq_peer_discovery_common    3.8.5
[  ] rabbitmq_peer_discovery_consul    3.8.5
[  ] rabbitmq_peer_discovery_etcd      3.8.5
[E*] rabbitmq_peer_discovery_k8s       3.8.5
[E*] rabbitmq_prometheus               3.8.5
[  ] rabbitmq_random_exchange          3.8.5
[  ] rabbitmq_recent_history_exchange  3.8.5
[  ] rabbitmq_sharding                 3.8.5
[  ] rabbitmq_shovel                   3.8.5
[  ] rabbitmq_shovel_management        3.8.5
[  ] rabbitmq_stomp                    3.8.5
[  ] rabbitmq_top                      3.8.5
[  ] rabbitmq_tracing                  3.8.5
[  ] rabbitmq_trust_store              3.8.5
[e*] rabbitmq_web_dispatch             3.8.5
[  ] rabbitmq_web_mqtt                 3.8.5
[  ] rabbitmq_web_mqtt_examples        3.8.5
[  ] rabbitmq_web_stomp                3.8.5
[  ] rabbitmq_web_stomp_examples       3.8.5

Expected behavior prometheus_rabbitmq_exporter will be installed

Version of Helm and Kubernetes:

version.BuildInfo{Version:"v3.2.1", GitCommit:"fe51cd1e31e6a202cba7dead9552a6d418ded79a", GitTreeState:"clean", GoVersion:"go1.13.10"}
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.5", GitCommit:"e0fccafd69541e3750d460ba0f9743b90336f24f", GitTreeState:"clean", BuildDate:"2020-04-16T11:35:47Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
andresbono commented 4 years ago

Hi @ramzes13, thanks for reporting this issue. I see two problems here:

1) Could you please use communityPlugins instead of customPlugins? See the values.yaml:

https://github.com/bitnami/charts/blob/36a663607aa4929a294bf547da583ce2edc64ec8/bitnami/rabbitmq/values.yaml#L119-L122

The README needs to be updated.

2) The link that you are indicating has a redirection to the final asset. The current implementation to download plugins doesn't follow redirections:

https://github.com/bitnami/bitnami-docker-rabbitmq/blob/2a10f5609ea89737f9f8947c3520ec5b6711a0f1/3.8/debian-10/rootfs/opt/bitnami/scripts/librabbitmq.sh#L239

        curl --remote-name --silent "$plugin"

We will work on fixing this.

andresbono commented 4 years ago

Related: https://github.com/bitnami/bitnami-docker-rabbitmq/issues/126

ramzes13 commented 4 years ago

Hello @andresbono, thanks for quick reply,

I tried with communityPlugins and it worked after I uploaded the plugin archives on separated file storage.

One thing to remark, If you want to clone multiple plugins, they must be listed in one string, separated by space

communityPlugins: "https://hostname.com/prometheus_rabbitmq_exporter-3.7.9.1.ez https://hostname.com/prometheus_httpd-2.1.10.ez https://hostname.com/prometheus_cowboy-0.1.7.ez"
andresbono commented 4 years ago

Thanks for confirming it, @ramzes13. We have fixed the issue with:

In case you want to update your deployment once the PR is merged.