Page MenuHomeDevCentral

Usee Docker pillar information in nginx config
Changes PlannedPublic

Authored by dereckson on Oct 28 2019, 03:13.
Tags
None
Referenced Files
F27642385: D2084.id5260.diff
Wed, May 6, 08:49
F27628278: D2084.id5249.diff
Wed, May 6, 04:16
F27628277: D2084.id5260.diff
Wed, May 6, 04:16
F27628271: D2084.id5250.diff
Wed, May 6, 04:16
F27627825: D2084.id10516.diff
Wed, May 6, 04:06
F27627824: D2084.id10512.diff
Wed, May 6, 04:06
F27624896: D2084.diff
Wed, May 6, 03:11
Unknown Object (File)
Thu, Apr 30, 10:47
Subscribers
None

Details

Reviewers
dereckson
Summary

Initially, the nginx configuration for the Alkane webserver role
used hardcoded port information to pass a request to Docker PaaS.

This change introduces a method to prepare a dictionary of proxy_pass URLs
per server and application, and applies it for API and infra.

Meanwhile, another change introduced a services table, but this change
allows to automatically handle host and port changes.

Test Plan

Deploy on Ysul

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
SeverityLocationCodeMessage
Advice_modules/paas_docker.py:138F821flake8 F821
Advice_modules/paas_docker.py:141F821flake8 F821
Unit
No Test Coverage
Branch
configure-docker-upstreams
Build Status
Buildable 6525
Build 6809: arc lint + arc unit

Event Timeline

dereckson created this revision.

Remove debug information, use correct pillar syntax.

Call paas_docker.get_upstreams()

This change is interesting and should be rebased.

Rebased against current main for Alkane.

dereckson retitled this revision from WIP: Use Docker pillar information in nginx config to Usee Docker pillar information in nginx config.Mar 23 2026, 14:04

Next: try salt web-001 paas_docker.get_upstreams

Rebased. Fixed pillar handling.

The output is really useful to avoid to manually repeat the ports.

But since salt-tower, we can't have a view from web-001 on the docker-002 pillar.

For example, if we run paas_docker.get_upstreams against docker-002, we've this dictionary:

{P396}


So, if we want to adopt this system, there is a need to consolidate the salt-tower files, by recreating the former unified pillar.

I've asked upstream for advice how to resolve pillar for another server than the current node @ https://groups.google.com/g/salt-tower/c/XEKg2CEiZrU