Exemplo n.º 1
0
from diagrams.onprem.database import Mongodb
from diagrams.onprem.queue import Rabbitmq
from diagrams.gcp.analytics import BigQuery, Dataflow, PubSub
from diagrams.programming.language import Nodejs
from diagrams.onprem.monitoring import Grafana, Prometheus
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
from diagrams.aws.storage import S3
from diagrams.onprem.network import Traefik
from diagrams.custom import Custom
from diagrams.onprem.tracing import Jaeger
from diagrams.onprem.database import Cassandra

with Diagram("OpenFlow Basic"):
    with Cluster("Backend"):
        b = [Mongodb("MongoDB"), Rabbitmq("RabbitMQ")]
    with Cluster("Remote Clients"):
        rc = [Custom("OpenRPA", "./my_resources/open_rpa128.png"), Custom("PowerShell",
                                                                          "./my_resources/PowerShell_5.0_icon.png"), Custom("NodeRED", "./my_resources/node-red-icon.png")]
    with Cluster("Frontend + API"):
        api = EC2("WEB-API")
        Custom("NodeRED", "./my_resources/node-red-icon.png")
    b << api
    api << rc

with Diagram("OpenFlow with Traefik"):

    with Cluster("Backend"):
        b = [Mongodb("MongoDB"), Rabbitmq("RabbitMQ")]

    with Cluster("Remote Clients"):
from diagrams import Cluster, Diagram

from diagrams.programming.language import Nodejs
from diagrams.onprem.network import Nginx
from diagrams.onprem.container import Docker
from diagrams.onprem.database import Mongodb
from diagrams.programming.language import Java

from diagrams.generic.storage import Storage
with Diagram("Bot para desarrollo", show=False):
    proxy = Storage("Proxy")
    bot = Nodejs("bot")
    kbase = Java("Kbase")
    mongodb = Mongodb("mongodb")
    docker = Docker("docker")

    proxy >> bot >> mongodb
    proxy >> kbase >> mongodb >> docker
Exemplo n.º 3
0
def main():
    graph_attr = {
        "fontsize": "45",
        'overlap_scaling': '100',
        'size': '24!',
        'ratio': 'expand'
    }

    with Diagram(name='Automation Framework Compose',
                 direction='LR',
                 graph_attr=graph_attr):
        with Cluster('Docker Cluster'):
            docker = Docker('Docker')

            with Cluster('container1'):
                python_container = Python('APIs\nOther Microservices')

            with Cluster('Docker Registry'):
                docker_registry_container = Docker('Docker Registry\ntcp:5000')

            with Cluster('Docker Registry Browser'):
                docker_registry_browser_container = Python(
                    'Docker Registry Browser\ntcp:8088')

            with Cluster('BatFish'):
                batfish_container = Custom(
                    'BatFish\ntcp:8888\ntcp:9997\ntcp:9996',
                    'custom_icons/BatFish.png')

        with Cluster('Kafka Cluster'):
            with Cluster('Zookeeper'):
                Zookeeper('Zookeeper\ntcp:2181')

            with Cluster('REST Proxy'):
                rest_proxy = Custom('REST Proxy\ntcp:8082',
                                    'custom_icons/REST-API.png')

            with Cluster('Control Center'):
                control_center = Kafka('Control Center\ntcp:9021')

            with Cluster('Schema Registry'):
                schema_registry = Storage('Schema Registry\ntcp:8081')

            with Cluster('Brokers'):
                broker_1 = Kafka('Broker 1\ntcp:9092')
                kafka_brokers = [
                    broker_1,
                    Kafka('Broker 2\ntcp:9093'),
                    Kafka('Broker 3\ntcp:9094')
                ]

        with Cluster('Secrets Managers'):
            vault = Vault('HashiCorp Vault\ntcp:8200')
            secrets_managers = [
                vault,
            ]

        with Cluster('Logging and Search'):
            with Cluster('ELK Stack'):
                elastic_search = Elasticsearch('Elastic Search\ntcp:9200')
                kibana = Kibana('Kibana\ntcp:5601')
                logstash = Logstash('Logstash\ntcp:5044')
                search_log = [elastic_search, kibana, logstash]

            with Cluster('Influxdb'):
                infulxdb = Influxdb('Influxdb\ntcp:8086')

            with Cluster('Grafana'):
                grafana = Grafana('Grafana\ntcp:3000')

        with Cluster('Inventory and Connectivity'):
            with Cluster('Inventory'):
                nautobot = Custom('Nautobot\ntcp:8000',
                                  'custom_icons/Nautobot.jpeg')

        with Cluster('Database'):
            with Cluster('Mongo dB'):
                mongodb = Mongodb('MongoDb\ntcp:27017')
                mongodb_express = Mongodb('MongoDb Express\ntcp:8181')
                mongo_group = [mongodb, mongodb_express]

        with Cluster('CI/CD'):
            team_city = TC('TeamCity')

        kafka_brokers - python_container

        python_container - vault

        python_container - nautobot

        nautobot - logstash
        python_container - logstash

        nautobot - infulxdb
        python_container - infulxdb

        python_container - mongodb
Exemplo n.º 4
0
from diagrams.firebase.base import Firebase
from diagrams.azure.database import CosmosDb, SQLDatabases, CacheForRedis
from diagrams.azure.storage import BlobStorage
from diagrams.aws.database import Dynamodb, RDS, Elasticache
from diagrams.aws.storage import S3

node_attr = {"fontsize": "20"}
graph_attr = {"fontsize": "28"}

with Diagram("", show=False, direction="TB", node_attr=node_attr):
    with Cluster("On-Premises", graph_attr=graph_attr):
        with Cluster("Relational Database", graph_attr=graph_attr):
            relational = Mssql("")
            relational - [Oracle("")]
        with Cluster("Document Database", graph_attr=graph_attr):
            documentdb = Mongodb("\nMongoDB")
            documentdb - [Couchdb("\nCouchDB")] - Firebase("\nFirebase")
        with Cluster("Cache", graph_attr=graph_attr):
            cache = Redis("\nRedis")
            cache - [Memcached("\nMemcached")] - Hazelcast("\nHazelcast")

    with Cluster("Cloud", graph_attr=graph_attr):
        with Cluster("Azure", graph_attr=graph_attr):
            azure = CosmosDb("\nCosmos DB")
            azure - [
                SQLDatabases("\nSQL DB")
            ] - CacheForRedis("\nRedis") - BlobStorage("\nBlob Storage")
        with Cluster("AWS", graph_attr=graph_attr):
            aws = Dynamodb("\nDynamoDB")
            aws - [RDS("\nRDS")] - Elasticache("\nElasticache") - S3("\nS3")
    with Cluster("Logging", graph_attr=graph_attr):
        logstash = Logstash("\nLogstash")
        fluentd = Fluentd("\nFluentd")
        loki = Loki("\nLoki")
        logstash - [fluentd] - loki

    with Cluster("Monitoring", graph_attr=graph_attr):
        prometheus = Prometheus("\nPrometheus")
        thanos = Thanos("\nThanos")
        prometheus - thanos

    with Cluster("Storage", graph_attr=graph_attr):
        with Cluster("Logs", graph_attr=graph_attr):
            elasticsearch = Elasticsearch("\nElasticsearch")
            solr = Solr("\nSolr")
            mongodb = Mongodb("\nMongoDB")
            elasticsearch - solr - mongodb

        with Cluster("Metrics", graph_attr=graph_attr):
            influx = Influxdb("\nInfluxDB")
            prometheus2 = Prometheus("\nPrometheus")
            prometheus2 - influx

        loki >> elasticsearch
        thanos >> prometheus2

    with Cluster("Visualization", graph_attr=graph_attr):
        kibana = Kibana("\nKibana")
        grafana = Grafana("\nGrafana")
        influx >> kibana
        mongodb >> grafana
Exemplo n.º 6
0
from diagrams import Cluster, Diagram
from diagrams.onprem.database import Mongodb, Couchdb
from diagrams.firebase.base import Firebase
from diagrams.azure.database import CosmosDb
from diagrams.aws.database import Dynamodb

node_attr = {
    "fontsize":"20"
}
graph_attr = {
    "fontsize":"28"
}

with Diagram("", show=False, direction="TB", node_attr=node_attr):
    with Cluster("On-Premises", graph_attr=graph_attr):
        onprem = [Mongodb("\nMongoDB"), Couchdb("\nCouchDB"), Firebase("\nFirebase")]

    with Cluster("Cloud", graph_attr=graph_attr):
        with Cluster("Azure", graph_attr=graph_attr):
                azure = [CosmosDb("\nCosmos DB")]
        with Cluster("AWS", graph_attr=graph_attr):
            aws = [Dynamodb("\nDynamoDB")]
        
Exemplo n.º 7
0
from diagrams import Diagram
from diagrams import Cluster, Diagram
from diagrams.aws.network import ELB
from diagrams.programming.framework import React
from diagrams.onprem.database import Mongodb
from diagrams.programming.language import Nodejs

with Diagram("Microservices", show=False):
    with Cluster("Service"):
        external_api = ELB("ExternalApi")
    with Cluster("Database\nMongoDB"):
        mongo = Mongodb("Contenedor-a")
    with Cluster("Service\nMongoExpress"):
        mongo_express = Nodejs("Contenedor-b")
        mongo_express >> mongo
        mongo >> mongo_express
    with Cluster("Service\nNodeJS\nScrapper"):
        scrapper = Nodejs("Contenedor-c")
        scrapper >> external_api
        external_api >> scrapper
        scrapper >> mongo
    with Cluster("Service\nNodeJS\nExpress\nAPI"):
        express_api = Nodejs("Contenedor-d")
    with Cluster("Service\nReactJS\nApacheServer"):
        react = React("Contenedor-f")
        react >> express_api
        express_api >> mongo
        mongo >> express_api
        express_api >> react