Skip to content

Add ability to customize product name, version & banner #2247

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

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

dumbbell
Copy link
Collaborator

@dumbbell dumbbell commented Feb 17, 2020

To override the product name (defaulting to "RabbitMQ"):

  • set the $RABBITMQ_PRODUCT_NAME environment variable, or
  • set the rabbit application product_name variable.

To override the product version:

  • set the $RABBITMQ_PRODUCT_VERSION environment variable, or
  • set the rabbit application product_version variable.

To add content to the banner (both the copy logged and the one printed to stdout), indicate the filename which contains it, à la /etc/motd using:

  • the $RABBITMQ_MOTD_FILE environment variable, or
  • the rabbit application motd_file variable.

The default motd file is /etc/rabbitmq/motd on Unix and %APPDATA%\RabbitMQ\motd.txt on Windows.

Here is an example of the printed banner with name, version & motd configured:

  ##  ##      WeatherMQ 1.2.3
  ##  ##
  ##########  Copyright (c) 2007-2020 Pivotal Software, Inc.
  ######  ##
  ##########  Licensed under the MPL 1.1. Website: https://rabbitmq.com

  This is an example of a RabbitMQ message of the day.

  The message is written in Paris, France.    \  /
  It is partly cloudy outside, with a       _ /"".-.
  temperature of 12°C. Wind is around         \_(   ).
  30-40 km/h, from south-west.                /(___(__)

  Doc guides: https://rabbitmq.com/documentation.html
  Support:    https://rabbitmq.com/contact.html
  Tutorials:  https://rabbitmq.com/getstarted.html
  Monitoring: https://rabbitmq.com/monitoring.html

  Logs: /tmp/rabbitmq-test-instances/rabbit/log/rabbit@cassini.log
        /tmp/rabbitmq-test-instances/rabbit/log/rabbit@cassini_upgrade.log

  Config file(s): /tmp/rabbitmq-test-instances/test.config

  Starting broker... completed with 0 plugins.

New APIS are available to query those product informations and use them in e.g. plugins such as the management API/UI:

  • rabbit:product_info/0
  • rabbit:product_name/0
  • rabbit:product_version/0
  • rabbit:motd_file/0
  • rabbit:motd/0

Depends on rabbitmq/rabbitmq-common#356.

@dumbbell dumbbell requested a review from gerhard February 17, 2020 11:41
Copy link
Contributor

@gerhard gerhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the MOTD and appreciate the persistent term caching.

A few minor changes required before it gets my blessing.

Looks 90% there!

@dumbbell dumbbell force-pushed the support-configurable-product-name-and-banner branch from 78e298f to 2b21689 Compare February 20, 2020 10:14
@gerhard
Copy link
Contributor

gerhard commented Feb 20, 2020

Ready to merge from my POV, not sure if you wanted to do anything else before changing it from WIP to RTM (Ready to Merge).

@dumbbell
Copy link
Collaborator Author

I just want to move the environment variables handling in rabbit_env as said in the TODO, then I will mark it as ready.

@dumbbell dumbbell force-pushed the support-configurable-product-name-and-banner branch 3 times, most recently from ff2a4f2 to f826672 Compare February 20, 2020 12:58
@dumbbell dumbbell force-pushed the support-configurable-product-name-and-banner branch from f826672 to 625ea1c Compare February 20, 2020 14:37
@dumbbell dumbbell marked this pull request as ready for review February 20, 2020 14:37
@dumbbell dumbbell force-pushed the support-configurable-product-name-and-banner branch from 625ea1c to 7943129 Compare February 20, 2020 16:42
@dumbbell dumbbell changed the title Add ability to customize product name, version & banner [WIP] Add ability to customize product name, version & banner Feb 20, 2020
@dumbbell dumbbell force-pushed the support-configurable-product-name-and-banner branch from 7943129 to 54d558c Compare February 20, 2020 17:39
gerhard added a commit to rabbitmq/rabbitmq-web-dispatch that referenced this pull request Feb 20, 2020
Rather than using rabbit:product_name/0 here, it was easier to just
remove RabbitMQ from this context - this word doesn't make this warning
message any clearer, so it's easier to just remove it.

re rabbitmq/rabbitmq-server#2247

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
gerhard added a commit to rabbitmq/rabbitmq-web-dispatch that referenced this pull request Feb 20, 2020
Rather than using rabbit:product_name/0 here, it was easier to just
remove RabbitMQ from this context - this word doesn't make this warning
message any clearer, so it's easier to just remove it.

re rabbitmq/rabbitmq-server#2247

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
(cherry picked from commit 041497c)
@gerhard gerhard added this to the 3.8.3 milestone Feb 20, 2020
@dumbbell dumbbell force-pushed the support-configurable-product-name-and-banner branch from bc283ec to 47e9f9c Compare February 20, 2020 18:35
To override the product name (defaulting to "RabbitMQ"):
* set the `$RABBITMQ_PRODUCT_NAME` environment variable, or
* set the `rabbit` application `product_name` variable.

To override the product version:
* set the `$RABBITMQ_PRODUCT_VERSION` environment variable, or
* set the `rabbit` application `product_version` variable.

To add content to the banner (both the copy logged and the one printed
to stdout), indicate the filename which contains it, à la `/etc/motd`
using:
* the `$RABBITMQ_MOTD_FILE` environment variable, or
* the `rabbit` application `motd_file` variable.

The default motd file is `/etc/rabbitmq/motd` on Unix and
`%APPDATA%\RabbitMQ\motd.txt` on Windows.

Here is an example of the printed banner with name, version & motd
configured:

      ##  ##      WeatherMQ 1.2.3
      ##  ##
      ##########  Copyright (c) 2007-2020 Pivotal Software, Inc.
      ######  ##
      ##########  Licensed under the MPL 1.1. Website: https://rabbitmq.com

      This is an example of a RabbitMQ message of the day.

      The message is written in Paris, France.    \  /
      It is partly cloudy outside, with a       _ /"".-.
      temperature of 12°C. Wind is around         \_(   ).
      30-40 km/h, from south-west.                /(___(__)

      Doc guides: https://rabbitmq.com/documentation.html
      Support:    https://rabbitmq.com/contact.html
      Tutorials:  https://rabbitmq.com/getstarted.html
      Monitoring: https://rabbitmq.com/monitoring.html

      Logs: /tmp/rabbitmq-test-instances/rabbit/log/rabbit@cassini.log
            /tmp/rabbitmq-test-instances/rabbit/log/rabbit@cassini_upgrade.log

      Config file(s): /tmp/rabbitmq-test-instances/test.config

      Starting broker... completed with 0 plugins.

New APIS are available to query those product informations and use them
in e.g. plugins such as the management API/UI:
* rabbit:product_info/0
* rabbit:product_name/0
* rabbit:product_version/0
* rabbit:motd_file/0
* rabbit:motd/0

[#170054940]
@dumbbell dumbbell force-pushed the support-configurable-product-name-and-banner branch from 47e9f9c to 8d5cf5e Compare February 20, 2020 18:39
Copy link
Contributor

@gerhard gerhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@gerhard gerhard merged commit 227e694 into master Feb 20, 2020
@gerhard gerhard deleted the support-configurable-product-name-and-banner branch February 20, 2020 18:41
@dumbbell dumbbell modified the milestones: 3.8.3, 3.9.0 Feb 20, 2020
HoloRin pushed a commit to rabbitmq/rabbitmq-monorepo that referenced this pull request Sep 9, 2020
Rather than using rabbit:product_name/0 here, it was easier to just
remove RabbitMQ from this context - this word doesn't make this warning
message any clearer, so it's easier to just remove it.

re rabbitmq/rabbitmq-server#2247

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
(cherry picked from commit b37e65c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants