Last active
December 23, 2015 10:39
-
-
Save tailhook/6622757 to your computer and use it in GitHub Desktop.
Diffs showing how complex (i.e. easy) it's to add a another cluster to the topology managed by rulens
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
diff -u examples/onedc/topology.yaml examples/twodc/topology.yaml | |
--- examples/onedc/topology.yaml 2013-09-19 15:17:42.546613699 +0300 | |
+++ examples/twodc/topology.yaml 2013-09-19 14:49:10.519955115 +0300 | |
@@ -81,6 +81,20 @@ | |
# If worker p isi not in the list above, choose random balancer for it | |
default: random | |
+ cluster2: | |
+ layout: cluster | |
+ rule: | |
+ dc: second | |
+ children: | |
+ frontend: | |
+ - ip: 127.2.5.1 | |
+ balancer: | |
+ - ip: 127.2.11.1 | |
+ gateway_input: | |
+ - ip: 127.2.6.1 | |
+ gateway_output: | |
+ - ip: 127.2.6.1 | |
+ | |
subcluster1: | |
# matches all nodes in the topology | |
match_topology: internal | |
@@ -102,6 +116,7 @@ | |
layout: world | |
children: | |
- cluster1 | |
+ - cluster2 | |
# This is a pseudo topology that "extracts" the ports from the other | |
# topology. So that when client requests "public" topology, it always gets | |
diff -u examples/onedc/addresses.txt examples/twodc/addresses.txt | |
--- examples/onedc/addresses.txt 2013-09-19 15:18:41.276613446 +0300 | |
+++ examples/twodc/addresses.txt 2013-09-19 14:50:24.269954765 +0300 | |
@@ -23,3 +23,15 @@ | |
topology://internal?ip=127.1.22.6&dc=first&role=worker&hostname=willy&pid=2260 NN_REP | |
topology://internal?ip=127.1.22.7&dc=first&role=worker&hostname=woody&pid=2270 NN_REP | |
topology://internal?ip=127.1.22.7&dc=first&role=worker&hostname=woody&pid=2271 NN_REP | |
+##### DC 2 ##### | |
+# Frontends | |
+topology://internal?ip=127.2.5.1&dc=second&role=frontend&hostname=faith&pid=510&id=1 device | |
+topology://internal?ip=127.2.5.1&dc=second&role=frontend&hostname=faith&pid=511&id=2 device | |
+# Gateway | |
+topology://internal?ip=127.2.6.1&dc=second&role=gateway_input&hostname=gloria&pid=610 device | |
+topology://internal?ip=127.2.6.1&dc=second&role=gateway_output&hostname=gloria&pid=610 device | |
+# Load Balancers | |
+topology://internal?ip=127.2.11.1&dc=second&role=balancer&hostname=lora&pid=1110 device | |
+# Workers | |
+topology://internal?ip=127.2.22.1&dc=second&role=worker&hostname=winnie&pid=2210 NN_REP | |
+topology://internal?ip=127.2.22.2&dc=second&role=worker&hostname=winston&pid=2220 NN_REP |
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
diff -u examples/twodc/topology.yaml examples/threedc/topology.yaml | |
--- examples/twodc/topology.yaml 2013-09-19 14:49:10.519955115 +0300 | |
+++ examples/threedc/topology.yaml 2013-09-19 14:51:55.679954297 +0300 | |
@@ -94,6 +94,19 @@ | |
- ip: 127.2.6.1 | |
gateway_output: | |
- ip: 127.2.6.1 | |
+ cluster3: | |
+ layout: cluster | |
+ rule: | |
+ dc: third | |
+ children: | |
+ frontend: | |
+ - ip: 127.3.5.1 | |
+ balancer: | |
+ - ip: 127.3.11.1 | |
+ gateway_input: | |
+ - ip: 127.3.6.1 | |
+ gateway_output: | |
+ - ip: 127.3.6.1 | |
subcluster1: | |
# matches all nodes in the topology | |
@@ -117,6 +130,7 @@ | |
children: | |
- cluster1 | |
- cluster2 | |
+ - cluster3 | |
# This is a pseudo topology that "extracts" the ports from the other | |
# topology. So that when client requests "public" topology, it always gets | |
diff -u examples/twodc/addresses.txt examples/threedc/addresses.txt | |
--- examples/twodc/addresses.txt 2013-09-19 14:50:24.269954765 +0300 | |
+++ examples/threedc/addresses.txt 2013-09-19 14:50:03.846621529 +0300 | |
@@ -35,3 +35,15 @@ | |
# Workers | |
topology://internal?ip=127.2.22.1&dc=second&role=worker&hostname=winnie&pid=2210 NN_REP | |
topology://internal?ip=127.2.22.2&dc=second&role=worker&hostname=winston&pid=2220 NN_REP | |
+##### DC 3 ##### | |
+# Frontends | |
+topology://internal?ip=127.3.5.1&dc=third&role=frontend&hostname=francie&pid=510&id=1 device | |
+topology://internal?ip=127.3.5.1&dc=third&role=frontend&hostname=francie&pid=511&id=2 device | |
+# Gateway | |
+topology://internal?ip=127.3.6.1&dc=third&role=gateway_input&hostname=glenda&pid=610 device | |
+topology://internal?ip=127.3.6.1&dc=third&role=gateway_output&hostname=glenda&pid=610 device | |
+# Load Balancers | |
+topology://internal?ip=127.3.11.1&dc=third&role=balancer&hostname=linda&pid=1110 device | |
+# Workers | |
+topology://internal?ip=127.3.22.1&dc=third&role=worker&hostname=walter&pid=2210 NN_REP | |
+topology://internal?ip=127.3.22.2&dc=third&role=worker&hostname=wilber&pid=2220 NN_REP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment