环境检查:
部署的前提条件:https://docs.starrocks.io/zh/docs/deployment/deployment_prerequisites/
StarRocks 依靠 AVX2 指令集充分发挥其矢量化能力。因此,在生产环境中,必须保证AVX2 指令集存在
检查AVX2 指令集:
root@starrocks002:~# cat /proc/cpuinfo | grep avx2
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2
x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt c
lwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid md_clear flush_l1d arch_capabilities
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2
x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt c
lwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid md_clear flush_l1d arch_capabilities
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
注意:如果执行后,无打印,说明机器没有AVX2 指令集,运行不了starrocks
docker-compose版本
root@starrocks002:~# docker-compose -v
Docker Compose version v2.27.2
编排文件
cat > docker-compose.yaml << EOF
version: "3"
services:
minio:
container_name: minio
environment:
MINIO_ROOT_USER: miniouser
MINIO_ROOT_PASSWORD: miniopassword
image: registry.cn-shanghai.aliyuncs.com/qwx_images/minio:latest
ports:
- "9001:9001"
- "9000:9000"
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://minio:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
minio_mc:
image: registry.cn-shanghai.aliyuncs.com/qwx_images/mc:latest
entrypoint:
- sh
- -c
- |
until mc alias set myminio http://minio:9000 miniouser miniopassword; do
echo "Waiting for minio to be ready..."
sleep 3
done
echo "Minio is ready, setting up credentials..."
if ! mc admin user svcacct info myminio AAAAAAAAAAAAAAAAAAAA > /dev/null 2>&1; then
mc admin user svcacct add --access-key AAAAAAAAAAAAAAAAAAAA \
--secret-key BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB \
myminio \
miniouser
fi
depends_on:
minio:
condition: service_healthy
starrocks-fe:
image: registry.cn-shanghai.aliyuncs.com/qwx_images/fe-ubuntu:3.2-latest
hostname: starrocks-fe
container_name: starrocks-fe
user: root
command:
- /bin/bash
- -c
- |
echo "# enable shared data, set storage type, set endpoint" >> /opt/starrocks/fe/conf/fe.conf
echo "run_mode = shared_data" >> /opt/starrocks/fe/conf/fe.conf
echo "cloud_native_storage_type = S3" >> /opt/starrocks/fe/conf/fe.conf
echo "aws_s3_endpoint = minio:9000" >> /opt/starrocks/fe/conf/fe.conf
echo "# set the path in MinIO" >> /opt/starrocks/fe/conf/fe.conf
echo "aws_s3_path = starrocks" >> /opt/starrocks/fe/conf/fe.conf
echo "# credentials for MinIO object read/write" >> /opt/starrocks/fe/conf/fe.conf
echo "aws_s3_access_key = AAAAAAAAAAAAAAAAAAAA" >> /opt/starrocks/fe/conf/fe.conf
echo "aws_s3_secret_key = BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" >> /opt/starrocks/fe/conf/fe.conf
echo "aws_s3_use_instance_profile = false" >> /opt/starrocks/fe/conf/fe.conf
echo "aws_s3_use_aws_sdk_default_behavior = false" >> /opt/starrocks/fe/conf/fe.conf
echo "# Set this to false if you do not want default" >> /opt/starrocks/fe/conf/fe.conf
echo "# storage created in the object storage using" >> /opt/starrocks/fe/conf/fe.conf
echo "enable_load_volume_from_conf = true" >> /opt/starrocks/fe/conf/fe.conf
/opt/starrocks/fe/bin/start_fe.sh
ports:
- 8030:8030
- 9020:9020
- 9030:9030
healthcheck:
test: 'mysql -u root -h starrocks-fe -P 9030 -e "show frontends\G" |grep "Alive: true"'
interval: 10s
timeout: 5s
retries: 3
depends_on:
minio:
condition: service_healthy
starrocks-cn:
image: registry.cn-shanghai.aliyuncs.com/qwx_images/cn-ubuntu:3.2-latest
command:
- /bin/bash
- -c
- |
sleep 200s;
ulimit -u 65535;
ulimit -n 65535;
mysql --connect-timeout 2 -h starrocks-fe -P9030 -uroot -e "ALTER SYSTEM ADD COMPUTE NODE \"starrocks-cn:9050\";"
/opt/starrocks/cn/bin/start_cn.sh
ports:
- 8040:8040
hostname: starrocks-cn
container_name: starrocks-cn
user: root
depends_on:
starrocks-fe:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test: 'mysql -u root -h starrocks-fe -P 9030 -e "SHOW COMPUTE NODES\G" |grep "Alive: true"'
interval: 10s
timeout: 5s
retries: 3
EOF
创建存储桶
浏览器打开minio的在线地址
http://10.84.3.129:9001
注意:需要在Buckets中创建starrocks否则,starrocks-cn将报错,可到starrocks-cn容器中的/opt/starrocks/cn/log/cn.INFO查看报错信息
示例:
I0703 06:51:10.169481 1181 agent_server.cpp:436] Submit task success. type=CREATE, signature=10339, task_count_in_queue=10
W0703 06:51:10.174785 1036 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6B127DB7][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/000000000000285C_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:198 file.save(*metadata), signature: 10332
W0703 06:51:10.175204 1466 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6B140674][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/SCHEMA_0000000000002859 error: The specif
ied bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:513 file.save(schema_pb)
be/src/storage/lake/tablet_manager.cpp:177 create_schema_file(req.tablet_id, tablet_metadata_pb->schema()), signature: 10330
W0703 06:51:10.175679 1467 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6B1E0F64][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/000000000000285B_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:198 file.save(*metadata), signature: 10331
W0703 06:51:10.178843 1466 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6B5E672D][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/000000000000285D_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:198 file.save(*metadata), signature: 10333
W0703 06:51:10.179836 1467 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6B6C9D42][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/000000000000285F_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:198 file.save(*metadata), signature: 10335
W0703 06:51:10.181123 1036 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6B7CFA0E][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/000000000000285E_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:198 file.save(*metadata), signature: 10334
W0703 06:51:10.181665 1466 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6B8AB304][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/0000000000002860_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:198 file.save(*metadata), signature: 10336
W0703 06:51:10.182467 1467 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6B9A7B06][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/0000000000002861_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:198 file.save(*metadata), signature: 10337
W0703 06:51:10.183777 1036 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6BAC5B5C][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/0000000000002862_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
be/src/storage/lake/tablet_manager.cpp:198 file.save(*metadata), signature: 10338
W0703 06:51:10.183971 1466 agent_task.cpp:232] create table failed. status: Not found: starlet err [RequestID=17DEA14F6BAD7196][StatusCode=404]Put object s3://starrocks/0a861f1d-511e-4d23-9ddd-555f9b504b86/db10004/10328/10327/meta/0000000000002863_0000000000000001.me
ta error: The specified bucket does not exist
be/src/storage/protobuf_file.cpp:147 output_file->close()
相关容器目录持久化
FE的相关目录:
meta目录:/opt/starrocks/fe/meta/
log目录:/opt/starrocks/fe/log/
配置文件目录:/opt/starrocks/fe/conf/
CN的相关目录:
配置文件目录:/opt/starrocks/cn/conf/
log目录:/opt/starrocks/cn/log/
MiniO的相关目录:
数据目录:/minio_data/
仅登录用户可评论,点击 登录