Page MenuHomeDevCentral

WIP: Configure RabbitMQ credentials from Vault
ClosedPublic

Authored by dereckson on Feb 9 2023, 23:19.
Tags
None
Referenced Files
F4033621: D2792.diff
Tue, Jan 21, 11:50
F4033217: D2792.diff
Tue, Jan 21, 09:45
F4032516: D2792.id7097.diff
Tue, Jan 21, 07:25
F4026684: D2792.diff
Mon, Jan 20, 15:40
Unknown Object (File)
Sun, Jan 19, 16:16
Unknown Object (File)
Sun, Jan 19, 06:08
Unknown Object (File)
Sat, Jan 18, 00:21
Unknown Object (File)
Sun, Jan 12, 12:44
Subscribers
None

Details

Summary

RabbitMQ clusters need the following important credentials:

  • Erlang cookie, to allow cluster components to communicate
  • An administrator account to allow maintenance tasks

Both are stored in Vault, cookie can be set in host data volume,
administrator account is set when container is initialized.
A file-as-flag is then created to indicate that's part is done.

References:

Ref T752

Test Plan

Provision white-rabbit on docker-002

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson retitled this revision from Configure RabbitMQ credentials from Vault to WIP: Configure RabbitMQ credentials from Vault.Feb 10 2023, 01:27
dereckson added inline comments.
roles/paas-docker/containers/rabbitmq.sls
67

Switching do cmd.script, and wait 20 seconds RabbitMQ started:

docker logs white-rabbit
2023-02-10 00:28:41.201991+00:00 [info] <0.491.0> Server startup complete; 7 plugins started.
2023-02-10 00:28:41.201991+00:00 [info] <0.491.0>  * rabbitmq_prometheus
2023-02-10 00:28:41.201991+00:00 [info] <0.491.0>  * rabbitmq_mqtt
2023-02-10 00:28:41.201991+00:00 [info] <0.491.0>  * rabbitmq_web_stomp
2023-02-10 00:28:41.201991+00:00 [info] <0.491.0>  * rabbitmq_stomp
2023-02-10 00:28:41.201991+00:00 [info] <0.491.0>  * rabbitmq_management
2023-02-10 00:28:41.201991+00:00 [info] <0.491.0>  * rabbitmq_web_dispatch
2023-02-10 00:28:41.201991+00:00 [info] <0.491.0>  * rabbitmq_management_agent
2023-02-10 00:28:58.228618+00:00 [info] <0.678.0> Created user 'root'
2023-02-10 00:28:58.279681+00:00 [info] <0.685.0> Successfully set user tags for user 'root' to [administrator]

How to properly escape password is still to determine, yaml_squote doesn't give correct result.

Rebased against docker-001 config. Ready to review.

Works correctly on docker-002 for white-rabbit container.

This revision is now accepted and ready to land.Feb 20 2023, 23:30