Skip to content

🎨 Diagram as Code for prototyping Open Telekom Cloud system architectures.

License

Notifications You must be signed in to change notification settings

akyriako/diagrams

 
 

Repository files navigation

Diagrams for Open Telekom Cloud

license pypi version python version

Diagram as Code.

Important

Due to the fact that the upstream project seems to be inactive and non-processing/non-responsive to new Issues or Pull Requests for more than 2 years, the artifacts supporting Open Telekom Cloud has been moved to their own package. Nevertheless, the repository retains its downstream status and any change that might come in the future either in the other providers artifacts or in the code itself, will be synced. Unless nothing changes, the package name in PyPi is from now on diagrams-otc.

Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture design without any design tools. You can also describe or visualize the existing system architecture as well. Diagrams currently supports main major providers including: AWS, Azure, GCP, Kubernetes, Alibaba Cloud, Oracle Cloud etc... It also supports On-Premise nodes, SaaS and major Programming frameworks and languages.

Diagram as Code also allows you to track the architecture diagram changes in any version control system.

Note

It does not control any actual cloud resources nor does it generate cloud formation or terraform code. It is just for drawing the cloud system architecture diagrams.

Providers

Open Telekom Cloud

in addition supports all the providers included in the original upstream:

aws provider azure provider gcp provider ibm provider kubernetes provider alibaba cloud provider oracle cloud provider openstack provider firebase provider digital ocean provider elastic provider outscale provider on premise provider generic provider programming provider saas provider c4 provider

Getting Started

It requires Python 3.7 or higher, check your Python version first.

It uses Graphviz to render the diagram, so you need to install Graphviz to use diagrams. After installing graphviz (or already have it), install the diagrams.

Tip

You can quickly install Graphviz either via pip: pip install graphviz (recommended) or via brew: brew install graphviz

Install the Diagrams for Open Telekom Cloud directly from Pypi choosing one of the following methods:

# using pip (pip3)
$ pip install diagrams-otc

# using pipenv
$ pipenv install diagrams-otc

# using poetry
$ poetry add diagrams-otc

and then you are ready to try your very first OTC diagram by executing the Python code below:

from diagrams import Diagram, Cluster
from diagrams.opentelekomcloud.computing import Ecs
from diagrams.opentelekomcloud.database import Rds
from diagrams.opentelekomcloud.network import Elb, Dns, Eip

with Diagram("Basic Web App", show=False):
    dns = Dns("dns")
    eip = Eip("eip")

    dns >> eip

    with Cluster("vpc"):
        elb = Elb("dns")

        with Cluster("app-subnet"):
            app = [Ecs("app1"),
            Ecs("app2")]

        with Cluster("db-subnet"):
            db_primary = Rds("primary")
            db_primary - [Rds("replica1"),
                        Rds("replica2")]

    eip >> elb >> app >> db_primary

save it in a python file, e.g. diagram.py and execute it with the following command:

python diagram.py

which will generate an diagram in PNG format:

Basic Web App

The list Open Telekom Cloud services currently supported can be found here.

Examples

Note

The rest of the documentation and examples refer to the original upstream site as is.

You can start with quick start. Check out guides for more details, and you can find all available nodes list in here.

Event Processing Stateful Architecture Advanced Web Service
event processing stateful architecture advanced web service with on-premise

You can find all the examples on the examples page.

Contributing

To contribute to Diagrams by adding a new provider or additional Open Telekom Cloud services, check out contribution guidelines.

Other languages

If you are familiar with Go, you can use go-diagrams as well.

About

🎨 Diagram as Code for prototyping Open Telekom Cloud system architectures.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Python 94.5%
  • JavaScript 3.6%
  • Other 1.9%