Skip to content

Commit ce008bf

Browse files
committed
merge complete
2 parents 809fd13 + 5d986e8 commit ce008bf

File tree

9 files changed

+3108
-1195
lines changed

9 files changed

+3108
-1195
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,44 @@ vcon-server-conserver-1 | {"asctime": "2024-08-23 17:27:22,240", "levelname": "
268268
```
269269

270270
The [vCon admin program](https://github.com/vcon-dev/vcon-admin) is a nice tool for managing the conserver. 
271+
272+
## Storage Modules
273+
274+
### Milvus Vector Database Storage
275+
276+
The vcon-server includes support for storing vCons in Milvus, a vector database that enables semantic search across vCon content. This is particularly useful for finding conversations based on meaning rather than exact keyword matches.
277+
278+
To set up Milvus storage:
279+
280+
1. Install the required packages:
281+
```bash
282+
poetry add pymilvus>=2.3.0 openai>=1.54.3 python-dateutil
283+
```
284+
285+
2. Add Milvus storage configuration to your config.yml:
286+
```yaml
287+
storages:
288+
milvus:
289+
module: storage.milvus
290+
options:
291+
host: "localhost" # Milvus server host
292+
port: "19530" # Milvus server port
293+
collection_name: "vcons" # Name of collection in Milvus
294+
embedding_model: "text-embedding-3-small" # OpenAI embedding model
295+
embedding_dim: 1536 # Dimensions for the embedding model
296+
api_key: "your-openai-api-key" # Your OpenAI API key
297+
organization: "your-org-id" # Optional: Your OpenAI organization ID
298+
create_collection_if_missing: true # Auto-create collection if needed
299+
```
300+
301+
3. Include the Milvus storage in your processing chain:
302+
```yaml
303+
chains:
304+
main_chain:
305+
# ... other configuration ...
306+
storages:
307+
- milvus
308+
# ... other storages ...
309+
```
310+
311+
See the [Milvus Storage Module README](server/storage/milvus/README.md) for more details on configuration and usage.

example_config.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,36 @@ storages:
5252
aws_access_key_id: some_key
5353
aws_secret_access_key: some_secret
5454
aws_bucket: some_bucket
55+
milvus:
56+
module: storage.milvus
57+
options:
58+
# Connection settings
59+
host: "localhost"
60+
port: "19530"
61+
collection_name: "vcons"
62+
63+
# Embedding settings
64+
embedding_model: "text-embedding-3-small"
65+
embedding_dim: 1536
66+
api_key: "your-openai-api-key"
67+
organization: ""
68+
69+
# Operation settings
70+
create_collection_if_missing: true
71+
skip_if_exists: true
72+
73+
# Vector index settings (Default: IVF_FLAT with L2 distance)
74+
index_type: "IVF_FLAT" # Options: IVF_FLAT, IVF_SQ8, IVF_PQ, HNSW, FLAT
75+
metric_type: "L2" # Options: L2, IP, COSINE
76+
nlist: 128 # For IVF indexes: number of clusters
77+
78+
# Advanced HNSW settings (used only if index_type is HNSW)
79+
# m: 16 # Number of edges per node
80+
# ef_construction: 200 # Size of dynamic candidate list during construction
81+
82+
# Advanced IVF_PQ settings (used only if index_type is IVF_PQ)
83+
# pq_m: 8 # Number of sub-quantizers
84+
# pq_nbits: 8 # Bit depth per quantizer
5585
chains:
5686
sample_chain:
5787
links:
@@ -65,6 +95,7 @@ chains:
6595
- mongo
6696
- postgres
6797
- s3
98+
- milvus
6899
egress_lists:
69100
- test_output
70101
enabled: 1

poetry.lock

Lines changed: 1728 additions & 1195 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ anyio = "^4.8.0"
4242
faker = "^33.3.1"
4343
jq = "^1.8.0"
4444
pytest-redis = "^3.1.3"
45+
pymilvus = ">=2.3.0"
46+
python-dateutil = "^2.8.2"
4547

4648

4749
[tool.poetry.group.dev.dependencies]

scripts/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Conserver Installation Script
2+
3+
A bash script to easily install and configure Conserver vCon Server with all necessary components.
4+
5+
## Overview
6+
7+
This script automates the installation process for the Conserver vCon Server, setting up:
8+
- Docker containers
9+
- MongoDB
10+
- Redis
11+
- vCon Server API
12+
- Admin interface
13+
- Traefik for routing
14+
15+
## Quick Installation
16+
17+
```bash
18+
curl -o install_conserver.sh https://raw.githubusercontent.com/your-username/your-repo/main/install_conserver.sh
19+
chmod +x install_conserver.sh
20+
sudo ./install_conserver.sh --domain your-domain.com --email your-email@example.com
21+
```
22+
23+
## Requirements
24+
25+
- Ubuntu Linux (recommended)
26+
- Root access
27+
- Public internet access
28+
- DNS record pointing to your server for the domain you specify
29+
30+
## Usage Options
31+
32+
```bash
33+
./install_conserver.sh [options]
34+
```
35+
36+
### Required Parameters:
37+
- `-d, --domain DOMAIN` - Domain name for the installation
38+
- `-e, --email EMAIL` - Email for DNS registration and notifications
39+
40+
### Optional Parameters:
41+
- `-t, --token TOKEN` - API token (default: randomly generated)
42+
- `-h, --help` - Display help information
43+
44+
## Post-Installation
45+
46+
After successful installation, you'll have access to:
47+
48+
- **Admin Portal**: `https://your-domain.com/admin/` (default login: admin/admin)
49+
- **API Documentation**: `https://your-domain.com/api/docs`
50+
- **API Token**: Displayed at the end of installation (save this!)
51+
- **MongoDB Express**: `https://your-domain.com/mongo-express`
52+
- **Redis Stack**: `http://localhost:8001`
53+
54+
## Configuration
55+
56+
The script creates the following configuration:
57+
- Docker network named "conserver"
58+
- MongoDB for vCon storage
59+
- Redis for message queuing
60+
- Pipeline configuration with tags set to "conserver"
61+
62+
## Troubleshooting
63+
64+
If you encounter issues:
65+
66+
1. Check Docker container status: `docker ps`
67+
2. Inspect Docker network: `docker network inspect conserver`
68+
3. View container logs: `docker logs [container-name]`
69+
70+
## Security Notes
71+
72+
- Change the default admin/admin credentials immediately after installation
73+
- The API token is displayed at the end of installation - save it securely
74+
- Consider restricting access to Redis on port 8001 if not needed externally
75+
76+
## License
77+
78+
This script is provided as-is under the same license as the Conserver vCon Server.
79+
80+
## Contributing
81+
82+
Feel free to submit issues or pull requests to improve this installation script.

0 commit comments

Comments
 (0)