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

sunnianjun 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 7235813  chore(doc): add a brief doc for cloudformation (#92)
7235813 is described below

commit 72358131225a405d9d16d1557ed590608a392928
Author: liyao <[email protected]>
AuthorDate: Wed Oct 12 11:04:18 2022 +0800

    chore(doc): add a brief doc for cloudformation (#92)
    
    * chore: add images for docs
    
    Signed-off-by: mlycore <[email protected]>
    
    * chore(doc): add a brief doc for cloudformation
    
    Signed-off-by: mlycore <[email protected]>
    
    Signed-off-by: mlycore <[email protected]>
---
 doc/images/cfn-1.png                               | Bin 0 -> 70716 bytes
 doc/images/cfn-10.jpeg                             | Bin 0 -> 172360 bytes
 doc/images/cfn-11.png                              | Bin 0 -> 197700 bytes
 doc/images/cfn-12.png                              | Bin 0 -> 675946 bytes
 doc/images/cfn-13.jpeg                             | Bin 0 -> 56988 bytes
 doc/images/cfn-3.png                               | Bin 0 -> 113849 bytes
 doc/images/cfn-4.png                               | Bin 0 -> 126807 bytes
 doc/images/cfn-5.png                               | Bin 0 -> 128784 bytes
 doc/images/cfn-6.png                               | Bin 0 -> 168305 bytes
 doc/images/cfn-7.png                               | Bin 0 -> 132985 bytes
 doc/images/cfn-8.png                               | Bin 0 -> 126992 bytes
 doc/images/cfn-9.png                               | Bin 0 -> 99423 bytes
 doc/images/cnf-2.png                               | Bin 0 -> 78828 bytes
 ...tup-shardingsphere-proxy-with-cloudformation.md |  69 +++++++++++++++++++++
 14 files changed, 69 insertions(+)

diff --git a/doc/images/cfn-1.png b/doc/images/cfn-1.png
new file mode 100644
index 0000000..1dba2b2
Binary files /dev/null and b/doc/images/cfn-1.png differ
diff --git a/doc/images/cfn-10.jpeg b/doc/images/cfn-10.jpeg
new file mode 100644
index 0000000..62fa95c
Binary files /dev/null and b/doc/images/cfn-10.jpeg differ
diff --git a/doc/images/cfn-11.png b/doc/images/cfn-11.png
new file mode 100644
index 0000000..20200f1
Binary files /dev/null and b/doc/images/cfn-11.png differ
diff --git a/doc/images/cfn-12.png b/doc/images/cfn-12.png
new file mode 100644
index 0000000..58730ab
Binary files /dev/null and b/doc/images/cfn-12.png differ
diff --git a/doc/images/cfn-13.jpeg b/doc/images/cfn-13.jpeg
new file mode 100644
index 0000000..daa1d3c
Binary files /dev/null and b/doc/images/cfn-13.jpeg differ
diff --git a/doc/images/cfn-3.png b/doc/images/cfn-3.png
new file mode 100644
index 0000000..eabbce4
Binary files /dev/null and b/doc/images/cfn-3.png differ
diff --git a/doc/images/cfn-4.png b/doc/images/cfn-4.png
new file mode 100644
index 0000000..4d61834
Binary files /dev/null and b/doc/images/cfn-4.png differ
diff --git a/doc/images/cfn-5.png b/doc/images/cfn-5.png
new file mode 100644
index 0000000..0fba3c7
Binary files /dev/null and b/doc/images/cfn-5.png differ
diff --git a/doc/images/cfn-6.png b/doc/images/cfn-6.png
new file mode 100644
index 0000000..74b0c77
Binary files /dev/null and b/doc/images/cfn-6.png differ
diff --git a/doc/images/cfn-7.png b/doc/images/cfn-7.png
new file mode 100644
index 0000000..b23a519
Binary files /dev/null and b/doc/images/cfn-7.png differ
diff --git a/doc/images/cfn-8.png b/doc/images/cfn-8.png
new file mode 100644
index 0000000..0f3ac1a
Binary files /dev/null and b/doc/images/cfn-8.png differ
diff --git a/doc/images/cfn-9.png b/doc/images/cfn-9.png
new file mode 100644
index 0000000..570597f
Binary files /dev/null and b/doc/images/cfn-9.png differ
diff --git a/doc/images/cnf-2.png b/doc/images/cnf-2.png
new file mode 100644
index 0000000..dd8b427
Binary files /dev/null and b/doc/images/cnf-2.png differ
diff --git a/doc/startup-shardingsphere-proxy-with-cloudformation.md 
b/doc/startup-shardingsphere-proxy-with-cloudformation.md
new file mode 100644
index 0000000..ce82a4e
--- /dev/null
+++ b/doc/startup-shardingsphere-proxy-with-cloudformation.md
@@ -0,0 +1,69 @@
+# Startup ShardingSphere Proxy with CloudFormation
+
+As we know that AWS CloudFormation is an easy to use tool for setup any 
environments and infrastructure in an Infrasture as Code way. Since it is 
really helpful, we proposed this CloudFormation Stack template to help people 
who want to try Apache ShardingSphere on AWS in minutes.
+
+## Prerequesites 
+
+Before we start, there are several items on the checklist. 
+
+- [ ] Region ap-north-1, currently the AMI contains Apache ShardingSphere 
Proxy and related components is only available in ap-north-1
+- [ ] An VPC where we place Apache ShardingSphere Proxy 
+- [ ] A designed CIDR and Subnets of this VPC
+- [ ] A SecurityGroup which allows application(e.g. 3307) and control 
traffic(e.g. 22)
+- [ ] A keypair for these instances 
+- [ ] Any tags for this stack 
+
+## Setup a ShardingSphere Proxy cluster
+
+### 1. Create a CloudFormation stack with new resources  
+
+As below shows
+
+![](./images/cfn-1.png)
+![](./images/cfn-2.png)
+
+### 2. Upload the template file in this repo
+
+Upload local file as `cloudformation/apache-shardingsphere-5.2.0.json` to 
CloudFormation, then click `Next`.
+
+![](./images/cfn-3.png)
+![](./images/cfn-4.png)
+
+### 3. Specify CloudFormation stack details
+
+Fill the blanks in this pages, the required informations are prepared in 
[](#prerequesite)
+
+![](./images/cfn-5.png)
+
+### 4. Configure Stack Options
+
+Add some tags to mark this stack. This is always useful for cost analysis.
+
+![](./images/cfn-6.png)
+
+### 5. Review and ensure the configuration
+
+Review the configuration and submit it if everything is expteced.
+
+![](./images/cfn-7.png)
+
+### 6. Check the EC2 instances
+
+After several minutes, the EC2 instances are spinned up.
+
+![](./images/cfn-8.png)
+
+### 7. Check ShardingSphere Proxy and Zookeeper status 
+
+Use `systemctl status shardingsphere` and `./bin/zkServer.sh status` to check 
the status of both components
+
+![](./images/cfn-11.png)
+![](./images/cfn-12.png)
+
+### 8. Test with a simple sharding Demo
+
+Try to create a database `sharding_db` and add two seperate database instances 
`resources`. Then create sharded table `t_order` and insert two rows. Check 
this result like below:
+
+![](./images/cfn-9.png)
+![](./images/cfn-10.jpeg)
+![](./images/cfn-13.jpeg)
\ No newline at end of file

Reply via email to