<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Diagram on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/diagram/</link>
    <description>Recent content in Diagram on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Tue, 08 Nov 2022 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/diagram/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Modeling AWS Structures with PlantUML and AsciiDoc</title>
      <link>https://www.hascode.com/modeling-aws-structures-with-plantuml-and-asciidoc/</link>
      <pubDate>Tue, 08 Nov 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/modeling-aws-structures-with-plantuml-and-asciidoc/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The AWS shapes are included in the PlantUML stdlib .. simply include them as shown here:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;example.puml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-plantuml&#34; data-lang=&#34;plantuml&#34;&gt;@startuml
!include &amp;lt;awslib/AWSCommon&amp;gt;
!include &amp;lt;awslib/Analytics/ManagedStreamingforKafka&amp;gt;
!include &amp;lt;awslib/Database/RDS&amp;gt;
!include &amp;lt;awslib/General/Users&amp;gt;
!include &amp;lt;awslib/General/InternetGateway&amp;gt;

!include &amp;lt;kubernetes/k8s-sprites-labeled-25pct&amp;gt;

skinparam linetype ortho

title &amp;#34;AWS Context Diagram&amp;#34;


package &amp;#34;EKS Kubernetes Cluster&amp;#34; as eks_cluster {
    component &amp;#34;&amp;lt;$pod&amp;gt;\napp1&amp;#34; as pod1
    component &amp;#34;&amp;lt;$pod&amp;gt;\napp2&amp;#34; as pod2
}

ManagedStreamingforKafka(kafka_pod, &amp;#34;Amazon MSK&amp;#34;, &amp;#34;Apache Kafka&amp;#34;)

RDS(pg_rds, &amp;#34;PostgreSQL&amp;#34;, &amp;#34;Sample Schema&amp;#34;)


Users(users, &amp;#34;AppUsers&amp;#34;,&amp;#34;editors, admins&amp;#34;)

InternetGateway(igw1, &amp;#34;Customer Gateway&amp;#34;, &amp;#34;Customer access to internal services&amp;#34;)

users -&amp;gt; igw1
igw1 --&amp;gt; pod1
igw1 --&amp;gt; pod2
pod1 --&amp;gt; pg_rds
pod1 --&amp;gt; kafka_pod
pod2 --&amp;gt; pg_rds
pod2 --&amp;gt; kafka_pod

@enduml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Adding Legends to PlantUML Diagrams</title>
      <link>https://www.hascode.com/snippet-adding-legends-to-plantuml-diagrams/</link>
      <pubDate>Fri, 21 Oct 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-adding-legends-to-plantuml-diagrams/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following hack allows us to draw a diagram in a diagram in a table in a legend :D&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;example-diagram.puml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-plantuml&#34; data-lang=&#34;plantuml&#34;&gt;@startuml
skinparam legendBackgroundColor transparent
skinparam legendBorderColor transparent

actor Editor as editor
queue Queue as &amp;#34;Message\nQueue&amp;#34;
editor -&amp;gt; [Component] : call
[Component] --&amp;gt; Queue : publish


legend right
{{
   scale 0.7
   skinparam defaultFontSize 14
   skinparam BackGroundColor transparent
   skinparam defaultBackgroundColor white

   !procedure $entry($type, $label, $scale=1)
      {{\nscale $scale \nskinparam backgroundcolor transparent\nlabel &amp;#34; &amp;#34; as A\nlabel &amp;#34; &amp;#34; as B\n $type \n}} =&amp;gt; $label
   !endprocedure

   map &amp;#34;&amp;lt;b&amp;gt;Legend&amp;lt;/b&amp;gt;&amp;#34; as legend #white {
      $entry(&amp;#34;:Editor:&amp;#34;,&amp;#34;\nEditor for Data xyz&amp;#34;, 0.6)
      $entry(&amp;#34;[Component]&amp;#34;,&amp;#34;\nSome Component&amp;#34;, 0.8)
      $entry(&amp;#34;queue Queue&amp;#34;,&amp;#34;\nKafka-Topic&amp;#34;, 1)
      $entry(&amp;#34;A -&amp;gt; B&amp;#34;,&amp;#34;Data-Flow&amp;#34;)
   }
}}

endlegend
@enduml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
