<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Veera26</title>
    <description>The latest articles on DEV Community by Veera26 (@veerasolaiyappan).</description>
    <link>https://dev.to/veerasolaiyappan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F912836%2Fe8c65f33-7aff-4e52-83bf-b4d50c0c3ce3.jpg</url>
      <title>DEV Community: Veera26</title>
      <link>https://dev.to/veerasolaiyappan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/veerasolaiyappan"/>
    <language>en</language>
    <item>
      <title>Infrastructure Diagrams as Code</title>
      <dc:creator>Veera26</dc:creator>
      <pubDate>Sun, 21 Aug 2022 16:13:00 +0000</pubDate>
      <link>https://dev.to/megacloud2323/infrastructure-diagrams-as-code-2li</link>
      <guid>https://dev.to/megacloud2323/infrastructure-diagrams-as-code-2li</guid>
      <description>&lt;p&gt;Diagrams are playing one of the major role in software development, Architecture development and Cloud infrastructure building.&lt;/p&gt;

&lt;p&gt;This python package diagrams is really helpful to Software architect, Solutions architect, Cloud engineers and Enterprise architect to keep our infrastructure diagram as code &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to understand&lt;/li&gt;
&lt;li&gt;Help to simplify the process&lt;/li&gt;
&lt;li&gt;Proper documentation&lt;/li&gt;
&lt;li&gt;Versioning our infrastructure diagrams changes as code&lt;/li&gt;
&lt;li&gt;Easy to customise&lt;/li&gt;
&lt;li&gt;Open source&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's currently supports main major providers including: &lt;strong&gt;AWS, Azure, GCP, Kubernetes, Alibaba Cloud, Oracle Cloud&lt;/strong&gt; etc... It also supports &lt;strong&gt;On-Premise&lt;/strong&gt; nodes, &lt;strong&gt;SaaS&lt;/strong&gt; and major Programming frameworks and languages&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;It requires &lt;strong&gt;python 3.6&lt;/strong&gt; version or heigher version python package&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
#using pip (pip3)
$ pip install diagrams

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Quick start
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
# SampleDiagram.py

from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB

#create diagram
with Diagram("Web Service", show=False):
    ELB("lb") &amp;gt;&amp;gt; EC2("web") &amp;gt;&amp;gt; RDS("userdb")



to run the above code in your terminal


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python SampleDiagram.py

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;output&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1wwu-0wv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3azyswrkgi1po1wc1ppu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1wwu-0wv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3azyswrkgi1po1wc1ppu.png" alt="Image description" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Clustered web service Infrastructure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
#ClusterWebService.py

from diagrams import Cluster, Diagram
from diagrams.aws.compute import ECS, Lambda
from diagrams.aws.database import ElastiCache, RDS
from diagrams.aws.network import ELB, Route53
from diagrams.aws.integration import SQS
from diagrams.aws.storage import S3

#create diagram
with Diagram("Clustered Web Services", show=False):
    # route53  
    dns = Route53("dns")

    #Elastic load balancer
    lb = ELB("App load balancer")

    #Elastic containe service cluster
    with Cluster("Services"):
        svc_group = [ECS("service1"),
                     ECS("service2"),
                     ECS("service3")]

    #Simple queue service
    queue = SQS("SQS service")

    #Relational Database service db cluster
    with Cluster("RDS DB Cluster"):
        db_primary = RDS("userdb")
        db_primary - [RDS("backup")]

    #lambda functions cluster
    with Cluster("Lambdas"):
      handlers = [
          Lambda('Lambda 1'),
          Lambda('Lambda 2'),
          Lambda('Lambda 3'),
      ]

    #Elasticcache service
    memcached = ElastiCache("memcached")

    # S3 serive
    store = S3("File storage")

    #architecture work flow
    dns &amp;gt;&amp;gt; lb &amp;gt;&amp;gt; svc_group &amp;gt;&amp;gt; queue &amp;gt;&amp;gt; handlers
    handlers[0] &amp;gt;&amp;gt; memcached
    handlers[1] &amp;gt;&amp;gt; store
    handlers[2] &amp;gt;&amp;gt; db_primary

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to run the code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python ClusterWebService.py

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;output&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ev-CDQUG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23tbclxogap1kkhqm3l8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ev-CDQUG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23tbclxogap1kkhqm3l8.png" alt="Image description" width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Link to library &lt;a href="https://diagrams.mingrammer.com/"&gt;diagrams&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Github link : &lt;a href="https://github.com/mingrammer/diagrams"&gt;Click here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Follow &lt;a href="https://www.linkedin.com/company/cloudnloud/"&gt;Cloudnloud tech community&lt;/a&gt; to know more Linux,Cloud,DevOps,Docker,K8s,Seccurity,Solutions,Re-Engineering,Virtuvalization,Data,AI,Python,Ansible,Terraform information&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep Learning Keep Growing !!!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Community and Social Footprints :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/veera26/"&gt;Veerasolaiyappan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/cloudnloud"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/cloudnloud"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/c/CloudnLoud"&gt;YouTube Cloud DevOps Free Trainings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/company/cloudnloud/"&gt;Linkedin Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/groups/9124202/"&gt;Linkedin Group&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/invite/vbjRQGVhuF"&gt;Discord Channel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/cloudnloud"&gt;Dev&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>terraform</category>
      <category>architecture</category>
      <category>python</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
