You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/12/23 09:56:22 UTC

[shardingsphere-on-cloud] branch main updated: chore(terraform,cloudformation): unified shardingsphere proxy nameing Signed-off-by: xuanyuan300

This is an automated email from the ASF dual-hosted git repository.

panjuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git


The following commit(s) were added to refs/heads/main by this push:
     new 9c93683  chore(terraform,cloudformation): unified shardingsphere proxy nameing Signed-off-by: xuanyuan300 <xu...@gmail.com>
     new f6f5685  Merge pull request #155 from xuanyuan300/unify-name
9c93683 is described below

commit 9c93683c1b13d0a522f9f0e072dcfe4d5aeeb58a
Author: xuanyuan300 <xu...@gmail.com>
AuthorDate: Fri Dec 23 17:52:13 2022 +0800

    chore(terraform,cloudformation): unified shardingsphere proxy nameing
    Signed-off-by: xuanyuan300 <xu...@gmail.com>
---
 cloudformation/multi-az/cloudwatch-agent.json      |  2 +-
 .../multi-az/shardingsphere-cloud-init.yml         | 24 ++++++++++----------
 terraform/amazon/shardingsphere/cloud-init.yml     | 26 +++++++++++-----------
 terraform/huawei/cloud-init.yml                    | 24 ++++++++++----------
 4 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/cloudformation/multi-az/cloudwatch-agent.json b/cloudformation/multi-az/cloudwatch-agent.json
