Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #104 from dedica-team/develop
Browse files Browse the repository at this point in the history
Release 0.2.1
  • Loading branch information
bonndan authored Feb 17, 2020
2 parents afc932d + f0954ec commit c034225
Show file tree
Hide file tree
Showing 203 changed files with 35,443 additions and 1,957 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Java CI

on: [push]
on:
push:
tags:
- '*'
branches:
- master
- develop

jobs:
build:
Expand All @@ -18,6 +24,6 @@ jobs:
- name: Build and Publish Docker
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: bonndan/nivo
name: bonndan/nivio
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
target
docs/build
_static
_templates
_templates
/.env
*.iml
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: java

jdk:
- openjdk10
- openjdk12

cache:
directories:
Expand Down
Binary file modified docs/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/hexmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/inout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ The API is not final and may change in the future.
JSON Endpoints
--------------

* /landscape/{landscape.identifier}
* /landscape/{landscape.identifier}/items
* /landscape/{landscape.identifier}/items/{fully qualified item identifier} DELETE
* /api/landscape/{landscape.identifier}
* /api/landscape/{landscape.identifier}/items
* /api/landscape/{landscape.identifier}/items/{fully qualified item identifier} DELETE

Document Endpoints
------------------

* /render/{landscape.identifier}/graph.png returns the landscape as rendered graph
* /render/{landscape.identifier}/map.svg returns the landscape as rendered graph
* /docs/{landscape.identifier}/report.html returns a formatted html summary of the landscape
* /docs/{landscape.identifier}/owners.html returns a formatted html summary of the item owners

37 changes: 37 additions & 0 deletions docs/source/extra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,40 @@ Vendor icons are work in progress.
items:
- identifier: bar
icon: vendor://redis
Graph Layout Tweaking
=====================

In rare cases the layout needs some manual improvements. Internally nivio uses mxGraph (for Java), which can be influences
by tweaking some parameters (see https://jgraph.github.io/mxgraph/java/docs/com/mxgraph/layout/mxOrganicLayout.html).

.. code-block:: yaml
:linenos:
identifier: nivio:example
name: Landscape example
sources:
- url: "./items/dashboard.yml"
format: nivio
# landscape configuration
config:
jgraphx:
triesPerCell: 8
edgeLengthCostFactor: 0.0001
nodeDistributionCostFactor: 900000.0
borderLineCostFactor: 7.0
#
# for group alignment
#
# the higher, the longer the edges between groups
forceConstantFactor: 2.8
# higher value is cpu intensive, but can lead to better layouts
maxIterations: 1000
# can also influence edge length and layout
minDistanceLimitFactor: 3.05
15 changes: 0 additions & 15 deletions docs/source/features.rst

This file was deleted.

17 changes: 16 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,28 @@ Nivio is a tool for application landscape management targeted at teams (develope
approach, i.e. there is no interface for manual data maintenance. Instead, nivio pulls all its information from data
sources like files or web apis (e.g. monitoring items) or allows pushing information via its API.


.. image:: https://raw.githubusercontent.com/dedica-team/nivio/master/docs/graph.png
:width: 100%
:alt: Rendered graph

* **It is easy to install and to maintain.** Runs dockerized on a single server with moderate to low hardware requirements. It store the items, so it can be discarded at any time and be refilled with the next start.
* **No-op usage** Besides its initial configuration it is designed to gather the application landscape information from configurable items, preferably code repos.
* **Renders the landscapes as a graph** see above
* **Multiple configuration sources** while nivio has its proprietary format, you can also use docker-compose files or use them as basis and enrich them using further files
* **PULL: Single seed** basic indexing of landscapes driven by a configuration file
* **PUSH: incremental data aggregation** send configuration files and other formats to build a landscape
* **Aggregation of item state** using sources like Prometheus and marking items accordingly


.. toctree::
:maxdepth: 2
:caption: Contents:

features
install
input
model
magic
api
extra
references
Expand Down
49 changes: 49 additions & 0 deletions docs/source/input.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Input Sources
=============


Kubernetes cluster inspection
-----------------------------

Kubernetes clusters are inspected using Fabric8.io's Java client. See https://github.com/fabric8io/kubernetes-client#configuring-the-client
for configuration. Parsing can be configured via an URL, i.e. the examined namespace can be given (otherwise all namespaces
are scanned) and a label for building groups can be named. Both parameters and even the whole URL are optional.

.. code-block:: yaml
:linenos:
identifier: k8s:example
name: Kubernetes example
sources:
- url: http://192.168.99.100?namespace=mynamespace&groupLabel=labelToUseForGrouping
format: kubernetes
Rancher 1 Cluster Inspection
----------------------------

Rancher clusters can be indexed one project (aka environment in the GUI speak) at a time. Access credentials can be read
from environment variables. To exclude internal stacks (like those responsible for internal networking), blacklist them.

.. code-block:: yaml
:linenos:
identifier: rancher:example
name: Rancher 1.6 API example
config:
groupBlacklist: [".*infra.*"]
sources:
- url: "http://rancher-server/v2-beta/"
projectName: Default
apiAccessKey: ${API_ACCESS_KEY}
apiSecretKey: ${API_SECRET_KEY}
format: rancher1
Nivio proprietary format
------------------------

Nivio provided an own format, which allows to set all model properties manually (see Model and Syntax section)
48 changes: 19 additions & 29 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ The Docker image is about 350MB and can be started with:

.. code-block:: bash
docker run -e DEMO=1 bonndan/nivio
docker run -e DEMO=1 dedica-team/nivio
Set SERVER_CONTEXT_PATH env var to the path if nivio won't be runner under "/".

Demo mode
---------
Expand Down Expand Up @@ -61,6 +63,7 @@ For jgraphx output, some force directed graph params can be set. More configurat
identifier: nivio:example
name: Landscape example
contact: [email protected]
description: This is an example landscape.
sources:
- "./items/wordpress.yml"
- url: "./items/dashboard.yml"
Expand All @@ -73,47 +76,34 @@ For jgraphx output, some force directed graph params can be set. More configurat
- url: xxx
format: kubernetes
# landscape configuration
config:
groups:
content:
color: "24a0ed"
# https://jgraph.github.io/mxgraph/java/docs/com/mxgraph/layout/mxOrganicLayout.html
jgraphx:
triesPerCell: 8
edgeLengthCostFactor: 0.0001
nodeDistributionCostFactor: 900000.0
borderLineCostFactor: 7.0
#
# for group alignment
#
# the higher, the longer the edges between groups
forceConstantFactor: 2.8
# higher value is cpu intensive, but can lead to better layouts
maxIterations: 1000
# can also influence edge length and layout
minDistanceLimitFactor: 3.05
Kubernetes cluster inspection
Reading from csv
-----------------------------

Kubernetes clusters are inspected using Fabric8.io's Java client. See https://github.com/fabric8io/kubernetes-client#configuring-the-client
for configuration. Parsing can be configured via an URL, i.e. the examined namespace can be given (otherwise all namespaces
are scanned) and a label for building groups can be named. Both parameters and even the whole URL are optional.
Nivio can parse csv files regarding one row as landscape item. The order of the columns in the file is important, since
headers are ignored and not mapping automatically. Instead, each column number (starting at zero) can be assigned to an
item property in the "mapping" configuration. Additionally, the csv separator char and the number of lines to
skip (usually 1 for the header row) can be set.

.. code-block:: yaml
:linenos:
identifier: k8s:example
name: Kubernetes example
sources:
- url: http://192.168.99.100?namespace=mynamespace&groupLabel=labelToUseForGrouping
format: kubernetes
- url: "./services/test.csv"
format: csv
mapping:
identifier: 1
name: 0
description: 2
providedBy: 3
separator: ";"
skipLines: 1
Deleting items
-----------------
Expand Down
Loading

0 comments on commit c034225

Please sign in to comment.