From f57fb52f935c67e68469717c11d31f03d1bbfb1a Mon Sep 17 00:00:00 2001 From: "Xu Han@AutoMQ" Date: Fri, 2 Aug 2024 10:54:47 +0800 Subject: [PATCH] chore(cli): rename configs to config (#1708) Signed-off-by: Robin Han --- .../java/com/automq/shell/commands/cluster/Deploy.java | 6 +++--- .../src/main/java/com/automq/shell/model/Global.java | 10 +++++----- automq-shell/src/main/resources/template/topo.yaml | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/automq-shell/src/main/java/com/automq/shell/commands/cluster/Deploy.java b/automq-shell/src/main/java/com/automq/shell/commands/cluster/Deploy.java index 016d6bb81f..c6f3797678 100644 --- a/automq-shell/src/main/java/com/automq/shell/commands/cluster/Deploy.java +++ b/automq-shell/src/main/java/com/automq/shell/commands/cluster/Deploy.java @@ -88,7 +88,7 @@ public static void main(String... args) throws Exception { private static void bucketReadinessCheck(ClusterTopology topo) { try { Properties properties = new Properties(); - properties.load(new StringReader(topo.getGlobal().getConfigs())); + properties.load(new StringReader(topo.getGlobal().getConfig())); String dataBuckets = properties.getProperty("s3.data.buckets"); String opsBuckets = properties.getProperty("s3.ops.buckets"); if (StringUtils.isBlank(dataBuckets) || StringUtils.isBlank(opsBuckets)) { @@ -131,7 +131,7 @@ private static String genServerStartupCmd(ClusterTopology topo, Node node) { appendEnvs(sb, topo); sb.append("./bin/kafka-server-start.sh config/kraft/server.properties "); appendCommonConfigsOverride(sb, topo, node); - appendExtConfigsOverride(sb, topo.getGlobal().getConfigs()); + appendExtConfigsOverride(sb, topo.getGlobal().getConfig()); return sb.toString(); } @@ -140,7 +140,7 @@ private static String genBrokerStartupCmd(ClusterTopology topo, Node node) { appendEnvs(sb, topo); sb.append("./bin/kafka-server-start.sh -daemon config/kraft/broker.properties "); appendCommonConfigsOverride(sb, topo, node); - appendExtConfigsOverride(sb, topo.getGlobal().getConfigs()); + appendExtConfigsOverride(sb, topo.getGlobal().getConfig()); return sb.toString(); } diff --git a/automq-shell/src/main/java/com/automq/shell/model/Global.java b/automq-shell/src/main/java/com/automq/shell/model/Global.java index 8aea2b192d..4af768ce51 100644 --- a/automq-shell/src/main/java/com/automq/shell/model/Global.java +++ b/automq-shell/src/main/java/com/automq/shell/model/Global.java @@ -18,7 +18,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Global { private String clusterId; - private String configs; + private String config; private List envs; public String getClusterId() { @@ -29,12 +29,12 @@ public void setClusterId(String clusterId) { this.clusterId = clusterId; } - public String getConfigs() { - return configs; + public String getConfig() { + return config; } - public void setConfigs(String configs) { - this.configs = configs; + public void setConfig(String config) { + this.config = config; } public List getEnvs() { diff --git a/automq-shell/src/main/resources/template/topo.yaml b/automq-shell/src/main/resources/template/topo.yaml index d7e5605809..ca1f91933a 100644 --- a/automq-shell/src/main/resources/template/topo.yaml +++ b/automq-shell/src/main/resources/template/topo.yaml @@ -1,11 +1,12 @@ global: clusterId: '' + # bucket URI pattern: 0@s3://$bucket?region=$region&endpoint=$endpoint # bucket URI example: # AWS : 0@s3://xxx_bucket?region=us-east-1 # AWS-CN: 0@s3://xxx_bucket?region=cn-northwest-1&endpoint=https://s3.amazonaws.com.cn # ALIYUN: 0@s3://xxx_bucket?region=oss-cn-shanghai&endpoint=https://oss-cn-shanghai.aliyuncs.com # TENCENT: 0@s3://xxx_bucket?region=ap-beijing&endpoint=https://cos.ap-beijing.myqcloud.com - configs: | + config: | s3.data.buckets=0@s3://xxx_bucket?region=us-east-1 s3.ops.buckets=1@s3://xxx_bucket?region=us-east-1 envs: