1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
sysctl -w vm.max_map_count=262144 echo "vm.max_map_count=262144" >> /etc/sysctl.d/90-k8s.conf && sysctl -p /etc/sysctl.d/90-k8s.conf && sysctl -a | grep vm.max_map_count
mkdir -p /data/milvus-etcd/{data,log} chown -R 1000:1000 /data/milvus-etcd && docker-compose up -d
$ cat /data/milvus-etcd/etcd.conf.yml name: etcd0 data-dir: /data/etcd/data listen-peer-urls: http://0.0.0.0:3380 listen-client-urls: http://0.0.0.0:3379 advertise-client-urls: http://1.1.1.1.203:3379 initial-advertise-peer-urls: http://1.1.1.1.203:3380
initial-cluster: "etcd0=http://1.1.1.1.203:3380,etcd1=http://1.1.1.1.204:3380,etcd2=http://1.1.1.1.205:3380" initial-cluster-state: new initial-cluster-token: milvus-etcd-cluster
quota-backend-bytes: 17179869184 max-txn-ops: 131072 max-request-bytes: 10485760
heartbeat-interval: 100 election-timeout: 5000 auto-compaction-mode: revision auto-compaction-retention: "1000" snapshot-count: 50000
log-outputs:
- stdout - /data/etcd/log/etcd.log enable-log-rotation: true log-rotation-config-json: | { "maxsize": 100, "maxage": 7, "compress": true }
cat > docker-compose.yml << 'EOF' version: '3.8' services: etcd: image: docker.io/milvusdb/etcd:3.5.25-r1 container_name: milvus-etcd restart: always network_mode: "host" volumes: - /data/milvus-etcd/etcd.conf.yml:/etc/etcd/etcd.conf.yml:ro - /data/milvus-etcd/data:/data/etcd/data - /data/milvus-etcd/log:/data/etcd/log - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro command: etcd --config-file=/etc/etcd/etcd.conf.yml EOF
cat > etcd_health_check.sh << 'EOF' docker exec -it milvus-etcd sh -c 'ETCDCTL_API=3 etcdctl --endpoints="http://1.1.1.1.203:3379,http://1.1.1.1.204:3379,http://1.1.1.1.205:3379" endpoint health --cluster' EOF
|