Last active
February 9, 2016 23:09
-
-
Save ooharak/4e2a79dce7216bc5360d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if defined(_GRAPHVIZ_FILETYPE_pdf) | |
#define _AWS_EXT "-fit.svg" | |
#elif defined(_GRAPHVIZ_FILETYPE_ps) | |
#define _AWS_EXT "-fit.svg" | |
#elif defined(_GRAPHVIZ_FILETYPE_ps2) | |
#define _AWS_EXT "-fit.svg" | |
#else | |
#define _AWS_EXT ".png" | |
#endif | |
#define _AWS_SHAPE(name) shape=box regular=true margin=0 peripheries=0 image="awsicons/"+name+_AWS_EXT | |
#define _AWS_INTERNET _AWS_SHAPE("internet") | |
#define _AWS_ELB _AWS_SHAPE("elb") | |
#define _AWS_INSTANCE _AWS_SHAPE("instance") | |
#define _AWS_INSTANCES _AWS_SHAPE("instances") | |
#define _AWS_S3 _AWS_SHAPE("s3") | |
#define _AWS_ROUTE53 _AWS_SHAPE("route53") | |
#define _AWS_USERS _AWS_SHAPE("users") | |
#define _AWS_REGION(name) style="filled,dashed" fillcolor=lightyellow label="Region:"+name | |
#define _AWS_AZ(name) style="filled" fillcolor=pink label="AZ:"+name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## サンプル | |
~~~{.graphviz width="0.9" height="0.9"} | |
#include "aws.inc" | |
digraph { | |
rankdir=LR | |
Route53 [_AWS_ROUTE53] | |
subgraph clusterR1 { | |
_AWS_REGION("東京") | |
ELB [_AWS_ELB] | |
subgraph clusterAZ1a { | |
_AWS_AZ("東京a") | |
i1a [_AWS_INSTANCE label="Instanceア"] | |
} | |
subgraph clusterAZ1b { | |
_AWS_AZ("東京b") | |
i1b [_AWS_INSTANCE label="Instanceイ"] | |
} | |
RR [shape=oval style=dotted label="ラウンド\nロビン"] | |
ELB -> RR -> {i1a i1b} | |
} | |
subgraph clusterR2 { | |
_AWS_REGION("オレゴン州") | |
ELB [_AWS_ELB] | |
s3 [_AWS_S3 label="Sorryページ\n(S3)"] | |
} | |
Route53 -> ELB [label="プライマリ"] | |
Route53 -> s3 [style=dashed label="セカンダリ"] | |
} | |
~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pandoc --filter=graphviz.py -s example.md -t beamer -o example.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment