Skip to content

On-Premise Installation Guide for Cognipeer

This guide explains how to deploy the Cognipeer application on-premise using a single Docker container. With the proper configuration, the application will be ready to use immediately. A scalable version is planned for future release.

Note: The Cognipeer image is distributed via AWS ECR. You will need the provided accessKey and Secret credentials from your company to access the repository.

Prerequisites

  • Docker: Ensure Docker is installed on your host machine.
  • AWS CLI: Installed and configured with your provided AWS credentials to authenticate with ECR.
  • (Optional) Kubernetes: If you plan to deploy Cognipeer on a Kubernetes cluster.

Environment Variables

Before starting the container, define the following environment variables:

VariableDescriptionDefault Value
LICENCEYour application license key.Required
ADMIN_EMAILAdministrator email address.Required
ADMIN_PASSWORDAdministrator password.Required
EMAIL_SERVEREmail server for sending notifications.Optional
EMAIL_PORTPort for the email server.Optional
EMAIL_USERNAMEUsername for the email server.Optional
EMAIL_PASSWORDPassword for the email server.Optional
EMAIL_FROMDefault sender email address.Optional
LOCAL_FILE_PATHPath for local file storage.Optional
./files
LOCAL_VECTOR_DB_PATHPath for the local vector database.Optional
./data/vector
MONGODB_URLURL for the MongoDB instance.Optional
Will use local MongoDB instance if empty
APPLICATION_URLURL for the application.Optional
http://127.0.0.1:3000
API_URLURL for the API endpoint.Optional
http://127.0.0.1:8080

Once these are set, the application will run with the default configuration.

Ports

PortDescription
8080API
3000UI
27017MongoDB

Paths for Volume Mapping

DescriptionDefault Path
Local vector database/app/api-source/data
Local file storage/app/api-source/files
MongoDB Files/data/db

Docker Deployment

Step 1: Log in to AWS ECR

Use the AWS CLI to log in to your ECR repository:

bash
aws ecr get-login-password --region <region> --profile <profile> | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com

Replace 'region' and 'aws_account_id' with your actual AWS region and account ID.

Step 2: Run the Docker Container

Run the container with the necessary environment variables:

bash
docker run -d \
  -e LICENCE="<your-licence-key>" \
  -e ADMIN_EMAIL="<your-admin-email>" \
  -e ADMIN_PASSWORD="<your-admin-password>" \
  -e EMAIL_SERVER="<optional-email-server>" \
  -e EMAIL_PORT="<optional-email-port>" \
  -e EMAIL_USERNAME="<optional-email-username>" \
  -e EMAIL_PASSWORD="<optional-email-password>" \
  -e EMAIL_FROM="<optional-email-from>" \
  -e LOCAL_FILE_PATH="./files" \
  -e LOCAL_VECTOR_DB_PATH="./data/vector" \
  -e MONGODB_URL="<mongodb-url>" \
  -e APPLICATION_URL="<application-url>" \
  -e API_URL="<api-url>" \
  <aws_account_id>.dkr.ecr.<region>.amazonaws.com/cognipeer:latest

Be sure to replace the placeholder values with your actual configuration details.

Kubernetes Deployment

If you prefer to deploy Cognipeer using Kubernetes, use the following sample YAML as a starting point. Adjust the values as needed for your environment.

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cognipeer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cognipeer
  template:
    metadata:
      labels:
        app: cognipeer
    spec:
      containers:
        - name: cognipeer
          image: <aws_account_id>.dkr.ecr.<region>.amazonaws.com/cognipeer:latest
          env:
            - name: LICENCE
              value: "<your-licence-key>"
            - name: ADMIN_EMAIL
              value: "<your-admin-email>"
            - name: ADMIN_PASSWORD
              value: "<your-admin-password>"
            - name: EMAIL_SERVER
              value: "<optional-email-server>"
            - name: EMAIL_PORT
              value: "<optional-email-port>"
            - name: EMAIL_USERNAME
              value: "<optional-email-username>"
            - name: EMAIL_PASSWORD
              value: "<optional-email-password>"
            - name: EMAIL_FROM
              value: "<optional-email-from>"
            - name: LOCAL_FILE_PATH
              value: "./files"
            - name: LOCAL_VECTOR_DB_PATH
              value: "./data/vector"
            - name: MONGODB_URL
              value: "<mongodb-url>"
            - name: APPLICATION_URL
              value: "<application-url>"
            - name: API_URL
              value: "<api-url>"

Apply the deployment using:

bash
kubectl apply -f cognipeer-deployment.yaml

Ensure your Kubernetes cluster is properly configured to pull images from AWS ECR.

Post-Installation Configuration

Once the application is running, complete the following steps within the Cognipeer interface:

Add a Model

Navigate to the model management section and add a new model to the system.

Configure Workspace Settings

  • Go to the settings/workspace section.
  • Select the default model.
  • Enter the embedding model details as required.

After these configurations, the system will be fully operational.

Conclusion

You have now deployed Cognipeer on-premise using Docker (or Kubernetes) and completed the necessary post-installation setup. If you encounter any issues or need further assistance, please refer to our contact support.

Built with VitePress