Page MenuHomeDevCentral

Usee Docker pillar information in nginx config
Changes PlannedPublic

Authored by dereckson on Oct 28 2019, 03:13.
Tags
None
Referenced Files
F44813855: D2084.id5260.diff
Tue, Aug 18, 20:27
F44664398: D2084.diff
Tue, Aug 18, 02:59
F44663221: D2084.id10512.diff
Tue, Aug 18, 02:50
F44639759: D2084.id10516.diff
Mon, Aug 17, 23:54
Unknown Object (File)
Mon, Aug 17, 18:35
Unknown Object (File)
Mon, Aug 17, 17:30
Unknown Object (File)
Mon, Aug 17, 15:19
Unknown Object (File)
Sun, Aug 16, 23:10
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