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

MDBF-804 - BB NGINX configuration in GH CI #590

Merged
merged 8 commits into from
Oct 15, 2024

Commits on Oct 10, 2024

  1. MDBF-804 - BB NGINX configuration in GH CI

    About This Patch:
    - Using templates (present since NGINX 1.19) to populate conf.d.
    - Templates allow for the use of environment variables defined in the .env files, enabling us to distinguish between PROD and DEV environments, particularly for the server name and certificate paths.
    - A proxy_params file is required according to the PROD configuration.
    - Mounting /etc/letsencrypt/live for SSL certificates. The base path is the same in both environments.
    - NGINX_ARTIFACTS_SSL_PATH variable is necessary because, in DEV, the same certificate is used for both CI and BB.
    - Attaching net_back to the NGINX container to facilitate communication with master-web via DNS.
    - Removing net_front from master-web; communication will be handled through NGINX.
    - NGINX access/error logs are written to the Docker-Compose relative path logs/nginx, which is needed for Zabbix collection.
    
    TODO Before Migration to PROD:
    - Address all FIXME comments.
      - Cross-reference proxy pass
      - helper_files directory name on hz-bbm2.
      - location /cloud-init ?
    
    TODO Before Deployment in DEV:
    - Disable the HAProxy service.
    RazvanLiviuVarzaru committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    6da2f1b View commit details
    Browse the repository at this point in the history
  2. Enable stub_status for Zabbix

    This will require some changes in Zabbix configuration for collecting these NGINX metrics. (replacing HAProxy metrics)
    RazvanLiviuVarzaru committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    d2f8f13 View commit details
    Browse the repository at this point in the history
  3. Configure hosts file for CrossReference host

    We don't have CrossReference in DEV, yet.
    For PROD I've configured the WG IP, for DEV it's just the loopback interface and will raise a BAD GATEWAY error.
    RazvanLiviuVarzaru committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    9f8f1bc View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. Use certbot container for letsencrypt certificates

    - add certbot container to docker-compose
    - bind mount www path for certbot/nginx to use it in webroot mode
    - bind mount certboot cnf path to allow nginx find the certificates
    
    Fixes:
    - remove location /cloud-init as per review
    - remove NGINX_ARTIFACTS_SSL_PATH variable . Will use multiple domain names in PROD also.
    - adapt bb and ci NGINX conf files to handle the acme challenge on port 80
    - fix generate-config to avoid exposing nginx env variables to other containers other than nginx
    RazvanLiviuVarzaru committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    4834fe4 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. Configuration menu
    Copy the full SHA
    dfc86de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    673fe22 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    941b6cb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2283b32 View commit details
    Browse the repository at this point in the history