Skip to content

A tool to programmatically create NGINX Plus configurations

Notifications You must be signed in to change notification settings

nginx-plus/NGINX-Config-Generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGINX-Config-Generator

This tool creates NGINX Plus configuration files for a given JSON service declaration.

Use cases include quick configuration generation and templating.

Architecture

graph TD
U([User]) -- Terminal --> IW(Interactive wizard)
DEVOPS([DevOps]) -- REST API --> CICD
IW -- REST API --> NCG[NGINX Configuration Generator]
CICD(CI/CD Pipeline) -- REST API --> NCG
NCG -- REST API --> NIM(NGINX Instance Manager)
NCG -- REST API --> Generic(Generic REST API endpoint) & IW & CICD
Loading

Branches

Two branches are currently available:

Input formats

  • REST API
  • Interactive wizard

Output formats

  • Plaintext
  • JSON-wrapped Base64-encoded
  • Kubernetes Configmap
  • POST to Generic REST API endpoint
  • NGINX Instance Manager interoperability

Supported NGINX Plus configurations

  • Upstreams
  • Servers
  • TLS
  • Locations
  • Rate limiting
  • Active healthchecks
  • Cookie-based stickiness
  • NGINX Plus REST API access
  • Custom configuration snippets (for upstreams, servers, locations)
  • Caching

How to use

Run NGINX Config Generator using:

$ cd src
$ pip install -r requirements.txt
$ python3 main.py

Usage details and JSON schema are available here

A sample Postman collection can be found here

REST API documentation

When NGINX Config Generator is running, REST API documentation can be accessed at:

About

A tool to programmatically create NGINX Plus configurations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%