config-database-discovery.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. ######################################################################################################
  18. #
  19. # Here you can configure the rules for the proxy.
  20. # This example is configuration of HA rule.
  21. #
  22. ######################################################################################################
  23. #
  24. #schemaName: database_discovery_db
  25. #
  26. #dataSources:
  27. # primary_ds:
  28. # url: jdbc:postgresql://127.0.0.1:5432/demo_primary_ds
  29. # username: postgres
  30. # password: postgres
  31. # connectionTimeoutMilliseconds: 3000
  32. # idleTimeoutMilliseconds: 60000
  33. # maxLifetimeMilliseconds: 1800000
  34. # maxPoolSize: 50
  35. # minPoolSize: 1
  36. # replica_ds_0:
  37. # url: jdbc:postgresql://127.0.0.1:5432/demo_replica_ds_0
  38. # username: postgres
  39. # password: postgres
  40. # connectionTimeoutMilliseconds: 3000
  41. # idleTimeoutMilliseconds: 60000
  42. # maxLifetimeMilliseconds: 1800000
  43. # maxPoolSize: 50
  44. # minPoolSize: 1
  45. # replica_ds_1:
  46. # url: jdbc:postgresql://127.0.0.1:5432/demo_replica_ds_1
  47. # username: postgres
  48. # password: postgres
  49. # connectionTimeoutMilliseconds: 3000
  50. # idleTimeoutMilliseconds: 60000
  51. # maxLifetimeMilliseconds: 1800000
  52. # maxPoolSize: 50
  53. # minPoolSize: 1
  54. #
  55. #rules:
  56. #- !DB_DISCOVERY
  57. # dataSources:
  58. # pr_ds:
  59. # dataSourceNames:
  60. # - ds_0
  61. # - ds_1
  62. # - ds_2
  63. # discoveryTypeName: mgr
  64. # discoveryTypes:
  65. # mgr:
  66. # type: MGR
  67. # props:
  68. # groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
  69. # zkServerLists: 'localhost:2181'
  70. # keepAliveCron: '0/5 * * * * ?'
  71. ######################################################################################################
  72. #
  73. # If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
  74. #
  75. ######################################################################################################
  76. #schemaName: database_discovery_db
  77. #
  78. #dataSources:
  79. # ds_0:
  80. # url: jdbc:mysql://127.0.0.1:3306/demo_primary_ds?serverTimezone=UTC&useSSL=false
  81. # username: root
  82. # password:
  83. # connectionTimeoutMilliseconds: 3000
  84. # idleTimeoutMilliseconds: 60000
  85. # maxLifetimeMilliseconds: 1800000
  86. # maxPoolSize: 50
  87. # minPoolSize: 1
  88. # ds_1:
  89. # url: jdbc:mysql://127.0.0.1:3306/demo_replica_ds_0?serverTimezone=UTC&useSSL=false
  90. # username: root
  91. # password:
  92. # connectionTimeoutMilliseconds: 3000
  93. # idleTimeoutMilliseconds: 60000
  94. # maxLifetimeMilliseconds: 1800000
  95. # maxPoolSize: 50
  96. # minPoolSize: 1
  97. # ds_2:
  98. # url: jdbc:mysql://127.0.0.1:3306/demo_replica_ds_1?serverTimezone=UTC&useSSL=false
  99. # username: root
  100. # password:
  101. # connectionTimeoutMilliseconds: 3000
  102. # idleTimeoutMilliseconds: 60000
  103. # maxLifetimeMilliseconds: 1800000
  104. # maxPoolSize: 50
  105. # minPoolSize: 1
  106. #
  107. #rules:
  108. #- !DB_DISCOVERY
  109. # dataSources:
  110. # pr_ds:
  111. # dataSourceNames:
  112. # - ds_0
  113. # - ds_1
  114. # - ds_2
  115. # discoveryTypeName: mgr
  116. # discoveryTypes:
  117. # mgr:
  118. # type: MGR
  119. # props:
  120. # groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
  121. # zkServerLists: 'localhost:2181'
  122. # keepAliveCron: '0/5 * * * * ?'