Skip to content

Commit d3817d5

Browse files
committed
docs/rabbitmq: Add nodes on creating users better magento2 config
1 parent f7d5123 commit d3817d5

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

docs/best-practices/database/how-to-run-rabbitmq-on-hypernode.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You can run this command to restart RabbitMQ:
5555
hypernode-servicectl restart rabbitmq-server
5656
```
5757

58-
## Accessing RabbitMQ
58+
## Accessing the RabbitMQ admin interface
5959

6060
- RabbitMQ only binds on localhost
6161
- The default admin account is username `guest` and password `guest`. You can change and add users via the admin interface.
@@ -67,22 +67,29 @@ Use your browser to go to `localhost:55672` and logon using guest/guest.
6767

6868
Another way to access the admin interface is via [hypernode-vpn](https://changelog.hypernode.com/changelog/release-6064-rabbitmq-can-be-accessed-via-the-hypernode-vpn/)
6969

70-
## RabbitMQ and Magento
71-
72-
You need to make some changes in Magento in order to use RabbitMQ. For example in `/data/web/magento2/app/etc/env.php`:
73-
74-
```php
75-
'queue' =>
76-
array (
77-
'amqp' =>
78-
array (
79-
'host' => 'rabbitmqmaster',
80-
'port' => '5672',
81-
'user' => 'guest',
82-
'password' => 'guest',
83-
'virtualhost' => '/',
84-
),
85-
),
70+
## Creating RabbitMQ users
71+
72+
You can also create your own RabbitMQ users. This can be done by in the RabbitMQ admin interface, as follows:
73+
74+
1. Go to the RabbitMQ admin interface
75+
2. Click on the `Admin` tab
76+
3. Click on `Add a user`
77+
4. Fill in the username and password
78+
5. Click on `Add user`
79+
6. Click on the user you just created
80+
7. Click on `Set permission`
81+
82+
## RabbitMQ and Magento 2
83+
84+
To configure RabbitMQ in Magento 2, you can run the following command:
85+
86+
```bash
87+
bin/magento setup:config:set \
88+
--amqp-host="rabbitmqmaster" \
89+
--amqp-port="5672" \
90+
--amqp-user="guest" \
91+
--amqp-password="guest" \
92+
--amqp-virtualhost="/"
8693
```
8794

8895
Note: Hypernode provisions a non-default user called `hypernode-admin` but you are free to create new users.

0 commit comments

Comments
 (0)