Skip to content
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

nats main and leaf setup with context #4

Closed
wants to merge 2 commits into from
Closed

Conversation

gedw99
Copy link

@gedw99 gedw99 commented Nov 27, 2023

for Issue: #3

Adds makefile scaffolding for NATS and NATS leaf servers with context.

Adds cross platform installers.

@gedw99 gedw99 changed the title nats maina nd leaf setup with context nats main and leaf setup with context Nov 27, 2023
@samber
Copy link
Owner

samber commented Nov 27, 2023

Why not just docker-compose up ?

@gedw99
Copy link
Author

gedw99 commented Nov 27, 2023

Why not just docker-compose up ?

I think it's useful to have the docker too. For NATS Leafs most people don't use docker though.

The nats golang binaries are needed anyway and very light. Later if we want I can dip them into the repo folder under .bin, and so not pollute the devs machine at all.

Keep in mind that from host we can talk to the docker or the leaf and so text all possibilities.


I can add overmind too which will make host services and docker all run from a single call.

This runs the docker compose and the nats leaf together, allowing the use case of docker and non docker testing from a single pane.

overmind start
system         | Tmux socket name: overmind-slog-nats-lGqSWbqbIfIiJZNUj2waM
system         | Tmux session ID: slog-nats
system         | Listening at ./.overmind.sock
docker-compose | Started with pid 65435...
nats-main      | Started with pid 65436...
[+] Building 0.0s (0/0)                                                                                                  docker:orbstack
[+] Running 3/0| 
docker-compose |  ✔ Container slog-nats-nats-1    Created                                                                                            0.0s 
docker-compose |  ✔ Container slog-nats-nats-2-1  Created                                                                                            0.0s 
docker-compose |  ✔ Container slog-nats-nats-1-1  Created                                                                                            0.0s 
docker-compose | Attaching to slog-nats-nats-1, slog-nats-nats-1-1, slog-nats-nats-2-1
nats-main      | [65438] 2023/11/27 18:41:10.226268 [INF] Starting nats-server
nats-main      | [65438] 2023/11/27 18:41:10.228286 [INF]   Version:  2.10.5
nats-main      | [65438] 2023/11/27 18:41:10.228288 [INF]   Git:      [not set]
nats-main      | [65438] 2023/11/27 18:41:10.228289 [INF]   Name:     NB5TFM2GJV64PNHVTBXO2HQHPPAICLAML2QDSJNXLQ7SZSYDRKFZ52ID
nats-main      | [65438] 2023/11/27 18:41:10.228290 [INF]   ID:       NB5TFM2GJV64PNHVTBXO2HQHPPAICLAML2QDSJNXLQ7SZSYDRKFZ52ID
nats-main      | [65438] 2023/11/27 18:41:10.228315 [INF] Using configuration file: nats-main.conf
nats-main      | [65438] 2023/11/27 18:41:10.231504 [INF] Listening for leafnode connections on 0.0.0.0:4223
nats-main      | [65438] 2023/11/27 18:41:10.232120 [INF] Listening for client connections on 0.0.0.0:4222
nats-main      | [65438] 2023/11/27 18:41:10.232326 [INF] Server is ready
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350032 [INF] Starting nats-server
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350142 [INF]   Version:  2.10.5
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350151 [INF]   Git:      [0883d32]
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350152 [INF]   Cluster:  NATS
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350153 [INF]   Name:     ND2UIDA35UXPQPAGWPA3O4OPXOQYDT3WZJNN5RB4IMRNQBEGVOPEGRVK
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350156 [INF]   ID:       ND2UIDA35UXPQPAGWPA3O4OPXOQYDT3WZJNN5RB4IMRNQBEGVOPEGRVK
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350487 [INF] Starting http monitor on 0.0.0.0:8222
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350547 [INF] Listening for client connections on 0.0.0.0:4222
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350632 [INF] Server is ready
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350739 [INF] Cluster name is NATS
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.350763 [INF] Listening for route connections on 0.0.0.0:6222
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.434998 [INF] Starting nats-server
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435073 [INF]   Version:  2.10.5
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435075 [INF]   Git:      [0883d32]
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435076 [INF]   Cluster:  NATS
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435077 [INF]   Name:     NBLBBM6K56FBIXPLNHLGCEOOERCUJFIITEK3VLPWUAMZDL7HWC6L3MEA
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435081 [INF]   ID:       NBLBBM6K56FBIXPLNHLGCEOOERCUJFIITEK3VLPWUAMZDL7HWC6L3MEA
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435609 [INF] Listening for client connections on 0.0.0.0:4222
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435681 [INF] Server is ready
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435736 [INF] Cluster name is NATS
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.435803 [INF] Listening for route connections on 0.0.0.0:6222
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.435827 [INF] Starting nats-server
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.435871 [INF]   Version:  2.10.5
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.435873 [INF]   Git:      [0883d32]
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.435874 [INF]   Cluster:  NATS
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.435874 [INF]   Name:     NBGIJ32KQDCXBAEDI5ZI3J4EMEWEJPU5LJD3H7M3QO6APNZMQHUHHDAW
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.435875 [INF]   ID:       NBGIJ32KQDCXBAEDI5ZI3J4EMEWEJPU5LJD3H7M3QO6APNZMQHUHHDAW
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.436130 [INF] Listening for client connections on 0.0.0.0:4222
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.436205 [INF] Server is ready
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.436339 [INF] Cluster name is NATS
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.436362 [INF] Listening for route connections on 0.0.0.0:6222
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.437036 [INF] 192.168.228.2:6222 - rid:5 - Route connection created
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.437094 [INF] 192.168.228.2:6222 - rid:6 - Route connection created
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.437123 [INF] 192.168.228.2:6222 - rid:5 - Route connection created
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.437128 [INF] 192.168.228.2:6222 - rid:6 - Route connection created
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.437190 [INF] 192.168.228.3:60916 - rid:5 - Route connection created
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.437213 [INF] 192.168.228.3:60920 - rid:6 - Route connection created
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.437247 [INF] 192.168.228.4:43904 - rid:7 - Route connection created
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.437309 [INF] 192.168.228.4:43906 - rid:8 - Route connection created
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.438368 [INF] 192.168.228.4:60654 - rid:7 - Route connection created
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.438393 [INF] 192.168.228.3:6222 - rid:7 - Route connection created
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.438411 [INF] 192.168.228.3:6222 - rid:8 - Route connection created
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.438417 [INF] 192.168.228.4:60662 - rid:8 - Route connection created
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.469672 [INF] 192.168.228.4:60668 - rid:9 - Route connection created
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.469638 [INF] 192.168.228.3:6222 - rid:9 - Route connection created
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.486483 [INF] 192.168.228.2:6222 - rid:10 - Route connection created
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.486521 [INF] 192.168.228.4:43916 - rid:9 - Route connection created
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.499460 [INF] 192.168.228.2:6222 - rid:10 - Route connection created
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.499476 [INF] 192.168.228.3:60928 - rid:10 - Route connection created
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.504786 [INF] 192.168.228.2:6222 - rid:11 - Route connection created
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.504795 [INF] 192.168.228.4:43932 - rid:11 - Route connection created
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.543360 [INF] 192.168.228.2:6222 - rid:11 - Route connection created
docker-compose | slog-nats-nats-1    | [1] 2023/11/27 17:41:10.543380 [INF] 192.168.228.3:60936 - rid:12 - Route connection created
docker-compose | slog-nats-nats-1-1  | [1] 2023/11/27 17:41:10.546927 [INF] 192.168.228.4:60684 - rid:12 - Route connection created
docker-compose | slog-nats-nats-2-1  | [1] 2023/11/27 17:41:10.547031 [INF] 192.168.228.3:6222 - rid:12 - Route connection created

@gedw99
Copy link
Author

gedw99 commented Nov 28, 2023

https://github.com/gedw99/slog-nats has the Profile runner it all

let me know if you want it.

@samber
Copy link
Owner

samber commented Dec 6, 2023

Sorry @gedw99 for the delay.

I will close this PR, since docker-compose does the job for a dev environment, and I don't see the added value in running NATs the old way.

I prefer not to pollute this repo.

Feel free to open it again if you think i'm wrong!

@samber samber closed this Dec 6, 2023
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