-
Notifications
You must be signed in to change notification settings - Fork 25
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
MDBF-842 / MDBF-841 - Streaming NGINX logs to standard streams / evaluate .env files values #657
MDBF-842 / MDBF-841 - Streaming NGINX logs to standard streams / evaluate .env files values #657
Conversation
@vladbogo I see that Because master machine does not have proper fqdn or the worker machines do not know how to resolve it? @fauust which will be the WG_IP of hz-bbm2 in the end? |
@RazvanLiviuVarzaru we probably forgot to add it to .env (this file was never actually used until now). There is a default value that points to the prod config for all env vars. So, if BUILDMASTER_WG_IP is not defined for prod, it will use the default value (for reference Line 108 in d2bde09
The idea behind this was the following: prod was up and running before dev and we changed a lot of env vars when setting up the dev env. We decided to use prod defaults because we considered with @fauust that this approach is less prone to forgetting to manually set an env var on prod (or ensuring it will be visible to all systemd services) until prod also uses docker. However, once prod uses docker, the ideas was to change all defaults to dev (or remove them) and cleanup this since having defaults to prod isn't necesssary the best idea. So, .env and .env.dev should have the same env vars defined. Hope this answers your question. |
Thanks @vladbogo , I'm aware of the defaults and how BB picks up these values DEV (containers) vs. PROD. (services). This is the confirmation I want to get from you, because I suppose you configured it in the first place. |
yes, it's the IP/DNS name of the master used by the latent workers to connect back once a container is started |
This is one of the reasons why I do not like defaults being set in the code like this. It makes it hard to track what is set and what is not. Having a "fail-fast" approach, where we just won't run unless the .env file is complete is much better. I will add that in my refactoring patches. |
Agree. I've almost missed this important variable. |
It was in my TODO and never ment to remain, but yep agree, it's worth removing them now: ❯ todo grep mdbf | grep default
[ ] 304 16-10-2023 17:56 mdbf: remove all the default= in BB configs @wk |
Ok, but this is something to be removed after migration. |
By removing the logs mount, and custom logging in configs, NGINX container will now stream the default access / error logs to the standard out/err streams. Having logging driver: journald will enable us to collect the logs via journalctl using the container tag bb-nginx. Re-introduce CrossReference location.
- MQ_ROUTER_URL for PROD will be the same as DEV, on 8080 - define NGINX_CR_HOST_WG_ADDR . For PROD is hz-bbw5 on 8080. For DEV we should deploy CR on hz-dev-bbm and choose another port (8081) because 8080 is already in use by CrossBar (MQ_ROUTER_URL). This will be used in NGINX bb.conf.template - add BUILDMASTER_WG_IP for PROD.
95ef6a9
to
8e24de8
Compare
Main feature: MDBF-791 - Run Production BuildBot services in docker containers
hz-bbw5 on 8080
. For DEV we should deploy CR onhz-dev-bbm
and choose another port (8081) because 8080 is already in use by CrossBar (MQ_ROUTER_URL)bb.conf.template
and define ENV variable in docker-compose.journald
will enable us to collect the logs via journalctl using the container tag bb-nginx.