Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support on-premise nodes #35

Merged
merged 3 commits into from
Feb 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
app_root_dir="diagrams"

# 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
echo 'round is not installed'
Expand All @@ -22,7 +22,7 @@ fi
# preprocess the resources
for pvd in "${providers[@]}"; do
# 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'"
python -m scripts.resource svg2png "$pvd"
fi
Expand Down
44 changes: 42 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DIR_RESOURCE = "resources"
DIR_TEMPLATE = "templates"

PROVIDERS = ("base", "aws", "azure", "gcp", "k8s", "alibabacloud", "oci")
PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "k8s", "alibabacloud", "oci")

#########################
# Resource Processing #
Expand All @@ -24,8 +24,8 @@
CMD_SVG2PNG_IM = "convert"
CMD_SVG2PNG_IM_OPTS = ("-shave", "25%x25%", "-resize", "256x256!")


FILE_PREFIXES = {
"onprem": (),
"aws": ("amazon-", "aws-"),
"azure": ("azure-",),
"gcp": ("cloud-",),
Expand Down Expand Up @@ -58,13 +58,53 @@
}

TITLE_WORDS = {
"onprem": {
"onprem": "OnPrem",
},
"alibabacloud": {
"alibabacloud": "AlibabaCloud"
}
}

# TODO: check if the classname exists
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": {
"analytics": {
"ElasticsearchService": "ES",
Expand Down
12 changes: 12 additions & 0 deletions diagrams/onprem/__init__.py
Original file line number Diff line number Diff line change
@@ -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"
31 changes: 31 additions & 0 deletions diagrams/onprem/analytics.py
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions diagrams/onprem/ci.py
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions diagrams/onprem/compute.py
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions diagrams/onprem/container.py
Original file line number Diff line number Diff line change
@@ -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
69 changes: 69 additions & 0 deletions diagrams/onprem/database.py
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions diagrams/onprem/gitops.py
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions diagrams/onprem/inmemory.py
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions diagrams/onprem/logging.py
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions diagrams/onprem/monitoring.py
Original file line number Diff line number Diff line change
@@ -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
Loading