Skip to content

Add ability to customize product name, version & banner [v3.8.x] #2250

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

Conversation

dumbbell
Copy link
Collaborator

This the equivalent of #2247 for v3.8.x.

@dumbbell dumbbell requested a review from gerhard February 20, 2020 20:59
@dumbbell dumbbell added this to the 3.8.3 milestone Feb 20, 2020
@gerhard gerhard modified the milestones: 3.8.3, 3.8.4 Feb 23, 2020
@gerhard
Copy link
Contributor

gerhard commented Feb 23, 2020

Since this got merged, test-package-windows-on-windows-server-2012 job started failing consistently. Even if the failure may not be related to this merge, we want to address it before we continue with this back-port.

Deferring this to v3.8.4 so that investigating & fixing the CI failure doesn't block the release of v3.8.3.

@dumbbell
Copy link
Collaborator Author

dumbbell commented Feb 24, 2020

Using os:set_signal/2 on Windows was indeed the cause of the failure in CI. This has been fixed in master and this patch was updated accordingly.

@dumbbell
Copy link
Collaborator Author

dumbbell commented Feb 24, 2020

CI is happy again!

@dumbbell dumbbell changed the title Add ability to customize product name, version & banner Add ability to customize product name, version & banner [v3.8.x] Feb 29, 2020
@dumbbell
Copy link
Collaborator Author

I will update the patch with the recently written testsuite.

dumbbell added 2 commits March 3, 2020 11:44
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]

(cherry picked from commit 8d5cf5e)
@dumbbell dumbbell force-pushed the support-configurable-product-name-and-banner-v3.8.x branch from c28a401 to 58deeb2 Compare March 3, 2020 10:58
@dumbbell dumbbell merged commit b2b0f5f into v3.8.x Mar 3, 2020
@dumbbell dumbbell deleted the support-configurable-product-name-and-banner-v3.8.x branch March 3, 2020 11:19
@gerhard gerhard modified the milestones: 3.8.4, 3.8.3 Mar 5, 2020
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.

2 participants