vault backup: 2024-08-20 13:52:07

This commit is contained in:
Struchkov Mark 2024-08-20 13:52:07 +03:00
parent b2eb56ac7c
commit f678db23a0
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C
4 changed files with 42 additions and 10 deletions

View File

@ -25,7 +25,7 @@
"recentFilesStore": [
{
"filepath": "_inbox/Кластер RabbitMQ.md",
"timestamp": 1724149751131
"timestamp": 1724151081888
},
{
"filepath": "_inbox/00 RabbitMQ.md",
@ -38,10 +38,6 @@
{
"filepath": "Home.md",
"timestamp": 1724137322406
},
{
"filepath": "_inbox/Уроки от English Galaxy.md",
"timestamp": 1724137321122
}
],
"bookmarkedFileStore": [],

View File

@ -195,10 +195,6 @@
{
"basename": "Вопросы работодателю",
"path": "notes/Собеседования/Вопросы работодателю.md"
},
{
"basename": "Собеседование на работу с HR",
"path": "_inbox/Собеседование на работу с HR.md"
}
],
"omittedPaths": [],

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -7,7 +7,47 @@ zero-link:
parents:
linked:
---
![](Pasted%20image%2020240820133224.png)
```
docker run -itd -p 5672:5672 -p 15672:15672 --name rabbit rabbitmq:3-management
```
```
docker exec -it rabbit bash
```
```
docker network create cluster-network
```
```
docker run -d --hostname node1.rabbit --net cluster-network --name rabbitNode1 --add-host node2.rabbit:172.24.0.3 -p "15673:15672" -e "RABBITMQ_USE_LONGNAME=true" -e RABBITMQ_ERLANG_COOKIE="cookie" rabbitmq:3-management
```
```
docker run -d --hostname node2.rabbit --net cluster-network --name rabbitNode2 --add-host node1.rabbit:172.24.0.2 -p "15674:15672" -e "RABBITMQ_USE_LONGNAME=true" -e RABBITMQ_ERLANG_COOKIE="cookie" rabbitmq:3-management
```
6. docker exec -it rabbitNode1 bash
7. rabbitmqctl stop_app
8. rabbitmqctl join_cluster rabbit@node2.rabbit
9. rabbitmqctl start_app
10. cd kafka-test
11. docker-compose up -d
12. docker exec -it kafka-test-kafka-1 bash
13. kafka-topics --bootstrap-server localhost:9092 --topic test --create
14. kafka-topics --bootstrap-server localhost:9092 --list
15. kafka-console-consumer --bootstrap-server localhost:9092 --topic test
16. kafka-console-producer --bootstrap-server localhost:9092 --topic test
Синхронизировать через файл `/var/lib/rabbitmq/.erlang.cookie`
```