配置主机间 ssh 互信
ssh-copy-id hadoop02
ssh-copy-id hadoop03
配置系统参数
echo 0 | sudo tee /proc/sys/vm/swappiness
echo 1 | sudo tee /proc/sys/vm/overcommit_memory
echo 262144 | sudo tee /proc/sys/vm/max_map_count
ulimit -n 655350 && echo -e '* soft nofile 655350\\\n* hard nofile 655350' >> /etc/security/limits.conf
ulimit -u 655350 && echo -e '* soft nproc 655350\\\n* hard nproc 655350' >> /etc/security/limits.conf && sed -i 's/4096/655350/' /etc/security/limits.d/20-nproc.conf
ss -antpl | grep -E '8030|9010|9020|9030'
ss -antpl | grep -E '9060|9050|8040|8060|9070'
ss -antpl | grep '8000'
systemctl stop firewalld && systemctl disable firewalld
echo 1 | sudo tee /proc/sys/net/ipv4/tcp_abort_on_overflow
echo 1024 | sudo tee /proc/sys/net/core/somaxconn
setenforce 0
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
timedatectl set-timezone Asia/Shanghai && clock -w
repo.yaml
sr_path: /opt/module/starrocks
sr_name: StarRocks-2.5.19.tar.gz
starrocks-2.5.19.yaml
global :
user : hadoop
ssh_port : 22
fe_servers :
- host : 192.168.153.103
ssh_port : 22
java_heap_mem : 10240
http_port : 8030
rpc_port : 9020
query_port : 9030
edit_log_port : 9010
deploy_dir : /opt/module/starrocks/fe
meta_dir : /opt/module/starrocks/fe/meta
log_dir : /opt/module/starrocks/fe/log
priority_networks : 192.168.153.103
role : FOLLOWER
config :
sys_log_level : "INFO"
be_servers :
- host : 192.168.153.102
ssh_port : 22
be_port : 9060
webserver_port : 8040
heartbeat_service_port : 9050
brpc_port : 8060
deploy_dir : /opt/module/starrocks/be
storage_dir : /opt/module/starrocks/be/storage
log_dir : /opt/module/starrocks/be/log
priority_networks : 192.168.153.102
config :
enable_new_load_on_memory_limit_exceeded : true
mem_limit : 90%
Stargo 部署集群
stargo cluster deploy < cluster_name> < version> < topology_file>
stargo cluster deploy starrocks2_5_19 v2.5.19 starrocks-2.5.19.yaml
验证集群
应用命令
集群列表
[ hadoop@hadoop03 stargo-v2.3] $ ./stargo cluster list
[ 2024 -03-16 11 :58:39.816398 INFO] List all clusters
ClusterName Version User CreateDate MetaPath PrivateKey
--------------- ---------- ---------- ------------------------- ------------------------------------------------------------ --------------------------------------------------
starrocks2_5_19 v2.5.19 hadoop 2024 -03-16 11 :44:11 /home/hadoop/.stargo/cluster/starrocks2_5_19 /home/hadoop/.ssh/id_rsa
展示集群信息
stargo cluster display starrocks2_5_19
启动集群
stargo cluster start starrocks2_5_19 --node 192.168 .153.102:9060
stargo cluster start starrocks2_5_19 --role BE
停止集群
stargo cluster stop starrocks2_5_19
stargo cluster stop starrocks2_5_19 --role BE
stargo cluster stop starrocks2_5_19 --role FE