# 脚本索引 本文件列出了所有已整理的脚本及其功能说明。 ## 设置和初始化脚本 (setup/) ### 初始化脚本 (setup/init/) - `init-vault-dev.sh` - 初始化开发环境的 Vault - `init-vault-dev-api.sh` - 通过 API 初始化开发环境的 Vault - `init-vault-cluster.sh` - 初始化 Vault 集群 ### 配置生成脚本 (setup/config/) - `setup-consul-cluster-variables.sh` - 设置 Consul 集群变量 - `setup-consul-variables-and-storage.sh` - 设置 Consul 变量和存储 - `generate-consul-config.sh` - 生成 Consul 配置文件 ## 部署脚本 (deployment/) ### Vault 部署 (deployment/vault/) - `deploy-vault.sh` - 部署 Vault - `vault-dev-example.sh` - Vault 开发环境示例 - `vault-dev-quickstart.sh` - Vault 开发环境快速启动 ### Consul 部署 (deployment/consul/) - `deploy-consul-cluster-kv.sh` - 部署 Consul 集群(使用 KV 存储) - `consul-variables-example.sh` - Consul 变量示例 ## 测试脚本 (testing/) ### 主测试运行器 (testing/) - `test-runner.sh` - 主测试运行器 ### 集成测试 (testing/integration/) - `verify-vault-consul-integration.sh` - 验证 Vault-Consul 集成 ### 基础设施测试 (testing/infrastructure/) - `test-nomad-config.sh` - 测试 Nomad 配置 - `test-traefik-deployment.sh` - 测试 Traefik 部署 ### MCP 测试 (testing/mcp/) - `test_direct_search.sh` - 直接搜索测试 - `test_local_mcp_servers.sh` - 本地 MCP 服务器测试 - `test_mcp_interface.sh` - MCP 接口测试 - `test_mcp_search_final.sh` - MCP 搜索最终测试 - `test_mcp_servers.sh` - MCP 服务器测试 - `test_qdrant_ollama_tools.sh` - Qdrant Ollama 工具测试 - `test_qdrant_ollama_tools_fixed.sh` - Qdrant Ollama 工具修复测试 - `test_search_documents.sh` - 搜索文档测试 - `test_mcp_servers_comprehensive.py` - MCP 服务器综合测试(Python) - `test_mcp_servers_improved.py` - MCP 服务器改进测试(Python) - `test_mcp_servers_simple.py` - MCP 服务器简单测试(Python) - `test_qdrant_ollama_server.py` - Qdrant Ollama 服务器测试(Python) ## 工具脚本 (utilities/) ### 备份工具 (utilities/backup/) - `backup-consul.sh` - 备份 Consul 数据 ### 维护工具 (utilities/maintenance/) - `cleanup-global-config.sh` - 清理全局配置 ### 辅助工具 (utilities/helpers/) - `show-vault-dev-keys.sh` - 显示 Vault 开发环境密钥 - `nomad-leader-discovery.sh` - Nomad 领导者发现 - `manage-vault-consul.sh` - 管理 Vault-Consul - `fix-alpine-cgroups.sh` - 修复 Alpine cgroups - `fix-alpine-cgroups-systemd.sh` - 修复 Alpine cgroups(systemd) ## MCP 相关脚本 (mcp/) ### MCP 服务器 (mcp/servers/) - `qdrant-mcp-server.py` - Qdrant MCP 服务器 - `qdrant-ollama-integration.py` - Qdrant Ollama 集成 - `qdrant-ollama-mcp-server.py` - Qdrant Ollama MCP 服务器 ### MCP 配置 (mcp/configs/) - `sync-all-configs.sh` - 同步所有 MCP 配置 ### MCP 工具 (mcp/tools/) - `start-mcp-server.sh` - 启动 MCP 服务器 ## 使用说明 ### 快速启动命令 ```bash # 运行所有测试 ./scripts/testing/test-runner.sh # 初始化开发环境 ./scripts/setup/init/init-vault-dev.sh # 部署 Consul 集群 ./scripts/deployment/consul/deploy-consul-cluster-kv.sh # 启动 MCP 服务器 ./scripts/mcp/tools/start-mcp-server.sh # 备份 Consul ./scripts/utilities/backup/backup-consul.sh ``` ### 权限设置 确保所有脚本都有执行权限: ```bash find scripts/ -name "*.sh" -exec chmod +x {} \; ``` ### 环境变量 某些脚本可能需要特定的环境变量,请参考各脚本的注释说明。