Skip to main content

Create infrastructure diagrams from configuration files (YAML and JSON) by using Graphviz

Project description

infrastructure-diagrams

infrastructure-diagrams is a python package that allows creating infrastructure diagrams/graphs from configuration files (YAML and JSON). The package utilizes Graphviz <https://www.graphviz.org/>__ to generate the diagrams. The functionality is exposed in the command line by the Unix command file.

Note: Some features are currently undocumented.

Requirements

The package requires python >= 3.6. It has only been tested on Linux as the intended use was for automatically generating diagrams in a CI.

Installation

The current stable version of infrastructure-daigrams is available on pypi and can be installed by running pip install infrastructure-diagrams.

Other sources:

Usage

.. code:: bash

$ infrastructure-diagrams
usage: infrastructure-diagrams [-h] [-d DISPLAY] [-o OUTPUT] [-r RENDERER] file

positional arguments:
  file                  path to diagram file

optional arguments:
  -h, --help            show this help message and exit
  -d DISPLAY, --display DISPLAY
                        display the diagram after rendering
  -o OUTPUT, --output OUTPUT
                        output path for the diagram, including filetype (.svg, .png, etc.)
  -r RENDERER, --renderer RENDERER
                        output renderer used for rendering (cairo, gd, etc.)

Example: $ infrastructure-diagrams -o example.png examples/example.yaml

Configuration files

The configuration files extend the Graphviz Node, Edge and Graph Attributes <https://www.graphviz.org/doc/info/attrs.html>__, meaning you can customize the diagram / graph as needed.

Examples:

  • example.yaml |Output of example.yaml|

  • misc.yaml |Output of misc.yaml|

  • iot.yaml |Output of iot.yaml|

Example diagram configuration files can be found under the examples/ <https://github.com/kotlarz/infrastructure-diagrams/>__ directory.

.. |Output of example.yaml| image:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/example.png .. |Output of misc.yaml| image:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/misc.png .. |Output of iot.yaml| image:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/iot.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for infrastructure-diagrams, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size infrastructure_diagrams-0.0.6-py3-none-any.whl (9.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size infrastructure-diagrams-0.0.6.tar.gz (8.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page