HUB
Sign inSign up
flight-deck-solr logo

ten7/flight-deck-solr

By ten7

•Updated about 6 years ago

A minimal Solr container for Drupal sites.

Image
0

100K+

ten7/flight-deck-solr repository overview

Flight Deck

⁠Flight Deck Solr

Flight Deck Solr is a minimalist Solr container for Drupal sites on Kubernetes and Docker. You can use it both for local development and production.

Features:

  • ConfigMap-friendly YAML configuration
  • Supports multiple cores
  • Supports custom cores via ConfigMaps or volumes

⁠Tags and versions

There are several tags available for this container, each with different Solr and module support:

Solr versionTagsSearch APIApachesolrCustom cores
8.6.08.6, 8yesnoyes
6.6.66.6, 6, latestyesnoyes
5.5.55.5, 57.x-1.x7.x-1.xyes

⁠Configuration

This container does not use environment variables for configuration. Instead, the flight-deck-solr.yml file is used to handle all configuration.

---
flightdeck_solr:
  port: 8983
  cores: []

Where:

  • flightdeck_solr.port is the port on which to run Solr. Optional, defailts to 8983.
  • flightdeck_solr.cores is a list of cores to create.
⁠Defining cores

This container supports multiple cores by defining an item under the flightdeck_solr.cores item:

---
flightdeck_solr:
  port: 8983
  cores:
    - name: "my_custom_core"
      type: "custom"
      confDir: "/solr-conf"
      dataDir: "/solr-data"

Each item has the following variables:

  • name is the name of the solr core. Required.
  • type is the type of Solr core to create. Required, must be custom or empty.
  • confDir is the path inside the container at which the schema files are mounted. Required for custom cores.
  • dataDir is the path inside the container at which the core data is to be stored. Optional, defaults to /data/<name_of_the_core>.
⁠What about Search API?

Flight Deck Solr supports Search API as fully custom cores. This is due to changes in how Search API Solr works, which requires you to generate a config.zip under Admin > Config > Search and metadata > Search API.

  1. First, create an empty core using this container.
  2. Generate the config.zip in Drupal.
  3. Update your docker-compose.yml to mount the extracted *.zip at the path specified by confDir.
  4. Update your flight-deck-solr.yml to be a custom core type.
  5. Restart the solr container.

⁠Deployment on Kubernetes

Use the ten7.flightdeck_cluster⁠ role on Ansible Galaxy to deploy Solr as a statefulset:

flightdeck_cluster:
  namespace: "search"
  configMaps:
    - name: "solr_config"
      files:
        - name: "flight-deck-solr.yml"
          content: |
            flightdeck_solr:
              cores:
                - name: "my_custom_core"
                  confDir: "/config/my_custom_core"
  solr:
    configMaps:
      - name: "solr_config"
        path: "/config/my_custom_core"

⁠Using with Docker Compose

Create the flight-deck-solr.yml file relative to your docker-compose.yml. Define the solr service mounting the file as a volume:

version: '3'
services:
  solr:
    image: ten7/flight-deck-solr
    volumes:
      - ./flight-deck-solr.yml:/config/solr/flight-deck-solr.yml
    ports:
      - "8003:8983"

⁠Part of Flight Deck

This container is part of the Flight Deck library⁠ of containers for Drupal local development and production workloads on Docker, Swarm, and Kubernetes.

Flight Deck is used and supported by TEN7⁠.

⁠Debugging

If you need to get verbose output from the entrypoint, set flightdeck_debug to true or yes in the config file.

---
flightdeck_debug: yes

This container uses Ansible⁠ to perform start-up tasks. To get even more verbose output from the start up scripts, set the ANSIBLE_VERBOSITY environment variable to 4.

If the container will not start due to a failure of the entrypoint, set the FLIGHTDECK_SKIP_ENTRYPOINT environment variable to true or 1, then restart the container.

⁠License

Flight Deck is licensed under GPLv3. See LICENSE⁠ for the complete language.

Tag summary

Content type

Image

Digest

Size

218.5 MB

Last updated

over 7 years ago

docker pull ten7/flight-deck-solr