Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGamba committed Nov 20, 2019
0 parents commit 5812944
Show file tree
Hide file tree
Showing 9 changed files with 1,435 additions and 0 deletions.
363 changes: 363 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

117 changes: 117 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
= Go-Wardley - Wardley maps generator
David Gamba, https://github.com/DavidGamba
:idprefix:
:toc: macro

Wardley Maps Generator written in Golang.
The generator takes an HCL based map description and generates a map in SVG format.
If viewed on a browser, the SVG will have hover over functionality to get additional details on node descriptions.

toc::[]

== Usage

----
$ go-wardley -f examples/map.hcl
map.svg
$ go-wardley -f examples/map.hcl -o examples/map.svg
examples/map.svg
----

image::./examples/map.svg[]

== Element types

=== Node

----
node user {
label = "User"
fill = "black"
color = "black"
visibility = 1
evolution = "custom"
x = 1
description = "User Description"
}
----

`evolution`:: `genesis`, `custom`, `product` or `commodity`.

=== Connector

----
connector {
from = "user"
to = "vcs"
label = ""
color = "black"
type = "normal"
}
----

`type`:: `normal`, `bold`, `change` or `change-inertia`.

== Example input

A more extensive one in link:./examples/map.hcl[].

[source, hcl]
----
node user {
label = "User"
fill = "black"
color = "black"
visibility = 1
evolution = "custom"
x = 1
description = "User Description"
}
node vcs {
label = "On Prem VCS"
fill = "black"
color = "black"
visibility = 2
evolution = "product"
x = 1
description = "On prem VCS"
}
node code_commit {
label = "Code Commit Mirror"
fill = "white"
color = "red"
visibility = 2
evolution = "commodity"
x = 1
description = "Allows Code Pipeline to access the code."
}
connector {
from = "user"
to = "vcs"
label = ""
color = "black"
type = "normal"
}
connector {
from = "vcs"
to = "code_commit"
label = ""
color = "red"
type = "change-inertia"
}
----

== License

This file is part of go-wardley.

Copyright (C) 2019 David Gamba Rios

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
233 changes: 233 additions & 0 deletions examples/map.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
# size {
# width = 1000
# height = 1000
# margin = 20
# font_size = 9
# }

# leyend {
# node {
# label = "node"
# fill = "node"
# color = "node"
# }
# node {
# label = "node"
# fill = "node"
# color = "node"
# }
# connector {
# label = "node"
# color = "node"
# type = "node"
# }
# }

# anchor
node user {
label = "User"
fill = "black"
color = "black"
visibility = 1
evolution = "custom"
x = 1
description = "User Description"
}

node vcs {
label = "On Prem VCS"
fill = "black"
color = "black"
visibility = 2
evolution = "product"
x = 1
description = "On prem VCS"
}

node code_commit {
label = "Code Commit Mirror"
fill = "white"
color = "red"
visibility = 2
evolution = "commodity"
x = 1
description = "Allows Code Pipeline to access the code."
}

node deployment_script {
label = "Deployment\nScript"
fill = "black"
color = "black"
visibility = 3
evolution = "genesis"
x = 1
description = ""
}

node rest_based_deployment {
label = "Rest based deployment\nAPI Gateway/Lambda"
fill = "black"
color = "red"
visibility = 3
evolution = "product"
x = 2
description = "Utopia world, ask for an environment using the browser for example."
}

node ci_cd {
label = "On Prem CI/CD"
fill = "black"
color = "black"
visibility = 4
evolution = "product"
x = 1
description = "Product we have to maintain and customize in house."
}

node code_pipeline {
label = "Code Pipeline"
fill = "white"
color = "red"
visibility = 4
evolution = "commodity"
x = 1
description = "Built in integrations with AWS, no need for maintaining plugins or build nodes, etc."
}

node tooling {
label = "Tooling"
fill = "white"
color = "blue"
visibility = 4
evolution = "custom"
x = 1
description = "Even though ansible is a product it requires codifying the procedure of how to get what we want and doesn't track state."
}

node ansible {
label = "Ansible"
fill = "black"
color = "black"
visibility = 5
evolution = "genesis"
x = 1
description = "Even though ansible is a product it requires codifying the procedure of how to get what we want and doesn't track state."
}

node terraform_v011 {
label = "Terraform v0.11"
fill = "white"
color = "black"
visibility = 5
evolution = "custom"
x = 1
description = "External because we don't have to write how to get to what we want, only describe it."
}

node terraform_v012 {
label = "Terraform v0.12"
fill = "white"
color = "black"
visibility = 5
evolution = "product"
x = 1
description = "Many fixes to syntax and to index management."
}

connector {
from = "user"
to = "deployment_script"
label = ""
color = "black"
type = "normal"
}

connector {
from = "user"
to = "vcs"
label = ""
color = "black"
type = "normal"
}

connector {
from = "vcs"
to = "code_commit"
label = ""
color = "red"
type = "change-inertia"
}

connector {
from = "vcs"
to = "ci_cd"
label = ""
color = "black"
type = "normal"
}

connector {
from = "code_commit"
to = "code_pipeline"
label = ""
color = "red"
type = "normal"
}

connector {
from = "ci_cd"
to = "code_pipeline"
label = ""
color = "red"
type = "change-inertia"
}

connector {
from = "deployment_script"
to = "rest_based_deployment"
label = ""
color = "red"
type = "change-inertia"
}

connector {
from = "tooling"
to = "ansible"
label = "EC2 instance provisioning"
color = "black"
type = "bold"
}

connector {
from = "tooling"
to = "terraform_v011"
label = ""
color = "black"
type = "normal"
}

connector {
from = "tooling"
to = "terraform_v012"
label = ""
color = "red"
type = "normal"
}

connector {
from = "ansible"
to = "terraform_v011"
label = ""
color = "black"
type = "change"
}

connector {
from = "terraform_v011"
to = "terraform_v012"
label = ""
color = "red"
type = "change-inertia"
}

# vim:ft=terraform
Loading

0 comments on commit 5812944

Please sign in to comment.