commit 988fec2e69187d80d2f6802ee04981dc733f0189 Author: A.Hediehloo Date: Wed Oct 29 13:56:58 2025 +0330 first commit diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..9660c86 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +MILVUS_USER=root +MILVUS_PASS=pass \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2eea525 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b762a81 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,92 @@ +version: '3.5' + +services: + etcd: + container_name: milvus-etcd + image: quay.io/coreos/etcd:v3.5.18 + restart: unless-stopped + stdin_open: true + tty: true + environment: + - ETCD_AUTO_COMPACTION_MODE=revision + - ETCD_AUTO_COMPACTION_RETENTION=1000 + - ETCD_QUOTA_BACKEND_BYTES=4294967296 + - ETCD_SNAPSHOT_COUNT=50000 + volumes: + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd + command: etcd -advertise-client-urls=http://etcd:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd + healthcheck: + test: ["CMD", "etcdctl", "endpoint", "health"] + interval: 30s + timeout: 20s + retries: 3 + + minio: + container_name: milvus-minio + image: minio/minio:RELEASE.2024-12-18T13-15-44Z + restart: unless-stopped + stdin_open: true + tty: true + environment: + MINIO_ACCESS_KEY: minioadmin + MINIO_SECRET_KEY: minioadmin + ports: + - "9001:9001" + - "9000:9000" + volumes: + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data + command: minio server /minio_data --console-address ":9001" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] + interval: 30s + timeout: 20s + retries: 3 + + standalone: + container_name: milvus-standalone + image: milvusdb/milvus:v2.6.2 + restart: unless-stopped + stdin_open: true + tty: true + command: ["milvus", "run", "standalone"] + security_opt: + - seccomp:unconfined + environment: + ETCD_ENDPOINTS: etcd:2379 + MINIO_ADDRESS: minio:9000 + MQ_TYPE: woodpecker + volumes: + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus + - ${DOCKER_VOLUME_DIRECTORY:-.}/user.yaml:/milvus/configs/user.yaml + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"] + interval: 30s + start_period: 90s + timeout: 20s + retries: 3 + ports: + - "19530:19530" + - "9091:9091" + depends_on: + - "etcd" + - "minio" + + zilliz_attu: + image: zilliz/attu:v2.6 + container_name: zilliz_attu + ports: + - "3000:3000" + environment: + - ATTU_LOG_LEVEL=info + - MILVUS_URL=localhost:19530 + volumes: + - ./tls:/app/tls + restart: unless-stopped + stdin_open: true + tty: true + + +networks: + default: + name: milvus + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..89427bd --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +python-dotenv +pymilvus diff --git a/update_password.py b/update_password.py new file mode 100644 index 0000000..0c086e2 --- /dev/null +++ b/update_password.py @@ -0,0 +1,21 @@ +from dotenv import load_dotenv +import os +from pymilvus import MilvusClient + + +load_dotenv() + +password = os.getenv("MILVUS_PASS") +user = os.getenv("MILVUS_USER") + + +client = MilvusClient( + uri='http://localhost:19530', # replace with your own Milvus server address + token=user + ":Milvus" +) + +client.update_password( + user_name=user, + old_password="Milvus", + new_password=password +) diff --git a/user.yaml b/user.yaml new file mode 100644 index 0000000..e55cdf7 --- /dev/null +++ b/user.yaml @@ -0,0 +1,29 @@ +# Extra config to override default milvus.yaml + + + +# minio: +# address: cmn-prod-rgw.kp0.mci.dev +# port: 80 # Port of MinIO or S3 service. +# accessKeyID: llm-dataset-backup-52eb6e7b8ff22 +# secretAccessKey: 0849cb0c7bdb5ce9a5d2d918ae9d7275 +# useSSL: false +# ssl: +# tlsCACert: /path/to/public.crt # path to your CACert file +# bucketName: llm-dataset-backup +# rootPath: milvus +# useIAM: false +# cloudProvider: aws +# gcpCredentialJSON: +# iamEndpoint: +# logLevel: fatal # Log level for aws sdk log. Supported level: off, fatal, error, warn, info, debug, trace +# region: # Specify minio storage system location region +# useVirtualHost: false # Whether use virtual host mode for bucket +# requestTimeoutMs: 10000 # minio timeout for request time in milliseconds +# listObjectsMaxKeys: 0 + + +common: + security: + authorizationEnabled: true +