Kunlun Database Cluster All-in-One Docker Image User's Guide Kunlun Database Cluster All-in-One Docker Image contains a simple but complete Kunlun distributed database cluster for easy and quick demonstration purpose. Nodes in this docker image was created with limited resources(e.g. 64MB buffer pool for InnoDB), so they are not suitable for performance testing or serious POC work loads. For such work loads, please use independent docker images of computing node and storage node, or use binaries built for Ubuntu-20.04 to deploy a Kunlun distributed DBMS cluster on multiple computer servers. In this docker image the cluster contains these nodes: * A meta-data shard with one primary node and two replica nodes * Two storage shards each with one primary node and two replica nodes * Three independent computing nodes that can be connected with psql client or pgsql client libraries of each programming language. Steps of demonstration 1 Install docker. 2 gzip -d kunlun.tar.gz 3 sudo docker load --input kunlun.tar 4 sudo docker run --name kunlun1 -p 5401:5401 -p 5402:5402 -p 5403:5403 -itd kunlun bash -c 'bash /kunlun/start_kunlun.sh' (The example here uses ports 5401, 5402, 5403, to use other ports, modify above command line accordingly. Refer to port mapping directions of docker run for more information.) 5 wait for 5 minutes: sleep 300 (It takes a little while to start all processes of the Kunlun cluster, and the time taken varies by machines, here we wait for 5 minutes to be sure everything has started even on a very slow machine) 6 check the cluster has started up: 'psql postgres://abc:abc@localhost:5401/postgres' or 'psql -h localhost -p5401 -Uabc postgres' and execute DDL&DML statements. Kunlun-0.8.0 now supports all common DDLs and most DML statements of PostgreSQL. ================================================================================================================================ Kunlun Database Cluster All-in-One Docker镜像使用说明 Kunlun Database Cluster All-in-One Docker镜像含有一个简单而完整的kunlun数据库分布式集群,用于简单快速地演示kunlun数据库的功能。此镜像中的节点只含有非常少的资源,比如innodb buffer pool只有64MB,所以它们不适合做性能测试和POC测试。要做性能测试需要使用本发布包中的独立的docker镜像或者使用在Ubuntu-20.04上面编译成的二进制程序在多台计算机服务器上面来部署昆仑分布式集群。 在该镜像中, 模拟了一个小规模数据集群,该集群具有以下节点: * 1个元数据集群(Meta Shard),含有1个主节点2个备节点 * 2个存储集群(Storage Shard),每个含有1主2备。 * 三个postgresql节点,构成三个各自独立的计算节点,用于处理客户端的数据请求。可以用psql程序或者pgsql客户端连接协议连上去执行DDL&DML语句。 使用步骤 1. 安装docker 2 解压镜像: gzip -d kunlun.tar.gz 3 载入镜像: sudo docker load --input kunlun.tar 4 启动镜像: sudo docker run --name kunlun1 -p 5401:5401 -p 5402:5402 -p 5403:5403 -itd kunlun bash -c 'bash /kunlun/start_kunlun.sh' (这里使用了主机的5401, 5402, 5403端口,需要使用其他端口的,要修改命令行,具体参见docker run的端口映射使用说明) 5 等待5分钟: sleep 300 (docker -itd是立即返回,但启动镜像内部进程需要时间,具体时间因机器而异,这里等待5分钟, 比较保险的做法) 6 验证集群启动成功: psql postgres://abc:abc@localhost:5401/postgres 或者 psql -h localhost -p5401 -Uabc postgres 然后执行DDL和DML语句。 Kunlun-0.8.0 现在已经支持PostgreSQL的所有常用DDL语句和几乎全部DML语句。