Something that surprised me is that I find the code very easy to read and follow. I really like how fast and easy it is to create simple and complex diagrams using Diagrams + Python. That’s it folks! Thanks for making it this far. This will generate a png file with the output. # Now you can run one of scripts above locally. # Install the package in your virtual environment # Prepare your Python virtual environment $ brew install virtualenvwrapper graphviz poetry Want to get it running in your local machine?īelow the steps required to run it on a Mac. SAP Tech Byte diagram following colour guidelines The code above will generate the following diagram, which uses the colours mentioned in the guidelines. Object_store > Edge(label="uses", color=FIX_GREY_COLOUR, style="dotted") > S3("S3 Bucket") With Cluster("SAP Business Technology Platform", graph_attr= ): # SAP BTP Solution Diagrams and Icons guidelines colors What if we want to use the colours specified in the guidelines? How would the diagram look? Let’s see…. ![]() Now, the diagram above looks great but the colours used by the clusters does not follow the colours specified in the SAP Business Technology Platform Solution Diagrams and Icons guidelines. Therefore, if you find the service under DevOps in the SAP Discovery Center, then it is likely that it will be under. I set up the SAP services in Diagrams so that it resembles the capabilities that have been defined in the SAP Discovery Center. In case you wonder where under diagrams.sap.* you can find a particular service. The code above will generate the following diagram: Object_store > Edge(label="uses", style="dotted") > S3("S3 Bucket") Placeholder_Circle("Audit Log service") > Edge() > SAPHANAService_Circle("HANA Cloud")Ĭloud_integration > Edge() > object_store Object_store = ObjectStore_Circle("Object Store") With Cluster("SAP Business Technology Platform"):Ĭloud_integration = ProcessIntegration_Circle("Cloud Integration") With Diagram("SAP Tech Byte - Exploring the SAP Audit Log service", show=False): In the forked repo, the changes are in the sap-icons branch.įrom diagrams import Cluster, Diagram, Edgeįrom import Placeholder_Circleįrom import ProcessIntegration_Circleįrom _datamanagement import SAPHANAService_Circleįrom _datamanagement import ObjectStore_Circle ![]() ![]() Below a sample of how we can use Python + Diagrams with the SAP BTP icons to create your architecture diagrams.Īt the moment of writing, the changes proposed to add SAP as a provider in Diagrams have not been merged to the main repository - See pull request 717. I forked the original repository and included the SAP BTP icons. This is just an exploration of how the official SAP BTP icons can be used within Diagrams. what if we could include the SAP Business Technology Platform Solution Diagrams and Icons, which are publicly available, as part of Diagrams? There are various cloud providers included in Diagrams: AWS, Azure, GCP, Kubernetes, Alibaba Cloud and Oracle Cloud. Under the hood, Diagrams uses Graphviz ( ) to create the diagrams, which is something that I explored before to generate entity-relationship (ER) diagrams from a JSON structure, see Generating Entity-Relationship diagrams from the SAP Ariba Analytical Reporting API metadata. So I was quite happy when last week I found out about Diagrams ( ).ĭiagrams is an open source project which lets you draw architecture diagrams using Python. These diagrams also change frequently and a new version meant copying the existing file and adding a suffix in the file, e.g. ![]() Draw.io, Omnigraffle, even Microsoft PowerPoint, and although it is possible to get the job done using this tools, I sometimes found it frustrating how complicated it was to do a minor change in the architecture, rearranging things (PowerPoint ), starting from scratch or worrying about using the right icon/colour. I've done many architecture diagrams in the past, for which I've used different tools, e.g. When explaining to others how a system works or communicates with its different parts, it is generally easier to do it visually, e.g. In this blog post, I will share how you can leverage an open source project called Diagrams to create architecture diagrams with code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |