diff --git a/README.md b/README.md index ad5421ecfe266a669181b7c507788f49fe6f3d64..669701595f985f40db625e08069d4ac3aaac8789 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ K8S一键化部署脚本参照distributed下的 Kubernates环境部署说明.doc #### 使用说明 -1. distributed:一键化部署脚本 +1. distributed:openGauss分布式搭建脚本 2. docker-build:打包镜像 3. patroni-for-openGauss:适配了openGauss的patroni,负责对openGauss数据库集群进行自动故障管理 -4. simple_install:调用的安装脚本 \ No newline at end of file +4. simple_install:K8S环境初始化脚本 \ No newline at end of file diff --git "a/distributed/Kubernates\347\216\257\345\242\203\351\203\250\347\275\262\350\257\264\346\230\216.docx" "b/distributed/Kubernates\347\216\257\345\242\203\351\203\250\347\275\262\350\257\264\346\230\216.docx" index 45456adcde6a60dc512a4e5e2fe5b6faa3749d1c..cbabdf4a8a6157258a1f181c837a430ed45f87fa 100644 Binary files "a/distributed/Kubernates\347\216\257\345\242\203\351\203\250\347\275\262\350\257\264\346\230\216.docx" and "b/distributed/Kubernates\347\216\257\345\242\203\351\203\250\347\275\262\350\257\264\346\230\216.docx" differ diff --git a/distributed/delpoy_sharding.sh b/distributed/delpoy_sharding.sh index 291f6ff13e879dfb3c3165f001dfadeacfe957a7..6da96322f46b0d2bfcad6d34c53885e418e9791d 100644 --- a/distributed/delpoy_sharding.sh +++ b/distributed/delpoy_sharding.sh @@ -30,11 +30,11 @@ spec: nodeName: ${hostname} containers: - name: ${name}-sha - image: shardingsphere:1.0.1 + image: teslacn/shardingsphere-proxy:og-3714873740 imagePullPolicy: Never volumeMounts: - name: config-file - mountPath: /tmp/ + mountPath: /opt/shardingsphere-proxy/conf ports: - containerPort: 3307 name: ${name} diff --git a/distributed/logback.xml b/distributed/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..fad520880229edbc5a9d240f6cd0eacd68d120f9 --- /dev/null +++ b/distributed/logback.xml @@ -0,0 +1,45 @@ + + + + + + + [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n + + + + + + + + + + + + + + + + + + + + + + + diff --git a/distributed/patroni.sh b/distributed/patroni.sh index ba57e713b9b336a9c4edbde973b42ecf39f1a9c2..1148fbafe9fee6625dd832a0f868a02d27067305 100644 --- a/distributed/patroni.sh +++ b/distributed/patroni.sh @@ -33,7 +33,7 @@ spec: restartPolicy: Never containers: - name: ${hostname} - image: opengauss:1.0.5 + image: opengauss:3.0.0 imagePullPolicy: Never securityContext: runAsUser: 0 diff --git a/distributed/server.yaml b/distributed/server.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4afa6e9e86b0f1efc75ddf9e3f7ddf09a8278ca6 --- /dev/null +++ b/distributed/server.yaml @@ -0,0 +1,77 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +###################################################################################################### +# +# If you want to configure governance, authorization and proxy properties, please refer to this file. +# +###################################################################################################### + +#scaling: +# blockQueueSize: 10000 +# workerThread: 40 +# clusterAutoSwitchAlgorithm: +# type: IDLE +# props: +# incremental-task-idle-minute-threshold: 30 +# dataConsistencyCheckAlgorithm: +# type: DEFAULT +# +#mode: +# type: Cluster +# repository: +# type: ZooKeeper +# props: +# namespace: governance_ds +# server-lists: localhost:2181 +# retryIntervalMilliseconds: 500 +# timeToLiveSeconds: 60 +# maxRetries: 3 +# operationTimeoutMilliseconds: 500 +# overwrite: false + +rules: + - !AUTHORITY + users: + - root@%:root + - sharding@:sharding + provider: + type: ALL_PRIVILEGES_PERMITTED +# - !TRANSACTION +# defaultType: XA +# providerType: Atomikos + +props: + max-connections-size-per-query: 2 + # kernel-executor-size: 16 # Infinite by default. + # proxy-frontend-flush-threshold: 128 # The default value is 128. + # proxy-opentracing-enabled: false + # proxy-hint-enabled: false + # sql-show: true +# check-table-metadata-enabled: false +# lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock +# show-process-list-enabled: false +# # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy. +# # The default value is -1, which means set the minimum value for different JDBC drivers. + proxy-backend-query-fetch-size: 1000 +# check-duplicate-table-enabled: false +# sql-comment-parse-enabled: false + proxy-frontend-executor-size: 128 # Proxy frontend executor size. The default value is 0, which means let Netty decide. +# # Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution +# # if client connections are more than proxy-frontend-netty-executor-size, especially executing slow SQL. +# proxy-backend-executor-suitable: OLTP +