Skip to content
/ ndiag Public
forked from k1LoW/ndiag

ndiag is a high-level architecture diagramming/documentation tool.

License

Notifications You must be signed in to change notification settings

gakugaku/ndiag

 
 

Repository files navigation

ndiag

ndiag is a "high-level architecture" diagramming/documentation tool.

Key features of ndiag are:

  • N-diagrams: Generate multiple "diagrams and documents" (views) from a single configuration.
  • Nested-clusters: Nodes and components can be clustered in nested layers
  • Provides the ability to check the difference between the architecture and the actual system.

Usage

$ ndiag doc -c ndiag.yml --rm-dist

Getting Started

Generate architecture documents

Add ndiag.yml (Full version is here).

---
name: 3-Tier Architecture
docPath: docs/arch
views:
  -
    name: overview
    layers: ["consul", "vip_group"]
  -
    name: http-lb
    layers: ["vip_group"]
    labels: ["http"]
nodes:
  -
    name: lb
    match: lb-*
    components:
      - NGINX?icon=lb-l7
    clusters:
      - 'Consul:dc1'
      - 'vip_group:lb'
  -
    name: app
    match: app-*
    components:
      - NGINX?icon=proxy
      - Rails App?icon=cube4&label=lang:ruby
    clusters:
      - 'Consul:dc1'
  -
    name: db
    match: db-*
    components:
      - PostgreSQL?icon=db
    clusters:
[...]

Run ndiag doc to generate documents in GitHub Friendly Markdown format.

$ ndiag doc -c ndiag.yml

Commit ndiag.yml and documents.

$ git add ndiag.yml doc/arch ndiag.description
$ git commit -m 'Add architecture document'
$ git push origin main

View the document on GitHub.

Example document

example

Tutorial

Install

deb:

Use dpkg-i-from-url

$ export NDIAG_VERSION=X.X.X
$ curl -L https://git.io/dpkg-i-from-url | bash -s -- https://github.com/k1LoW/ndiag/releases/download/v$NDIAG_VERSION/ndiag_$NDIAG_VERSION-1_amd64.deb

RPM:

$ export NDIAG_VERSION=X.X.X
$ yum install https://github.com/k1LoW/ndiag/releases/download/v$NDIAG_VERSION/ndiag_$NDIAG_VERSION-1_amd64.rpm

apk:

Use apk-add-from-url

$ export NDIAG_VERSION=X.X.X
$ curl -L https://git.io/apk-add-from-url | sh -s -- https://github.com/k1LoW/ndiag/releases/download/v$NDIAG_VERSION/ndiag_$NDIAG_VERSION-1_amd64.apk

homebrew tap:

$ brew install k1LoW/tap/ndiag

manually:

Download binary from releases page

go get:

$ go get github.com/k1LoW/ndiag

docker:

$ docker pull ghcr.io/k1low/ndiag:latest

temporary:

$ source <(curl https://git.io/ndiag)
$ curl -sL https://git.io/ndiag > /tmp/ndiag.tmp && . /tmp/ndiag.tmp

About

ndiag is a high-level architecture diagramming/documentation tool.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.8%
  • Makefile 2.2%
  • Other 1.0%