Cosdata is a versatile vector database solution featuring high performance, immutability, and versioning capabilities, catering to a wide range of AI and machine learning applications. Cosdata supports embedding-based search and similarity queries, real-time vector search at scale, and seamless integration with existing ML pipelines.
This guide provides step-by-step instructions for installing Cosdata on Linux systems.
Before installing Cosdata, ensure you have the following:
- Git
- Rust (latest stable version)
- Cargo (Rust's package manager)
- A C++ compiler (GCC 4.8+ or Clang 3.4+)
- CMake (3.10+)
Clone the Cosdata repository:
git clone https://github.com/cosdata/cosdata.git
cd cosdata
Build the project:
cargo build --release
While developing Cosdata, you can use self-signed certificates for testing the APIs, this sections mentions how you can generate and setup them.
Run the following commands in sequence to get the private key and certificate
openssl req -newkey rsa:2048 -nodes -keyout private_key.pem -x509 -days 365 -out self_signed_certificate.crt
# Convert the private key to PKCS#8 format
openssl pkcs8 -topk8 -inform PEM -outform PEM -in private_key.pem -out private_key_pkcs8.pem -nocrypt
Set the SSL_CERT_DIR
environment variable to the folder where you're gonna store the certificates:
export SSL_CERT_DIR="/etc/ssl"
Move certificates to appropriate folders and set permissions:
# Create directories if don't exist
sudo mkdir -p $SSL_CERT_DIR
sudo mkdir -p $SSL_CERT_DIR/certs
sudo mkdir -p $SSL_CERT_DIR/private
# Move certificates
sudo mv self_signed_certificate.crt $SSL_CERT_DIR/certs/cosdata-ssl.crt
sudo mv private_key_pkcs8.pem $SSL_CERT_DIR/private/cosdata-ssl.key
# Change private key file permissions
sudo chgrp ssl-cert $SSL_CERT_DIR/private/cosdata-ssl.key
sudo chmod 640 $SSL_CERT_DIR/private/cosdata-ssl.key
sudo usermod -aG ssl-cert $USER
# Change private key folder permissions
sudo chmod 750 $SSL_CERT_DIR/private
sudo chgrp ssl-cert $SSL_CERT_DIR/private
# Add yourself to ssl-cert group (you may need to re-login after this)
newgrp ssl-cert