index 790a9eb..1b0a261 100644
--- a/cloudformation/multi-az/cloudwatch-agent.json
+++ b/cloudformation/multi-az/cloudwatch-agent.json
@@ -51,7 +51,7 @@
       "files": {
         "collect_list": [
           {
-            "file_path": "/usr/local/shardingsphere/logs/*.log",
+            "file_path": "/usr/local/shardingsphere-proxy/logs/*.log",
             "log_group_name": "shardingsphere-proxy.log",
             "timezone": "UTC",
             "timestamp_format": "%Y-%m-%d %H:%M:%S,%f"
diff --git a/cloudformation/multi-az/shardingsphere-cloud-init.yml b/cloudformation/multi-az/shardingsphere-cloud-init.yml
index 3d725f5..2dd7720 100644
--- a/cloudformation/multi-az/shardingsphere-cloud-init.yml
+++ b/cloudformation/multi-az/shardingsphere-cloud-init.yml
@@ -23,18 +23,18 @@ packages:
 - nc
 
 write_files:
-- path: /run/shardingsphere.service
+- path: /run/shardingsphere-proxy.service
   permissions: 0644
   content: |
     [Unit]
-    Description=ShardingSphere Service
+    Description=ShardingSphere Proxy Service
     Requires=network.target
     After=network.target
     [Service]
     Type=forking
     LimitNOFILE=65536
-    ExecStart=/usr/local/shardingsphere/bin/start.sh
-    ExecStop=/usr/local/shardingsphere/bin/stop.sh
+    ExecStart=/usr/local/shardingsphere-proxy/bin/start.sh
+    ExecStop=/usr/local/shardingsphere-proxy/bin/stop.sh
     Environment="JAVA_MEM_COMMON_OPTS=${JAVA_MEM_OPTS}"
     Restart=always
     RestartSec=3
@@ -97,18 +97,18 @@ write_files:
       proxy-default-port: 3307 # Proxy default port.
       proxy-netty-backlog: 1024 # Proxy netty backlog.
 
-- path: /run/install_shardingsphere.sh
+- path: /run/install_shardingsphere_proxy.sh
   permissions: 0700
   content: |
     echo Installing ShardingSphere v${VERSION}
     wget -O /run/ss.tar.gz https://archive.apache.org/dist/shardingsphere/${VERSION}/apache-shardingsphere-${VERSION}-shardingsphere-proxy-bin.tar.gz
-    mkdir -p /usr/local/shardingsphere
-    tar xvf /run/ss.tar.gz --strip 1 -C /usr/local/shardingsphere
-    /bin/cp -avf /run/server.yaml /usr/local/shardingsphere/conf/server.yaml
-    /bin/cp -avf /run/shardingsphere.service /usr/lib/systemd/system/shardingsphere.service
+    mkdir -p /usr/local/shardingsphere-proxy
+    tar xvf /run/ss.tar.gz --strip 1 -C /usr/local/shardingsphere-proxy
+    /bin/cp -avf /run/server.yaml /usr/local/shardingsphere-proxy/conf/server.yaml
+    /bin/cp -avf /run/shardingsphere-proxy.service /usr/lib/systemd/system/shardingsphere-proxy.service
     systemctl daemon-reload
-    systemctl enable shardingsphere
-    systemctl start shardingsphere
+    systemctl enable shardingsphere-proxy
+    systemctl start shardingsphere-proxy
 
 - path: /run/install_cloudwatch.sh
   permissions: 0700
@@ -118,5 +118,5 @@ write_files:
     /opt/aws/bin/cfn-init -v --stack ${AWS::StackId} --resource ${LaunchTemplateName} --region ${AWS::Region} --configsets default
     /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackId} --resource ${ASGName} --region ${AWS::Region}
 runcmd:
-- /run/install_shardingsphere.sh
+- /run/install_shardingsphere_proxy.sh
 - /run/install_cloudwatch.sh
diff --git a/terraform/amazon/shardingsphere/cloud-init.yml b/terraform/amazon/shardingsphere/cloud-init.yml
index a63d69a..9a809e9 100644
--- a/terraform/amazon/shardingsphere/cloud-init.yml
+++ b/terraform/amazon/shardingsphere/cloud-init.yml
@@ -21,18 +21,18 @@ packages:
 - nc
 
 write_files:
-- path: /run/shardingsphere.service
+- path: /run/shardingsphere-proxy.service
   permissions: 0644
   content: |
     [Unit]
-    Description=ShardingSphere Service
+    Description=ShardingSphere Proxy Service
     Requires=network.target
     After=network.target
     [Service]
     Type=forking
     LimitNOFILE=65536
-    ExecStart=/usr/local/shardingsphere/bin/start.sh
-    ExecStop=/usr/local/shardingsphere/bin/stop.sh
+    ExecStart=/usr/local/shardingsphere-proxy/bin/start.sh
+    ExecStop=/usr/local/shardingsphere-proxy/bin/stop.sh
     Restart=always
     RestartSec=3
     StartLimitInterval=0
@@ -94,18 +94,18 @@ write_files:
       proxy-default-port: 3307 # Proxy default port.
       proxy-netty-backlog: 1024 # Proxy netty backlog.
 
-- path: /run/install_shardingsphere.sh
+- path: /run/install_shardingsphere_proxy.sh
   permissions: 0700
   content: |
     echo Installing ShardingSphere v${version}
     wget -O /run/ss.tar.gz https://archive.apache.org/dist/shardingsphere/${version}/apache-shardingsphere-${version}-shardingsphere-proxy-bin.tar.gz
-    mkdir -p /usr/local/shardingsphere
-    tar xvf /run/ss.tar.gz --strip 1 -C /usr/local/shardingsphere
-    /bin/cp -avf /run/server.yaml /usr/local/shardingsphere/conf/server.yaml
-    /bin/cp -avf /run/shardingsphere.service /usr/lib/systemd/system/shardingsphere.service
+    mkdir -p /usr/local/shardingsphere-proxy
+    tar xvf /run/ss.tar.gz --strip 1 -C /usr/local/shardingsphere-proxy
+    /bin/cp -avf /run/server.yaml /usr/local/shardingsphere-proxy/conf/server.yaml
+    /bin/cp -avf /run/shardingsphere-proxy.service /usr/lib/systemd/system/shardingsphere-proxy.service
     systemctl daemon-reload
-    systemctl enable shardingsphere
-    systemctl start shardingsphere
+    systemctl enable shardingsphere-proxy
+    systemctl start shardingsphere-proxy
 
 - path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json
   permissions: 0644
@@ -163,7 +163,7 @@ write_files:
           "files": {
             "collect_list": [
               {
-                "file_path": "/usr/local/shardingsphere/logs/*.log",
+                "file_path": "/usr/local/shardingsphere-proxy/logs/*.log",
                 "log_group_name": "shardingsphere-proxy.log",
                 "timezone": "UTC",
                 "timestamp_format": "%Y-%m-%d %H:%M:%S,%f"
@@ -184,5 +184,5 @@ write_files:
     systemctl enable amazon-cloudwatch-agent 
     systemctl start amazon-cloudwatch-agent
 runcmd:
-- /run/install_shardingsphere.sh
+- /run/install_shardingsphere_proxy.sh
 - /run/install_cloudwatch.sh
diff --git a/terraform/huawei/cloud-init.yml b/terraform/huawei/cloud-init.yml
index 5ce099c..cdf673e 100644
--- a/terraform/huawei/cloud-init.yml
+++ b/terraform/huawei/cloud-init.yml
@@ -21,18 +21,18 @@ packages:
 - netcat
 
 write_files:
-- path: /run/shardingsphere.service
+- path: /run/shardingsphere-proxy.service
   permissions: 0644
   content: |
     [Unit]
-    Description=ShardingSphere Service
+    Description=ShardingSphere Proxy Service
     Requires=network.target
     After=network.target
     [Service]
     Type=forking
     LimitNOFILE=65536
-    ExecStart=/usr/local/shardingsphere/bin/start.sh
-    ExecStop=/usr/local/shardingsphere/bin/stop.sh
+    ExecStart=/usr/local/shardingsphere-proxy/bin/start.sh
+    ExecStop=/usr/local/shardingsphere-proxy/bin/stop.sh
     Restart=always
     RestartSec=3
     StartLimitInterval=0
@@ -111,21 +111,21 @@ write_files:
           maxRetries: 3
           operationTimeoutMilliseconds: 500
 %{ endif }
-- path: /run/install_shardingsphere.sh
+- path: /run/install_shardingsphere_proxy.sh
   permissions: 0700
   content: |
     #!/bin/bash
     echo Installing ShardingSphere v${version}
     wget -O /run/ss.tar.gz https://mirrors.huaweicloud.com/apache/shardingsphere/${version}/apache-shardingsphere-${version}-shardingsphere-proxy-bin.tar.gz
-    mkdir -p /usr/local/shardingsphere
-    tar xvf /run/ss.tar.gz --strip 1 -C /usr/local/shardingsphere
+    mkdir -p /usr/local/shardingsphere-proxy
+    tar xvf /run/ss.tar.gz --strip 1 -C /usr/local/shardingsphere-proxy
     if [ -f /run/server.yaml ]; then
-      /bin/cp -avf /run/server.yaml /usr/local/shardingsphere/conf/server.yaml
+      /bin/cp -avf /run/server.yaml /usr/local/shardingsphere-proxy/conf/server.yaml
     fi
-    /bin/cp -avf /run/shardingsphere.service /usr/lib/systemd/system/shardingsphere.service
+    /bin/cp -avf /run/shardingsphere-proxy.service /usr/lib/systemd/system/shardingsphere-proxy.service
     systemctl daemon-reload
-    systemctl enable shardingsphere
-    systemctl start shardingsphere
+    systemctl enable shardingsphere-proxy
+    systemctl start shardingsphere-proxy
 
 runcmd:
-- bash /run/install_shardingsphere.sh
+- bash /run/install_shardingsphere_proxy.sh