-
Notifications
You must be signed in to change notification settings - Fork 431
Add a default rabbitmq.conf file to the image #501
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
Add a default rabbitmq.conf file to the image #501
Conversation
This allows the default user to connect from outside the running container, which has been the case for the 3.8 series, but is not currently the case with the 3.9 rc
I'm not sure providing a default config file is going to be a great experience for users; for example, if they want to add additional configuration to the provided default, they now have to first somehow extract this file from the image/container in order to modify it, and then they become responsible for updating it over time if it ever needs more changes. Additionally, the file provided is 1000 lines of comments for a single line of configuration, and I think it'd be much more effective (here, at least, where users aren't likely to have an interactive editor inside their container when they're inspecting this configuration) to instead just link to the official configuration documentation if users want to set more values or provide additional customization. If this is the route we want to go, I'd love to see the stock default However, I'd reiterate that my preference would be to not provide a file by default, since it gives a much simpler user experience, especially for users who need to provide additional configuration (which is going to be a much larger number of users now, thanks to #424). Given my own naiveté with respect to RabbitMQ (especially secure configurations of RabbitMQ), I'd also suggest that this is a good time to question / discuss whether this is a good / safe default, even in container environments (where users are very, very frequently foot-gunning themselves by exposing their services publicly and not understanding that they've done so / that |
@tianon thanks for your feedback on this. I could easily be persuaded that the contents of
I wouldn't advise this as a default anywhere else but docker, so I would not expect to embed it in the distribution tarball. It's true it is not the most secure choice, but without it I expect many confused users that have encountered documentation for the 3.8 images and cannot connect. The RabbitMQ startup sequence logs the location of the file, so my original though in including the full example was that a user who notices this log line would easily discover it. Very rarely (if ever) do we change rabbitmq configuration options such that once working config will fail to start, so I'm not too worried about users needing to maintain their own version of the file if they customize. However the example will go out of date more easily, and for that reason I'm not at all opposed to the short version. |
This is a great discussion, thanks for kicking it off @pjk25! The first goal is to address the long command that users need to run in the context of My understanding of the issue captured by @pjk25 in #500:
While #467 was the right move - thank you @tianon & @yosifkit for seeing it through - I feel it is important to preserve the same simple user experience by default, as mentioned above. Assuming that we agree on this point, I also think that a single
Do you see the above approach working better in this context too @tianon @yosifkit? For completeness, this is the full manifest that sets up a 3-node RabbitMQ cluster on K8s with rabbitmq/cluster-operator v1.8.0: apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: rabbitmq-1-1
namespace: lre-tanzu-rabbitmq-1-x
spec:
replicas: 3
image: vmware-tanzu-rabbitmq:1.1.1
imagePullSecrets:
- name: dev-tanzu-registry
resources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 2
memory: 4Gi
persistence:
storageClassName: premium-rwo
storage: 100Gi
rabbitmq:
additionalConfig: |
cluster_partition_handling = pause_minority
vm_memory_high_watermark_paging_ratio = 0.99
disk_free_limit.relative = 1.0
additionalPlugins:
- rabbitmq_mqtt
- rabbitmq_stomp |
I hadn't realized that the |
I'm afraid this is a necessary evil. We should add two more links to the comment:
There will be plenty of users who would never read that so perhaps a README note for this image that says that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I would add a commented line which links to the canonical rabbitmq.conf - https://github.com/rabbitmq/rabbitmq-server/blob/v3.9.x/deps/rabbit/docs/rabbitmq.conf.example - but it's not a blocker for merging.
We intend to ship RabbitMQ 3.9.0 final on Friday, 23rd of July and announce it on Monday, 26th of July. Would it be possible to get this change in before then? I'm happy for this to be merged as is if you're happy @tianon @yosifkit. I'll ping tomorrow when the 3.9.0 artefacts are ready for the Docker image to pick them up. Thanks! |
I'm not sure if I've mentioned this in the past, but if it would help to make myself & @michaelklishin maintainers of this repo, we would gladly accept it 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor nits and it needs to be applied to all the generated files.
Oh, and this shouldn't be added to 3.8 -- this should only be added in 3.9+. |
- add newline at end of rabbitmq.conf - drop rhs filename in Dockerfile COPY - drop $conf variable from shell
After this is merged, it would be good to trigger the 3.9.0 final image: https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.9.0 |
fa5366c
to
f138399
Compare
- adjust 3.9 fragments to a single file - use jq template instead of seding the Dockerfile for the COPY
f138399
to
b28920c
Compare
Changes: - docker-library/rabbitmq@499c201: Add "loopback_users" configuration snippet to the 3.9 image (docker-library/rabbitmq#501)
Opened #505 for 3.9.0 GA. 👍 |
Changes: - docker-library/rabbitmq@49bd734: Merge pull request docker-library/rabbitmq#505 from infosiftr/3.9-ga - docker-library/rabbitmq@b07819f: Add 3.9.0 (GA) - docker-library/rabbitmq@499c201: Add "loopback_users" configuration snippet to the 3.9 image (docker-library/rabbitmq#501)
Changes: - docker-library/rabbitmq@56d547f: Update latest to 3.9 - docker-library/rabbitmq@49bd734: Merge pull request docker-library/rabbitmq#505 from infosiftr/3.9-ga - docker-library/rabbitmq@b07819f: Add 3.9.0 (GA) - docker-library/rabbitmq@499c201: Add "loopback_users" configuration snippet to the 3.9 image (docker-library/rabbitmq#501)
This allows the default user to connect from outside the running container, which has been the case for the 3.8 series, but is not currently the case with the 3.9 rc.
Intended to address #500