Authored by chunhua.zhang

add

@@ -35,4 +35,9 @@ java.inner.lb: 10.66.4.112 @@ -35,4 +35,9 @@ java.inner.lb: 10.66.4.112
35 35
36 #rabbitmq 36 #rabbitmq
37 java.rabbit.common.local: 10.66.4.112 37 java.rabbit.common.local: 10.66.4.112
38 -java.rabbit.order.local: 10.66.4.234  
  38 +java.rabbit.order.local: 10.66.4.234
  39 +
  40 +#redis
  41 +redis.java: 10.66.4.161
  42 +redis.gateway: 10.66.4.200
  43 +redis.search: 10.66.4.249
@@ -93,3 +93,10 @@ @@ -93,3 +93,10 @@
93 10.66.70.139 93 10.66.70.139
94 10.66.70.12 94 10.66.70.12
95 95
  96 +
  97 +[zookeeper]
  98 +10.66.4.9
  99 +10.66.4.8
  100 +10.66.4.4
  101 +10.66.4.5
  102 +10.66.4.3
  1 +
1 --- 2 ---
2 3
3 -nameserver_timeout: 1 4 +dc: qcloud-az1
  5 +
  6 +# database info: using to generate bind9 dns config file. very important !!
  7 +db.cms.write: 10.66.0.99
  8 +db.cms.read: 10.66.6.7
  9 +db.passport.write: 10.66.0.105
  10 +db.passport.read: 10.66.6.8
  11 +db.shops.write: 10.66.0.213
  12 +db.shops.read: 10.66.6.10
  13 +db.order.write: 10.66.0.170
  14 +db.order.read: 10.66.6.9
  15 +db.message.write: 10.67.2.103
  16 +db.message.read: 10.66.106.5
  17 +db.uic.write: 10.66.6.136
  18 +db.uic.read: 10.66.106.12
  19 +
  20 +db.ordersplit.1.write: 10.66.0.57
  21 +db.ordersplit.2.write: 10.66.0.81
  22 +db.ordersplit.3.write: 10.66.0.98
  23 +db.ordersplit.4.write: 10.66.0.121
  24 +db.ordersplit.1.read: 10.66.0.57
  25 +db.ordersplit.2.read: 10.66.0.81
  26 +db.ordersplit.3.read: 10.66.0.98
  27 +db.ordersplit.4.read: 10.66.0.121
  28 +
  29 +db.search: 10.66.6.6
  30 +db.mongo: 10.66.6.19
  31 +
  32 +
  33 +# java inner load balancer
  34 +java.inner.lb: 10.66.4.112
  35 +
  36 +
  37 +#rabbitmq
  38 +java.rabbit.common.local: 10.66.4.112
  39 +java.rabbit.order.local: 10.66.4.234
4 40
  41 +#redis
  42 +redis.java: 10.66.4.161
  43 +redis.gateway: 10.66.4.200
  44 +redis.search: 10.66.4.249
5 45
6   46  
@@ -32,3 +32,7 @@ @@ -32,3 +32,7 @@
32 [java-union] 32 [java-union]
33 10.66.4.95 33 10.66.4.95
34 34
  35 +
  36 +
  37 +[zookeeper]
  38 +10.66.4.95
1 --- 1 ---
2 -# tasks file for yoho.dns  
  2 +# tasks file for yoho.
  3 +
  4 +
  5 +- name: sync bind9 zone files
  6 + template:
  7 + src: qcloud.zone.j2
  8 + dest: /tmp/qlcoud.zone
@@ -122,11 +122,11 @@ bigdata.redis.push.aws IN A 10.67.3.135 @@ -122,11 +122,11 @@ bigdata.redis.push.aws IN A 10.67.3.135
122 bigdata.redis.push IN A 10.67.3.135 122 bigdata.redis.push IN A 10.67.3.135
123 redis.nginx IN A 10.66.4.80 123 redis.nginx IN A 10.66.4.80
124 redis.global IN A 10.66.4.161 124 redis.global IN A 10.66.4.161
125 -redis.java IN A 10.66.4.161  
126 -redis.gateway IN A 10.66.4.200 125 +redis.java IN A {{ redis.java }}
  126 +redis.gateway IN A {{ redis.gateway }}
127 redis.bigdata IN A 10.66.4.156 127 redis.bigdata IN A 10.66.4.156
128 redis.web IN A 10.66.105.49 128 redis.web IN A 10.66.105.49
129 -search.redis IN A 10.66.4.249 129 +search.redis IN A {{ redis.search }}
130 redis.push IN A 10.66.5.182 130 redis.push IN A 10.66.5.182
131 bigdata.rtrec.redis IN A 10.67.1.139 131 bigdata.rtrec.redis IN A 10.67.1.139
132 web.redis IN A 10.66.1.192 132 web.redis IN A 10.66.1.192
@@ -136,12 +136,12 @@ union.redis IN A 10.66.4.127 @@ -136,12 +136,12 @@ union.redis IN A 10.66.4.127
136 136
137 137
138 ;hosts 138 ;hosts
139 -gateway IN A 10.66.0.4  
140 -zk01 IN A 10.66.4.3  
141 -zk02 IN A 10.66.4.4  
142 -zk03 IN A 10.66.4.5  
143 -zk04 IN A 10.66.4.8  
144 -zk05 IN A 10.66.4.9 139 +gateway IN A {{ groups['java-gateway'][0] }}
  140 +zk01 IN A {{ groups['zookeeper'][0] }}
  141 +zk02 IN A {% if groups['zookeeper'] | length > 1 %} {{ groups['zookeeper'][1] }} {% else %} {{ groups['zookeeper'][0] }}{% endif %}
  142 +zk03 IN A {% if groups['zookeeper'] | length > 2 %} {{ groups['zookeeper'][2] }} {% else %} {{ groups['zookeeper'][0] }}{% endif %}
  143 +zk04 IN A {% if groups['zookeeper'] | length > 3 %} {{ groups['zookeeper'][3] }} {% else %} {{ groups['zookeeper'][0] }}{% endif %}
  144 +zk05 IN A {% if groups['zookeeper'] | length > 4 %} {{ groups['zookeeper'][4] }} {% else %} {{ groups['zookeeper'][0] }}{% endif %}
145 145
146 ;java rabbitmq 146 ;java rabbitmq
147 rabbit.order.dc1 IN A 10.66.4.234 147 rabbit.order.dc1 IN A 10.66.4.234