{"id":3599,"date":"2022-07-25T18:30:08","date_gmt":"2022-07-25T13:00:08","guid":{"rendered":"https:\/\/navveenbalani.dev\/?p=3599"},"modified":"2022-07-28T20:18:40","modified_gmt":"2022-07-28T14:48:40","slug":"code-to-custom-cloud-architecture-diagrams","status":"publish","type":"post","link":"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/","title":{"rendered":"Code to Custom Cloud Architecture Diagrams"},"content":{"rendered":"<p>If you are looking to generate multi-cloud or custom cloud architectures diagrams from code quickly, then look at &#8220;Diagram as Code for prototyping cloud system architectures&#8221; tool.<\/p>\n<p>The diagrams as a code tool supports all cloud providers like AWS, Azure, Google Cloud, Alibaba Cloud, IBM and their respective services\/components.\u00a0 If some of the service nodes are not available, you can create one using the custom node feature.<\/p>\n<p>I used the custom extensions node to develop my own constructs for a Google Cloud CI\/CD process using Cloud Code,<wbr \/>\u00a0Cloud Build,<wbr \/>\u00a0Google Cloud Deploy,<wbr \/> and GKE. The reference architecture wa picked up from Google blog &#8211; https:\/\/cloud.google.com\/architecture\/app-development-and-delivery-with-cloud-code-gcb-cd-and-gke<\/p>\n<p>For the AWS version of the code, please <a href=\"https:\/\/navveenbalani.dev\/index.php\/articles\/aws-code-to-custom-cloud-architecture-diagrams\/\">click here.<\/a><\/p>\n<p>Link to Github repo &#8211; https:\/\/github.com\/mingrammer\/diagrams<\/p>\n<p><a href=\"http:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build.png\"><img loading=\"lazy\" class=\"alignleft size-large wp-image-3606\" src=\"http:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build-1024x709.png\" alt=\"\" width=\"1024\" height=\"709\" srcset=\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build-1024x709.png 1024w, https:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build-300x208.png 300w, https:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build-768x532.png 768w, https:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build-1536x1063.png 1536w, https:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build.png 1702w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Following is the custom code for the above diagram,<\/p>\n<pre>from diagrams import Cluster, Diagram, Edge\nfrom diagrams.custom import Custom\n\nwith Diagram(\"Google Cloud\", show=True):\n\n    developer = Custom(\"\",\".\/my_extensions\/developer.png\")\n\n    operationsApproval = Custom(\"\",\".\/my_extensions\/operations-approval.png\")\n\n    with Cluster(\"Google Cloud\"):\n\n         develop = Custom(\"\",\".\/my_extensions\/develop-cloud-code.png\")\n\n         sourceRepo = Custom(\"\",\".\/my_extensions\/cloud-source-repo.png\")\n\n         ciBuild = Custom(\"\",\".\/my_extensions\/ci-cloud-build.png\")\n\n         ciDeploy = Custom(\"\",\".\/my_extensions\/cloud-deploy.png\")\n\n         buildArtifact = Custom(\"\",\".\/my_extensions\/cloud-storage-build-artifact.png\")\n\n          deployArtifact = Custom(\"\",\".\/my_extensions\/deploy-artifacts-cloud-storage.png\")\n\n          artifactRegistry = Custom(\"\",\".\/my_extensions\/artifact-registry.png\")\n\n          stagingCluster = Custom(\"\",\".\/my_extensions\/staging-cluster-gke.png\")\n\n          productionCluster = Custom(\"\",\".\/my_extensions\/production-cluster-gke.png\")\n\n\n          ciDeploy &gt;&gt; stagingCluster\n\n          ciDeploy &gt;&gt; deployArtifact\n\n          ciDeploy &gt;&gt; productionCluster\n\n          artifactRegistry &gt;&gt; stagingCluster\n\n          artifactRegistry &gt;&gt; productionCluster\n\n          ciBuild &gt;&gt; [buildArtifact,ciDeploy,artifactRegistry]\n\n          sourceRepo &gt;&gt; Edge(label=\"trigger\") &gt;&gt;ciBuild\n\n          develop &gt;&gt; sourceRepo\n\n\noperationsApproval &gt;&gt; Edge(label=\"Approval\") &gt;&gt; productionCluster\n\ndeveloper &gt;&gt; develop<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you are looking to generate multi-cloud or custom cloud architectures diagrams from code quickly, then look at &#8220;Diagram as Code for prototyping cloud system architectures&#8221; tool. The diagrams as a code tool supports all cloud providers like AWS, Azure, Google Cloud, Alibaba Cloud, IBM and their respective services\/components.\u00a0 If some of the service nodes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3606,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,79,11,10,184],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.0.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Code to Custom Cloud Architecture Diagrams - Current and Future Technology Trends by Navveen Balani<\/title>\n<meta name=\"description\" content=\"Code to Custom Cloud Architecture Diagrams - Articles\" \/>\n<link rel=\"canonical\" href=\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Code to Custom Cloud Architecture Diagrams - Current and Future Technology Trends by Navveen Balani\" \/>\n<meta property=\"og:description\" content=\"Code to Custom Cloud Architecture Diagrams - Articles\" \/>\n<meta property=\"og:url\" content=\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/\" \/>\n<meta property=\"og:site_name\" content=\"Current and Future Technology Trends by Navveen Balani\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-25T13:00:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-28T14:48:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1702\" \/>\n\t<meta property=\"og:image:height\" content=\"1178\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/navveenbalani.dev\/#website\",\"url\":\"https:\/\/navveenbalani.dev\/\",\"name\":\"Current and Future Technology Trends by Navveen Balani\",\"description\":\"Current and Future Technology Trends by Navveen Balani\",\"publisher\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/navveenbalani.dev\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2022\/07\/gke-build.png\",\"width\":1702,\"height\":1178},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#webpage\",\"url\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/\",\"name\":\"Code to Custom Cloud Architecture Diagrams - Current and Future Technology Trends by Navveen Balani\",\"isPartOf\":{\"@id\":\"https:\/\/navveenbalani.dev\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#primaryimage\"},\"datePublished\":\"2022-07-25T13:00:08+00:00\",\"dateModified\":\"2022-07-28T14:48:40+00:00\",\"description\":\"Code to Custom Cloud Architecture Diagrams - Articles\",\"breadcrumb\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/\",\"url\":\"https:\/\/navveenbalani.dev\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/\",\"url\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/\",\"name\":\"Code to Custom Cloud Architecture Diagrams\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#webpage\"},\"author\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"headline\":\"Code to Custom Cloud Architecture Diagrams\",\"datePublished\":\"2022-07-25T13:00:08+00:00\",\"dateModified\":\"2022-07-28T14:48:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#webpage\"},\"publisher\":{\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\"},\"image\":{\"@id\":\"https:\/\/navveenbalani.dev\/index.php\/articles\/code-to-custom-cloud-architecture-diagrams\/#primaryimage\"},\"articleSection\":\"Articles,Cloud Computing,Experimental,Featured,Technology\",\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/navveenbalani.dev\/#\/schema\/person\/51f7ab14b20611d95e3c7fd4ea0950bf\",\"name\":\"Navveen\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/navveenbalani.dev\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/navveenbalani.dev\/wp-content\/uploads\/2019\/07\/navveen_balani.jpeg\",\"width\":200,\"height\":200,\"caption\":\"Navveen\"},\"logo\":{\"@id\":\"https:\/\/navveenbalani.dev\/#personlogo\"},\"sameAs\":[\"http:\/\/naveenbalani.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/3599"}],"collection":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/comments?post=3599"}],"version-history":[{"count":21,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/3599\/revisions"}],"predecessor-version":[{"id":3634,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/posts\/3599\/revisions\/3634"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/media\/3606"}],"wp:attachment":[{"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/media?parent=3599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/categories?post=3599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/navveenbalani.dev\/index.php\/wp-json\/wp\/v2\/tags?post=3599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}