feat: support on-premise nodes

pull/35/head
mingrammer 6 years ago
parent 2c7b01a826
commit 6b159cbd65

@ -2,7 +2,7 @@
app_root_dir="diagrams" app_root_dir="diagrams"
# NOTE: azure icon set is not latest version # NOTE: azure icon set is not latest version
providers=("aws" "azure" "gcp" "k8s" "alibabacloud" "oci") providers=("onprem" "aws" "azure" "gcp" "k8s" "alibabacloud" "oci")
if ! [ -x "$(command -v round)" ]; then if ! [ -x "$(command -v round)" ]; then
echo 'round is not installed' echo 'round is not installed'
@ -22,7 +22,7 @@ fi
# preprocess the resources # preprocess the resources
for pvd in "${providers[@]}"; do for pvd in "${providers[@]}"; do
# convert the svg to png for azure provider # convert the svg to png for azure provider
if [ "$pvd" = "azure" ]; then if [ "$pvd" = "onprem" ] || [ "$pvd" = "azure" ]; then
echo "converting the svg to png using inkscape for provider '$pvd'" echo "converting the svg to png using inkscape for provider '$pvd'"
python -m scripts.resource svg2png "$pvd" python -m scripts.resource svg2png "$pvd"
fi fi

@ -11,7 +11,7 @@ DIR_APP_ROOT = "diagrams"
DIR_RESOURCE = "resources" DIR_RESOURCE = "resources"
DIR_TEMPLATE = "templates" DIR_TEMPLATE = "templates"
PROVIDERS = ("base", "aws", "azure", "gcp", "k8s", "alibabacloud", "oci") PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "k8s", "alibabacloud", "oci")
######################### #########################
# Resource Processing # # Resource Processing #
@ -24,8 +24,8 @@ CMD_SVG2PNG_OPTS = ("-z", "-w", "256", "-h", "256", "--export-type", "png")
CMD_SVG2PNG_IM = "convert" CMD_SVG2PNG_IM = "convert"
CMD_SVG2PNG_IM_OPTS = ("-shave", "25%x25%", "-resize", "256x256!") CMD_SVG2PNG_IM_OPTS = ("-shave", "25%x25%", "-resize", "256x256!")
FILE_PREFIXES = { FILE_PREFIXES = {
"onprem": (),
"aws": ("amazon-", "aws-"), "aws": ("amazon-", "aws-"),
"azure": ("azure-",), "azure": ("azure-",),
"gcp": ("cloud-",), "gcp": ("cloud-",),
@ -58,6 +58,9 @@ UPPER_WORDS = {
} }
TITLE_WORDS = { TITLE_WORDS = {
"onprem": {
"onprem": "OnPrem",
},
"alibabacloud": { "alibabacloud": {
"alibabacloud": "AlibabaCloud" "alibabacloud": "AlibabaCloud"
} }
@ -65,6 +68,43 @@ TITLE_WORDS = {
# TODO: check if the classname exists # TODO: check if the classname exists
ALIASES = { ALIASES = {
"onprem": {
"ci": {
"Circleci": "CircleCI",
"Travisci": "TravisCI",
},
"container": {
"Rkt": "RKT",
},
"database": {
"Cockroachdb": "CockroachDB",
"Couchdb": "CouchDB",
"Hbase": "HBase",
"Influxdb": "InfluxDB",
"Mariadb": "MariaDB",
"Mongodb": "MongoDB",
"Mssql": "MSSQL",
"Mysql": "MySQL",
"Postgresql": "PostgreSQL",
},
"gitops": {
"Argocd": "ArgoCD",
},
"logging": {
"Logstash": "LogStash",
},
"netowrk": {
"Etcd": "ETCD",
"Haproxy": "HAProxy",
},
"queue": {
"Zeromq": "ZeroMQ",
},
"workflow": {
"Kubeflow": "KubeFlow",
"Nifi": "NiFi",
}
},
"aws": { "aws": {
"analytics": { "analytics": {
"ElasticsearchService": "ES", "ElasticsearchService": "ES",

@ -0,0 +1,12 @@
"""
OnPrem provides a set of general on-premise services.
"""
from diagrams import Node
class _OnPrem(Node):
_provider = "onprem"
_icon_dir = "resources/onprem"
fontcolor = "#ffffff"

@ -0,0 +1,31 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Analytics(_OnPrem):
_type = "analytics"
_icon_dir = "resources/onprem/analytics"
class Flink(_Analytics):
_icon = "flink.png"
class Hadoop(_Analytics):
_icon = "hadoop.png"
class Hive(_Analytics):
_icon = "hive.png"
class Spark(_Analytics):
_icon = "spark.png"
class Storm(_Analytics):
_icon = "storm.png"
# Aliases

@ -0,0 +1,26 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Ci(_OnPrem):
_type = "ci"
_icon_dir = "resources/onprem/ci"
class Circleci(_Ci):
_icon = "circleci.png"
class Jenkins(_Ci):
_icon = "jenkins.png"
class Travisci(_Ci):
_icon = "travisci.png"
# Aliases
CircleCI = Circleci
TravisCI = Travisci

@ -0,0 +1,15 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Compute(_OnPrem):
_type = "compute"
_icon_dir = "resources/onprem/compute"
class Server(_Compute):
_icon = "server.png"
# Aliases

@ -0,0 +1,21 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Container(_OnPrem):
_type = "container"
_icon_dir = "resources/onprem/container"
class Docker(_Container):
_icon = "docker.png"
class Rkt(_Container):
_icon = "rkt.png"
# Aliases
RKT = Rkt

@ -0,0 +1,69 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Database(_OnPrem):
_type = "database"
_icon_dir = "resources/onprem/database"
class Cassandra(_Database):
_icon = "cassandra.png"
class Cockroachdb(_Database):
_icon = "cockroachdb.png"
class Couchdb(_Database):
_icon = "couchdb.png"
class Hbase(_Database):
_icon = "hbase.png"
class Influxdb(_Database):
_icon = "influxdb.png"
class Mariadb(_Database):
_icon = "mariadb.png"
class Mongodb(_Database):
_icon = "mongodb.png"
class Mssql(_Database):
_icon = "mssql.png"
class Mysql(_Database):
_icon = "mysql.png"
class Neo4J(_Database):
_icon = "neo4j.png"
class Oracle(_Database):
_icon = "oracle.png"
class Postgresql(_Database):
_icon = "postgresql.png"
# Aliases
CockroachDB = Cockroachdb
CouchDB = Couchdb
HBase = Hbase
InfluxDB = Influxdb
MariaDB = Mariadb
MongoDB = Mongodb
MSSQL = Mssql
MySQL = Mysql
PostgreSQL = Postgresql

@ -0,0 +1,17 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Gitops(_OnPrem):
_type = "gitops"
_icon_dir = "resources/onprem/gitops"
class Argocd(_Gitops):
_icon = "argocd.png"
# Aliases
ArgoCD = Argocd

@ -0,0 +1,27 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Inmemory(_OnPrem):
_type = "inmemory"
_icon_dir = "resources/onprem/inmemory"
class Aerospike(_Inmemory):
_icon = "aerospike.png"
class Hazelcast(_Inmemory):
_icon = "hazelcast.png"
class Memcached(_Inmemory):
_icon = "memcached.png"
class Redis(_Inmemory):
_icon = "redis.png"
# Aliases

@ -0,0 +1,21 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Logging(_OnPrem):
_type = "logging"
_icon_dir = "resources/onprem/logging"
class Fluentd(_Logging):
_icon = "fluentd.png"
class Logstash(_Logging):
_icon = "logstash.png"
# Aliases
LogStash = Logstash

@ -0,0 +1,31 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Monitoring(_OnPrem):
_type = "monitoring"
_icon_dir = "resources/onprem/monitoring"
class Datadog(_Monitoring):
_icon = "datadog.png"
class Grafana(_Monitoring):
_icon = "grafana.png"
class Kibana(_Monitoring):
_icon = "kibana.png"
class Prometheus(_Monitoring):
_icon = "prometheus.png"
class Splunk(_Monitoring):
_icon = "splunk.png"
# Aliases

@ -0,0 +1,63 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Network(_OnPrem):
_type = "network"
_icon_dir = "resources/onprem/network"
class Apache(_Network):
_icon = "apache.png"
class Caddy(_Network):
_icon = "caddy.png"
class Consul(_Network):
_icon = "consul.png"
class Envoy(_Network):
_icon = "envoy.png"
class Etcd(_Network):
_icon = "etcd.png"
class Haproxy(_Network):
_icon = "haproxy.png"
class Istio(_Network):
_icon = "istio.png"
class Kong(_Network):
_icon = "kong.png"
class Linkerd(_Network):
_icon = "linkerd.png"
class Nginx(_Network):
_icon = "nginx.png"
class Tomcat(_Network):
_icon = "tomcat.png"
class Traefik(_Network):
_icon = "traefik.png"
class Zookeeper(_Network):
_icon = "zookeeper.png"
# Aliases

@ -0,0 +1,29 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Queue(_OnPrem):
_type = "queue"
_icon_dir = "resources/onprem/queue"
class Activemq(_Queue):
_icon = "activemq.png"
class Kafka(_Queue):
_icon = "kafka.png"
class Rabbitmq(_Queue):
_icon = "rabbitmq.png"
class Zeromq(_Queue):
_icon = "zeromq.png"
# Aliases
ZeroMQ = Zeromq

@ -0,0 +1,19 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Search(_OnPrem):
_type = "search"
_icon_dir = "resources/onprem/search"
class Elasticsearch(_Search):
_icon = "elasticsearch.png"
class Solr(_Search):
_icon = "solr.png"
# Aliases

@ -0,0 +1,26 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _OnPrem
class _Workflow(_OnPrem):
_type = "workflow"
_icon_dir = "resources/onprem/workflow"
class Airflow(_Workflow):
_icon = "airflow.png"
class Kubeflow(_Workflow):
_icon = "kubeflow.png"
class Nifi(_Workflow):
_icon = "nifi.png"
# Aliases
KubeFlow = Kubeflow
NiFi = Nifi

@ -0,0 +1,102 @@
---
id: onprem
title: OnPrem
---
Node classes list of onprem provider.
## onprem.database
- **diagrams.onprem.database.Cassandra**
- **diagrams.onprem.database.Cockroachdb**, **CockroachDB** (alias)
- **diagrams.onprem.database.Couchdb**, **CouchDB** (alias)
- **diagrams.onprem.database.Hbase**, **HBase** (alias)
- **diagrams.onprem.database.Influxdb**, **InfluxDB** (alias)
- **diagrams.onprem.database.Mariadb**, **MariaDB** (alias)
- **diagrams.onprem.database.Mongodb**, **MongoDB** (alias)
- **diagrams.onprem.database.Mssql**, **MSSQL** (alias)
- **diagrams.onprem.database.Mysql**, **MySQL** (alias)
- **diagrams.onprem.database.Neo4J**
- **diagrams.onprem.database.Oracle**
- **diagrams.onprem.database.Postgresql**, **PostgreSQL** (alias)
## onprem.ci
- **diagrams.onprem.ci.Circleci**, **CircleCI** (alias)
- **diagrams.onprem.ci.Jenkins**
- **diagrams.onprem.ci.Travisci**, **TravisCI** (alias)
## onprem.network
- **diagrams.onprem.network.Apache**
- **diagrams.onprem.network.Caddy**
- **diagrams.onprem.network.Consul**
- **diagrams.onprem.network.Envoy**
- **diagrams.onprem.network.Etcd**
- **diagrams.onprem.network.Haproxy**
- **diagrams.onprem.network.Istio**
- **diagrams.onprem.network.Kong**
- **diagrams.onprem.network.Linkerd**
- **diagrams.onprem.network.Nginx**
- **diagrams.onprem.network.Tomcat**
- **diagrams.onprem.network.Traefik**
- **diagrams.onprem.network.Zookeeper**
## onprem.inmemory
- **diagrams.onprem.inmemory.Aerospike**
- **diagrams.onprem.inmemory.Hazelcast**
- **diagrams.onprem.inmemory.Memcached**
- **diagrams.onprem.inmemory.Redis**
## onprem.search
- **diagrams.onprem.search.Elasticsearch**
- **diagrams.onprem.search.Solr**
## onprem.container
- **diagrams.onprem.container.Docker**
- **diagrams.onprem.container.Rkt**, **RKT** (alias)
## onprem.compute
- **diagrams.onprem.compute.Server**
## onprem.workflow
- **diagrams.onprem.workflow.Airflow**
- **diagrams.onprem.workflow.Kubeflow**, **KubeFlow** (alias)
- **diagrams.onprem.workflow.Nifi**, **NiFi** (alias)
## onprem.queue
- **diagrams.onprem.queue.Activemq**
- **diagrams.onprem.queue.Kafka**
- **diagrams.onprem.queue.Rabbitmq**
- **diagrams.onprem.queue.Zeromq**, **ZeroMQ** (alias)
## onprem.gitops
- **diagrams.onprem.gitops.Argocd**, **ArgoCD** (alias)
## onprem.monitoring
- **diagrams.onprem.monitoring.Datadog**
- **diagrams.onprem.monitoring.Grafana**
- **diagrams.onprem.monitoring.Kibana**
- **diagrams.onprem.monitoring.Prometheus**
- **diagrams.onprem.monitoring.Splunk**
## onprem.logging
- **diagrams.onprem.logging.Fluentd**
- **diagrams.onprem.logging.Logstash**, **LogStash** (alias)
## onprem.analytics
- **diagrams.onprem.analytics.Flink**
- **diagrams.onprem.analytics.Hadoop**
- **diagrams.onprem.analytics.Hive**
- **diagrams.onprem.analytics.Spark**
- **diagrams.onprem.analytics.Storm**

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

@ -7,7 +7,7 @@ from jinja2 import Environment, FileSystemLoader, Template
import config as cfg import config as cfg
from . import app_root_dir, doc_root_dir, resource_dir, template_dir from . import app_root_dir, doc_root_dir, resource_dir, template_dir
_usage = "Usage: generate.py <aws|gcp|azure|k8s|alibabacloud|oci>" _usage = "Usage: generate.py <onprem|aws|gcp|azure|k8s|alibabacloud|oci>"
def load_tmpl(tmpl: str) -> Template: def load_tmpl(tmpl: str) -> Template:

@ -16,6 +16,11 @@ from . import resource_dir
_usage = "Usage: resources.py <cmd> <pvd>" _usage = "Usage: resources.py <cmd> <pvd>"
def cleaner_onprem(f):
f = f.replace("_", "-")
return f.lower()
def cleaner_aws(f): def cleaner_aws(f):
f = f.replace("_", "-") f = f.replace("_", "-")
f = f.replace("@4x", "") f = f.replace("@4x", "")
@ -76,6 +81,7 @@ def cleaner_oci(f):
cleaners = { cleaners = {
"onprem": cleaner_onprem,
"aws": cleaner_aws, "aws": cleaner_aws,
"azure": cleaner_azure, "azure": cleaner_azure,
"gcp": cleaner_gcp, "gcp": cleaner_gcp,

@ -37,6 +37,9 @@
}, },
"nodes/oci": { "nodes/oci": {
"title": "OCI" "title": "OCI"
},
"nodes/onprem": {
"title": "OnPrem"
} }
}, },
"links": { "links": {

@ -10,6 +10,7 @@
"guides/cluster" "guides/cluster"
], ],
"Nodes": [ "Nodes": [
"nodes/onprem",
"nodes/aws", "nodes/aws",
"nodes/azure", "nodes/azure",
"nodes/gcp", "nodes/gcp",

Loading…
Cancel
Save