Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Generate High Level Cloud Architecture diagrams...

Generate High Level Cloud Architecture diagrams using YAML syntax

Luca Sepe

June 20, 2020
Tweet

More Decks by Luca Sepe

Other Decks in Technology

Transcript

  1. Draft go report go report A+ A+ coverage coverage 81.2%

    81.2% Tweet Tweet A commandline tool that generate High Level Cloud Architecture diagrams using a declarative syntax defined in a YAML file. Works on linux, macOS, windows Just a single portable binary file Input data in flat YAML text files Usable with shell scripts 「Generate High Level Cloud Architecture diagrams using YAML syntax」 1 / 11
  2. It is better to think in terms of "capabilities" rather

    than specific vendor services. "do we need a DNS?" instead of "do we need Route 53?" "do we need a CDN?" instead of "do we need Cloudfront?" "do we need a database? if yes? what type? Relational? No SQL?" instead of "do we need Google Cloud Datastore?" "do we need some serverless function?" instead of "do we need an Azure Function" 「Generate High Level Cloud Architecture diagrams using YAML syntax」 2 / 11
  3. How draft works? It takes in input a YAML file

    and generates a dot script for Graphviz. Piping the draft output to GraphViz dot you can generate many output formats (PNG, SVG, PS, etc.) draft backend-for-frontend.yml | dot -Tpng -Gdpi=200 > backend-for-frontend.png To install GraphViz to your favorite OS, please, follow this link https://graphviz.gitlab.io/download/. 「Generate High Level Cloud Architecture diagrams using YAML syntax」 3 / 11
  4. Example - Upload a file to Amazon S3 using pre-signed

    URL s3-upload-presigned-url.yml Running draft with this command: draft s3-upload-presigned-url.yml | dot -Tpng > s3-upload-presigned-url.png 「Generate High Level Cloud Architecture diagrams using YAML syntax」 4 / 11
  5. What if I would like to show AWS product names

    and icons? You can use -impl aws flag to ... replace your capabilities with the related provider services use the provider icons (setting the env var DRAFT_ICONS_PATH=/path/to/icons ) DRAFT_ICONS_PATH=../icons draft -impl aws s3-upload-presigned-url.yml | dot -Tpng > s3-upload-presigned-url-aws.png 「Generate High Level Cloud Architecture diagrams using YAML syntax」 5 / 11
  6. Example - a System View impl-example.yml Running draft with this

    command: draft impl-example.yml | dot -Tpng > impl-example.png 「Generate High Level Cloud Architecture diagrams using YAML syntax」 6 / 11
  7. What if I would like to implement this with AWS?

    DRAFT_ICONS_PATH=../icons draft -impl aws impl-example.yml | dot -Tpng > impl-example-aws.png 「Generate High Level Cloud Architecture diagrams using YAML syntax」 7 / 11
  8. What if I would like to implement this with Google

    cloud? DRAFT_ICONS_PATH=../icons draft -impl gcp impl-example.yml | dot -Tpng > impl-example-gcp.png 「Generate High Level Cloud Architecture diagrams using YAML syntax」 8 / 11
  9. What if I would like to implement this with Microsoft

    Azure? DRAFT_ICONS_PATH=../icons draft -impl azure impl-example.yml | dot -Tpng > impl-example-azure.png 「Generate High Level Cloud Architecture diagrams using YAML syntax」 9 / 11
  10. Links draft documentation https://github.com/lucasepe/draft/blob/master/README.md more draft architecture descriptor YAML examples

    https://github.com/lucasepe/draft/blob/master/examples/README.md cloud providers icons for draft components https://github.com/lucasepe/draft/tree/master/icons 「Generate High Level Cloud Architecture diagrams using YAML syntax」 10 / 11
  11. Thank you Luca Sepe Solution Architect (@day) / Software Craftsman

    (@night) {twitter.com, github.com, linkedin.com} / lucasepe 「Generate High Level Cloud Architecture diagrams using YAML syntax」 11 / 11