Skip to content

Deployment Overview of Apache Solr on Server

Prerequisites and Basic Requirements

To ensure a successful deployment, the following requirements must be met:

  • Operating System: Ubuntu (specifically required for the automated installation steps).

  • Privileges: Root or sudo access is required to manage Docker and system directories.

  • Network/Ports:

  • Port 3000: Internal application port used by Apache Solr.

  • Port 443: External HTTPS port managed via the Nginx proxy.

FQDN of the final panel on the hostkey.in domain

The application is accessible via a specific subdomain generated based on the server ID.

Parameter Value
Prefix apache-solr
Domain hostkey.in
Full template apache-solr{Server_ID_from_Invapi}.hostkey.in

File and Directory Structure

The application uses the following directory structure for data persistence and configuration:

  • /opt/solr/data: Main data directory for Solr, owned by user 8983.

  • /opt/solr/data/data: Subdirectory containing security configurations.

  • /root/nginx: Directory containing the Nginx Docker Compose configuration.

  • /data/nginx/user_conf.d: Location for Nginx virtual host configurations.

  • /data/nginx/nginx-certbot.env: Environment file for Certbot settings.

Application Installation Process

The installation process involves setting up the environment, configuring security, and launching the application via Docker.

  1. System Preparation: The system ensures that necessary directories exist with specific ownership (8983:8983) and permissions (0755).

  2. Security Configuration: A security.json file is placed in /opt/solr/data/data/ to bootstrap the Solr security settings.

  3. Container Deployment: The Apache Solr container is launched using Docker with the host network mode enabled.

  4. Authentication Setup: Upon initial startup, the system uses the Solr Authentication API to set a custom administrative password for the root user.

  5. Proxy Configuration: An Nginx proxy service is deployed via Docker Compose in /root/nginx to handle SSL termination and traffic routing.

Access Rights and Security

  • File Permissions: Data directories are restricted to specific UID/GID (8983) with mode 0755. The security configuration file is set to 0640.

  • Authentication: The application uses a bootstrap process to establish administrative credentials via the Solr Authentication API.

  • SSL/TLS: Traffic is secured using SSL certificates managed by Certbot through an Nginx proxy.

Docker Containers and Their Deployment

The deployment utilizes two primary containers:

Apache Solr Container

  • Image Name: solr:9

  • Ports: Internal port 3000 (mapped via host network).

  • Volumes: /opt/solr/data mapped to /var/solr.

  • Environment Variables:

  • SOLR_PORT=3000

  • Restart Policy: always

  • Network Mode: host

Nginx Proxy Container

  • Image Name: jonasal/nginx-certbot:latest

  • Volumes:

  • nginx_secrets:/etc/letsencrypt

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d

  • Environment Variables:

  • [email protected]

  • Restart Policy: unless-stopped

  • Network Mode: host

Application Update Instructions

To update the Apache Solr application, perform the following steps:

  1. Navigate to the directory containing the configuration (if applicable).

  2. Pull the latest images and restart the containers:

    docker compose pull && docker compose up -d
    

Location of Configuration Files and Data

  • Solr Data: /opt/solr/data

  • Security Config: /opt/solr/data/data/security.json

  • Nginx Compose File: /root/nginx/compose.yml

  • Nginx User Configurations: /data/nginx/user_conf.d

Available Ports for Connection

Port Service Access Type
443 Nginx (HTTPS) External
3000 Apache Solr Internal / Localhost
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×