Page MenuHomeDevCentral

Usee Docker pillar information in nginx config
Changes PlannedPublic

Authored by dereckson on Oct 28 2019, 03:13.
Tags
None
Referenced Files
F25009962: D2084.id5260.diff
Wed, Mar 25, 02:09
F25009961: D2084.id5250.diff
Wed, Mar 25, 02:09
F25009830: D2084.id10512.diff
Wed, Mar 25, 01:55
F25009388: D2084.diff
Wed, Mar 25, 01:13
F25005534: D2084.id10512.diff
Tue, Mar 24, 19:10
Unknown Object (File)
Tue, Mar 24, 00:23
Unknown Object (File)
Mon, Mar 23, 22:02
Unknown Object (File)
Sun, Mar 22, 02:14
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
Unit
No Test Coverage
Branch
configure-docker-upstreams
Build Status
Buildable 6529
Build 6813: 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.Mon, Mar 23, 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