Installing on Google Cloud
To deploy SearchAI on Google Cloud using a GPU server, you will need to set up a Google Cloud Compute Engine instance with a GPU, and then follow the SearchBlox installation steps for Ubuntu.
Steps to set-up a GPU Server on Google Cloud
Follow the following steps to set-up GPU Server on Google Cloud:
- Google Cloud Account and Project:
- Ensure you have a Google Cloud account and a project created.
- Enable the Compute Engine API for your project.
- GPU Quota:
- Google Cloud requires GPU quotas. You might need to request an increase for the desired GPU type in your chosen region/zone. You can check GPU availability and request quota increases in the Google Cloud console under IAM & Admin > Quotas.
- Choose a GPU Model and Machine Type:
- Select an appropriate GPU model (e.g., NVIDIA T4, L4, A100, H100) and a compatible machine type. Different GPU models are available in specific regions and zones.
- For machine learning and data processing workloads, accelerator-optimized machine types are ideal.
- Create a VM Instance:
- Navigate to "Compute Engine" > "VM instances" in the Google Cloud console.
- Click "Create instance".
- Name your instance and choose a Region and Zone where your selected GPU type is available and your quota is approved.
- Under "Machine configuration", select "GPU" and then choose your desired GPU model and Number of GPUs. This will automatically suggest compatible machine types (e.g., G2 series for L4 GPUs).
- Boot Disk: Select an Ubuntu LTS image (e.g., Ubuntu 20.04 LTS or 22.04 LTS), which aligns with the SearchBlox installation guide. Ensure the disk size is sufficient (e.g., 100 GB SSD is recommended for better performance).
- Firewall: Allow HTTP and HTTPS traffic (ports 80 and 443). You may also need to open port 8443 for SearchBlox.
- Install NVIDIA drivers automatically: When creating the VM, there's often an option to automatically install NVIDIA GPU drivers. Enable this option if available. If not, you will need to install them manually after the VM is created.
- Review all settings and click "Create".
- Install NVIDIA Drivers and Container Toolkit (if not automated):
- After the VM is created, connect to it via SSH.
- Follow NVIDIA's instructions to install the appropriate drivers for your GPU and the NVIDIA container toolkit, especially if you plan to run SearchAI PrivateLLM in a containerized environment. This is crucial for the VM to recognize and utilize the GPUs.
Install SearchBlox Service on GPU Server
Prerequisites
-
Install OpenJDK 21:
SearchBlox requires Java to run. Install OpenJDK 21 using the following commands:sudo apt install openjdk-21-jdk
Verify the Installation:
java -version
Ensure the output shows OpenJDK 21.
-
Install wget:
wget is required to download files from the internet. Install it using:sudo apt-get update sudo apt-get install wget
-
Install Dependencies for Dynamic Auto Collection Crawler:
Install the following libraries:sudo apt-get install libxkbcommon0 libgbm1
-
Set vm.max_map_count:
Edit the/etc/sysctl.conf
file to set thevm.max_map_count
value:sudo vi /etc/sysctl.conf
Add the following line:
vm.max_map_count=262144
Apply the changes:
sudo sysctl -p
-
Increase File Descriptor Limit:
Edit the /etc/sysctl.conf file to increase the file descriptor limitsudo vi /etc/sysctl.conf
Add the following line:
fs.file-max=100000
Apply the changes:
sudo sysctl -p
- Set ulimit Values:
Edit the /etc/security/limits.conf file to set soft and hard limits:Add the following linessudo vi /etc/security/limits.conf
* soft nofile 100000 * hard nofile 100000
- Enable pam_limits
Edit the /etc/pam.d/common-session file:Add the following linesudo vi /etc/pam.d/common-session
session required pam_limits.so
- Reboot the Server:
Reboot the server to apply all changes:sudo reboot
- Verify ulimit Settings:
After rebooting, verify the ulimit settings:ulimit -a ulimit -Sn # Check soft limit ulimit -Hn # Check hard limit
SearchBlox Installation
-
Login as Root:
If you are not the root user, switch to the root usersudo su
-
Create a SearchBlox User:
Create a dedicated user for SearchBlox. Follow the prompts to set a password and provide necessary details.sudo adduser searchblox
-
Navigate to the /opt Directory:
SearchBlox must be installed in the /opt folder. Change to the /opt directory:cd /opt
-
Download the SearchBlox Debian Package:
Download the SearchBlox Debian package using wget:sudo wget https://d2fco3ozzrfhhd.cloudfront.net/v11.1.0.3/searchblox_11.1.0.3-0_all.deb
-
Install the Debian Package:
Install the downloaded package using dpkg:sudo dpkg -i searchblox_11.1.0.3-0_all.deb
-
Set Permissions:
Change ownership and permissions for the SearchBlox directories:sudo chown -R searchblox:searchblox /opt/searchblox sudo chmod -R 755 /opt/searchblox/bin sudo chmod -R 755 /opt/searchblox/opensearch/ sudo chmod -R 755 /opt/searchblox/logs sudo chmod -R 755 /opt/searchblox/connectors
-
Install and Run SearchAI PrivateLLM:
Follow the instructions in the SearchAI PrivateLLM documentation to install and run theSearchAI PrivateLLM
andollama.service
. -
Start the SearchBlox Service:
Start the SearchBlox service using systemctl:systemctl start searchblox
-
To stop SearchBlox service, use
systemctl stop searchblox
To Check the Status of the SearchBlox Service:
systemctl status searchblox
Verify Installation
-
Access the SearchBlox Admin Console:
Wait for 30-60 seconds after starting the SearchBlox service.
Open a web browser using the end point:https://<localhost or IP>:8443/console
-
Log in to the Admin Console:
Setup the Super Admin Password.Login using the updated username and password.
-
Verify the Service Status:
If the Admin Console loads successfully, the SearchBlox service is running correctly.
Check the Status Log File
- Navigate to the Logs Directory:
The status log file is located at:
/opt/searchblox/webapps/ROOT/logs/status.log
- View the Log File:
Use the following command to view the log:
cat /opt/searchblox/webapps/ROOT/logs/status.log
- Confirm Successful Startup:
Look for the message:
SearchBlox Started
- Troubleshoot Errors:
If the service fails to start, the status.log file will contain error messages or warnings that can help identify the issue.
Common issues include:- Port conflicts (ensure port 8443 is free).
- Incorrect file permissions (verify permissions for /opt/searchblox).
Verify that the /opt/searchblox directory and its subdirectories have the correct permissions:sudo chown -R searchblox:searchblox /opt/searchblox sudo chmod -R 755 /opt/searchblox
- Missing dependencies (ensure Java and other prerequisites are installed).
GPU
- Confirm GPU Usage: After configuring and integrating SearchAI PrivateLLM, monitor your GPU usage on the VM using tools like nvidia-smi to ensure SearchAI is properly utilizing the GPU.
Additional Resources
-
To learn more on Troubleshooting visit: Logging and Troubleshooting
-
To learn about accessing SearchBlox visit: Overview of SearchBlox
-
To learn about tuning after installation visit: Installation Tuning
SearchBlox Admin Console Access using IP Address or Domain Name
- Using IP Address:
Replace localhost with your server's IP address in the URL:https://<your-server-ip>:8443/console
- Using Domain Name:
If a domain name is mapped to your server's IP address, use the domain name in the URL:https://exampledomain:8443/console
Important Notes
- Port Number: By default, SearchBlox uses port 8443. Ensure this port is open and accessible in your firewall or security group (if using a cloud instance like AWS EC2).
- HTTPS: SearchBlox uses HTTPS for secure communication. Ensure your browser trusts the SSL certificate (self-signed certificates may require manual approval).
- Domain Configuration: If using a domain name, ensure the DNS records are correctly configured to point to your server's IP address
NOTE:
- This deployment article combines the necessary Google Cloud GPU setup with the SearchBlox installation on Ubuntu, providing a comprehensive guide for your SearchAI v11.1.0.3 deployment.
- References:
Overview of creating an instance with attached GPUs | Compute Engine Documentation | Google Cloud
Steps to Install and Run SearchAI PrivateLLM
To install and run SearchAI PrivateLLM after completing the SearchBlox installation, follow the steps below. This process involves downloading the PrivateLLM Models, setting up the ollama.service, and starting the service.
- Download the Models Folder:
Download the PrivateLLM Models from the provided link:
SearchAI PrivateLLM Models
Extract the downloaded models folder. - Replace the Models Folder:
Navigate to the/opt/searchblox/ollama/models
directory and replace the existing models folder with the downloaded one.cd /opt/searchblox/ollama/models
- Create the ollama.service File:
- Navigate to the
/etc/systemd/system/
directory:
cd /etc/systemd/system/
- Create a new service file named ollama.service:
sudo vi /etc/systemd/system/ollama.service
- Navigate to the
Add the following script to the ollama.service file:
[Unit]
Description=Ollama Service
After=network-online.target
[Service]
WorkingDirectory=/opt/searchblox/ollama/bin
ExecStart=/opt/searchblox/ollama/bin/ollama serve
User=root
Group=root
Restart=always
RestartSec=3
Environment="OLLAMA_MODELS=/opt/searchblox/ollama/models/"
[Install]
WantedBy=default.target
Then save and exit the file.
- Set Execute Permissions:
Provide execute permissions for the ollama.service file:Also, set execute permissions for the ollama binary:sudo chmod 755 /etc/systemd/system/ollama.service
sudo chmod 755 /opt/searchblox/ollama/bin/ollama
- Reload Systemd Daemon:
Reload the systemd daemon to apply the new service file:sudo systemctl daemon-reload
- Start the Ollama Service:
sudo systemctl start ollama
- Verify the Models:
Check the list of available models by running:./opt/searchblox/ollama/bin/ollama list
- Download the Model:
Download the model using the command below:./opt/searchblox/ollama/bin/ollama pull qwen2.5
- Stop the Ollama Service (Optional):
To stop the ollama service, use:sudo systemctl stop ollama
- Enable Auto-Start on Reboot:
To ensure the ollama service starts automatically on system reboot, enable it:sudo systemctl enable ollama
Updated about 17 hours ago