'Recent' updates
[pwan.org.git] / content / ideas / CodeGenerationAndDeploymentDiagrams.rst
diff --git a/content/ideas/CodeGenerationAndDeploymentDiagrams.rst b/content/ideas/CodeGenerationAndDeploymentDiagrams.rst
new file mode 100644 (file)
index 0000000..91cafe2
--- /dev/null
@@ -0,0 +1,34 @@
+Code Generation and Deployment Diagrams
+#######################################
+
+:date: 2014-07-07
+:tags: idea,project
+:category: idea
+:author: Jude N
+:Status: draft
+
+Is code generation for deployment diagrams possible/useful ?
+
+Problem
+- A deployment diagram is put together pretty close to the start of the project.  
+- The deployment diagram shows the various machines in the stack and what services should be running on the machines, and what ports should be opened
+- In theory, it should be possible to set up the manifests for the boxes to open iptables rules, adjust SELinux policies to use the expected ports, etc
+- In practice, there are usually errors uncovered late in the development cycle, since the networking changes can't really be tested until there's software available to pass traffic over the ports (at which point we figure out the manifests are opening traffic in the reverse direction, 
+- It would be good if there was a better way to 'kickstart' the manifests involved with multi-machine stacks.
+
+Solution
+- Since we do use deployment documents, and it is possible to generate skeleton code from UML class diagrams, it might be possible to set up skeleton puppet manifests from deployments diagrams.
+- So what open source tools where this might be possible ?  
+
+  - `Gaphor`_ :  I could get one end of a connector to attach to a node, but not the other.
+  - `Dia`_ : Thre's a Python API where I was able to get some basic node/connector code generation working, but Dia didn't let me nest components in nodes.  Also many years since a new release.
+  - `ArgoUML`_ :  The deployment diagram supports nesting components inside nodes, but adding support for puppet code generation would involve writing a lot of Java.  PLus 2 years since a release, and still using SVN.
+  - `PlantUML`_ :  UML diagrams are generated from text files, so in theory I could use the text as an input to code generation program that could output puppet.
+    -- I also like that this approach removes a lot of the time wasted fiddling with diagram layout by outsourcing that to graphviz.
+    -- The text-source approach has also worked out well for me using the  `Quick sequence Diagram Editor`_
+
+.. _Gaphor: http://freecode.com/projects/gaphor
+.. _Dia: https://wiki.gnome.org/Apps/Dia
+.. _ArgoUML: http://argouml.tigris.org/
+.. _PLantUML: http://plantuml.sourceforge.net/
+.. _Quick sequence Diagram Editor: http://sourceforge.net/projects/sdedit/